LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tags does not updates simultaneously

I have a Vi that need to change four tags at one time. The four tags (0's and 1's) are a binary image of decimal address. The decimal address is a specific device to deal with it. I have 15 devices and the address of each one of them is a combination of binary numbers the Tag Engine gets from four tags. I generate the tags in Select..Case structure. The problem is that the Tag Engine doesn't update all fours at once. As a result from time to time I get nomber of another instrument than I requested. For example: no.5 in place of no.7 (0101 in place of 0111). The are hundred of tags from few clients on the server. I'm looking for method that can tell Tag Engine to update my four tags first and/or simultaneously and than to deal with the rest of the tags.
I tried to set a new tags group with it's specific update rate but it doesen't help.
When I separated the problem part of vi to another vi with .scf file contains just four tags there was not change to better.
Additional important information:
I'm working with Logos Server (When I go to Edit/Edit Tag/Connection/ I see "Logos" at Server Name box)

Thank you,
Nelly
0 Kudos
Message 1 of 4
(2,804 Views)
I had similar results when trying to read blocks of several hundred registers at a time. I ended up calculating the CRC-16 values, in plc logic, for each block of one hundered registers that I had to read. Then I made labview read all of the register blocks and CRC-16 value registers from the plc. Labview then calculated new CRC-16 values from the register blocks. I made the while loop read until the Labview CRC-16 values matched the plc CRC-16 values.

Another option may be to use the changed output from the read tag.vi, or the timestamps value and compare to previous values with a shift register.

I tend to think that the tag engine is not quite the same as working with plc logic. You just don't know how long it will take to update the tag values.
Message 2 of 4
(2,789 Views)
One more idea. Since your are interested in four bits, could you combine them into a single register value before reading into labview?? Then read a single register value and explode it into the bits that you need.
Message 3 of 4
(2,774 Views)
I second uncles register suggestion. All of the OPC servers I have worked with do register updates.

Tags are not globals and cannot be used as such. They are a great way to share a lot of info but when it comes to WHEN it will share is another story.

Handshaking may solve your problem but it has to well thought out.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,764 Views)