Table special instruction Instruction format (statement table) Features Operand Interrupt instruction ATCH INT, EVNT Associate an interrupt event (EVNT) with an interrupt routine and allow the interrupt event INT: constant EVNT: constant (CPU221/222: 0~12, 19~23, 27~33; CPU224: 0~23, 27~33; CPU226: 0~33) DTCH EVNT Truncating an interrupt event and all interrupt handlers and disabling the interrupt event ENI Globally allow all connected interrupt events no DISI Globally close all connected interrupt events CRETI Return from the interrupt program according to the conditions of the logical operation RETI At the end of the interrupt program, it is a mandatory part. When the program is compiled, the software automatically adds the instruction at the end of the program. Communication instruction NETR TBL, PORT Initialize the communication operation, receive data from the remote device through the command port (PORT) and form a table (TBL). Read up to 16 bytes of information from a remote site TBL: VB, MB, *VD, *AC, *LD PORT: constant NETW TBL, PORT Initialize the communication operation, write the data in the table (TBL) to the remote device through the designated port (PORT), and write up to 16 bytes of information to the remote site. XMT TBL, PORT Used in free port mode. Specifies the data in the active transmit data buffer (TBL), the first data in the data buffer indicates the number of bytes to send, and the PORT specifies the port to use for the transmission. TBL: VB, IB, QB, MB, SB, SMB, *VD, *AC, *LD PORT: constant (CPU221/222/224 is 0; CPU226 is 0 or 1) RCV TBL, PORT Activate the service that initializes or ends receiving information. The information received through the designated port (PORT) is stored in the data buffer (TBL), and the first data in the data buffer indicates the number of bytes received. GPA ADDR, PORT Read the station address of the CPU port specified by PORT, and put the value into the address specified by ADDR. ADDR: VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD ADDR can also be a constant in the SPA instruction. PORT: constant SPA ADDR,PORT Set the station address (PORT) of the CPU port to the value specified by ADDR. Clock instruction TODR T Read the current time and date and load it into an 8-byte buffer (starting address is T) T: VB, IB, QB, MB, SB, SMB, LB, *VD, *AC, *LD TODW T Load an 8-byte buffer (starting address is T) containing the current time and date into the clock High speed counter instruction HDEF HSC, MODE Assign a working mode to the specified high-speed counter. HDEF instructions must be used before each high-speed counter can be used and can only be used once HSC: constant (0~5) MODE: constant (0~11) HSC N According to the state of the special memory bit of the high-speed counter, the high-speed counter is set and controlled according to the operating mode specified by the HDEF instruction. N specifies the high speed counter number N: constant (0~5) High speed pulse output command PLS Q Detect special memory bits set by the user program, activate the pulse operation defined by the control bits, and output high-speed pulses from Q0.0 or Q0.1 Can be used to activate high speed pulse train output (PTO) or width adjustable pulse output (PWM) Q: constant (0 or 1) PID loop command PID TBL, LOOP The PID operation is performed using the input and configuration information in the loop table. To execute this instruction, the logical stack top (TOS) must be in the ON state. TBL specifies the starting address of the loop table, LOOP specifies the control loop number The loop table contains nine parameters for controlling and monitoring the PID operation: the current value of the process variable (PV n ), the value of the process variable (PV n-1 ), the given value (SP n ), and the output value (M n ). Gain (Kc), sampling time (Ts), integration time (Ti), derivative time (Td) and integral term (MX) In order for the PID calculation to be performed at the required sampling time, the interrupt service routine should be executed at the timed interrupt or in the main program controlled by the timer, which must be filled in the loop table as an input to the PID instruction. parameter TBL: VB LOOP: constant (0 to 7) 6.5 Coaxial Speakers,Coaxial Audio Speaker,6.5 Inch Coaxial Speaker,6.5 Inch Coaxial Speakers Guangzhou Yuehang Audio Technology Co., Ltd , https://www.yhspeakers.com