AX10445 Module Series User
’
s Manual
Application
34
/**********************************************************************************
* Main program to simulate communication protocol *
* Please connect external loopback *
***********************************************************************************
void main()
{
/* initial data */
clrscr();
/* initial port */
COM_INIT(1);
COM_INIT(2);
/* set RS485 mode */
Is_RS485 = 1;
/* looping */
while (!kbhit())
/* if key pressed then exit
*/
{
/* reset all index */
Reset_Buf();
/* channel 1 send, channel 2 receive */
/* send equiry / request data */
Write_Com(1, “Enquiry from 1”,14);
/* wait for acknowledge */
delay (100);
if (Get2Str()==14) puts (showbuf2);
else { puts (“Timeout! channel 2\n”); goto ERROR_END1;}
/* send header / command data */
Write_Com(1, Header Command”,14);
/* wait for acknowledge */
delay(100);
if (Get2Str()==14) puts (showbuf2);
else { puts(“Timeout! channel 2\n”);goto ERROR_END1; }
/* send data out or receive in data */
Write_Com(1, “Data1 Data2 Data3 Data4 Data5”, 29);
/* wait for acknowledge */
delay (100);
if (Get2Str()==29) puts(showbuf2);
else { puts(“Timeout! channel 2\n”); goto ERROR_END1; }
/* send End of Transm ission */
Содержание AX10445 Series
Страница 1: ...AX10445 Series Isolated Dual Channel RS422 485 Interface Module User s Manual...
Страница 10: ...AX10445 Module Series User s Manual 4 This page does not contain any information...
Страница 20: ...AX10445 Module Series User s Manual Setting up the AX10445 14 This page does not contain any information...
Страница 41: ...AX10445 Module Series User s Manual Application 33 return 0 void Reset_Buf rear1 front1 rear2 front2 0...
Страница 46: ...AX10445 Module Series User s Manual 36 This page does not contain any information...
Страница 48: ...AX10445 Module Series User s Manual 38 This page does not contain any information...
Страница 50: ...AX10445 Module Series User s Manual 40 This page does not contain any information...
Страница 52: ...AX10445 Module Series User s Manual 42 This page does not contain any information...
Страница 54: ...AX10445 Module Series User s Manual 44 This page does not contain any information...
Страница 58: ...AX10445 Module Series User s Manual 48 This page does not contain any information...