LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket read stop but shared variable can update

Solved!
Go to solution

Hello ,

I program with datasocket open/read, sometimes the read stops and after some time,maybe 10s, it go on reading, I compare this with shared variable (DSC) and found

the shared variable can update ,I don't know what happen to my program.

( the reason I'd like to use datasocket is that I need to change the ULR dynamically , I have many OPC tags to read ( 100 PLCs time 80 tags per PLC )  )

thanks for your help!  

0 Kudos
Message 1 of 4
(2,630 Views)
Solution
Accepted by topic author apple2

Hi~

 

The read function waits for items to be updated, and 10ms is the default time for this waiting. Setting wait for updated value to false will probably solve this issue.

PS: URLs of variables could be changed programmatically, see this document if you like.

 

Good day

0 Kudos
Message 2 of 4
(2,606 Views)

Thank you Mr.Wang.

After setting wait for updated value to false, it works well.

Yes,URLs of variables could be changed programmatically,the reason I use datasocket is I don't like to create thousands of shared variable.(may be there is a smart way,I don't know how )

 

Thanks again !

 

0 Kudos
Message 3 of 4
(2,595 Views)

Thank you Mr.Wang.

After setting wait for updated value to false, it works well.

Yes,URLs of variables could be changed programmatically,the reason I use datasocket is I don't like to create thousands of shared variable.(may be there is a smart way,I don't know how )

 

Thanks again !

 

0 Kudos
Message 4 of 4
(2,595 Views)