02-24-2015 04:04 AM
I was playing around with OPC and using the DataSocket pallete. Although I've used it reliably for a while and am content, I was baffled by one error. I was hoping someone could explain why this error occurs or how to solve it.
In the NI Distributed System Manager I've created an Shared Variable of the type single, with Read/Write access.
Problem
When writing a value less or equal to 0 to an OPC URL, I get an error 42. When using the equivalent PSP URL, I don't get it.
Using this VI snippet code.
I get these paths and errors:
This error 42 comes for all values below zero and for zero. For all positive values I don't get this error. What's the reason for this behaviour? In my humble opinion this is not wanted behaviour, as OPC tags should accept the whole value range of the single.
02-24-2015 04:15 AM - edited 02-24-2015 04:16 AM
I didn't mention it well enough, but this is true for Single-precision floating-point number (SGL). When selecting in the NI Distributed System Manager the value of the type Double-precision floating-point number (DBL), I don't get this error. However, most clients are storing values in the type SGL instead of DBL, so therefor this data type was selected.
02-25-2015 07:46 AM
So is it a feature or a bug?
03-06-2015 03:21 AM
I was still hoping someone would respond.
For all details, I'm using LV2013 SP1 32-bit, NI Distributed System Manager 2013.
The interesting thing is that for the above example I was using the method ReadWrite and would create the Error 42. However, when I'm using the method Write, it won't create any error, but any negative value is simple not written to the Shared Variable ...
03-11-2015 08:51 AM
Hello,
I think that the problem is that you have "space" in the OPC URL. -> opc://localhost/National Instruments......
Can you try to put the variable to different URL (without spaces) and see if it works? Here is some useful info for DSC:
http://www.ni.com/pdf/manuals/372946d.pdf
Check it out and let me know if this solves your issue.
Best,
Bozhidar
03-18-2015 03:48 AM
White spaces are allowed in OPC URLs, so that cannot be the issue.
I've tested with another LV2013 computer and NI Distributed System Manager 2013 and got the same errors. However, when I tested it on a LV2012 and NI DSM 2012 it was all working. Quite strange.
Now I'm wondering if it's something local or that the bug was introduced in the 2013 distribution and if it has been solved in the 2014 version ...
Could someone test it on LV2013 and/or LV2014, just to check if the problem occurs for other installations in LV2013 and if the problem has been solved in LV2014? Please indicate LV version and DSM version.