You are on page 1of 3

ARL-500 PLC Module Guide

1. PLC Program:

The program consists of at most 20 lines of assignment operations.

All program lines are executed every 0.1 seconds. Execution starts at line-00 and ends
at line-20.

Every program line is in the following format:

LINE_NO: RESULT <= OPERAND1 OPERATION OPERAND2

Every program line is a logical operation having 2 operands and the result of the
operation (either 0 or 1) is written into the “result” field.

OPERAND1 and OPERAND2 fields may have the following


values:

0 : Logical 0 constant
1 : Logical 1 constant
in1..in16 : Input-1..16
me1..me8 : Memory bit-1..8
to1..to4 : Timer-1..4 output
rtc1..rtc4: Realtime-clock-1..4 output

RESULT field may have the following values:

out1..out8: Output-1..8
me1..me8 : Memory bit-1..8
ti1..ti4 : Timer-1..4 input
---- : No operation

OPERATION field may have the following values:

== : Returns 1 if OPERAND1 and OPERAND2 are equal (XNOR)


!= : Returns 0 if OPERAND1 and OPERAND2 are equal (XOR)
// : Returns 1 if any of the OPERANDs are 1 (OR)
!/ : Returns 0 if any of the OPERANDs are 1 (NOR)
&& : Returns 1 if both of the OPERANDs are 1 (AND)
!& : Returns 0 if both of the OPERANDs are 1 (NAND)
2. PLC Timer Settings:

PLC module contains 4 timers. Every timer has 1 input and 1 output.
Timers are used to On-delay and/or Off-delay signals. On-delay and Off-delay times
may be adjuested independently.

Below is a time-chart explaining the operation of On-delay and Off-delay:

3. PLC Inputs:

PLC module can get its 16 available inputs from two sources.

1. PLC inputs may be connected internally to ARL-500 output functions by using the
“Inputs” page in the PLC Module. So that, for example, the Car Light output
function of ARL-500 may be used as an input to the PLC module.

2. In ARL-500 programmable input functions settings;


Function “186: (PLI1) PLC Input-1” to “201: (PLI16) PLC Input-16”
Using this method, PLC inputs may be gathered from any of the programmable
inputs of devices connected to the CANbus.

Note: If a PLC input is set to more than one physical input, its value will be the logical
OR of all input signals.

4. Realtime Clock:

PLC module has 4 realtime clock timers which can be set to be active between chosen
times of a day and inactive at other times.

For example: If we want an output to be active between 06.30 in the morning to 22.00
in the evening. We may use a rtc with the settings 06 00 22 00.

The first entry is the time of day when the rtc output will activate.
The second entry is the time of day when the rtc output will deactivate.
5. PLC Outputs:

The 8 available PLC outputs may be sent to any physical programmable output by
using the programmable output functions of ARL-500:

71: (PLO1) PLC Output-1


….
74: (PLO4) PLC Output-4
83: (PLO5) PLC Output-5

86: (PLO8) PLC Output-8

Using this method, PLC outputs may be sent to any programmable outputs of devices
connected to the CANbus.

Note: A PLC output may be sent to many outputs at the same time.

Note: If PLC inputs and outputs are connected to devices other than ARL-500
mainboard, slight delays may occur due to CANbus communication.
So they should not be used in this way for safety critical purposes.

Examples:

1. Negating an input:

00: out1 <= in1 == 0

2. Logically AND’ing 3 inputs:

00: me1 <= in1 && in2


01: out1 <= in3 && me1

3. Flip-Flop with Enable Input:

Block diagram:

Program:
00: ti1 <= to1 == 0
01: out1 <= to1 && in1

You might also like