08-05-2014 05:46 AM
Hello, I download modbus library 121 and add to the usr.lib. I start with the serial master example and serial slave example. And I increase both the master and slave discrete inputs to 32 inputs.
But when the communication is established, the third byte of discrete inputs will lose. And the forth byte of slave will become the third byte in master.
The vi is attached, and my labview version is 2012 sp1.
The communication is based on configure virtual serial port driver.
And I use SUDT SerialTrace to track the serial, the result is:
The master write 01 02 00 00 00 20 79 D2
The slave response 01 02 04 0F C7 AA 00 37 AB
which means the fouth data cover the third data and the forth data place become 00.
I wonder if anyone could help me. Thanks very much!
08-05-2014 06:57 AM
Have a look at all the reviews on the download site...
Error in code - Feb 21, 2006 By Jim Gruenbacher, Airgas. The "MB Modbus Command to Data Unit.vi" has a mistake in it. The "Write Multiple Coils" Function Code will not work properly past 8 bits of data. In case "15", the index to the "Split Array" VI should just be 8. Either that or you could remove the shift register and use an index array instead. The current implementation however corrupts the output data past 8 bits.