Copyright © 2003 Promation Inc. All Rights Reserved.
ld sv-101 // get valve status
and pmp-101on // and pump motor signal
    // both must be on to simulate flow
jmpc Flow100 // set for 100 hz signal
ld 0 // no flow so shut off signal generator
jmp UpFlow // update signal generator
Flow100: ld 1 //  set for 100 hz signal
UpFlow: sig flow-100 // set output
//
// Simulate Flow meter with 1 pulse/gallon output
//        
ld 5 // set for 5 seconds open and close
st T#LS102Ton.pt // set timer program time - Ton
st T#LS102Tof.pt // set timer program time - Tof
ld sv-102 // get solenoid status of valve
st T#LS102Tof.in // gate for timer -- if solenoid on
ton T#LS102Ton // Do Timer timer on logic
st T#LS102Tof.in // gate for timer -- if solenoid off
  tof T#LS102Tof // Do Timer timer off logic
jmpc SlowOpen // jmp if solenoid valve active
ld T#LS102Tof.ot // get status of TOF timer
jmp UpdateLS102 // Update valve status
SlowOpen: ld T#LS102Ton.ot // get status of timer
UpdateLS102: stn ls-av102 // update status of limit switch
//
// Simulate a fill valve on top of a tank that is slow reacting
// The fill valve has a N.C. set of contacts
//        
ld sv-101 // get valve status
and pmp-101on // and pump motor signal
    // both must be on to simulate filling
jmpcn NotFill // jump if not filling
ld Lv-101 get current tank level
add 1 // increase level (update d/a  - 4 - 20ma)
st Lv-101 // update level
NotFill: // simulate material draining from tank if discharge
ld sv-101a // valve open
jmpcn NotDis // jump if valve not open
ld Lv-101 // get current level
sub 1 // decrease d/a count by one
st Lv-101 // update level
NotDis:
//
//        Simulate tank filling
//        Tank has a 4 -20 ma level sensor
//        Pump and Fill valve must both be active to begin filling
//
  ld pmp-101on // motor control run signal
st pmp-101run // update motor running contact
//
//  Transfer pump simulation
//  Motor run contact is N.O.
//
Simulator IL Example

//
// Simulate a fill valve on top of a tank and discharge valve on bottom
// Valves have a N.C. set of contacts on the limit switch
//
Start: ld sv-101 // Current condition of Fill valve
stn ls-av-101 // simulate status of valve to controller
ld sv-101a // Current condition of discharge valve
stn ls-av101a // simulate status of valve to controller
IL Operators
             Function
ld
Load the operand value into the IL register
ldn
Load the negation of operand value into the IL register
st
Store the IL register into the operand
stn
Store the negation of the IL register into the operand
s
Sets the operand to 1 if IL register equals True
r
Sets the operand to 0 if IL register equals True
and
And's the operand with IL register - result stored in IL register
or
Or's the operand with IL register - result stored in IL register
xor
Xor's the operand with IL register - result stored in IL register
add
Adds the operand with the IL register - result stored in IL register
sub
Subtracts the operand with the IL register - result stored in IL register
mul
Multiples the operand with the IL register - result stored in IL register
div
Divides IL register by the operand - result stored in IL register
gt
If IL register is > operand  - IL reg set to True otherwise set to False
ge
If IL register is >= operand  - IL reg set to True otherwise set to False
eq
If IL register is = operand  - IL reg set to True otherwise set to False
ne
If IL register is <> operand  - IL reg set to True otherwise set toFalse
le
If IL register is <= operand  - IL reg set to True otherwise set to False
lt
If IL register is < operand  - IL reg set to True otherwise set to False
jmp
Program jumps to label specified in operand
jmpc
Program jumps to label specified in operand if IL reg. = True
jmpcn
Program jumps to label specified in operand if IL reg. = False
Extended Instr.
ton
Timer on logic for timer specified in operand
toff
Timer off logic for timer specified in operand
tp
Pulse logic for timer specified in operand
sig
Sets operand  to signal generator with divider specifiied in IL reg
Label Operator      Operand    Comments
Start: ld PMP101 // Motor On Signal from Controller
st                     PmpRun101 // Set Status of motor to controller
The operator indicates which operation will be made between the current (IL) register value and the operand. The result is always stored in the IL register.
 
Syntax:
IL Programming Language