Emerson EV1000-2S0004G User Manual page 154

Ev1000 series general purpose variable speed drive
Hide thumbs Also See for EV1000-2S0004G:
Table of Contents

Advertisement

艾默生变频器、艾默生CT高级授权代理商--广州盟雄 020-85543394 qq:2294731312
150
Appendix 2 Communication Protocol
strcpy(set_frequency,buf);
send_comd(set_frequency,"HEX");
printf("\nPress anykey to stop ...");
while(!kbhit());
send_comd(stop_inverter,"ASCII");
}
void send_comd(char *sendstr,char *display_type)
{
unsigned int i;
char buf[5];
printf("\nSend(%s):",display_type);
for(i=0;i<strlen(sendstr);i++){
outportb(PORT_ADDR,sendstr[i]);
delay(delaytime);
if(display_type[0]=='H')
{printf("%02x ",sendstr[i]);}
else{printf("%c",sendstr[i]);}
}
}
void checksum(char *sendstr,char result_sum[])
{
unsigned int i,sum=0;
static char sum_string[5];
for(i=0;i<strlen(sendstr);i++)sum+=(unsigned int)sendstr[i];
sprintf(sum_string,"%04x",sum);
for(i=0;i<4;i++)
result_sum[i]=toupper(sum_string[i]);
result_sum[i]=0x0;
}
EV1000 Series General Purpose Variable Speed Drive User Manual
/*combine frame*/
/*set 30.00Hz, HEX display*/
/*wait for keypad input*/
/*send Stop command, ASCII
dispaly*/
/*for display buffer*/
/*send frame command*/
/*delaytime for finish sending
command*/
/*determine display format*/
/*HEX format*/
/*ASCII format*/
/*calculatethe sum of bytes*/
/*covert to capital letter/
/*tail of character string*/
/*return checksum ASCII
character string*/

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents