AB Micro ASCII read missing instructions

Tim 777

Member
Join Date
Sep 2007
Location
Midwest
Posts
1
I have a program that is used to read basic ascii characters in to turn on outputs on the plc. The program works fine with the exception of getting ascii commmands to quickly. A PC running a VB program is sending an "a" to turn on output 1. The problem is when the PC sends the commands to quickly the PLC misses the command. The temporary solution was to put a 1/10 sec delay in the VB code and wait for this time before sending another command.
The only thing this program does is read in ascii and turn on an output as well as send ascii on input.

My question is what can be done to increase the response of the PLC? There must be a way to store the ascii as it comes in and execute on next scan or immediate.

A PDF of the program is attached.

Thanks to all of you guys that have been posting here for years. While my user ID is new I have been looking at this site for help since 2000.
 
Last edited:
Tim,

It could be that your ASCII Control Elements are interfering with each other. In Rungs 02 to 30, you use the same R6:0 Control element for every AWT instruction. If two or more of these rungs are on at the same time, this could cause an error and a missed character. You may need some One-Shots to prevent more than one AWT from being active at a time, or use the Control Element DN or EM bits to signal when a character has been written, then stop the Write. (I see that you have One-shots that prevent some of inputs from being on more than one scan, but it seems that you need the One-Shots between the inputs and the AWT instructions. What you want to happen only one time per ON input.. is the the Write instruction.)

Similarly, in Rung 31, the beginning of your ASCII Read instructions, you use R6:2 as your Control Element for the ACB command (determine number of Ascill Characters in Buffer).

It is my understanding that all ASCII commands have a 3-word Control Element, so the R6:2 will overwrite your R6:0 (plus R6:1 and R6:2) Control element used previously. Also in Rung 32 you use Control Word R6:3 for the ARD, where the ACB command in Rung 32 will use words R6:2, R6:3, and R6:4, so again part of the Control Element may be destroyed or overwritten and cause characters to be missed. Try spreading out these Control Elements so that they do not overlap. See the excerpt below from RSLogix Help files:

The control element for all ASCII instructions includes eight status bits, an error code byte, and two character words:

The control element:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 0 EN EU DN EM ER UL IN FD > Error Code <
Word 1 Number of characters for sending/ receiving (LEN)
Word 2 Number of characters sent or received (POS)

Control word status bits
15 = EN
(Enable) bit indicates that an instruction is enabled due to a false-to-true transition. This bit remains set until the instruction has completed executing or if an error occurs.

14 = EU
(Queue) bit indicates that an ASCII instruction has been placed in the ASCII queue. This action is delayed if the queue is already filled. The queue may contain up to 16 instructions.

13 = DN
(Done) bit is set opposite to a program scan when an instruction successfully completes its operation. An instruction can take longer than one program scan to finish executing.

12 = EM
(Synchronous Done) bit is set concurrently to a program scan to indicate the completion of an ASCII instruction.

11 = ER (Error) bit indicates that an error occurred while executing the instruction.

10 = UL
(Unload) bit causes instruction operation to stop before or during execution. If this bit is set while an instruction is executing, any data already processed is sent to the destination. The instruction is not removed from the queue; remaining data is just not processed. You set this bit.

9 = IN (Running) bit indicates that a queued instruction is executing.

8 = FD
(Found) bit indicates that the instruction found the end of characters or termination characters in the buffer (applies to ABL and ACB instructions).

Rockwell Software 2000

Best Regards,
Lancie
 
Last edited:

Similar Topics

Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
92
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,182
I have been working on a PLC project that requires sending ASCII commands/queries to an external pressure transducer using the Micro 850 PLC...
Replies
12
Views
2,821
Hello all! I have a micro 1100 and am trying to recieve a string from a cognex dataman barcode reader. I am not very familar with the ascii...
Replies
7
Views
4,622
Hi all, Just trying to set up communications between an SLC5/03 and a Micrologix over a phone line and I am using two telephone modems. In the...
Replies
2
Views
1,976
Back
Top Bottom