Removed set{Input,Output}Eos calls from omsMAXnet constructor so that input and output EOS values set in the st.cmd file are not overridden. Added examples for setting the input and

output EOS from the st.cmd to the MAXnet README.
This commit is contained in:
kmpeters
2014-12-15 23:03:05 +00:00
parent 79b73f6f8b
commit ae3394921f
2 changed files with 8 additions and 15 deletions
+7 -2
View File
@@ -9,8 +9,7 @@ Please note:
with checksum 0xffff.
- MAXnet cards with firmware versions below 1.33 use "\n\r" as input EOS
on Ethernet ports. Version 1.33 and higher use "\n" on ethernet and serial ports.
Comment the setInputEos call and set input EOS in st.cmd if using firmware
versions below 1.33
The input and output EOS must be set prior to calling omsMAXnetConfig()
add this to st.cmd if using the ethernet port:
drvAsynIPPortConfigure("MAXNET","maxnet-ip-address:23",0,0,0)
@@ -22,3 +21,9 @@ add this to st.cmd if using the serial port:
asynSetOption("MAXNET",0,"parity","none")
asynSetOption("MAXNET",0,"crtscts","Y")
set the input/output EOS based on the MAXnet firmware version:
### Uncomment one of the following two lines:
#asynOctetSetInputEos("MAXNET",0,"\n\r")
#asynOctetSetInputEos("MAXNET",0,"\n")
asynOctetSetOutputEos("MAXNET",0,"\n")
+1 -13
View File
@@ -128,19 +128,7 @@ omsMAXnet::omsMAXnet(const char* portName, int numAxes, const char* serialPortNa
timeout = 2.0;
pasynUserSerial->timeout = 0.0;
// CAUTION firmware versions before 1.33.4 use '\n' for serial port and '\n\r' for IP port as InputEOS
// Set inputEOS in st.cmd for old firmware versions
status = pasynOctetSyncIO->setInputEos(pasynUserSyncIOSerial, "\n\r", 2);
if(status != asynSuccess){
printf("MAXnetConfig: unable to set InputEOS %s: %s\n", serialPortName, pasynUserSyncIOSerial->errorMessage);
return ;
}
status = pasynOctetSyncIO->setOutputEos(pasynUserSyncIOSerial, "\n", 1);
if(status != asynSuccess){
printf("MAXnetConfig: unable to set OutputEOS %s: %s\n",serialPortName,pasynUserSyncIOSerial->errorMessage);
return ;
}
// Set input and output EOS in st.cmd
void* registrarPvt= NULL;
status = pasynOctetSerial->registerInterruptUser(octetPvtSerial, pasynUserSerial, omsMAXnet::asynCallback, this, &registrarPvt);