Unity with M340 Topological Variable Error

Join Date
Apr 2016
Location
Arizona
Posts
44
I am trying to create a DFB that moves 16bits to Word, Word to INT, INT to Array of EBOOL. Basically a discrete output map. For the last function (Array to EBOOL) I created an Output Pin Called DO_Word to be visible on the DFB. I created a tag DO_2 (Array 0...15 of EBOOL) and tied it to the DO_Word Pin.

DO_2 = Array 0...15 OF EBOOL, Address %Q0.2.0.0.

The intent is to have 16 bits read directly into the DO Address. The card is in Rack 0, Slot 2.

I have done this in the other direction DI Address to bits, basically the opposite of above and it works fine. With this DO DFB though I get a message when I build: The topological variable is incorrect.

Any help would be appreciated.

Trent
 
I am trying to create a DFB that moves 16bits to Word, Word to INT, INT to Array of EBOOL. Basically a discrete output map. For the last function (Array to EBOOL) I created an Output Pin Called DO_Word to be visible on the DFB. I created a tag DO_2 (Array 0...15 of EBOOL) and tied it to the DO_Word Pin.

DO_2 = Array 0...15 OF EBOOL, Address %Q0.2.0.0.

The intent is to have 16 bits read directly into the DO Address. The card is in Rack 0, Slot 2.

I have done this in the other direction DI Address to bits, basically the opposite of above and it works fine. With this DO DFB though I get a message when I build: The topological variable is incorrect.

Any help would be appreciated.

Trent

Can you post a screenshot of the DFB, i am struggling to fully understand what you are doing without seeing it.

To map outputs from application to physical we normally just use WORD_TO_BIT
 
Attached you will see the tag created and the DI tag that does the same thing... only opposite.

Also attached is the DFB as I want to use it and the code inside the DFB.

Thanks again for any help possible.

Trent

Tag that gets error.jpg DFB with Tag.JPG DFB Logic.JPG
 
What I don't understand is why you want move 8 bits to byte and then to array.
You could easily move them directly to %Q address with eight move blocks
 

Similar Topics

Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
967
Hello. I'm trying to set up an M340 with a BMX AMO 0410 and a BMX AMI 0410 in Unity Pro XL 13.1. While trying to set up the IODDT for the card...
Replies
8
Views
4,172
Greetings, I'm new at PLC programming, but good a logic - so I thought. I've inherited a PLC system, which is presently operating in the field...
Replies
6
Views
2,486
If I am disconnected from M340, I cant see the Values. Unlike RSLogix when one gets to choose upload state values upon exit, and these state...
Replies
4
Views
2,264
I am trying to make a function that count the number of True BOOL inn a specific Array and return the count to an INT AlarmArrayActiveAlarms. I...
Replies
8
Views
4,442
Back
Top Bottom