12-13-2014 04:30 PM
I'm using LV 2013 32bit on W7-64bit. I'm talking to an industrial controller using Modbus over Ethernet. My current software uses the DSC modbus interface, in which I define the Modbus bus itself within a library in the project, then define each Modbus point as an address inside that modbus definition. Inside LabVIEW, you can then get to the Modbus data via Shared Variables. I am currently using the dynamic shared variable calls, rather than static shared variables. I have points that are Boolean (coils) and Reals, with some Read Only and some Read/Write. In general, all of this works.
However, there is one Read/Write Real that acts funny. If I set it to a new value or if the industrial controller sets it to a new value, the industrial controller gets the new value. The shared variable engine on my computer even gets the new value, as can be verified by opening the Distributed System Manager. But LabVIEW continues to read the old value, with no errors. Other Read/Write points work fine, and I've looked over the address definition several times and can't find any reason why this point should be any different than the others.
Does anyone have any ideas why the DSM can see a new value of a shared variable, but LabVIEW continues to get the old value? I've looked at the init case for the dynamic SV's, and I can't see any options there that I can tweak to try to resolve this. My next attempt will be to rewrite the entire sub-system so that it uses NI's latest Modbus library and skips the whole DSC thing. That will probably be much better for other reasons as well. I've noticed that with DSC and Shared Variables, the first time the program runs it gets started pretty quickly, but subsequent runs can take up to two minutes to connect to all the SV's.
Thanks,
DaveT
Solved! Go to Solution.
12-14-2014 03:53 PM
Never mind. I think I found the issue. A minor configuration bug in my own code...
01-13-2015 12:19 PM
01-13-2015 12:58 PM
Sorry, I can't help you in this case. The config error was within my own software configuration. I was just telling it to do the wrong thing. Nothing that could be useful for anyone else.
I hope you figure out your issue. I know how maddening that can be.
DaveT