From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus (RS485) and Automation Direct GS2 Example

Solved!
Go to solution

From what I understand this error typically means a value contained in the query data field is not an allowable value for the slave. I would double check this. Also, even though the issue is similar you will probably have more luck creating a new post for this issue for better visibility! 

CH
Applications Engineering
National Instruments
http://www.ni.com/en-us/support.html
0 Kudos
Message 11 of 13
(761 Views)

Hi,

 

Never used ModBus ASCII, only RTU, but from what I know I think the command is missing one byte.

01 = Slave address

06 = Command write register

091B = Register address

00 = The data should two bytes

01D4 = The check is also two bytes

 

So either the check or data is missing one byte. If you use the ModBus lib I would not expect this.

Maybe this is Ok for ModBus ASCII. But like I said I never used MB ASCII and I never use the lib.

 

Kees

 

0 Kudos
Message 12 of 13
(755 Views)

Yes, you are correct I was missing data.   I found out that you can edit the Int to display leading and trailing zeros and define how many.  That fixed that problem.  The other issue I had was that you need to go into the GS2 manually and tell it that commands are going to be sent using the RS485.  This was the crux of my problem.  The GS2 will save any settings made.  The default was to read from the control panel.  I changed it to read from the RS485 and to lock the control panel.    

0 Kudos
Message 13 of 13
(722 Views)