07-06-2022 08:52 PM
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?
07-07-2022 01:30 AM
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.
07-08-2022 02:54 AM
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