Shop OBEX P1 Docs P2 Docs Learn Events
RS232 output from a BS2 is different then RS232 from a computer??? PLEASE HELP! — Parallax Forums

RS232 output from a BS2 is different then RS232 from a computer??? PLEASE HELP!

Grant_OGrant_O Posts: 36
edited 2006-04-25 14:18 in BASIC Stamp
Ok so most of my projects that involve RS232 ASCII communications work great, but IV been beating my head agents the desk on this project.
·
What I have is a Yaskawa linier stage controller that is controlled by RS232 ASCII. When I connect it to the Com port on my computer and type in the commands through HyperTerminal it works fine. But when I connect it to the APPmod RS232 port on the BS2 and send the exact same code, it doesn’t respond. I also plugged the BS2's port into my computer and I see the ASCII code as it’s supposed to be. is there a difference in the signal / noise. it is on a transformer power supply and the ocilliscope says its a little noisey when improperly grounded.·but yea Iv also tried tuneing the baud rates of the BS2·from 70 -to- 90 but i think 84 is the best and i cant change the baud on the Yaskawa, well... i can go up in speed with it but 9600 is as low as it goes. man this is bugging the heck outa me!
·
Code Iv tried:
·
SEROUT 2, 84, [noparse]/noparse][color=red]"SH"[/color], [color=purple]CR[/color
·
"and/or"
·
SEROUT 2, 84, [noparse]/noparse][color=red]"SH"[/color], [color=black]13[/color
·


and iv tried
·
SEROUT 2, 84,· [noparse]/noparse] [color=red]"S"[/color

PAUSE 100

SEROUT 2, 84, [noparse]/noparse][color=red]"H"[/color

PAUSE 100

SEROUT 2, 84, [noparse]/noparse][color=purple]CR[/color
·
nothing seems to work!!!!!!!!!
Please Help, i dont want to have to buy a whole nother computer just for this reason smhair.gif··
·

Post Edited (Grant_O) : 4/24/2006 11:53:41 PM GMT

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-04-25 00:12
    Have you tried 16468 for a Baudmode (just for yucks)?

    Another think, the Yaskawa to the PC is via a serial extension, right (male to female), right?

    In that event, using the DCE AppMod, you'll need a Null Terminal cable (with pin2 on A going to pin3 on B, pin3 on A going to pin 2 on B.)· Yes?

    [noparse][[/noparse] A Null Modem is a female-to-female, swapped as above, a Null Terminal is a male-to-male cable as above.· Others may not dig the difference.· They'll call it a "male-to-male null modem." ]

    So, what's the story, morning glory?




    Post Edited (PJ Allen) : 4/25/2006 12:20:17 AM GMT
  • Grant_OGrant_O Posts: 36
    edited 2006-04-25 00:38
    Yea, i tried a Null connection. still nothin... the only two baud rates i have optional are 9600 and 19200.

    i was thinking though.... i used the default settings in Hyperterminal minus the hardware flow control. but is the serial output of the Bs2 truly:

    9600 baud
    8 data bits
    no parity
    1 stop bits
    no flow control?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-25 01:06
    Since you're now going directly from the chip and not through an inverter, you need to use inverted mode.· Instead of embedding "magic numbers" into you SERIN/SEROUT statements, use the attached template; it will you get things right and you only need to change one place (Baud constant).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Grant_OGrant_O Posts: 36
    edited 2006-04-25 03:12
    Jon,

    Yea i guess i should have used a constant for the baud rate. But you say to use "inverted mode". What is that exactly? And how is it different from what im doing?

    thanks.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-25 03:30
    This is covered in the manual (hint, hint, grin) -- but what that means is that a start bit is high (logic 1); in true mode (what you're using) the start bit (and 1 bits) are at logic 0. If you're communicating with someth that normally connects directly to a PC serial port you need to use inverted mode (normally you would go through a level shifter that would invert the signal and transform to RS-232 levels).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Grant_OGrant_O Posts: 36
    edited 2006-04-25 06:32
    I thought that the Parallax #29120 RS232 DCE AppMod took care of all that?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-25 14:17
    You said when connected to Hyper Terminal the device communicates.· Is it possible it's using lines such as DTR and DSR?· Currently you are only supplying RX, TX, RTS and CTS.· You should check the device manual to see what lines it uses.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-25 14:18
    You're right, it does -- my miss that you're using the AppMod (it wasn't clear to me what you meant until now). So yes, use True mode. The best thing to do is connect the demo circuit an make sure you're getting data in and out of the AppMod.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.