BL1700

I want to send data through the port BL1700 Z1, for this I used the following program but it does not work.

#use aasc.lib
#use aascz0.lib
#use aascz1.lib
#use vdriver.lib
#use eziobl17.lib

int b1;
CHANNEL chan0,chan1;
main ()
{
VdInit();
_GLOBAL_INIT ( );
chan1=aascOpen (DEV_Z1,0,(ASCI_PARAM_1200 *16) | ASCI_PARAM_8N1,NULL);
aascSetWriteBuf(chan1, &b1, sizeof(b1));
aascTxSwitch(chan1, 1);
while(1){
costate{
waitfor(DelayMs(1200));
b1=51;
}
}
}

Can someone help me please