Announcement

Collapse
No announcement yet.

ASCII to Real or BCD

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • ASCII to Real or BCD

    I'm using RS-232 to communicate a value (degrees, from -360.00 to +360.00) to my D0-06 to drive the high-speed outputs (it's a CNC rotary indexing table). I can drop the negative values and the decimals if they'll cause problems in the conversion (i.e. -1.00 = 359.00. And 187.52 = 18752)

    I can't figure out how to get the number in ASCII converted to something the HSIO motion control can use (real or BCD or whatever).

    Any ideas on what command to use to convert? Or do I need some kind of ugly workaround. I don't think the CNC can output anything other than ASCII, though I will check if what I'm asking above is impossible.

    Robin


  • #2
    Look at the DL-06 user manual volume 1,

    Page 5-208 is about the "AIN" box to import ASCII code.

    Page 5-216 is about the "AEX" box for picking out values and converting to BCD.

    EDIT: This thread at post#8 shows how I used the above instructions to recieve and convert weight data from a scale.
    http://forum.automationdirect.com/showthread.php?t=7904

    Hope this helps,
    Last edited by Bob S BN; 07-20-2012, 07:22 AM. Reason: added "edit" information
    Bob

    Comment

    Working...
    X