AB Naming methods (for Curt)


Thread Starter

Ron Gage


AB style addressing on the PLC5/SLC5 goes something like this:


A = a file type indicator. Common indicators are: B=Boolean or bit, C = Counter, I = Input, N = Integer, O = Output, F = Float, R = Control, S = System (Status), bbb = a numeric file number indicator, any decimal number from 0-999. Files
below 9 are "reserved" to be certain types. For example, file 7 will always be an Integer (N7).
ccc = index or position within the file. Again, any decimal number between 0-999 is valid.
dd = bit position (an optional expression). This is either octal (PLC5) or decimal (SLC5). Bit 0 is the least significant bit.

Inputs and Outputs can only be located at Files 1 & 0 respectively. Also, the index indicator for inputs and outputs is in octal.

A bit identifier does not necessarily have to be expressed. For example, you can do MOV I;002 N12:0 which will take all 16 bits of I:002 and copy them into N12:0 so that N12:0/2 is the same as I:002/2.

If you are examining a bit, then it must be specified. Example: XIC I;002/3

Boolean registers are typically expressed as just a file number and a bit number. The index value is "hidden" in the bit number by doing (index*16) + bit. This is optional but considered the norm for the PLC5/SLC5. Hense, B3/16 is the same as B3:1/0.

The PLC does automatic type conversion - hense MOV F7:0 N23:1 is valid (and will truncate the decimal portion of the number).

Integers are 16 bit signed, Floats are single precision.

Biggest downfall to this method. Memory must be allocated before a location can be addressed. Before I can address N12:0, I have to "create" it by configuring the data table. All registers utilize a single pool of memory, taking from the
pool until the pool is empty.


LinuxPLC mailing list
[email protected]