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, I need to write the following program in Ladder language, but I could not integrate the Fibonacci sequence into the ladder. Can you help...
Replies
17
Views
208
this a program to send data to barcode printer I want to integrate a new printer in a new machine and i wanted to adapt the old prgram on it but I...
Replies
4
Views
157
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
54
Hi all, hope you are having a great day, I am in need of your help to create a AOI or program that does this kind of job: I have a IO Link...
Replies
26
Views
483
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
363
Back
Top Bottom