Micro 850- ASCII query/command and response

chowam01

Member
Join Date
Feb 2021
Location
Silver Spring
Posts
10
I have been working on a PLC project that requires sending ASCII commands/queries to an external pressure transducer using the Micro 850 PLC (2080-SERIALISOL module) via serial port communication (ASCII protocol) and in response the PLC would read pressure readings from the transducer. I was able to write a ladder logic program that reads ASCII code from the transducer and converts it into string and inversely converts string output from the computer to ASCII and sends it to the transducer. However, I am uncertain as to how I should send the command string from my computer so that the external transducer receives it, recognizes it after the <cr><lf> is encountered and sends a pressure reading. I am screenshots of my program to this thread for your reference.

2.PNG 3.PNG 1.PNG
 
Not really. I am getting pressure readings via Putty terminal. I am trying to find out if there’s a way to incorporate these command strings to my PLC program so that it writes to the Tx buffer of the transducer and in response the transducer would send pressure readings to the PLC. Is there a way to do that in CCW?
 
I would be surprised if there is not an example of a similar application on this forum; The Google is your friend.


The way I would do it is treat the AWA and ARL instructions as if they were two alternating timers, using the AWAInput.Q boolean to go from writing to reading, and the ARLInput.Q to transition from reading to writing.


Other tasks


  • Perhaps there needs to be a delay between reading and the next writing or vice versa.
  • On initialization, it may make sense to examing and/or clear the buffers (ABL, ACB, ACL instructions).
All of these tasks would need to happen in a certain order, so using a step sequence style to control them might work

  • step 0 is initialization
    • Wait a bit for any serial communication to cease,
    • Clear buffers,
    • Then advance to step 10
  • step 10 is request
    • AWA instruction writes serial data, plus <CR><LF>, from PLC to transducer
      • AWA.IN trigger is rising edge of [= step 10]
    • Completed when AWAInput.Q is 1
      • Advance to step 20
  • step 20 is read
    • ARL instruction reads serial data, excluding terminating <CR><LF>
      • ARL.IN trigger is rising edge of [= step 20]
    • Completed when ARLInput.Q is 1
      • parse data in ARL.Destination
      • Advance to step 30
        • or to step 10,
        • or to step 0
  • step 30 is wait
    • This may not be needed
    • Use TON
    • Completed when TON.Q is 1
      • Return to stop 10
There could be special handling, for example

  • set watchdog timer for each step
    • if timer completes before that step, then return to step 0
  • if either ARL.Error or AWA.Error becomes 1, then return to step 0
  • etc.
 
Thank you for the reply. What I am still trying to figure out is if there is a way that I can type in a command string, such as, '#*?' into my write function. The only way the transducer responds is when it sees that command. Is there a way to incorporate that command into my write ufdb? Or is it something that should be done using an HMI/SCADA? Btw, I am using a 2080-SERIALISOL plug-in module for serial communication with the transducer.

According to this: https://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm013_-en-p.pdf, I can use RSLogix to send ASCII strings to ASCII triggered devices such as MessageViewer Terminal using the AWA/AWT functions (by typing the hex code for the ASCII string in the input value field of the AWA/AWT). Can something similar be done to send ASCII commands from my computer to the pressure transducer via the PLC (Micro 850) without the use of HMI?
 
Last edited:
I am not sure I understand the question.


You are using Putty to send ASCII characters, literally using your fingers, from the PC, right?


I was assuming the final goal is to have the PLC interact autonomously with the pressure device via RS-232, so the PLC sends e.g. "#*?<CR><LF>" and the pressure unit responds with "123.45 kPa" or some such. For that, you can use AWA/ARL.


What does this mean: "Can something similar be done to send ASCII commands from my computer to the pressure transducer via the PLC (Micro 850) without the use of HMI?"


Do you want to type something into the PC e.g. using Putty, or even some other program, and have that sent to, and stored as a string on, the PLC, and then have the PLC send that string, which string originated on the PC, to the transducer?
 
Last edited:
I just want to establish interaction with the transducer using PLC, doesn’t matter if it is autonomous or not. I have used AWA/ARL instructions in my program but I’m not sure where I should input the command for retrieving pressure. Should I just initialize my Txstring variable with ‘#*?’ and then download the program with project values?
 
I just want to establish interaction with the transducer using PLC, doesn’t matter if it is autonomous or not. I have used AWA/ARL instructions in my program but I’m not sure where I should input the command for retrieving pressure. Should I just initialize my Txstring variable with ‘#*?’ and then download the program with project values?




Yes, hard-code the '#*?' command into an AWA, and then wait for the response to be read by the ARL.
 

Similar Topics

Hello Everyone, I am trying to connect a A&D EK-6100i Weigher to my Micro 800 PLC and read the current weight. For now I have managed to connect...
Replies
13
Views
4,159
I am trying to read and write data from Control Logix L23E and a Micro 850. My path in the message is 2, 192.168.2.183 192.168.2.183 is the ip...
Replies
2
Views
696
Hello. I have an issue with a Micro 850 PLC. Issue is when it is in RUN mode, and an output is energized, the whole PLC just turns off, then turns...
Replies
3
Views
816
Hello. I have an issue with a Micro 850 PLC. Issue is when it is in RUN mode, and an output is energized, the whole PLC just turns off, then turns...
Replies
1
Views
547
I am using a Micro 850E PLC (the new one with implicit messaging capability) to drive a Kinetix 5100 servo drive. The error code number on the...
Replies
7
Views
1,688
Back
Top Bottom