
adccommunitymod (AutomationDirect) asked a question.
Created Date: March 11,2004
Created By: idssteve
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I’m using an 06 port 2 for rs485 modbus to an Advantech ADAM 4018+ -B. Function code 3, holding register address 40001. Accurate values are coming through OK, but Com error sp117 is counting up at a rate of about 15 errors per minute. Capturing from the Exception Response buffer, V400 in the MRX instruction, it’s getting # 303, BCD. What does that mean??? Should I be reading this number in another format??? Convert to binary and it’s: 0000001100000011 Will sp117 necessarily be counting Exception Responses indicated in the MRX V400??? Sorry for newbe questions. Haven’t touched modbus for about 15 years and the 06’s MRX is a totally new experience. (mostly positive experience, I might add… http://forum1.automationdirect.com/board/wink.gif ) Thanks.
Created Date: March 11,2004
Created by: jackson
You need V400 and V401 to get the complete exception response. The data is byte swapped as well.
For example: if you were polling slave 1 for an address that does not exist in the device, you would see the value (in BCD) 8301 in V400 and c002 in V401, which arranged correctly indicate 01 83 02 c0. The first byte is the node address, the second byte is the function code with the high byte set (indication of exception response), the third byte is the actual error (illegal address error), the fourth byte is the high byte of the CRC (the low byte of the CRC is actually in V402 but you don't really need it).
The value that you indicate is in V400 doesn't really make sense to me. The value in V400 should always be 8xxx as I understand it. I would try to zero out V400 with Directsoft and see if it places that value back in to that location again.
Created Date: March 11,2004
Created by: idssteve
Thanks VERY much, Jackson. I didn't realize v401 and v402 were involved. All three values blink on very briefly (while sp117 is energized) and then return to zero on their own. I'm copying them into other registers while sp117 is "on".
The values are: (BCD) v400= 303, v401= 8E02, and v402= 35.
Does anything there make sense?
Where can I find documentation on this?
The "station #" for this device is assigned as #3.
Thanks again.
Created Date: March 11,2004
Created by: jackson
No, that doesn't make sense to me. I would expect that you would see a 8303 not a 303.
You may have to call tech support on that one.
The explanation for the exception response is in the MODBUS manual. Go to www.modbus.org to get it.
I'm not sure where the explanation for this is in the 06 documentation. I just happened to know MODBUS exception responses and I just kind of figured it out.
What you might want to do is isolate your code to make sure nothing else is over writing any of the v memory in your MRX instruction. Take your MRX rung and put it at the very top of the program and put an END statement right beneath it. Download that and see if you are getting the same results.
Created Date: March 11,2004
Created by: idssteve
Thanks once again, Jackson. I've started a new, from scratch, program with only 6 rungs of logic, so there's no writing to v400 from the ladder" but" ??? there's a H0-ECOM and an F0-2AD2DA-2 in the 06 " ??? at this point there's no ladder logic concerning either card"
Interestingly, if it weren't for the sp117 count, I wouldn't know there's a problem. The device and its info seem OK, otherwise. Leaving it this way this would, of course, be irresponsible without even knowing what v400-401 is trying to tell me"
Is this response strictly from the slave device? Or, can the master and/or MRX also be generating codes to v400???
I did a little searching on modbus.org, before posting here, but didn't find anything making sense of 303 " I'll do some real reading and call tech support tomorrow, if nothing else.
Many Thanks
Created Date: March 12,2004
Created by: jackson
In MODBUS, only a slave can generate an exception response since the master is the one that is forming a query.
I have seen RS485 echo problems before but it's hard to say. I wouldn't think that the PLC would put the data into the exception response buffer unless it saw the high bit (8x) of the second byte in the buffer.
You might want to try playing around with the timeout to see what happens. You may want to try a simple test of using the SP4 bit with a PD coil to trigger the MRX command to put a little space in between your polls just to see what happens.
Created Date: March 12,2004
Created by: jackson
In MODBUS, only a slave can generate an exception response since the master is the one that is forming a query.
I have seen RS485 echo problems before but it's hard to say. I wouldn't think that the PLC would put the data into the exception response buffer unless it saw the high bit (8x) of the second byte in the buffer.
You might want to try playing around with the timeout to see what happens. You may want to try a simple test of using the SP4 bit with a PD coil to trigger the MRX command to put a little space in between your polls just to see what happens.
Created Date: March 11,2004
Created by: idssteve
I'm using an 06 port 2 for rs485 modbus to an Advantech ADAM 4018+ -B. Function code 3, holding register address 40001. Accurate values are coming through OK, but Com error sp117 is counting up at a rate of about 15 errors per minute. Capturing from the Exception Response buffer, V400 in the MRX instruction, it's getting # 303, BCD. What does that mean??? Should I be reading this number in another format???
Convert to binary and it's: 0000001100000011
Will sp117 necessarily be counting Exception Responses indicated in the MRX V400???
Sorry for newbe questions. Haven't touched modbus for about 15 years and the 06's MRX is a totally new experience. (mostly positive experience, I might add" http://forum1.automationdirect.com/board/wink.gif )
Thanks.