122
Epsilon EP-P Drive Reference Manual
www.controltechniques.com
Revision: A4
Else
This program flow instruction is used in conjunction with the If/Then/Endif instruction. If the If/Then test condition evaluates to true the code
after the If/Then and before the Else is executed. If the test evaluates to false the code between the Else and the Endif is executed.
Example:
If DriveInput.1=ON Then
‘The following two lines are executed if
‘DriveInput.1=ON
DriveOutput.1=ON
DriveOutput.2=OFF
Else
‘The following two lines are executed if
‘DriveInput.1=OFF
DriveOutput.1=OFF
DriveOutput.2=ON
Endif
Example:
If (DriveInput.5=ON) Then
‘Set fast velocity if DriveInput.5 = ON
Jog.0.Vel = 1.0 ‘in/s
Else
‘Set slow velocity if DriveInput.5 = OFF
Jog.0.Vel = 0.1 ‘in/s
Endif
End
This program flow instruction is used to halt the execution of the program. It can be used in multiple places within the program. It is not required
on the last line of every program. It is implied that after the controller executes the last line of code in a program the program will halt. It is
commonly used inside of If/Then/Endif constructs to end the program if a certain condition has been met.
Example:
If DriveInput.1=OFF Then
End
Endif
Example:
If DriveInput.1=ON Then
DriveOutput.1=ON
End
Endif
For Count/Next
This instruction is used to execute section of code a specific number of times.
Example:
For Count = 1 to 5
Index.1.Initiate
‘Incremetal,Dist=5.250in,Vel=10.0in/s
Dwell For Time 1.000
‘seconds
Next
Example:
For Count = 1 To 10
Wait For DriveInput.1 = ON
Index.0.Initiate
‘Incremetal,Dist=5.000in,Vel=50in/s
Wait For Index.AnyCommandComplete
DriveOutput.1=ON
‘Turn DriveOutput.1 On
Wait For Time 1.000
‘seconds
DriveOutput.1=OFF
‘Turn DriveOutput.1 Off
Next
Formula
This program instruction can be used to enter a formula or assignment into a program. All parameters are available for use in a formula. They
may be dragged and dropped into a formula, but the program User Level will determine how many appear for dragging and dropping (see the
section on User Level in the Setting Up Parameters chapter). Formulas can also be created by simply typing them into the program. This
instruction was created to inform the user that formulas can be used in a program.
Examples:
Index.1.Vel = 20.0
Index.0.Dist = Index.2.Dist + 0.1
DriveOutput.1 = ON
Index.0.Accel = (Index.0.Accel*1000)+5.00
Содержание Epsilon EP-P
Страница 2: ......
Страница 14: ...xii Epsilon EP P Drive Reference Manual www controltechniques com Revision A4 Glossary 225 Index 231...
Страница 124: ...110 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Страница 200: ...186 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Страница 218: ...204 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Страница 238: ...224 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Страница 244: ...230 Epsilon EP P Drive Reference Manual www controltechniques com Revision A4...
Страница 247: ......