EasyManuals Logo

Omron SYSMAC FH Series User Manual

Omron SYSMAC FH Series
882 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #801 background imageLoading...
Page #801 background image
WWW.NNC.IR
Macro Reference
799
8
Appendices
Vision System FH/FZ5 Series
User’s Manual (Z340)
Example
Uses the variables used in subroutines as local variables.
*EXPA
Rem Display the current value of the variable.
Print A&, B&, C&, D#, E#
Rem Use the EXPA subroutine to save the current values of the variables in order to prepare for treating the variable
as local variables.
VarPush A&, B&, C&, D#, E#
Rem Use A&, B&, C&, D#, and E# freely.
GetUnitData 2, "CR", A&
GetUnitData 3, "CR", B&
GetUnitData 4, "CR", C&
GetUnitData 5, "X", D#
GetUnitData 6, "Y", E#
Rem Check the current values of the variables before calling the subroutine.
Print A&, B&, C&, D#, E#
Rem Variables named A&, B&, C& are used in the *EXPB subroutine.
Rem These names are also used for variables in this *EXPA subroutine.
Rem Although being nested with the Gosub statement in this program example,
Rem saving and restoration of variable values are performed with the Varpush and Varpop functions within the *EXPB
subroutine,
Rem so as to prevent variable values from being unintentionally overwritten.
Gosub *EXPB
Rem Check the current value of the variables after calling the subroutine.
Print A&, B&, C&, D#, E#
Rem Restore the current value of the variables that were saved at the beginning of the subroutine EXPA.
VarPop
Return
*EXPB

Table of Contents

Other manuals for Omron SYSMAC FH Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC FH Series and is the answer not in the manual?

Omron SYSMAC FH Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC FH Series
CategoryIndustrial Equipment
LanguageEnglish

Related product manuals