Help Topic
VG108 Wagon Programming Help Topics

___________________________________________________________________________

A word to word help is also provided, just select the word and press key F4.

Programming Technique

Programming Language

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

There are 8 Interpreters i.e. 8 transport wagons movement can be programmed with VG108.Each interpreter is associated with each transport wagon. i.e. Interpreter1 programming is related to wagon1, Interpreter2 programming is related to wagon2 and so on.

Technically speaking transport wagon1 means its inputs (Like proxies, limit switches, push buttons) are wired to InputCard-1 and its outputs (Like traverse motor, hoist motor) are wired to OutputCard-0(1 to 7).

Similarly transport wagon2 means its inputs (Like proxies, limit switches, push buttons) are wired to InputCard-2 and its outputs (Like traverse motor, hoist motor) are wired to OutputCard-0(9 to 15).

Similarly transport wagon3 means its inputs (Like proxies, limit switches, push buttons) are wired to InputCard-3 and its outputs (Like traverse motor, hoist motor) are wired to OutputCard-1(1 to 7) and so on.

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.

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

After one has finished programming, for an Interpreter one should compile it (Click compile on menu.).Only compiling an Interpreter does not form a program for VG108.All Interpreters should be compiled first then compile General programming in last. If one desires, not to use any Interpreter then only General program should be compiled.


How Do I Program
Programming Technique:

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

Each Interpreter has its own 224 counters & 255 Flags, 1 AlarmTime & 1 Dwell Time.

Any counter can be referred with My. and counter number or its name. Any flag can be referred with My Flag. and flag number or its name.    To name a counter or flag one has to define name in Name menu.

E.g. Counter 5 is referred as My.5 in an Interpreter.

E.g. Say one of counters has name Choice is referred as My. Choice

E.g. flag 5 is referred as MyFlag.5 in an Interpreter.

E.g. Say one of flags has name Choice is referred as Myflag.Choice

Remember when programming in General, same counter or flag referred as Sequence and Interpreter number and counter or a flag number.

For above examples of counter of an interpreter 1 referred as Sequence1.5 and Sequence1.Choice for an interpreter 2 referred as Sequence2.5 and Sequence2.Choice.

For a flag of an interpreter 1 referred as Sequence1Flag.5 and Sequence1Flag.Choice for an interpreter 2 referred as Sequence2Flag.5 and Sequence2Flag.Choice.

Alternatively Wagon can be used instead of a Sequence. One can also refer a counter as Wagon1.5 and Wagon1.Choice for an interpreter 1 and Wagon2.5 and Wagon2.Choice for an interpreter 2. For a flag as Wagon1Flag.5 and Wagon1Flag.Choice for an interpreter 1 and Wagon2Flag.5 and Wagon2Flag.Choice for an interpreter 2.

Certain statements in interpreter uses Tanks(0-63), Inputs(0-255), Outputs(0-239),GlobalCounters(0-224), GlobalFlag(0-255),TimerFlags(0-47) and LoadFlag(0-63) to communicate with peripheral and other interpreter.

Refer to a named Choice Tank 12 as Tank.12 or Tank.Choice

Refer to a named Choice Input 12 as Input.12 or Input.Choice

Refer to a named Choice Output 12 Output.12 or Output.Choice

Refer to a named Choice GlobalCounter 12 Global.12 or Global.Choice

Refer to a named Choice GlobalFlag 12 GlobalFlag.12 or GlobalFlag.Choice

Refer to a named Choice TimerFlags 12 TimerFlag.12 or TimerFlag.Choice

Refer to a named Choice LoadFlag 12 LoadFlag.12 or LoadFlag.Choice

While writing a program in a Interpreter, first you have to write all required procedures(If required) & then statements required to be initialized & then statement Do & then again statements. Last statement should be Loop. It means every Interpreter must have atleast One Do and One Loop statement.

So you’re Interpreter Looks Like as following,

Procedure (0 to 7)

  Statements

  - - -

End Procedure

Statements (For Initialize if required)

- - -

Do         (Must)

  Statements

  - - -

Loop       (Must)

Whenever user AutoRestart plant (From Basic Position), program will start from Statements For Initialize & then statements Do. In case of AutoRestart program will start from Statements from where plant Auto was intercepted for manual or power lost.

Before we look for statements let us clear some word definitions.

Basically we define only two types for making conditions or addressing switches or relays or storing data or retrieving. They are flag and counter & Tank, data.

FLAG types   : Input, Output, MyFlag, GlobalFlag, TimerFlags

   Flag types has only two status either On or Off

COUNTER types: My, Global

   Counter types can store data 0 to 255

   Here we may use word OPERATOR.

   OPERATOR has one of <, >, <>, =, <=, >= value

TANK: Only Tank number or its name should be supplied.

DATA: It has only numeric numbers.

STRING: A line having alphanumeric data. But start with [image] as first letter.

In General a bold & italic word in statements has different data’s while other words are fixed words.


Statement List
Programming Language

+1 COUNTER

-1 COUNTER

Alarm Lift Time = DATA

Alarm Lower Time = DATA

Alarm SLowTraverse Time = DATA

Alarm Station Time = DATA

Barrel Drip Time = DATA

ByPass Tank From Group1 DATA

ByPass Tank From Group2 DATA

ByPass Tank From Group3 DATA

Call DATA

COUNTER = Counter0

Counter0 = COUNTER

Counter0 = DATA

Counter0 = InputByte DATA

Disable Drip Time

Do

Do Until FLAG Is On

Do Until FLAG Is Off

Do Until COUNTER OPERATOR Counter0

End If

End Procedure

Else

Get Information From TANK

Group1 Buffer Size = DATA

Group2 Buffer Size = DATA

Group3 Buffer Size = DATA

If FLAG Is On

If FLAG Is Off

If COUNTER OPERATOR Counter0

Increment Load Number

OutputByte DATA = Counter0

Lift By My

Lift From TANK

Lift From Load Buffer DATA

Lift From Group1 Buffer

Lift From Group2 Buffer

Lift From Group3 Buffer

Load Buffer Size = DATA

Log Data For Tank

Loop

Lower By My

Lower To Group1 Buffer

Lower To Group2 Buffer

Lower To Group3 Buffer

Lower On Load Buffer DATA

Lower On TANK

Message

Pause DATA Seconds

Pause DATA Minutes

Procedure DATA

Put Information To TANK

Putoff FLAG

Puton FLAG

Rack Drip Time = DATA

Random

Wagon Basic Position = TANK


Increment Counter
+1

SeeAlso   Example

___________________________________________________________________________

Increment Counter by 1.

Syntax:

+1 COUNTER

COUNTER:

MY counters, GLOBAL counters number or name

Note:

Numbers for MY & GLOBAL counters are 0 to 223

If counter value is 98 it becomes 99.

If counter value is 99 it becomes 0.

Example:

+1 MY.0

My.0 counter had value 25.

After This statement it becomes 26.

+1.Global.Choice

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

it becomes 0.


Decrement Counter

-1

___________________________________________________________________________

Increment Counter by 1.

Syntax:

-1 COUNTER

COUNTER:

MY counters, GLOBAL counters number or name

Note:

Numbers for MY & GLOBAL counters are 0 to 223

If counter value is 0 it becomes 99.

If counter value is 99 it becomes 98.

Example:

-1 MY.0

My.0 counter had value 25.

After This statement it becomes 24.

-1.Global.Choice

Counter named Choice of a Global, had value 0. After 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-1 of OutputCard-1 flickers, display will show first line of (error Or remedy programmed in fix message file) message related to function.

Syntax:

Alarm FUCTION Time = Data

FUCTION: Lift, Lower, SlowTraverse, Station

    Lift: - until wagon arm reaches to LiftEnd position.

    Lower: - until wagon arm reaches to LowerEnd position.

    SlowTraverse:- While traversing, wagon reaches one before

destinations station and expecting slow forward proxy for forward

motion or slow reverse proxy for reverse motion.

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

Data: As time 0 to 99 in seconds

Example:

Alarm Lift Time = 12

Whenever a wagon start lifting an related interpreters alarm-

timer starts. If Lift function is not completed in 12 seconds an

error will be generated.

Alarm Lower Time = 12

Whenever a wagon start lowering an related interpreters alarm-

timer starts. If Lower function is not completed in 12 seconds an

error will be generated.

Alarm SlowTraverse Time = 3

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

moment it reaches to station 9 an related interpreters alarm timer

starts. If SlowForwardProxy is not received in 3 seconds 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 alarmtimer also starts. If wagon does not reach

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

will be regenerated and continue repeating it unless it reaches

station 10.


Barrel Drip Time

___________________________________________________________________________

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

Syntax:

Barrel Drip Time = DATA

Data: 0 to 99 seconds time.

Example:

Barrel Drip Time = 10

While lifting If it is Barrel Load and MidBarrelProxy is sensed

lifting is stopped 10 seconds waits & then starts lifting to LiftEnd position.


ByPass a GroupTank
ByPass

___________________________________________________________________________

No Help is provided for this text.


Calling Procedure
Call

___________________________________________________________________________

For each wagon programming user can write 8 procedures and each procedures can be called in program. whenever program finds a procedure program will divert itself to called procedure and when procedure ends (End Procedure statement) program comes back to next to call position.

Syntax:

Call DATA

Data: 0 to 7(Procedures).

Example:

Call 0

Assume an Interpreter Program as

Procedure 0

  Lower on Tank.9

  Pause 10 Seconds

  Lift from Tank.9

End Procedure

Do

  Lift from Tank.8

  Call 0

  Lower on Tank.8

  - - -

  - - -

Loop

In above program first wagon lifts from 8 THEN LOER ON 9 WAITS FOR 10 SECONDS THEN LIFTS FROM 9 THEN Lower on tank 8 & so on to next.


Counter value setting
COUNTER

___________________________________________________________________________

COUNTER value is replaced by a value of counter0 of current Interpreter.

Syntax:

COUNTER = Counter0

COUNTER:

MY counters, GLOBAL counters number or name

Note:

Numbers for MY & GLOBAL counters are 0 to 223

Example:

MY.25 = Counter0

Counter-0 of current interpreter had value 20.Counter-25 of current interpreter had value 35.

After This statement Counter-25 of current interpreter becomes 20.Counter-0 value remains 20.

Global.80 = Counter0

Counter-0 of current interpreter had value 20.GlobalCounter-80 of had value 35.

After This statement GlobalCounter-80 value becomes 20.Counter-0 value remains 20.


Conter0 value setting
COUNTER0

___________________________________________________________________________

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

Syntax:

Counter0 = Counter

COUNTER:

MY counters, GLOBAL counters number or name

Fixed value 0 To 99.

Example:

Counter0 = MY.25

Counter-0 of current interpreter had value 20.Counter-25 of current interpreter had value 35.

After This statement Counter0 of current interpreter becomes 35.Counter-25 value remains 35.

Counter0 = Global.80

Counter-0 of current interpreter had value 20.GlobalCounter-80 of had value 35.

After This statement Counter-0 value becomes 35. GlobalCounter-80 value remains 35.

Counter0 = 10


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. Once load is lifted, dripping time is enabled automatically.

Syntax:

Disable Drip Time


Repeating statements
Do . . . Loop

Example

___________________________________________________________________________

Do & Loop or Do until CONDITION & Loop should always be in pair. Statements between Do & Loop are repeated continuously, while statements between Do Until CONDITION & Loop are repeated until condition is satisfied.

Syntax:

Do

  (Statements)

Loop

Do Until FLAG Is On

  (Statements)

Loop

Do Until FLAG Is OFF

  (Statements)

Loop

Do Until COUNTER OPERATOR Counter0

  (Statements)

Loop

FLAG:

MyFlag, GlobalFlag, Input, Output, TimerFlags, LoadFlag number or name

COUNTER:

MY counters, GLOBAL counters number or name

OPERATOR:

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


End Block
End

___________________________________________________________________________

Ends If block statements or Ends a Procedure block statements.

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.

Statements between a Procedure & End Procedure are called in program latter with Call statement. Thus End defines end of procedure.

Syntax:

End If

End Procedure


Get Tank's Information
Get

___________________________________________________________________________

No Help is provided for this topic.


Group size setting
Group

___________________________________________________________________________

No Help is provided for this topic.


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.

Syntax:

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:

FLAG Is On

FLAG Is Off

COUNTER OPERATOR Counter0

FLAG:

MyFlag, GlobalFlag, Input, Output, TimerFlags, LoadFlag number or name

COUNTER:

MY counters, GLOBAL counters number or name


Log Flight Bar
Increment Load Number

___________________________________________________________________________

For logging purpose, Whenever a new load enters into the plant, it should have some identity different from other load. Above statement increment load number. Numbers are from 0 to 255, if it exceeds more than 255 then again it is numbered as 0.Also programmed data (Like current, passivation) remains attached to this load.

Syntax:

Increment Load Number


Lift By Counter
Lift By My.C

___________________________________________________________________________

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 its private counter C (My.C) and then lift flight bar until Lift end switch is not activated. Program does not goto next statement until this statement is over.

Syntax:

Lift From My.C

Where

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 VG108.


Lifting From Process Tanks
Lift From Tank.T

___________________________________________________________________________

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

Syntax:

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 VG108.


Lower By Counter
Lower By My.C

___________________________________________________________________________

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 its private counter C (My.C) and then lower flight bar until Lift end switch is not activated. Program does not goto next statement until this statement is over.

Syntax:

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 VG108.


Lowering on Process Tanks
Lower on Tank.T

___________________________________________________________________________

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

Syntax:

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 VG108.


Display Message
Message

___________________________________________________________________________

Some plants having more then one wagon, in such case wagon can not move until second wagon gives release command(Through GlobalFlag).In such case wagon is waiting for other wagon release command. Some time it is waiting for operator response (Through Input).Such waiting of wagon can be intimated to users by statement Message. This message will be displayed on Display Line which is related to wagon programming.

E.g.

If statement appears in Wagon1 Programming then Display Line is 1

If statement appears in Wagon2 Programming then Display Line is 2

Syntax:

Message “Message String”

Where

Message String = 32 character message.

Example

Do Until GlobalFlag.0 Is On

  Message “Waiting for Wagon1 Signal”

Loop

Do Until Input.16 Is On

  Message “Waiting for Operator Response”

Loop

Note: If in above statement if @character is used before Global or Wagon counter then it’s counter value is placed instead of Global or Wagon counter

E.g.

Message “Waits for Tank @Wagon1.5 Unload”

In above case, @Wagon1.5 will be replaced with counter 5 of wagon1.If this value = 10 then Message will look as

Message = Waits for Tank 10 Unload


Fixed Waiting
Pause

___________________________________________________________________________

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

Syntax:

1)	Pause Data Seconds

2)	Pause Data Minutes

Where

Data = 0 to 99.

Example

Pause 30 Seconds

Pause 2 Minutes


Frequent Required Function
Procedure

___________________________________________________________________________

For different program it some wagon movement or part of program is same. One can write such part of program in one of 8 procedures, and then latter calls in program by Call statements. Procedures should be written on top of programming always. Each procedure ends with statement End Procedure.

Syntax:

Procedure Data

Where

Data = 0 to 7.

Example

Procedure 0

Lift From Tank.10

Lower on Tank.11

Pause 10 Seconds

Lift from Tank.11

Lower on Tank.13

End Procedure

Latter In program Call 0 statement first completes Procedure 0 step then program returns to next step of Call 0.


Reset Flag
Putoff

___________________________________________________________________________

To set Flags to Off condition

Syntax:

Putoff Flag.F

Where

Flag = GlobalFlag or MyFlag.

F = GlobalFlag or MyFlag number.

Example

Putoff GlobalFlag.10

Putoff MyFlag.10


Set Flag
Puton

___________________________________________________________________________

To set Flags to On condition

Syntax:

Puton Flag.F

Where

Flag = GlobalFlag or MyFlag.

F = GlobalFlag or MyFlag number.

Example

Puton GlobalFlag.10

Puton MyFlag.10


Set 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.

Syntax:

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 appeared before a main program (Program written between Do and Loop statements)

Syntax:

Wagon basic Position = Data

Where

Data = 0 to 63 Tanks.

Example

Wagon Basic Position = 10


Decrement Counter

-1 COUNTER


Example:

___________________________________________________________________________

Create New Project. Declare in Plant setting That there is only one wagon. Maximum Tanks 10.Copy Following Program and paste in Interpreter-1. In Statement Message put apostrophe in start of Message line. Compile it then compile in General. Transmit on 27c256 through programmer, and then replace it on Microprocessor card. First run with Auto Restart.

Procedure 0

  Lower on Tank.3

  Pause 14 Seconds

  Lift From Tank.3

End Procedure

Procedure 1

  Lower on Tank.4

  Pause 20 Seconds

  Lift From Tank.4

End Procedure

Wagon Basic Position = Tank.0

If Input.7 Is On

  Counter0 = 0

  My.13 = Counter0

Else

  Counter0 = 5

  My.13 = Counter0

End If

Do

  Do Until Input.6 Is On

    Message “Waits Operator response Input 6”

  Loop

  Lift From Tank.12

  Lower On Tank.12

  If My.13 = 0

    Lift From Tank.13

  End If

  If My.13 = 1

    Lift From Tank.14

  End If

  If My.13 = 2

    Lift From Tank.15

  End If

Loop


MY is collection of 224 counters of an Interpreter in which presently one is writing its program.

Each counter is referred as My.COUNTER.


Global is collection of 224 counters of are available to 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 14 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.