Beck4 Posted April 15, 2009 Report Share Posted April 15, 2009 I also posted this in the NI forum here: http://forums.ni.com/ni/board/message?boar...thread.id=35223 Trying to communicate with a master device using the Modbus library 1.2 and LV 8.5. We've matched all the serial parameters I think (9600, 8 data, parity None, 2 stop, no flow). But when I run the Serial Slave example, we see nothing in the holding registers. The master is using function 16 (write mult. registers). Should Read All Holding Registers work then? Master is writing to register address 0x01 if it matters. We've confirmed correct data is being sent and that the serial port (PXI-8430) is working. I changed the serial settings in MAX as well, but are the advanced ones there critical? Anything else to check? Is there another VI I can use? Thanks. Quote Link to comment
malef Posted April 16, 2009 Report Share Posted April 16, 2009 thx for info there is a new release of Modbus library. In 2006 two errors have been reported to forums. 1. "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." - Jim Gruenbacher - Feb 21, 2006 This seems to be fixed in current Version. 2. "The 'MB Registers Manager.VI' is used as the repository for the Slave registers. In the case of Write, however, the Start Address is not being taken into account (compare this with the Read cases to know what I mean). The Start Address defaults to 0, always! The fix is to wire-in the Start Address to the Index input of the Array Subset primitive. This alongwith the (already present) Length input should write to the correct set of registers, coils, etc." - Khalid - March 18, 2006 This has not been fixed by NI up to now and may cause trouble. :thumbdown: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.