Help Topic
VgAB Interpreter Programming Help Topics

___________________________________________________________________________

Programming Technique

Programming Language

This Interpreter is mainly designed for process control material handling systems. Programming is friendlier & user’s oriented with this Interpreter.

There are 2 Interpreters i.e. 2 transport wagons movement can be programmed with VgAB. Each interpreter is associated with each transport wagon. i.e. Interpreter1 programming is related to wagon1, Interpreter2 programming is related to wagon.

E.g.

Your statement Lift From Tank.12 in Interpreter1 commands transport wagon1 to move to station number 12 and then lift load from station 12.

Your statement Lift From Tank.12 in Interpreter2 commands transport wagon2 to move to station number 12 and then lift load from station 12.

Wagon1 controls, Like it’s inputs(proxies, limit switches ,push buttons) are wired to InputCard-1 and it’s outputs(traverse motor, hoist motor ,Fast Traverse) are wired to OutputCard-0(1 to 7).

Wagon2 controls, inputs are wired to InputCard-2 and it’s outputs are wired to OutputCard-1(1 to 7).

After one has finished programming, for a Interpreter one should compile it (Click compile on menu.). Only compiling a Interpreter does not form a program for VgAB. All Interpreters should be compiled


How Do I Programm
Programming Technique:

Programming is not case sensitive. One can write in uppercase or lowercase or mixed case.

Tank, Input, Output, Global and GlobalFlag are referred as object having collection Tanks, Inputs, Outputs, Counters and Flags used while programming.

Tanks:

Limit For Tanks are 0 To 63

Statements Example

Lift From Tank.11

Lower on Tank.10

Inputs:

Limit For Inputs are 0 To 47

Input 0 To 15 refers to input 0 To 15 of Input Card 0

Input 16 To 31 refers to input 0 To 15 of Input Card 1

Input 32 To 47 refers to input 0 To 15 of Input Card 2

Statements Example

If Input.12 is On

If Input.13 Is Off

Outputs:

Limit For Outputs are 0 To 47

Output 0 To 15 refers to output 0 To 15 of Output Card 0

Output 16 To 31 refers to output 0 To 15 of Output Card 1

Output 32 To 47 refers to output 0 To 15 of Output Card 2

Statements Example

Puton Output.10

Putoff Output.10

Counters:

Limit for Counters are 0 to 15 & are counters can have value 0 to 99

Statements Example

Global.0 = 12

+1 Global.2

-1 Global.3

If Global.1 = 12

If Global.5 > Global.10

Flags:

Limit for Flags are 0 to 15 can have value On Or Off

Statements Example

Puton GlobalFlag.10

Putoff GlobalFlag.10

If GlobalFlag.12 Is On

If GlobalFlag.13 Is Off

Note:

One can use name of Object Instead of it’s number

E.g. Lift from Tank.12

If name of Tank 12 is SoakDegrease One can write statement

Lift From Tank.SoakDegrease Instead of Lift From Tank.12

While writing a program in a Interpreter, first One has to write all statements required to initialise Counters, Flags, Alarmtimer, Wagon Basic Position & then statement Do & then again statements. Last statement should be always Loop. It means every Interpreter must have One Do and One Loop statement.

So your Interpreter Looks like as following,

Alarm Station Time = 4

Alarm Hoist Time = 15

Rack Drip Time = 5

Barrel Drip Time = 10

Wagon Basic Position = 1

Do         (Must)

  Statements

  - - -

Loop       (Must)

Whenever user Auto-Restart plant (From Basic Position),program will start from Statements For Initialise & then statements Do. In case of Auto-Start program will start from Statements from where plant Auto was interrupted for manual or power lost.


Example:

___________________________________________________________________________

Create New Project. Copy Following Program and paste in Interpreter-1.

Then save and compile.

Alarm Hoist Time = 15

Alarm Station Time = 4

Rack Drip Time = 5

Barrel Drip Time = 10

Wagon Basic Position = Tank.0

Global.0 = 13

Do

  Wait Input.6 ‘Waiting for Operator response

  Lift From Tank.12

  Lower On Tank.12

  If Global.0 = 13

    Lift From Tank.13

  End If

  If Global.0 = 14

    Lift From Tank.14

  End If

  If Global.0 = 15

    Lift From Tank.15

  End If

  If Global.0 = 13

    Lower on Tank.13

  End If

  If Global.0 = 14

    Lower on Tank.14

  End If

  If Global.0 = 15

    Lower on Tank.15

  End If

  +1 Global.0

  If Global.0 > 15

    Global.0 = 13

  End if

Loop

Alternatively one can write this way also.

Alarm Hoist Time = 15

Alarm Station Time = 4

Rack Drip Time = 5

Barrel Drip Time = 10

Wagon Basic Position = Tank.0

Global.0 = 13

Do

  Wait Input.6 ‘Waiting for Operator response

  Lift From Tank.12

  Lower On Tank.12

  Lift By Global.0

  Lower By Global.0

  +1 Global.0

  If Global.0 > 15

    Global.0 = 13

  End if

Loop


Global is collection of 16 counters of are available in all  Interpreters.

Each counter is referred as Global.COUNTER.


Input 11 of related wagon. If it is on wagon arm assumes Top most Position.


Input 12 of related wagon. If it is on wagon arm assumes Lower most Position.


Input 15 of related wagon. If it is on wagon assumes Barrel Load Else RackLoad


.

Input 15 of related wagon. Decides Barrel lift position at which liquid is to be drained out.


Increment Counter
+1

SeeAlso   Example

___________________________________________________________________________

Increment Counter by 1.

Syntex:

+1 COUNTER

COUNTER :

GLOBAL counters number or name

Note:

Numbers GLOBAL counters are 0 to 15

If counter value is 98 it becomes 99.

If counter value is 99 it becomes 0.

Example:

+1.Global.Choice

Counter named Choice of a Global, had value 99. After completing

statement it becomes 0.


Decrement Counter

-1

SeeAlso   Example

___________________________________________________________________________

Decrement Counter by 1.

Syntex:

-1 COUNTER

COUNTER :

GLOBAL counters number or name

Note:

Numbers GLOBAL counters are 0 to 15

If counter value is 0 it becomes 99.

If counter value is 99 it becomes 98.

Example:

-1 Global.Choice

Counter named Choice of a Global ,had value 0. After completing this

Statement it becomes 99.


AlarmTime setting
Alarm

___________________________________________________________________________

Sets Alarmtime in seconds for a given function. If function is not completed within given data(time) automatically an error is generated. Plant (All wagons) comes to halt. Output-0 of OutputCard-0 turns on, corresponding WAGON STATUS display will show error.

Syntex:

Alarm FUCTION Time = Data

FUCTION: Hoist, Station

    Hoist:  until wagon arm reaches to LiftEnd position while

            Lifting or wagon arm reaches to LowerEnd position

            while lowering.

    Station: While traversing, from one station to next station.

Data: As time 0 to 99 in seconds

Example:

Alarm Hoist Time  = 12

Whenever a wagon start lifting/lowering an related interpreters

alarm-timer starts. If lift/lower function is not completed in 12

Seconds then an error will be generated.

Alarm Station Time  = 4

Assume wagon current position is 2 has to go to station 10 and

As it starts an alarm timer also starts. If wagon does not reach

to station 3 in 4 seconds an error will be generated else alarm timer

will be regenerated and continue repeating it unless it reaches

station 10.


Barrel Drip Time

___________________________________________________________________________

Sets barrel drip time. Whenever wagon lifts a BarrelLoad,it will lift up to its MidBarrelProxy position.Waits there for given barrel drip time to drain out liquid and again start lifting to Lift End position. In case MidBarrelProxy is not sensed then wagon will reach to Lift End position but will not wait for barrel drip time.

Syntex:

Barrel Drip Time = DATA

Data: 0 to 99 seconds time.

Example:

Barrel Drip Time = 10

While lifting if it is MidBarrelProxy is sensed lifting is stopped 10

Seconds waits & then start lifting to Lift End position.


Conter value setting
COUNTER = DATA

___________________________________________________________________________

Counter value of current Interpreter is replaced by a given value.

Syntex:

Counter = Data

COUNTER:

GLOBAL counters number or name

Data:

Fixed value 0 To 99.

Example:

Global.0 = 24

Counter-0 had value 20, will have value of 24 after execution of this instruction.


Remove Dripping
Disable Drip Time

___________________________________________________________________________

After lifting every wagon stops for a time(Set by Barrel/Rack Drip Time Instruction) so that liquid attached to load is dripped down. In certain cases (Like lifting from Load Station) dripping time is not necessary; user can remove this time by above statement. The statement should be given before lifting from required tank

Syntex:

Disable Drip Time


Repeating statements
Do . . . Loop

Example

___________________________________________________________________________

Do & Loop should always be in pair. There should be only one such pair. Statements between Do & Loop are repeated continuously until manual is switched on.

Syntex:

Do

  (Statements)

Loop


Insert Dripping
Enable Drip Time

___________________________________________________________________________

After lifting every wagon stops for a time(Set by Barrel/Rack Drip Time Instruction) so that liquid attached to load is dripped down. In certain cases (Like lifting from Load Station) dripping time is not necessary; user can remove this time by Disable Drip Time statement. The statement should be given before lifting from required tank. Similarly to insert drip time after disabling one should give following statement to enable dripping.

Syntex:

Enable Drip Time


End Block

End If

___________________________________________________________________________

One requires to execute or not to execute certain statements in program depending upon a condition. If is conditional statement & its following statements up to End If are executed if condition is satisfied else program takes a jump next to End If statements.

Syntex:

End If


Conditional Statement
If . . Else . . End If

Example

___________________________________________________________________________

If condition is satisfied then statements between If & End If or between    If & Else are executed otherwise a program jump take place at statement next to End If(Else used then next to Else).One can also nest If statement. i.e. If statement can be given in a statement after if. One has to keep in mind that last if statement is related with first End If statement it receives.

Syntex:

If CONDITION

  (Statements)

End If

If CONDITION        ;A Nest example

  (Statements)

  If CONDITION

    (Statements)

  End If

  (Statements)

End If

If CONDITION

  (Statements)

Else

  (Statements)

End If

If CONDITION        ;A Nest example

  (Statements)

  If CONDITION

    (Statements)

  Else

    (Statements)

  End If

Else

  (Statements)

  If CONDITION

    (Statements)

  Else

    (Statements)

  End If

End If

CONDITION:

For FLAG:

FLAG Is On

FLAG Is Off

GlobalFlag, Input, Output number or name

For COUNTER:

COUNTER OPERATOR data

GLOBAL counters number or name

OPERATOR:

+, =, <>, >, <, >=, <=

Data:

Fixed Value 0 To 99.


Lowering on Process Tanks

Lower on Tank.T

 Lower By Counter

___________________________________________________________________________

Wagon first reaches to tank T and then lower flight bar until Lower end switch is not activated. Program does not go to next statement until this statement is over.

Syntex:

Lower on Tank.T

Where

T = is required tank number from which load is to be lowered. It can be name of tank if it is listed in name list of Tank under Name Menu of wagon(Sequence)Tank Sub Menu of VgAB.

It frequent so require that there are number of same process tank & load is to be lowered on one of these tanks, in such cases this statement is useful. Counter value can be changed as per desired condition.

In executing this statement Wagon first reaches to tank ,tank number is value of it’s Global counter C (Global.C) and then lower flight bar until Lift end switch is not activated. Program does not go to next statement until this statement is over.

Syntex:

Lower From My.C

Where

C = is counter value of required tank number from which load is to be lowered. It can be name of counter if it is listed in name list of counter under Name Menu of wagon(Sequence)counter Sub Menu of VgAB.


Fixed Waiting at Tanks
Pause

___________________________________________________________________________

In certain case it is required that wagon waits for some time before it proceed for next function. Pause is one instruction.

Syntex:

1)	Pause Data Seconds

2)	Pause Data Minutes

Where

Data = 0 to 99.

Example

Pause 30 Seconds

Pause 2 Minutes


Clear Falg
Putoff

___________________________________________________________________________

To set Flags to Off condition

Syntex:

Putoff Flag.F

Where

Flag = GlobalFlag or Output

F = GlobalFlag or Output number.

Example

Putoff GlobalFlag.10

Putoff Output.10


Set Falg
Puton

___________________________________________________________________________

To set Flags to On condition

Syntex:

Puton Flag.F

Where

Flag = GlobalFlag or Output.

F = GlobalFlag or Output number.

Example

Puton GlobalFlag.10

Puton Output.10


Set Rack Drip Time
Rack Drip Time

___________________________________________________________________________

After Lifting from most of the tanks, it is necessary to wait for some time for liquid or chemical to drop down so that it does not carry to another tank. When Lift From Tank Statement is executed then after lifting wagon waits for Set time of statement Rack Drip Time.

Syntex:

Rack Drip Time = Data

Where

Data = 0 to 99 Seconds.

Example

Rack Drip Time = 5


Wagon Basic Position

___________________________________________________________________________

Since Wagon Tank position is decided by counting through Centre Proxy, it is necessary to set its basic position of tank while starting fresh process from initial position. Given statement sets basic position of wagon. Statement should appear before a main program(Program written between Do and Loop statements)

Syntex:

Wagon basic Position = Data

Where

Data = 0 to 63 Tanks.

Example

Wagon Basic Position = 10


Waiting for flag
Wait (Not) Flag

___________________________________________________________________________

In case of more then one wagon wagons have to be synchronized, in such case wagons communicate through flags, while master wagon sets flag, waits not for that flag (To be turned off by slave wagon),slave wagon waits for flag then turns off to indicate it has acknowledged. Also sometime it is useful to wait for some operator intervenes.

Syntex:

Wait Flag

Wait Not Flag

Where

Flag = GlobalFlag, Input, Output.

Wait Flag statement wait for flag to turn on.

Wait Not Flag statement wait for flag to turn off.

Example1

Wait Input.11 ‘Waits for Operator signal to start

Lift From tank.1

Lower On Tank.5

- - - -

Example2

(Wagon 1 program)

Lift From tank.1

Lower On Tank.5

Putoff GlobalFlag.0  ‘Signal to Slave Wagon2

Wait GlobalFlag.0    ‘Waits for Slave wagon2 signal

- - - -

- - - -

(Wagon 2 program)

Lift From tank.10

Lower On Tank.12

Wait Not GlobalFlag.0    ‘Waits for master wagon1 signal

Puton GlobalFlag.0       ‘Signal to master Wagon1

- - - -

- - - -


Lifting From Process Tanks
Lift From Tank.T

  Lift By Counter

___________________________________________________________________________

Wagon first reaches to tank T and then lift flight bar until Lift end switch is not activated. Program does not go to next statement until this statement is over.

Syntex:

Lift From Tank.T

Where

T = is required tank number from which load is to be lifted. It can be name of tank if it is listed in name list of Tank under Name Menu of wagon (Sequence) Tank Sub Menu of VgAB.

Example

Lift From Tank.12

It frequent so require that there are number of same process tank & load is to be lifted from one of these tanks, in such cases this statement is useful. Counter value can be changed as per desired condition.

In executing this statement Wagon first reaches to tank, tank number is value of it’s Global counter C (Global.C) and then lift flight bar until Lift end switch is not activated. Programm does not go to next statement until this statement is over.

Syntex:

Lift By Global.C

C = is counter value of required tank number from which load is to be lifted. It can be name of counter if it is listed in name list of counter under Name Menu of wagon(Sequence)counter Sub Menu of VgAB.

Example

Lift By Global.1


Statement List
Programming Language

+1 COUNTER

-1 COUNTER

Alarm Hoist Time = DATA

Alarm Station Time = DATA

Barrel Drip Time = DATA

Counter = DATA

Disable Drip Time

Do

Enable Drip Time

End If

Else

If FLAG Is On

If FLAG Is Off

If COUNTER OPERATOR Counter0

Lift By Counter

Lift From TANK

Loop

Lower By Counter

Lower On TANK

Pause DATA Seconds

Pause DATA Minutes

Putoff FLAG

Puton FLAG

Rack Drip Time = DATA

Wagon Basic Position = TANK

Wait Flag

Wait Not Flag