LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI OPC Servers "Unable to write to address "x" to the device "y" : Device responded with exception code 1"

Hello!

I have a problem and i don't wknow how to resolve it.

i have one PLC with GSM card. I receive the information from it by NI opc Server 2013 (i created an opc server with some variable who i need). In labview, I configurated each variable with "data binding"->"Shared variable engine"-> path: in "Project Items" i selected "my computer->myLibrary->variableOne".

The problem is that when i try to modify an boolean variable(who is also writing and reading) , that variable change in my VI but in PLC remain the same; And in the OPC server i see the mesage: Source:"Modbus TCP/IP Ethernet" EVENT: "Unable to write to address '400010.3' on device 'myOPCServer': Device responded with exception code 1."

I noticed that i have, for example, a numeric control(that i have set the same as before) , when i try to modify that numeric control  it works, and i see also in the PLC.

The main problem is to modify the boolean variable.

 

Thanks for your time and advise. Marius

0 Kudos
Message 1 of 5
(6,446 Views)

Hi Marius,

 

Have you ever had this configuration working or is this the initial set-up of the system?  It seems like there is a missed catch of the data change.  Is it possible that there is a timing problem that is preventing the boolean to update? Are you calling both the working variable (the numeric) and the nonworking variable from the same VI? If you are able to test using a separate VI that calls to the same input that the boolean is currently calling to, it would help narrow down where the problem is located.  Have you verified the line you are writing to is available to read?

Kelli Kravetz
Product Marketing Manager
LabVIEW, LabVIEW NXG, LabWindows/CVI, Measurement Studio
National Instruments
0 Kudos
Message 2 of 5
(6,398 Views)

Hello Kelli!

I have removed the numeric control and i tried to call just boolean buttons, but it did not work. The boolean variable was saved in NI OPC Server also to read and write. When it run the VI i see the boolean changes (like the screen of PLC), and also when change the boolean variable it's work in the VI, but it does not work in the PLC. 

I attached the VI, maybe you can help me.

 

PS: I have to say it's the first time when I use OPC Server.

0 Kudos
Message 3 of 5
(6,380 Views)

Hi Marius,

 

Unfortunately, it is a little difficult to pinpoint exactly what is causing the problem you are seeing, but I have a few suggestions to help narrow the options down. If you open up the properties for each of the controls, can you verify that the correct path is selected under the data binding selection? If for some reason it didn't, reselect the path and try it again.  

 

My next step if that doesn't work is to open the NI Distributed System Manager (DSM) from the start menu in your programs and navigate to your OPC.  If it is local, look under My Systems or if it is on the network, it would be located under Network Items.  Once you find your OPC, it should list out the variables from your project.  While you have this screen visible, try running your project from LabVIEW and changing the value of the Boolean.  Does the value update in the DSM panel?  

 

While the DSM is open, it gives you the ability to set the value of the variable in addition to viewing it.  If you change the value there and hit the Set button, does it change on the PLC?

Kelli Kravetz
Product Marketing Manager
LabVIEW, LabVIEW NXG, LabWindows/CVI, Measurement Studio
National Instruments
0 Kudos
Message 4 of 5
(6,344 Views)

Hi Kelli !

Fortunately, I searched more in the NI OPC Help,  exactly, Modbus TCP/IP and I found at the settings a checked fuction. My PLC who is configurated in the particular way and I could not write just a bit if the fuction is checked.

Thank you very much for your time and your advises.

0 Kudos
Message 5 of 5
(6,323 Views)