2017년 2월 23일 목요일

[ACS Controller] Mask Setting for Trigger

If we use External Trigger signal from driver , need add this line

COEWRITE/4 (1,0x60FE,1,0);
COEWRITE/4 (1,0x60FE,2,0xFFFF0000);

this is driver 1 mask,


----------------------------------------------------------------------------------

GLOBAL REAL TRIGPOINT(64) !Encoder Trigger Generating Point
GLOBAL REAL PULSE_WIDTH
COEWRITE/4 (1,0x60FE,1,0);
COEWRITE/4 (1,0x60FE,2,0xFFFF0000);
TRIGPOINT(0) = 50.0
TRIGPOINT(1) = 50.0
PULSE_WIDTH = 50 ![msec]
WHILE(1)
IF( ABS( FPOS(0) - TRIGPOINT(0)) < 0.05 )
OUT(1).18 = 1
WAIT PULSE_WIDTH
ELSE
OUT(1).18 = 0
END !IF End
END !While End
STOP

-------------------------------------------------------------------------------------

댓글 없음:

댓글 쓰기