Galil DMC-3425 Manual De Usuario
DMC-3425
Chapter 7 Application Programming
• 127
XQ _ED3,_ED1,1
Skip invalid command
ENDIF
EN
EN
End of command error routine
Example – Ethernet Communication Error
This simple program executes in the DMC-3425 and indicates (via the serial port) when a
communication handle fails. By monitoring the serial port, the user can re-establish communication if
needed.
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
EN
#TCPERR Ethernet
communication error auto routine
MG {P1}_IA4
Send message to serial port indicating which handle
did not receive proper acknowledgment
did not receive proper acknowledgment
RE
Mathematical and Functional Expressions
Mathematical Operators
For manipulation of data, the DMC-3425 provides the use of the following mathematical operators:
Operator Function
+ Addition
- Subtraction
* Multiplication
/ Division
&
Logical And (Bit-wise)
|
Logical Or (On some computers, a solid vertical line
appears as a broken line)
appears as a broken line)
() Parenthesis
The numeric range for addition, subtraction and multiplication operations is +/-2,147,483,647.9999.
The precision for division is 1/65,000.
The precision for division is 1/65,000.
Mathematical operations are executed from left to right. Calculations within parentheses have
precedence.
precedence.
SPEED=7.5*V1/2
The variable, SPEED, is equal to 7.5 multiplied by V1 and
divided by 2
divided by 2
COUNT=COUNT+2
The variable, COUNT, is equal to the current value plus 2.
RESULT=_TPA-(@COS[45]*40)
Puts the position of A - 28.28 in RESULT. 40 * cosine of
45
45
° is 28.28
TEMP=@IN[1]&@IN[2]
TEMP is equal to 1 only if Input 1 and Input 2 are high