Announcement

Collapse
No announcement yet.

P3k ASCII OUT & IN to query values from and send values to Omegabus D4000

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


  • P3k ASCII OUT & IN to query values from and send values to Omegabus D4000

    I've read a whole bunch of forum posts but am still getting stuck trying to talk to an Omegabus D4182 RS-485 analog output module. Short story is I have a couple P3k's that are full up on modules (no more slots in the chassis AND no more space in the cabinet for a larger chassis). I need to add a single 0-10Vdc analog output and have chosen the Omegabus D4182 which will take ASCII commands over RS-485 and provides a single 0-10 Vdc analog output with a separate analog-to-digital built in for positive read-back of the actual output voltage. I'm trying to accomplish the following sequence of events:

    1. Use ASCII OUT to send "$1AO+02468.00" with termination character 0xd to cause the D4182 to set its analog output to 2.468 Vdc
    2. Use ASCII OUT to send "$1RAD" with termination character 0xd to cause the D4182 to report back the present value of its output
    3. Use ASCII IN to receive the string "*+02470.00" followed by 0xd which corresponds to a measured value of 2.47 Vdc
    4. Compare the value sent (2.468) to the measured value (2.47) and alarm if the values differ by more than 0.1 Vdc

    I need to repeat this sequence at least once per second.

    If anyone has had success in doing something similar to this (send a command, send another command, read a response, repeat), please share your logic. I've tried timers and interlocking to make sure that the 3 ASCII functions occur separately and have gotten close to success but can't make it function completely. I often get one "good" scan where everything seems to work but then subsequent scans don't work.

    Thanks for the help!


  • #2
    The following code works with realterm. If your device needs some time between each instruction use a timer to delay the increment.

    Click image for larger version

Name:	AEX.PNG
Views:	53
Size:	35.1 KB
ID:	124126

    Comment

    Working...
    X