Word
and Bits:
Computers and PLCs all work
with signals that are either On or Off. These bits when grouped together
are used to determine a character or a command, an example of this is
the words that you are reading on this page, they are all collectively
signals being transmitted to the screen after being interpreted from the
group they were transmitted in and converted into characters.
The signal being transmitted is called a 'bit', groups of bits are named
depending upon how many bits are used in the group to determine a character
or command.
Nibble = 4bits
Byte = 8bits
Word = 16bits MSB0000000000000000LSB
Double word = 32bits
The name Nibble is more commonly used in electronic engineering, when
refering to 4bit micro processors. Bytes, Words and Double Words are used
nearly all the time in PLC programming.
In the above table you will note the terms MSB and LSB, these refer to:
LSB (Least Significant Bit) = 0
MSB (Most Significant Bit) = 15
The 0 and 15 are sometimes a confusing statement for beginners to grasp,
the first bit is always referred to as bit 0 (zero), therefore when we
count the bits from 'right to left', the last bit in a Word will be bit
15.
PLC
signaling & addressing:
A PLC (Programmable Logic Controller),
communicates with the outside world by signals arriving at its input cards
and transmitting control signals out to the world via its output cards.
These cards communicate with the PLC central processor via slots on a
backplane, each slot is where the card is plugged into.
The signals can be in many forms, so several types of card exist to cater
for these forms, some of these cards are:
Digital Input - generally a relay input, which turns on the relay when
a signal is present 24vdc - 110vAC
Digital Output - a relay or transistor output, supplying 24vdc - 110vAC
to the external device.
Analogue - reads an AC voltage and converts this to a digital value depending
upon when it takes a sample reading (known as the sample rate). Normally
reading small voltages from thermocouples, determining temperatures.
Encoder - converts a varying dc voltage level into a digital value, normally
associated with determining the positioning of an object, as it moves
from one position to another.
Other types of card exist, it is beyond the scope of this page to describe
every card used since different manufacturers supply other styles to cater
for different circumstances and provide accuracies and greater flexibility
which may be better than their competitors. The cards mentioned above
are generally supplied by all PLC manufacturers.
If we look at the most common card the Digital input and Digital output.
This card attaches to the backplane via its slot, you will normally find
the first or first few cards are Inputs. The first slot provides the card
with an address, which is address 0. Should the card have 16 inputs, these
would be associated with Word 0, with the very first input (top most contact)
addressed 0.00, and the last input (bottom most) addressed 0.15.
These inputs are sometimes referred to as channels.
In the Omron C200H/C200HS/C1000H series of PLCs the following bits are
pre -assigned fro the programmers use, they do not refer to a card, but
to the internal addresses which are found at the end of what is called
the General Bit address area:
Omron
special relay addressing:
253.13 = Always On - useful
for structuring a network or shorting out a contact which you do not want
to delete just yet.
253.14 = Always Off - useful for disabling a network without deleting
it
253.15 = First Scan - turns On for One PLC scan at the start, use to setup
registers
255.05 = Greater Than - used as decision contact after Compare function
block
255.06 = Equals - as above
255.07 = Less Than as above
255.00 = 0.1second pulse - useful for strobing
255.01 = 0.2second pulse
255.02 = 1second pulse
255.02 = Carry Flag - used for maths instructions, if the value exceeds
16bits then Carry is set, advisable to clear carry prior to any maths
instruction (use the CLC function)
253.08 = Low Battery warning
|