Emerson FM-3 Network Card User Manual


 
123
Programming
In the diagram below, => Represents a Call Program instruction
Examples:
Call Program.10 ‘Program 10 contains a complex home
‘routine.
Call Program.100 ‘Program 100 contains a “teach position”
‘routine.
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.
Examples:
If DriveInput.1=OFF Then
End
Endif
If DriveInput.1=ON Then
DriveOutput.1=ON
End
Endif
Formula
This program instruction can be used to enter a formula or assignment into a program. All
FM-3 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
ModuleOutput.1 = ON
Index.0.Accel = (Index.0.Accel*1000)+5.00
P
rogram0=>Program1=>Program2=>Program3=>Program4 => NO MORE THAN
4!