BS2 to PLC via RS485
anthr4x
Posts: 3
Hello, I'm new to the world of Basic Stamps and am having some trouble getting my BS2 to communicate with my PLC over RS485.
When I send this:
SEROUT 6,baud, [noparse][[/noparse]DEC 48,DEC 49,DEC 50,DEC 51,DEC 52,DEC 53,DEC 54,DEC 55]
My PLC is receiving:
83 83 d0 b0 90 70 50
If I send:
SEROUT 6,baud, [noparse][[/noparse]HEX 48,HEX 49,HEX 50,HEX 51,HEX 52,HEX 53,HEX 54,HEX 55]
I receive this:
99 f0 83 06 2e
If I send:
SEROUT 6,baud, [noparse][[/noparse]48, 49, 50, 51, 52, 53, 54, 55]
I receive randomly:
f0 46 c6 19 93
a3 c6 19 93
46 c6 19 93
I am using this http://www.sparkfun.com/commerce/product_info.php?products_id=9083
It uses a MAX485 CSA chip.
Can anyone make sense of what I'm receiving?
When I send this:
SEROUT 6,baud, [noparse][[/noparse]DEC 48,DEC 49,DEC 50,DEC 51,DEC 52,DEC 53,DEC 54,DEC 55]
My PLC is receiving:
83 83 d0 b0 90 70 50
If I send:
SEROUT 6,baud, [noparse][[/noparse]HEX 48,HEX 49,HEX 50,HEX 51,HEX 52,HEX 53,HEX 54,HEX 55]
I receive this:
99 f0 83 06 2e
If I send:
SEROUT 6,baud, [noparse][[/noparse]48, 49, 50, 51, 52, 53, 54, 55]
I receive randomly:
f0 46 c6 19 93
a3 c6 19 93
46 c6 19 93
I am using this http://www.sparkfun.com/commerce/product_info.php?products_id=9083
It uses a MAX485 CSA chip.
Can anyone make sense of what I'm receiving?
Comments
2) The MAX485 is a half duplex RS485 driver. The SparkFun documentation link gives no information about how the direction of the MAX485 is controlled. How do you have things hooked up?
-Phil
Edit: What PhiPi says is very true.
Post Edited (allanlane5) : 4/6/2010 4:47:22 PM GMT
-Phil