VgMotor42 Help Topics

___________________________________________________________

VgMotor42 is renovate product, PLC-Cum-Frequency Motor control drive for 42 Volt 3-Phase.

Required input Voltage is 40 to 50 Volt AC single phase input voltage, output is 3 phase 42 Volt AC.

Salient Features:

1)	Wide range of Input Volt 40 to 50 Volt AC single phase.

2)	Single Phase to 3 Phase Output.

3)	Power Factor = 1.

4)	Reduced Wire cabling for plating plants.

5)	Also reduced contact problem for above.

6)	Constant motor torque, reducing motor billing by 30%.

7)	Programming-Technique allows motor to vary it’s function in different tank as per requirement.

8)	Reducing hardware like, motor starter and overload protection circuit.

9)	Imagine idea and implement in your way.

1)	On the left side of left picture is

   Female 9-Pin-Dsub connector, for RS-232C

   To communication with PC having installed

   VGMotor42 program.

2) Next to Female 9-Pin-Dsub connector, is

   9-Pin connector (Shown wire is Pin9 is Ground).

   Pin 1 To Pin8 is used as Input 0 To 7.

3) Next to 9-Pin Connector, is 3-Pin Connector

   For Motor Output connection as U, V, W.

4) On other side of card, there is 2-Pin connector

   is Ac supply (40 Volt to 50 Volt AC) for device.

   Right side of picture is other side of left picture.

   5) On the card six pin Berks-Pin Connector has

      +5 volt and Ground supply and 2 Output.

Hardware

Data Files

Operating Mode:

Program Files


Hardware

___________________________________________________________

1) 1 Serial Interface (Optional)

   Connector Dsub-9 Pin Female On the left is for Rs-232C.

Not-Programmed Mode

1) 5 Analog + 3 Digital Inputs.

Programmed Mode

1) 8 Digital Inputs or 6 Analog + 2 Digital Inputs.

2) 2 Digital Outputs.

L.E.D

1) Red colored Fault L.E.D

2) Green colored Power-On L.E.DMotor Output

Next to 9-Pin Connector, is 3-Pin connector having

connections Pin1 to Pin3 for Motor Output U, V, W.

Supply Volt:

On other side of card, there is 2-Pin connector, is

Ac supply (40 Volt to 50 Volt AC) for device.


Red L.E.D

___________________________________________________________

Red L.E.D is fault indication L.E.D.

Red Fault L.E.D glows up for following condition:

1) If Motor Current exceeds then Set

   CurrentLimit

2) Supply under Voltage.

3) Fault in VFD Power stage.

User has to turn of VFD, rectify fault then user should resume work.


Green L.E.D

___________________________________________________________

Green L.E.D is power indication L.E.D.


Data Files

___________________________________________________________

There are 3 data-type file.

1) Byte-Type can hold a value 0 To 255

2) Word-Type can hold a value 0 To 65535

3) Boolean-Type can hold a value True or False

User Data

System Data


User Data

___________________________________________________________

User Data:

There are basically 6 Groups of user data.

Each group is made of Elements.

Group Name:

1) Analog

2) Counter

3) Flag

4) Input

5) InputByte

6) Output

7) Timer

8) WordCounter


Analog Group

___________________________________________________________

There are 6 elements(Analog) in this group.

Each Element can hold value 0 To 1021.

They are addressed as:

Analog.0

Analog.1

Analog.2

Analog.3

Analog.4

Analog.5

These are physical Input to VgMotor42.

Input is actually is Analog Input, where user can connect a trim-pot or analog input range from 0 to 1.1 volt.

Note:

One should remember that Input 0 To 5 is used as analog input and same inputs can be used as digital input.


Counter Group

___________________________________________________________

There are 8 elements(Counters) in this group.

Each Element is Byte-Type and can hold value 0 To 255.

Counters are addressed as:

Counter0 or Counter.0

Counter1 or Counter.1

Counter2 or Counter.2

Counter3 or Counter.3

Counter4 or Counter.4

Counter5 or Counter.5

Counter6 or Counter.6

Counter7 or Counter.7


Flag Group

___________________________________________________________

There are 8 elements(Flags) in this group.

Each Element is Boolean-Type and can hold value True or False.

They are addressed as:

Flag0 or Flag.0

Flag.1

Flag.2

Flag.3

Flag.4

Flag.5

Flag.6

Flag.7


Input Group

___________________________________________________________

There are 8 elements(Inputs) in this group.

Each Element is Boolean-Type and can hold value True(High) or False(Low).

They are addressed as:

Input.0

Input.1

Input.2

Input.3

Input.4

Input.5

Input.6

Input.7

These are physical Input to VgMotor42.

Input is actually is Digital Input, where user can connect Push-Button or Switch.

In Not-Programmed Mode Inputs are used as:

Input.0 as Analog as DecelerateRate

Input.1 as Analog as AccelerateRate

Input.2 as Analog as ReferenceSpeed

Input.3 as Analog as CurrentLimit

Input.4 as Analog as Volt%

Input.5 as Digital as AutoTorque(High), Not-AutoTorque(Low)

Input.6 as Digital as CommandForward(Low)

Input.7 as Digital as CommandReverse(Low)

Note:

One should remember that Input 0 To 5 is used digital as input and same inputs can be used as analog input.


InputByte Group
InputByte

___________________________________________________________

It is single element(InputByte) in this group.

It can hold value 0 To 255

They are addressed as “InPutByte”

Its value is decided by all 8 Digital Input and is calculated as follows:

InputByte = 128*I7 + 64*I6 + 32*I5 + 16*I4 + 8*I3 + 4*I2 + 2*I1 + I0

Where I7 to I0 is value of Digital Input, If Input is High Value = 1 else Value = 0.


Output Group

___________________________________________________________

There are 2 elements(Outputs) in this group.

Each Element is Boolean-Type and can hold value True(High) or False(Low).

They are addressed as:

Output.0

Output.1

These are physical Output from VgMotor42.

Output switches 0 to 5volt, can source or sink current of 10 M.A.

User can connect auxiliary hardware with necessary driver.


Timer Group

___________________________________________________________

There are 4 elements(Timers) in this group.

Timer tick time is of 1 second and can hold value 0 To 255.

Timers are addressed as:

Timer.0

Timer.1

Timer.2

Timer.3

A Timer is triggered by statement

TriggerTimer

Each Timer has a relative flag named as TimerFlag.

Each TimerFlag is Boolean-Type and can hold value True or False. When Timer is running it sets to True.

TimerFlags are addressed as:

TimerFlag.0

TimerFlag.1

TimerFlag.2

TimerFlag.3


Word Group
WordCounter Group

___________________________________________________________

There are 4 elements(WordCounters) in this group.

Each Element is Word-Type and can hold value 0 To 65535.

WordCounters are addressed as:

WordCounter.0

WordCounter.1

WordCounter.2

WordCounter.3

Basically 8 Counters are configured as 4 WordCounters.

Counter0 and Counter1 together act as WordCounter.0.

And so Counter2 and Counter3 together act as WordCounter.1.

And so Counter4 and Counter5 together act as WordCounter.2.

And so Counter6 and Counter7 together act as WordCounter.3.

I.E Counter0 holds remainder of (WordCounter.0 / 256) and Counter1 holds integer value of (WordCounter.0 / 256).

And so for other WordCounter

I.E

WordCounter.0 = Counter.1 * 256 + Counter.0

WordCounter.1 = Counter.3 * 256 + Counter.2

WordCounter.2 = Counter.5 * 256 + Counter.4

WordCounter.3 = Counter.7 * 256 + Counter.6

E.G If user loads Counter0 = 30 and Counter1 = 25

Means WordCounter.0 holds 25 * 256 + 30 = 6430.


System Data
System Data: Provided by System

01) AccelerateRate

02) AutoTorque

03) CommandForward

04) CommandReverse

05) CurrentLimit

06) CurrentSpeed

07) DecelerateRate

08) MotorEnable

09) MotorForward

10) Programmed

11) ReferenceSpeed

12) ReferenceVolt%


AccelerateRate

___________________________________________________________

Value for AccelerateRate is 1 to 102.1 Hz.

If motor ReferenceSpeed is less then motor CurrentSpeed then Motor always accelerate from current-speed as specified by AccelerateRate.

I.E If AccelerateRate = 10, CurrentSpeed = 0 and ReferenceSpeed = 50 Then motor will accelerate form 0 to 50 in 5 seconds.


AutoTorque

___________________________________________________________

AutoTorque is Boolean system memory, I.E it holds a value True or False.

If device is programmed then its value can be set by program statement.

If device is not programmed then its value can be set by Input.5, If input is high then it holds value True else it holds value False.


CommandForward

___________________________________________________________

See MotorEnable


Reverse
CommandReverse

___________________________________________________________

See MotorEnable


CurrentLimit

___________________________________________________________

Value for CurrentLimit is 0 to 25.5 Amp.

If Motor Current exceeds then Set CurrentLimit then a fault L.E.D of red color will glow up and motor will stop functioning. User has to turn of VFD, rectify fault then user should resume work.


CurrentSpeed

___________________________________________________________

CurrentSpeed represents current motor speed.

See Also

AccelerateRate

DecelerateRate


DecelerateRate

___________________________________________________________

Value for DecelerateRate is 1 to 102.1 Hz.

If motor ReferenceSpeed is greater then motor CurrentSpeed then Motor always decelerate from current-speed as specified by DecelerateRate.

I.E If DecelerateRate = 10, CurrentSpeed = 50 and ReferenceSpeed = 0 Then motor will decelerate form 50 to 0 in 5 seconds.


MotorEnable

___________________________________________________________

Programmed is VgMotor42 Boolean system memory.

MotorEnable is VgMotor42 Boolean system memory.

MotorForward is VgMotor42 Boolean system memory.

CommandForward is VgMotor42 Boolean user memory.

CommandReverse is VgMotor42 Boolean user memory.

Input-Forward (Input6) is Boolean Input to VgMotor42.

Input-Reverse (Input7) is Boolean Input to VgMotor42.

MotorEnable is set as per following condition.

If MotorEnable = False Then

  If programmed = False then

    If Input-Forward = Low

      MotorForward = True

      MotorEnable = True

    Else If Input-Reverse = Low

      MotorForward = False

      MotorEnable = True

    Else

      MotorEnable = False

    End If

  Else	'If programmed = True

    If CommandForward = True

      MotorForward = True

      MotorEnable = True

    Else If CommandReverse = True

      MotorForward = False

      MotorEnable = True

    Else

      MotorEnable = False

    End If

  End If

Else 	‘MotorEnable = True

  If programmed = False then

    If CommandForward = False And CommandReverse = False

      MotorEnable = False

    End If

  Else	'If programmed = True

    If Input-Forward = False And Input-Reverse = False

      MotorEnable = False

    End If

  End If

End If


MotorForward

___________________________________________________________

See MotorEnable


Programmed

___________________________________________________________

Programmed is Boolean system memory, I.E it holds a value True or False.

If device is programmed then it holds value true else it is set False.

Device can only be programmed or erased through RS-232C interface with help of VgMotor42 program.


ReferenceSpeed

___________________________________________________________

Value for Speed is 1 to 102.1 Hz.

If VgMotor42 not in Programmed mode then this value is taken from “Speed-Set” Trim-Pot.

See Also

AccelerateRate

DecelerateRate


ReferenceVolt%

___________________________________________________________

It can hold a value from 0 To 100%.

If Programmed = True then ReferenceVolt% is set by program else it is set by Analog-Input.4.

Please Note:

Its value is effective only when AutoTorque = False.

Warning:

Only qualified user should use ReferenceVolt% setting otherwise it can harm motor or and device also.


Operating Mode

___________________________________________________________

There are 2 Modes of Operation.

1)	Programmed Mode

2)	Non-Programmed Mode

Programmed Mode:

To enter in programmed Mode, program device through

RS-232C interface. In this mode all Inputs & Outputs and commands are controlled through program.

Input 0 To 5 can be used as Digital or Analog inputs, while input 6 To 7 can be used as digital only.

Non-Programmed Mode:

To enter in non-programmed Mode, Erase device program through RS-232C interface. In this mode all Inputs are controlled through as per following instruction.

1)	Pin1 as Input0 as Analog-Input as DecelerateRate:

      User can give 0 To 1.1Volt Input between Input0

      and Input9, or user can connect 2.7K Trim-Pot

      between Input0 and Input9 to vary DecelerateRate

      from 0 To 102.1 Hz.

      If Input0 is left open then selected

      Decelerate-Rate = 102.1

2)	Pin2 as Input1 as Analog-Input as AccelerateRate:

   User can give 0 To 1.1Volt Input between Input1

   and Input9, or user can connect 2.7K Trim-Pot

   between Input1 and Input9 to vary AccelerateRate

   from 0 To 102.1 Hz.

     If Input1 is left open then selected

     AccelerateRate = 102.1

3)	Pin3 as Input2 as Analog-Input as ReferenceSpeed:

     User can give 0 To 1.1Volt Input between Input2

     and Input9, or user can connect 2.7K Trim-Pot

     between Input2 and Input9 to vary ReferenceSpeed

     from 0 To 102.1 Hz.

     If Input2 is left open then selected

     ReferenceSpeed = 102.1

4)	Pin4 as Input3 as Analog-Input as Motor ReferenceVolt%:

Input is effective only when AutoTorque (Input6) selection is Low (False).

   User can give 0 To 1.1Volt Input between Input3

   and Input9, or user can connect 2.7K Trim-Pot

   between Input3 and Input9 to vary ReferenceVolt%

   from 0 To 100% Voltage.

     If Input4 is left open then selected

     ReferenceVolt% = 100

5)	Pin5 as Input4 as Analog-Input as Motor CurrentLimit:

      User can give 0 To 1.1Volt Input between Input4

      and Input9, or user can connect 2.7K Trim-Pot

      between Input4 and Input9 to vary CurrentLimit

      from 0 To 65 Amps.

      If Input4 is left open then selected

      CurrentLimit = 65 Amps

6)	Pin6 as Input5 as Digital-Input as AutoTorque:

   If Input5 is shorted with Input9 then

   Manual-torque is selected.

  (Torque selected through Input4)

   If Input5 is left open then AutoTorque is selected.

Warning:

   De-Selected Auto Mode should only be operated

   by a qualified person.

7)	Pin7 as Input6 as Digital-Input as CommandForward:

     If Input6 is shorted with Input9 then motor

     forward command is selected, provided CommandReverse

     was not selected.

     If Input6 is left open then CommandForward

     not selected.

     To see that motor moving in forward direction, check

     that No-Error exists and AccelerateRate <> 0 and Motor

     ReferenceVolt <> 0. (AutoTorque is deselected).

8)	Pin8 as Input7 as Digital-Input as CommandReverse:

   If Input7 is shorted with Input9 then motor

   forward command is selected, provided CommandForward

   is not selected.

     If Input7 is left open then CommandReverse

     is not selected.

     To see that motor moving in reverse direction, check

     that No-Error exists and DecelerateRate <> 0 and Motor

     ReferenceVolt <> 0. (Auto Torque is deselected).

9)	Pin9 as Input9 as common ground:


Program Files

___________________________________________________________

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

One can use '(Means Comment) to make comment either in start of line or in end of line.

In This program there should be at least one “Do” statement and one “Loop” statement.

All statements before first “Do” statement are executed only at time of power on(I.E. Without Battery). They are not scanned afterwards.

At power on program always starts from first statement of Main File.

Software Statements

AccelerateRate = Data

AccelerateRate = WordCounter

AutoTorque = False

AutoTorque = Flag0

AutoTorque = True

CommandForward = False

CommandForward = Flag0

CommandForward = True

CommandReverse = False

CommandReverse = Flag0

CommandReverse = True

Counter0 = Data

Counter0 And Data

Counter0 And Counter

Counter0 Or Data

Counter0 Or Counter

Counter0 Xor Data

Counter0 Xor Counter

Counter0 = Counter

Counter1 = Data

Counter2 = Data

Counter3 = Data

Counter4 = Data

Counter5 = Data

Counter6 = Data

Counter7 = Data

Counter = Counter0

Counter = InputByte

CurrentLimit = Data

DecelerateRate = Data

DecelerateRate = WordCounter

Do

Do Until Counter0 = Data

Do Until Counter0 <> Data

Do Until Counter0 < Data

Do Until Counter0 <= Data

Do Until Counter0 > Data

Do Until Counter0 >= Data

Do Until Counter0 = Counter

Do Until Counter0 <> Counter

Do Until Counter0 < Counter

Do Until Counter0 <= Counter

Do Until Counter0 > Counter

Do Until Counter0 >= Counter

Do Until [Not] Flag

Do Until [Not] Input

Do Until [Not] TimerFlag

Else

End If

Flag0 = [Not] Flag

Flag0 = [Not] Input

Flag0 = MotorEnable

Flag0 = MotorForward

Flag0 = [Not] Output

Flag0 = [Not] TimerFlag

Flag0 And [Not] Flag

Flag0 And [Not] Input

Flag0 And MotorForward

Flag0 And [Not] Output

Flag0 And [Not] TimerFlag

Flag0 Or [Not] Flag

Flag0 Or [Not] Input

Flag0 Or MotorForward

Flag0 Or [Not] Output

Flag0 Or [Not] TimerFlag

Flag0 Xor [Not] Flag

Flag0 Xor [Not] Input

Flag0 Xor MotorForward

Flag0 Xor [Not] Output

Flag0 Xor [Not] TimerFlag

Flag = False

Flag = Flag0

Flag = True

If ClickedToFalse Input

If ClickedToTrue Input

If Counter0 = Data

If Counter0 <> Data

If Counter0 < Data

If Counter0 <= Data

If Counter0 > Data

If Counter0 >= Data

If Counter0 = Counter

If Counter0 <> Counter

If Counter0 < Counter

If Counter0 <= Counter

If Counter0 > Counter

If Counter0 >= Counter

If [Not] Flag

If [Not] Input

If [Not] TimerFlag

Loop

Output = False

Output = Flag0

Output = True

ReferenceSpeed = Data

ReferenceSpeed = WordCounter

Reset Program

TriggerTimer0 Data

TriggerTimer1 Data

TriggerTimer2 Data

TriggerTimer3 Data

TriggerTimer0 By Counter

TriggerTimer1 By Counter

TriggerTimer2 By Counter

TriggerTimer3 By Counter

Volt% = Data

WordCounter0 = WordCounter0 + Data

WordCounter0 = WordCounter0 - Data

WordCounter1 = WordCounter1 + Data

WordCounter1 = WordCounter1 - Data

WordCounter2 = WordCounter2 + Data

WordCounter2 = WordCounter2 - Data

WordCounter3 = WordCounter3 + Data

WordCounter3 = WordCounter3 - Data

WordCounter = AccelerateRate

WordCounter = DecelerateRate

WordCounter = CurrentSpeed

WordCounter = ReferenceSpeed


AccelerateRate =

___________________________________________________________

See Also

Syntax 1:

AccelerateRate = Data

Data = 0 To 102.1

Syntax 2:

AccelerateRate = WordCounter.Value

Value = 0 To 3

User can load in AccelerateRate by two ways, one direct with data 0 to 102.1 or

Indirect by WordCounter.0 To WordCounter.3

If WordCounter Value > 1021 then only value 1021 is loaded in AccelerateRate memory


AutoTorque =

___________________________________________________________

See Also

Syntax 1:

AutoTorque = False

Syntax 2:

AutoTorque = Flag0

Syntax 2:

AutoTorque = True

User can put AutoTorque equal to True or False or user can load Flag0 in AutoTorque by above statements.


Counter =

___________________________________________________________

See Also

Syntax 1:

Counter0 = Data

Data = 0 To 255

Syntax 2:

Counter1 = Data

Data = 0 To 255

Syntax 3:

Counter2 = Data

Data = 0 To 255

Syntax 4:

Counter3 = Data

Data = 0 To 255

Syntax 5:

Counter4 = Data

Data = 0 To 255

Syntax 6:

Counter5 = Data

Data = 0 To 255

Syntax 7:

Counter6 = Data

Data = 0 To 255

Syntax 8:

Counter7 = Data

Data = 0 To 255

Syntax 9:

Counter0 = Counter.Value

Value = 0 To 7

Syntax 9:

Counter0 = Counter.Value

Value = 0 To 7

Syntax 10:

Counter.Value = InputByte

Value = 0 To 7

User can load in one of 8 Counter with data 0 to 255

Or can load one of Counter 0 To 7 value in Counter0

Or can load InputByte value in one of Counter 0 To 7.


Counter0 And

___________________________________________________________

See Also

Syntax 1:

Counter0 And Data

Data = 0 To 255

Each 8 bit of Counter0 is And ’ed  with each corresponding bit of Data.

Syntax 2:

Counter1 And Counter.Value

Value = 0 To 7

Each 8 bit of Counter0 is And’ed  with each corresponding bit of Counter 0 to 7 Value

E.g.

Counter0 = 255

Counter0 And 255 ‘Counter0 has now value 255

E.g.

Counter0 = 255

Counter0 And 0 ‘Counter0 has now value 0

E.G.

Counter0 = 0

Counter0 And 255 ‘Counter0 has now value 0

E.G.

Counter0 = 0

Counter0 And 0 ‘Counter0 has now value 0


Counter0 Or

___________________________________________________________

See Also

Syntax 1:

Counter0 Or Data

Data = 0 To 255

Each 8 bit of Counter0 is Or ’ed  with each corresponding bit of Data.

Syntax 2:

Counter1 Or Counter.Value

Value = 0 To 7

Each 8 bit of Counter0 is Or ’ed  with each corresponding bit of Counter 0 to 7 Value

E.g.

Counter0 = 255

Counter0 Or 255 ‘Counter0 has now value 255

E.g.

Counter0 = 255

Counter0 Or 0 ‘Counter0 has now value 255

E.G.

Counter0 = 0

Counter0 Or 255 ‘Counter0 has now value 255

E.G.

Counter0 = 0

Counter0 Or 0 ‘Counter0 has now value 0


Counter0 Xor

___________________________________________________________

See Also

Syntax 1:

Counter0 Xor Data

Data = 0 To 255

Each 8 bit of Counter0 is Xor ’ed  with each corresponding bit of Data.

Syntax 2:

Counter1 Xor Counter.Value

Value = 0 To 7

Each 8 bit of Counter0 is Xor ’ed  with each corresponding bit of Counter 0 to 7 Value

E.g.

Counter0 = 255

Counter0 Xor 255 ‘Counter0 has now value 0

E.g.

Counter0 = 255

Counter0 Xor 0 ‘Counter0 has now value 255

E.G.

Counter0 = 0

Counter0 Xor 255 ‘Counter0 has now value 255

E.G.

Counter0 = 0

Counter0 Xor 0 ‘Counter0 has now value 0


Current% =
CurrentLimit =

___________________________________________________________

See Also

Syntax 1:

CurrentLimit = Data

Data = 0 To 25.5

User can load in CurrentLimit percentage limit with data 0 to 25.5. If motor current increases more then specified CurrentLimit then VFD gets tripped.


DecelerateRate =

___________________________________________________________

See Also

Syntax 1:

DecelerateRate = Data

Data = 0 To 102.1

Syntax 2:

DecelerateRate = WordCounter.Value

Value = 0 To 3

User can load in Deceleration by two ways, one direct with data 0 to 102.1 or

Indirect by WordCounter.0 To WordCounter.3

If WordCounter Value > 1021 then only value 1021 is loaded in Deceleration memory


Do/Do Until/Loop Statement

___________________________________________________________

Repeats a block of statements between “Do” and “Loop” statement until a condition becomes True. If No condition is supplied then repeats for ever.

Syntax 1:

Do

  [statements]
  [statements]

Loop

Syntax 2:

Do [Until Condition]

  [statements]
  [statements]

Loop

Condition: An expression that evaluates to True Or False.

Example:

Counter0 = 1

Do Until Flag.0

  Counter0 = 0

  Flag.0 = True

Loop

In above example If Flag.0 was False then Counter0 value changed to 0 and Flag.0 set to True Else Counter0 remains unchanged.

Example:

Counter0 = 1

Do Until Not Flag.0

  Counter0 = 0

  Flag.0 = False

Loop

In above example If Flag.0 was True then Counter0 value changed to 0 and Flag.0 set to False Else Counter0 remains unchanged.

Example:

Counter0 = 0

Do Until Counter0 = 2

  If ClickedToTrue Input.0

    WordCounter0 = WordCounter0 + 1

  End If

Loop

In above example program remains in loop unless Input.0 is clicked from Low To High 2 times. Because clicking Input.0 each time Counter0 is updated by 1.


Flag =

___________________________________________________________

See Also

User can load in Flag0 all other shown Boolean value to have logical operation, or to test condition of required Boolean.

Syntax 1:

Flag0 = Flag.Value

Value = 0 To 7

Replaces Flag0 with any one of 8 Flag

Syntax 2:

Flag0 = Not Flag.Value

Value = 0 To 7

Replaces Flag0 with complement of any one of 8 Flag

Syntax 3:

Flag0 = Input.Value

Value = 0 To 7

Replaces Flag0 with any one of 8 Input

Syntax 4:

Flag0 = Not Input.Value

Value = 0 To 7

Replaces Flag0 with complement of any one of 8 Input

Syntax 5:

Flag0 = MotorEnable

Replaces Flag0 with MotorEnable

Syntax 6:

Flag0 = MotorForward

Replaces Flag0 with MotorForward

Syntax 7:

Flag0 = Output.Value

Value = 0 To 2

Replaces Flag0 with any one of 3 Output

Syntax 8:

Flag0 = Not Output.Value

Value = 0 To 2

Replaces Flag0 with complement of any one of 3 Ouput

Syntax 9:

Flag0 = TimerFlag.Value

Value = 0 To 3

Replaces Flag0 with any one of 4 TimerFlag

Syntax 10:

Flag0 = Not TimerFlag.Value

Value = 0 To 3

Replaces Flag0 with complement of any one of 4 TimerFlag


Flag0 And

___________________________________________________________

See Also

Syntax 1:

Flag0 And Flag.Value

Value = 0 To 7

Flag0 is And ’ed  with one of 8 Flag.

Result is placed in Flag0

Syntax 2:

Flag0 And Not Flag.Value

Value = 0 To 7

Flag0 is And’ ed  with complemented one of 8 Flag.

Result is placed in Flag0

Syntax 3:

Flag0 And Input.Value

Value = 0 To 7

Flag0 is And ’ed  with one of 8 Input

Result is placed in Flag0

Syntax 4:

Flag0 And Not Input.Value

Value = 0 To 7

Flag0 is And’ ed  with complemented one of 8 Input

Result is placed in Flag0

Syntax 5:

Flag0 And MotorForward

Flag0 is And ’ed  with MotorForward

Result is placed in Flag0

Syntax 5:

Flag0 And Output.Value

Value = 0 To 2

Flag0 is And ’ed  with one of 3 Output

Result is placed in Flag0

Syntax 6:

Flag0 And Not Output.Value

Value = 0 To 2

Flag0 is And’ ed  with complemented one of 3 Output

Result is placed in Flag0

Syntax 7:

Flag0 And TimerFlag.Value

Value = 0 To 3

Flag0 is And ’ed  with one of 4 TimerFlag

Result is placed in Flag0

Syntax 8:

Flag0 And Not TimerFlag.Value

Value = 0 To 3

Flag0 is And’ ed  with complemented one of 4 TimerFlag

Result is placed in Flag0

E.g.

Flag0 And Flag.1

If any one of Flag0 Or Flag.1 has vale False then

Flag0 value becomes False Else becomes True

E.g.

Flag0 And Not Flag.1

If Flag0 = False then

  Flag0 value remains unchanged

Else

  If Flag.1 = False then

    Flag0 value becomes True

  Else

    Flag0 value becomes False

  End If

End If


Flag0 Or

___________________________________________________________

See Also

Syntax 1:

Flag0 Or Flag.Value

Value = 0 To 7

Flag0 is Or ’ed  with one of 8 Flag.

Result is placed in Flag0

Syntax 2:

Flag0 Or Not Flag.Value

Value = 0 To 7

Flag0 is Or’ ed  with complemented one of 8 Flag.

Result is placed in Flag0

Syntax 3:

Flag0 Or Input.Value

Value = 0 To 7

Flag0 is Or ’ed  with one of 8 Input

Result is placed in Flag0

Syntax 4:

Flag0 Or Not Input.Value

Value = 0 To 7

Flag0 is Or’ ed  with complemented one of 8 Input

Result is placed in Flag0

Syntax 5:

Flag0 Or MotorForward

Flag0 is Or ’ed  with MotorForward

Result is placed in Flag0

Syntax 5:

Flag0 Or Output.Value

Value = 0 To 2

Flag0 is Or ’ed  with one of 3 Output

Result is placed in Flag0

Syntax 6:

Flag0 Or Not Output.Value

Value = 0 To 2

Flag0 is Or’ ed  with complemented one of 3 Output

Result is placed in Flag0

Syntax 7:

Flag0 Or TimerFlag.Value

Value = 0 To 3

Flag0 is Or ’ed  with one of 4 TimerFlag

Result is placed in Flag0

Syntax 8:

Flag0 Or Not TimerFlag.Value

Value = 0 To 3

Flag0 is Or’ ed  with complemented one of 4 TimerFlag

Result is placed in Flag0

E.g.

Flag0 Or Flag.1

If any one of Flag0 Or Flag.1 has vale True then

Flag0 value becomes True Else becomes False

E.g.

Flag0 Or Not Flag.1

If Flag0 = True then

  Flag0 value remains unchanged

Else

  If Flag.1 = False then

    Flag0 value becomes True

  Else

    Flag0 value remains unchanged

  End If

End If


Flag0 Xor

___________________________________________________________

See Also

Syntax 1:

Flag0 Xor Flag.Value

Value = 0 To 7

Flag0 is Xor ’ed  with one of 8 Flag.

Result is placed in Flag0

Syntax 2:

Flag0 Xor Not Flag.Value

Value = 0 To 7

Flag0 is Xor’ ed  with complemented one of 8 Flag.

Result is placed in Flag0

Syntax 3:

Flag0 Xor Input.Value

Value = 0 To 7

Flag0 is Xor ’ed  with one of 8 Input

Result is placed in Flag0

Syntax 4:

Flag0 Xor Not Input.Value

Value = 0 To 7

Flag0 is Xor’ ed  with complemented one of 8 Input

Result is placed in Flag0

Syntax 5:

Flag0 Xor MotorForward

Flag0 is Xor ’ed  with MotorForward

Result is placed in Flag0

Syntax 5:

Flag0 Xor Output.Value

Value = 0 To 2

Flag0 is Xor ’ed  with one of 3 Output

Result is placed in Flag0

Syntax 6:

Flag0 Xor Not Output.Value

Value = 0 To 2

Flag0 is Xor’ ed  with complemented one of 3 Output

Result is placed in Flag0

Syntax 7:

Flag0 Xor TimerFlag.Value

Value = 0 To 3

Flag0 is Xor ’ed  with one of 4 TimerFlag

Result is placed in Flag0

Syntax 8:

Flag0 Xor Not TimerFlag.Value

Value = 0 To 3

Flag0 is Xor’ ed  with complemented one of 4 TimerFlag

Result is placed in Flag0

E.g.

Flag0 Xor Flag.1

If Flag0 = False then

  Flag0 is replaced with Flag.1 Value

Else

  Flag0 is replaced with complemented value of Flag.1

End If

E.g.

Flag0 Xor Not Flag.1

If Flag0 = False then

  Flag0 is replaced with complemented value of Flag.1

Else

  Flag0 is replaced with Flag.1 Value

End If


CommandForward =

___________________________________________________________

See Also

If CommandReverse = False then

User can put on motor in forward direction by statement CommandForward = True, Or one can put motor off by statement CommandForward = False.

End If

Syntax 1:

CommandForward = False

Syntax 2:

CommandForward = True


CommandReverse =

___________________________________________________________

See Also

If CommandForward = False then

User can put on motor in reverse direction by statement CommandReverse = True, Or one can put motor off by statement CommandReverse = False.

End If

Syntax 1:

CommandReverse = False

Syntax 2:

CommandReverse = True


If/Else/End If Statement

___________________________________________________________

Conditionally executes a group of statements.

For every “If” statement there should be one “End If” statement. Statements block between “If” and “End If” will be executed when condition Is True.

Syntax

If Condition Then

  [Statements]

[Else]

  [Statements]

End If

Example:

If Input.7	‘If Input.7 = True[High] Then Counter0 = 1

  Counter0 = 1

End If

Example:

If Not Input.7	‘If Input.7 = False[Low] Then Counter0 = 1

  Counter0 = 1

End If

Example

If Input.7: 	‘If Input.7 = True[High] Then

  Counter0 = 1 	‘Counter0 = 1

Else	‘If Input.7 = False[Low] Then

  Counter0 = 2	‘Counter0 = 2

End If

Note: with every “If” statement there should be one

“End If”


If ClickToTrue/ClickToFalse Input Statement

___________________________________________________________

Conditionally executes a group of statements.

For every “If” statement there should be one “End If” statement. Statements block between “If” and “End If” will be executed when condition Is True.

Syntax 1:

If ClickToTrue Input

When Input changes status from False To True then all statements between block will be executed.

If Input remains True or False then above statements block will not be executed.

Example:

If ClickToTrue Input.0

  Output.0 = False

End If

Syntax 2:

If ClickToFalse Input

When Input changes status from True To False then all statements between block will be executed.

If Input remains True or False then above statements block will not be executed.

Example:

If ClickToFalse Input.0

  Output.0 = True

End If

Note:

If “DO” or “Do Until” statement block is used then The above condition should not be examined before or after “DO”  or “Do Until” statement.


Output =

___________________________________________________________

See Also

Syntax 1:

Output.Value = False

Value = 0 To 2

Syntax 2:

Output.Value = True

Value = 0 To 2

Syntax 2:

Output.Value = Flag0

Value = 0 To 2

User can put one of output equal to True or False or user can load Flag0 value, by above statements.


Speed =
ReferenceSpeed =

___________________________________________________________

See Also

Syntax 1:

ReferenceSpeed = Data

Data = 0 To 102.1 in Hz

Syntax 2:

ReferenceSpeed = WordCounter.Value

Value = 0 To 3

User can load in Speed by two ways, one direct with data 0 to 102.1 or Indirect by WordCounter.0 To WordCounter.3

If WordCounter Value > 1021 then only value 1021 is loaded in Speed memory


Reset Program

___________________________________________________________

Syntax:

Reset Program

Use above statement to exit immediately from “Do” and “Loop”

E.G

TriggerTimer0 10

 Do Until Not TimerFlag.0

   If Input.5 Then

     Reset Program

   End If

 Loop

Assumed that Input 5 is off and If Timer0 is triggered and running and if user switched on Input 5 then program is reset to first statement of program.


TriggerTimer

___________________________________________________________

Syntax 1:

TriggerTimer0 Data

TriggerTimer1 Data

TriggerTimer2 Data

TriggerTimer3 Data

Data = 0 To 255 in second

Syntax 2:

TriggerTimer0 By Counter.Value

TriggerTimer1 By Counter.Value

TriggerTimer2 By Counter.Value

TriggerTimer3 By Counter.Value

Value = 0 To 7

User can trigger one of 4 timer with above statement.

Timers relative TimerFlag remains True as long as timer is running otherwise set to False.

Note: If statement is executed while corresponding timer is running then timer will be re-triggered. So trigger timer with a condition which is not repetitive.

E.G.

If Counter0 = 0

  TriggerTimer0 10

  Counter0 = 1

End If

E.G.

If ClickedToTrue Input.0

  TriggerTimer1 255

End If


Volt% =

___________________________________________________________

See Also

Syntax 1:

Volt% = Data

Data = 0 To 100

User can load in Volt percentage with data 0 to 100 to change motor torque.


WordCounter =

___________________________________________________________

Syntax 1:

WordCounter0 = WordCounter0 + Data

Data = 0 To 255

One can add to WordCounter0, a value 0 To 255

E.G. WordCounter0 = WordCounter0 + 1

Syntax 2:

WordCounter0 = WordCounter0 - Data

Data = 0 To 255

One can subtract from WordCounter0, a value 0 To 255

E.G. WordCounter0 = WordCounter0 - 1

Syntax 3:

WordCounter1 = WordCounter1 + Data

Data = 0 To 255

One can add to WordCounter1, a value 0 To 255

E.G. WordCounter1 = WordCounter1 + 50

Syntax 4:

WordCounter1 = WordCounter1 - Data

Data = 0 To 255

One can subtract from WordCounter1, a value 0 To 255

E.G. WordCounter1 = WordCounter1 - 50

Syntax 5:

WordCounter2 = WordCounter2 + Data

Data = 0 To 255

One can add to WordCounter2, a value 0 To 255

E.G. WordCounter2 = WordCounter2 + 100

Syntax 6:

WordCounter2 = WordCounter2 - Data

Data = 0 To 255

One can subtract from WordCounter2, a value 0 To 255

E.G. WordCounter2 = WordCounter2 - 100

Syntax 7:

WordCounter3 = WordCounter3 + Data

Data = 0 To 255

One can add to WordCounter3, a value 0 To 255

E.G. WordCounter3 = WordCounter3 + 255

Syntax 8:

WordCounter3 = WordCounter3 - Data

Data = 0 To 255

One can subtract from WordCounter3, a value 0 To 255

E.G. WordCounter3 = WordCounter3 - 255

Syntax 9:

WordCounter.Value = AccelerateRate

Value = 0 To 3

One can replace WordCounter 0 To 3 with AccelerateRate

E.G. WordCounter.0 = AccelerateRate

Syntax 10:

WordCounter.Value = DecelerateRate

Value = 0 To 3

One can replace WordCounter 0 To 3 with Deceleration

E.G. WordCounter.1 = Deceleration

Syntax 11:

WordCounter.Value = ReferenceSpeed

Value = 0 To 3

One can replace WordCounter 0 To 3 with ReferenceSpeed

E.G. WordCounter.3 = Speed

Syntax 12:

WordCounter.Value = CurrentSpeed

Value = 0 To 3

One can replace WordCounter 0 To 3 with CurrentSpeed

E.G. WordCounter.0 = CurrentSpeed


Conditional Operator

___________________________________________________________

= (Equal)

<> (Not Equal)

<= (Less then or Equal)

>= (Greater then or Equal)

> (Greater then)

< (Less then)


= (Conditional Operator)
= (Conditional/Assign Operator)

___________________________________________________________

As Assign operator it assigns a value or another User-Data to Destination Data.

E.G.

Byte(0) = 0, Byte(0) = Byte(1), Byte(0) = Byte(1) / Byte(2)

Boolean(0) = True, Boolean(1) = False

Boolean(0) = Boolean(1) And Boolean(2)

As conditional it compares User-Data and raises a condition, If equals then raises True Else raises False.

It is used in statement “If”, “Do Until” “On”

E.G.

If Byte(0) = 1 Then

If Byte(1) = Byte(2) Then

If Byte(1) = (Byte(2) * Byte(3)) Then

If Boolean(0) = True Then

If Boolean(0) = False Then

If Boolean(0) = Boolean(1) Then

If Boolean(0) = (Boolean(1) Or Boolean(2)) Then


<> (Conditional Operator)

___________________________________________________________

As conditional it compares User-Data and raises a condition, If equals then raises False Else raises True.

It is used in statement “If”, “Do Until”

E.G.

If Counter0 <> 100 Then


Less Or Equal
<= (Conditional Operator)

___________________________________________________________

As conditional it compares User-Data and raises a condition, If (Less then Or Equals) then raises True Else raises False.

It is used in statement “If”, “Do Until”

E.G.

If Counter0 <= 100 Then


Greater Or Equal
>= (Conditional Operator)

___________________________________________________________

As conditional it compares User-Data and raises a condition, If (Greater then Or Equals) then raises True Else raises False.

It is used in statement “If”, “Do Until”

E.G.

If Counter0 >= 100 Then


< (Conditional Operator)

___________________________________________________________

As conditional it compares User-Data and raises a condition, If Less then raises True Else raises False.

It is used in statement “If”, “Do Until”

E.G.

If Counter0 < 100 Then


> (Conditional Operator)

___________________________________________________________

As conditional it compares User-Data and raises a condition, If Greater then raises True Else raises False.

It is used in statement “If”, “Do Until”

E.G.

If Counter0 > 100 Then


Logical Operator

___________________________________________________________

And

Not

Or

Xor


And (Logical Operator)

___________________________________________________________

Logically-And two User-Data.

If User-Data are Boolean then if both of them are True then result is True Else False.

If User-Data are Binary-Type then each bit(Which is Boolean-Type) of them is logically-And as described above.

E.G. 32 And 96 = 32

One can not Logically-And Binary-Type with Boolean-Type and vice versa.


Not Operator
Not (Logical Operator)

___________________________________________________________

Complement User-Data.

If User-Data is Boolean then if it is True then results in False Else result in True.


Or (Logical Operator)

___________________________________________________________

Logically-Or two User-Data.

If User-Data are Boolean then if both of them are False then result is False Else True.

If User-Data are Binary-Type then each bit(Which is Boolean-Type) of them is logically-Or as described above.

E.G. 32 And 96 = 96

One can not Logically-Or Binary-Type with Boolean-Type and vice versa.


Xor (Logical Operator)

___________________________________________________________

Logically-Exclusive-Or two User-Data.

If User-Data are Boolean then if (both of them are False) Or (both of them are True) then result is False Else True.

If User-Data are Binary-Type then each bit(Which is Boolean-Type) of them is logically-Xor as described above.

E.G. 32 And 96 = 64

One can not Logically-Or Binary-Type with Boolean-Type and vice versa.


Mathematical Operator

___________________________________________________________

+ (Add)

- (Subtract)


+ (Mathematical Operator)

___________________________________________________________

Results in Addition Of 2 User-Data.

Not applicable for Boolean-Data.


- (Mathematical Operator)

___________________________________________________________

Results in Subtraction Of 2 User-Data.

Not applicable for Boolean-Data.


False

___________________________________________________________

One can treat False as Low Or Off.

E.g. If Input.0 = False has also meaning that If Input.0 is Off Or Input.0 is Low(0 Volt).


True

___________________________________________________________

One can treat True as High Or On.

E.g. If Input.0 = True has also meaning that If Input.0 is On Or Input.0 is High(+Volt).