LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

siemens PLC modbus tcp connect to labview

i searched file from web,MODBUS TCP controlled by labview , and i did a screen shoot as attached,

it is working , however , this program only write and read one type of data,bool or integrage or float , and there is one problem ,, wirte float to PLC, value will be a bit difference ,i think the reason is data tansformation by labview , singe precision -----u32---u16 array

i want to find another way read and write data to PLC, different data types ,could any body give me suggestion?

Download All
0 Kudos
Message 1 of 3
(1,082 Views)

Typically you can set a float value (single precision) by means of MODBUS writing two adjacent U16 registers. As far as I know a boolean value can be written as a MODBUS digital output or a register as integer. This depends on how the PLC memory is mapped into the MODBUS address space.

Another possibility is to use the SNAP7 library, which is a freeware licensed under LGPL.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 3
(1,054 Views)

 

HI Paolo!

Thank you for your replying!

absolutely , Labview could use MODBUS  write bool and integer value to PLC, there is one primise ,  only one type of data could be built in PORTAL software , i think it need to build different type of dada in one block

thank you for your SNAP7 LIBRARY sharing

0 Kudos
Message 3 of 3
(1,018 Views)