12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ASCII Serial Port <strong>Instructions</strong> (ABL, ACB, ACL, AHL, ARD, ARL, AWA, AWT) 589Execution:Condition Relay Ladder Action Structured Text Actionprescan The rung-condition-out is set to false. No action taken.rung-condition-in is false The rung-condition-out is set to false. narung-condition-in is true The instruction executes when rung-condition-intoggles from cleared to set.naThe rung-condition-out is set to true.EnableIn is set na EnableIn is always set.instruction executionThe instruction executes.The instruction removes characters from the buffer and stores them in the destination.The .EN bit is set.The remaining status bits, except .UL, are cleared.The instruction attempts to enter the ASCII queue.postscan The rung-condition-out is set to false. No action taken.Example:A bar code reader sends bar codes to the serial port (channel 0) of thecontroller. Each bar code contains 24 characters. To determine whenthe controller receives a bar code, the ACB instruction continuouslycounts the characters in the buffer. When the buffer contains at least24 characters, the controller has received a bar code. The ARDinstruction moves the bar code to the DATA member of thebag_bar_code tag, which is a string.Relay Ladderbar_code_count.EN/ACBASCII Chars in BufferChannel 0SerialPort Control bar_code_countCharacter Count 0ENDNERGEQGrtr Than or Eql (A>=B)Source A bar_code_count.pos0Source B 24ARDASCII ReadChannel 0Destinationbag_bar_code''SerialPort Control bar_code_readSerialPort Control Length 24Characters Read 0ENDNERStructured TextACB(0,bar_code_count);IF bar_code_count.POS >= 24 THENPublication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!