Download Function Library Manual
Transcript
BEIJING HENGYUAN ZHONGLIAN INSTRUMENTS CO., LTD. FUNCTION LIBRARY MANUAL FOR MPC07 Syntax: int get_board_num(void); Quoted Examples: card_num=get_board_num(); Return Value: get_board_num function returns to total number of board card. System: WINDOWS98, WINDOWS 2000, WINDOWS XP Function Name: get_axe Purpose: get_axe function is used to read total axis number of board card. Syntax: int get_axe(int board_no); board_no: card number; Quoted Examples: axe_num=get_axe(1); Return Value: get_board_num function returns to total number of board card. System: WINDOWS98, WINDOWS 2000, WINDOWS XP Function Name: set_outmode Purpose: set_ outmode function is used to set impulse output mode of each axis. If driver demand double impulse (positive impulse, negative impulse) control signal interface, then this function should be quoted after init_board function. Syntax: int set_outmode(int ch,int mode,int outlogic); ch: controlling axis of the set output mode; mode: setting of impulse output mode (1 for impulse/direction mode, 0 for double impulse mode) outlogic: this parameter is invalid in MPC 07, and it can be set any value. Quoted Examples: set_outmode(2, 0,1); /* set the impulse output mode of the 2nd axis double impulse mode. */ Description: on condition of default, init_board function set all the axes impulse/direction mode. If driver demand double impulse (positive impulse and negative impulse) input mode, set_outmode function should be quoted after init_board function to reset the demanded mode. Notes: output mode of controlling card should be the conform to the input signal mode of the connected driver; otherwise, motor could not work normally. Return Value: if output mode is set successfully, return value of set_outmode function is‟ 0‟value; if not, it is „-1‟value. System: WINDOWS98, WINDOWS 2000, WINDOWS XP Reference: init_board 8/27