forked from epics_driver_modules/motorBase
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:
@@ -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")
|
||||
|
||||
@@ -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, ®istrarPvt);
|
||||
|
||||
Reference in New Issue
Block a user