12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

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

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

plc serial - 27.10<br />

ABL(channel, control)- reports the number of ASCII characters including line endings<br />

ACB(channel, control) - reports the numbers of ASCII characters in buffer<br />

ACI(string, dest) - convert ASCII string to integer<br />

ACN(string, string,dest) - concatenate strings<br />

AEX(string, start, length, dest) - this will cut a segment of a string out of a larger string<br />

AIC(integer, string) - convert an integer to a string<br />

AHL(channel, mask, mask, control) - does data h<strong>and</strong>shaking<br />

ARD(channel, dest, control, length) - will get characters from the ASCII buffer<br />

ARL(channel, dest, control, length) - will get characters from an ASCII buffer<br />

ASC(string, start, string, result) - this will look for one string inside another<br />

ASR(string, string) - compares two strings<br />

AWT(channel, string, control, length) - will write characters to an ASCII output<br />

Figure 27.8<br />

PLC-5 ASCII Functions<br />

In the example in Figure 27.9, the characters "Hi " are placed into string memory<br />

ST10:1. The ACB function checks to see how many characters have been received, <strong>and</strong><br />

are waiting in channel 0. When the number of characters equals 2, the ARD (Ascii ReaD)<br />

function will then copy those characters into memory ST10:0, <strong>and</strong> bit R6:0/DN will be set.<br />

This done bit will cause the two characters to be concatenated to the "Hi ", <strong>and</strong> the result<br />

written back to the serial port. So, if I typed in my initial "HJ", I would get the response<br />

"HI HJ".

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

Saved successfully!

Ooh no, something went wrong!