LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binded variables change value of modbus PLC variable when application starts

Hello,

 

I have a front panel with controls binded to some shared variables that use a modbus server to control a PLC. There is no logic behind that front panel, all I want to do is to be able to read/write some variables on the PLC.

 

I binded the control with datasocket. The reason I did not use PSP is that I would like to bind the controls programmatically so if the client change the server (that holds the library and the citadel BD) the only thing he would have to do is to change the name of the server in the configuration file. It's seems that there is a bug in the Data Binding:Path Property and it always return me an error when I try to bind dynamically (Which is not the case with the DataSocket:URL Property) .

 

Now the PROBLEM: 

 

Lets say a certains variable on the PLC holds the value 10. When I open my panel, I can see that value (10) a very short moment (milliseconds) and the value shifts to '0'. That undesirable '0' is indded written on the shared variable on the server and on the PLC. After that I can change the same value back and everything works properly. Its seems to me that the problem occurs only at the first connection. Same thing apend with booleans controls.

 

I would like to be able to open my application, see the '10' in my control, update it if I want, close the application and get the last value when I re-open it.

 

I'm running an executable with the DSC run-time.

 

Thanks in advance for your help!

 

Vincent

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

Hello Vincent,

 

This was reported to R&D (#161821) for further investigation.  I noticed that this only happens for controls in subVIs.  Perhaps you could restructure your program so that it no longer needs to view the front panel of its subVIs.  I will let you know if I find any other workarounds.  Thanks for the feedback!

0 Kudos
Message 2 of 2
(2,676 Views)