12-07-2016 01:25 PM
I am attempting to work with a LeddarTech M16. The device communicates over RS485 using the Modbus protocol. I've wired the RS485 output on the device to a RS485-RS232 converter to a RS232-USB dongle. I am able to see the sensor in my Device Manager, and am able read data from the company provided software GUI. I would like to integrate this sensor with LabVIEW now.
The first step is that I want to send a function code, '0x11', and read the response. Per the sensor manual, I expect the response to follow:
I've looked into this library, but am not sure where to begin. I can create a new Serial Modbus Master Instance, but I don't see how to send an object function code such as '0x11' and read the response. Any advice where to start? I've never worked with Modbus before.
12-08-2016 05:46 PM
Hi pb3,
I think the Read Device Identification.vi if might be related with what you are looking for
That VI is intended to read information from the device as the one in your table.
Regards,
And G
NI
12-15-2016 12:39 PM - edited 12-15-2016 12:49 PM
Here is what I tried.
Received the following error message:
12-16-2016 01:08 PM
Are you able to read/write regular Modbus registers? The error you are seeing seems to be related with some type of configuration on the serial connection (cable, baudrate, etc)
Regards,
And G
01-03-2017 02:00 AM
Hi,
The interface reports a parity error. So ModBus communication cannot work at all.
Reason for the parity error is wrong parity setting (easy to check) or a bad RS-485 interface.
Do you get a parity error on every try ??
Kees
01-03-2017 05:41 AM
Yes, every try
01-03-2017 06:08 AM
Did you check the parity setting of your ModBus slave ?
01-03-2017 06:10 AM
Yes, I'm using the specified parity settings. The RS485 line should be fine as the sensor works with the manufacturers software.
01-03-2017 06:20 AM
So your device is using even parity ??
01-04-2017 06:39 AM
It is even parity, but I can configure the device to be even, odd, none.