![Galil Motion Control DMC-14 5 Series Скачать руководство пользователя страница 119](http://html1.mh-extra.com/html/galil-motion-control/dmc-14-5-series/dmc-14-5-series_manual_3258007119.webp)
#B
Begin
thread
1
N=-1
Create
new
variable
KP N
Set KP to value of N, an invalid value
TY
Issue
invalid
command
EN
End
of
thread
1
#CMDERR
Begin command error subroutine
IF _TC=6
If error is out of range (KP -1)
N=1
Set N to a valid number
XQ _ED2,_ED1,1
Retry KP N command
ENDIF
IF _TC=1
If error is invalid command (TY)
XQ _ED3,_ED1,1
Skip invalid command
ENDIF
EN
End of command error routine
Example – Ethernet Communication Error
This simple program executes in the IOC-7007 and indicates (via the serial port) when a
communication handle fails. By monitoring the serial port, the user can re-establish communication if
needed.
Instruction
Interpretation
#LOOP
Simple program loop
JP#LOOP
EN
#TCPERR Ethernet
communication error auto routine
MG {P1}_IA4
Send message to serial port indicating which handle did not receive
proper acknowledgement
RE
Return to main program
Note: The #TCPERR routine only detects the loss of TCP/IP Ethernet handles, not UDP.
Mathematical and Functional Expressions
Mathematical Operators
For manipulation of data, the DMC-14XX provides the use of the following mathematical operators:
Operator
Function
+ Addition
- Subtraction
* Multiplication
/ Division
110
i
Chapter 7 Application Programming
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com