Help please~ related to barcode scanner and PLC

In the picture that you sent me in post #2, what does EN,DN,ER represent??
EN = Enable, the ARL instruction has been started; DN = DONE, instruction is finished reading data; ER = ERROR, something went wrong.

Here is the information from the RSLogix500 Help file for ARL:
ARL [ASCII Read Line]
Use the ARL instruction to read characters from the buffer, up to and including the end-of-line (termination) characters, and store them in a string.

Entering Parameters:
Channel is the number of the RS-232 port (must be 0)
Destination is the string element where you want the characters stored.
Control is the address of the control block used to store data for the ARL instruction.
String Length (.LEN) is the number of characters you want to read from the buffer. The maximum is 82 characters. If you specify a length larger than 82, only the first 82 characters will be read. (A 0 defaults to 82.) This is Word 1 in the control block.
Characters Read (.POS) are the number of characters that the processor moved from the buffer to the string (0-82). This field is updated during the execution of the instruction and is display only. This is Word 2 in the control block.
Error is the hexadecimal error code that indicates why the ER bit was set in the control data file. Refer to ASCII Error Codes for an explanation of any displayed error code.

Operation
1 The ARL rung goes from false-to-true, setting the EN (Enable) bit.
2 The instruction is put in the ASCII queue, setting the EU (Queue) bit.
3 The instruction executes and the RN (Run) bit is set.
4 The requested number of characters (including the end-of-line characters) are moved from the buffer to the destination string.
5 The number of characters moved is placed in the position field (control element Word 2).
6 The number in the Characters Read field is continuously updated, and the DN (Done) bit is set once all of the characters have been read. If the processor finds termination characters before reading is done, the number of characters found is stored in the POS word of the control block in addition to setting the DN (Done) bit.
7 When the program scan finds the DN bit set, the processor sets the EM (Synchronous Done) bit.

Execution Errors
The ER (Error) bit is set during the execution of the instruction if:

the instruction is aborted - serial port not in User mode
the modem is disconnected (control line selection is other than NO HANDSHAKING).

the instruction is aborted due to channel mode change.
the UL (Unload) bit is set. The instruction stops executing, but received characters are sent to the destination.

an ACL to clear the receive buffer is executed, removing the ARL instruction from the ASCII queue.

Rockwell Software
 
Last edited:

Similar Topics

Hello everyone. Could someone please assist me? I am using Citect version 7.2 service pack 5 and Windows 7. I have created a project...
Replies
0
Views
93
Hello, I'm not sure if anyone can help me. I made a big mistake by pulling out the battery to swap it with the machine turned off, and as a...
Replies
0
Views
63
I've adjusted the IP of the Panelview Plus as well as the DNS servers; the screen does not show up in the search when I go to the transfer utility...
Replies
7
Views
196
Hi Everyone, I own a GE Versamax controller that I purchased for a class at Long Beach City College a couple of years ago. I lost the use of my...
Replies
12
Views
332
I was wondering if anyone could help i am trying to use a SLC 500 with a 5/05 processor to set up an incremental encoder to a HSCE2 card? The card...
Replies
2
Views
193
Back
Top Bottom