Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

SV URL is malformed but does not generate an error

My original URL was:

 

\\192.168.0.9\PowerUnit (HMI)\test_var

 

This did not generate an error in my DS Write and also the DS Open call was generating a valid refnum

 

I finally realized that I needed the URL to be:

 

\\192.168.0.9\PowerUnit (HMI)\'test_var'

 

and then everything started working correctly.

I was just wondering why the DS Open was generating what looked like a valid refnum and why the

subsequence DS Write did not generate an error?

 

0 Kudos
Message 1 of 2
(1,866 Views)

sachsm,

 

I have found a KB for you that just shows the simple way to communicate with the DS API, but you seem to already know that.

How Do I Read/Write to a Shared Variable with the DataSocket API?

 

It seems that there are one of two options that are possible. Either you have two different shared variables with the names of : test_var AND 'test_var' and your variable with the name of test_var is just not behaving as expected.

 

Or, the  ItemName: test_var, which is passed as the ItemID along with the AccessPath can not be distinguished as such, and is not going to the desired variable.  Hopefully this helps you some!

 

 

Chris Van Horn
Applications Engineer
0 Kudos
Message 2 of 2
(1,844 Views)