Delta Electronics DUP-B Network Router User Manual


 
Chapter 3 Creating and Editing Screens
LOCKCOM / UNLOCKCOM (Lock COM Port / Unlock COM Port)
Equation
Lock COM Port
Var1 = LOCKCOM (Var2, Var3)
Unlock COM Port
Var1 = UNLOCKCOM (Var2)
Explanation
LOCKCOM command locks COM port. Var1 is the response value after the
communication, Var2 is the COM port and represents as constant 0(COM1), 1(COM2)
or 2(COM3). Var3 is the communication time out time (unit is ms). When the specified
communication time out time is reached, if the COM port cannot be locked, an error
will be responsed. When Var3 is set to 0, it indicates that HMI will continuously wait
without time limit.
UNLOCKCOM command unlocks COM port. Var2 is the COM port and represents as
constant 0(COM1), 1(COM2) or 2(COM3).
Remark
Var1: Response value after communication
1: Completed normally
0: Failed
Var1 can be internal memory only. Var2 and Var3 can be constant only.
When the communication commands are used in different macros, such as
Screen Cycle Macro, Clock Macro, Background Macro, Befor/After Execute
Macro, ON/OFF Macro, if LOCKCOM and UNLOCKCOM commands are not used,
the different macros may have interferences and causes the error result. To
ensure the correct communication and not to interrupt the communication at
the same time, it is recommended to use these two commands.
3-362 Revision May, 2010