LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

erroneous value when SV bind to a SV

In LV 8.2 Shared Variable (SV) DSC, if I bind a SV (#2) to another SV(#1) binded to some address the the binded variable (#2) shows  erroneous values. Can someone confirm if this is true in 8.2 and/or 8.5???
0 Kudos
Message 1 of 5
(4,413 Views)

richjoh,

I setup a project in both LabVIEW 8.5 and LabVIEW 8.2, and both seemed to work properly with double binding to network published doubles.  I've seen issues with shared variables in 8.5, where a read immediately following a write to the same variable (with error cluster connecting the two) produces the wrong value.  A 35 ms wait seems mandatory (not sure how the SV engine is handling these seemingly synchronous operations).

Anyhow, you can take a look at the attached projects and see if they simulate your problem.  Some example code would be helpful.

Take care.

-B


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 2 of 5
(4,396 Views)

LabBean,

In my case I used a library using SV with an I/O server (modbus master) for a Watlow EZ Zone controller. So maybe this just applies to Modbus. I see your sample works just fine. Btw if you can connect some kind of hardware using SV you may find more delay is required between write and read (several seconds). NI is addressing this.

regards,
richjoh

0 Kudos
Message 3 of 5
(4,341 Views)
Hi richjoh,

Is SV#1 also showing erroneous values? Is SV#1 and SV#2 showing the same value? Have you connected the error output from the Shared Variable Nodes to indicators to see if you are getting any errors? Are the two shared variables in the same library or on different libraries? Are they hosted on the same computer?

Can you attach a project, Shared Variable Library, and VI with one shared variable bounded to Modbus and a second shared variable bounded to the first that reproduces this error? I have attached a zip file with my project. I was not able to reproduce the issue. To run my example, open the project, run Modbus Simulator.vi, and then run Update Bound Variables.vi.
0 Kudos
Message 4 of 5
(4,170 Views)

richjoh,

 

Please see my last post here:

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=356313&requireLogin=False

 

I've attached a project there which demonstrates operating characteristics of bound / unbound and buffered / unbuffered shared variables with respect to the new timeout terminal that is available with LabVIEW 8.6.

 

You mentioned "erroneous values".  A 25 ms intial wait followed by reads with 50 ms timeouts should alleviate this problem.  (A greater timeout may be necessary due to your hardware limitations.)  Also note that the buffer for bound shared variables ignores repeat values (even for unbuffered shared variables).

 

-Jason 


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 5 of 5
(2,744 Views)