From 9d2f9918fb9b4b2903916a8406a9ed505406efba Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Thu, 5 Jun 2003 18:22:20 +0000 Subject: [PATCH] Switching to OS specific st.cmd files. --- iocBoot/iocWithAsyn/{st.cmd => st.cmd.Vx} | 42 +++++++++++----------- iocBoot/iocWithAsyn/st.cmd.linux | 18 ++++++++++ iocBoot/iocWithAsyn/st.cmd.sun | 18 ++++++++++ iocBoot/iocWithAsyn/st_mpfserver.cmd | 30 ---------------- iocBoot/iocWithAsyn/st_mpfserver.cmd.Vx | 19 ++++++++++ iocBoot/iocWithAsyn/st_mpfserver.cmd.linux | 3 ++ iocBoot/iocWithAsyn/st_mpfserver.cmd.sun | 3 ++ iocBoot/iocWithMPF/{st.cmd => st.cmd.Vx} | 42 +++++++++++----------- iocBoot/iocWithMPF/st.cmd.linux | 18 ++++++++++ iocBoot/iocWithMPF/st.cmd.sun | 18 ++++++++++ iocBoot/iocWithMPF/st_mpfserver.cmd | 30 ---------------- iocBoot/iocWithMPF/st_mpfserver.cmd.Vx | 19 ++++++++++ iocBoot/iocWithMPF/st_mpfserver.cmd.linux | 3 ++ iocBoot/iocWithMPF/st_mpfserver.cmd.sun | 3 ++ 14 files changed, 164 insertions(+), 102 deletions(-) rename iocBoot/iocWithAsyn/{st.cmd => st.cmd.Vx} (76%) create mode 100644 iocBoot/iocWithAsyn/st.cmd.linux create mode 100644 iocBoot/iocWithAsyn/st.cmd.sun delete mode 100644 iocBoot/iocWithAsyn/st_mpfserver.cmd create mode 100644 iocBoot/iocWithAsyn/st_mpfserver.cmd.Vx create mode 100644 iocBoot/iocWithAsyn/st_mpfserver.cmd.linux create mode 100644 iocBoot/iocWithAsyn/st_mpfserver.cmd.sun rename iocBoot/iocWithMPF/{st.cmd => st.cmd.Vx} (76%) create mode 100644 iocBoot/iocWithMPF/st.cmd.linux create mode 100644 iocBoot/iocWithMPF/st.cmd.sun delete mode 100644 iocBoot/iocWithMPF/st_mpfserver.cmd create mode 100644 iocBoot/iocWithMPF/st_mpfserver.cmd.Vx create mode 100644 iocBoot/iocWithMPF/st_mpfserver.cmd.linux create mode 100644 iocBoot/iocWithMPF/st_mpfserver.cmd.sun diff --git a/iocBoot/iocWithAsyn/st.cmd b/iocBoot/iocWithAsyn/st.cmd.Vx similarity index 76% rename from iocBoot/iocWithAsyn/st.cmd rename to iocBoot/iocWithAsyn/st.cmd.Vx index 0d13cce0..35ff0542 100644 --- a/iocBoot/iocWithAsyn/st.cmd +++ b/iocBoot/iocWithAsyn/st.cmd.Vx @@ -2,11 +2,6 @@ # IMS483 controller. The examples must be configured by including or omitting # comment characters (i.e., #'s) from this file. -# The Newport example can be configured for either serial or GPIB communication -# by omitting/including comments (i.e., remove "# !SERIAL! #" or "# !GPIB! #" -# for serial or GPIB communication, respectively. The IMS example is serial -# communication only, in "single mode". - # The MPF option is either single or double CPU board configuration and is # selected by deleting either the "# !MPF-1-CPU! #" for the "# !MPF-2-CPU! #" # comments. @@ -15,23 +10,21 @@ # The following must be added for many board support packages #cd "... IOC st.cmd complete directory path ... " -#< ../nfsCommands < cdCommands -< ../MPFconfig.cmd +#< ../nfsCommands.rls -cd appbin +cd topbin # If the VxWorks kernel was built using the project facility, the following must # be added before any C++ code is loaded (see SPR #28980). sysCplusEnable=1 -ld < WithMPFLib - -# !GPIB! ## !MPF-1-CPU! #ld < GpibHideosLocal.o -# !GPIB! ## !MPF-2-CPU! #ld < GpibHideosRemote.o +ld < WithMPFVx.munch cd startup -dbLoadDatabase("../../dbd/WithMPFApp.dbd") +dbLoadDatabase("../../dbd/WithMPFVx.dbd") +registerRecordDeviceDriver(pdbbase) + dbLoadRecords("../../db/WithMPF.db") routerInit @@ -40,7 +33,7 @@ MPF_Server_Location = 0 # !MPF-2-CPU! #tcpMessageRouterClientStart(MPF_Server_Location,9900,"164.54.53.78",1500,40) # Configure the MPF server code. This MUST be configured too! -# !MPF-1-CPU! #< st_mpfserver.cmd +# !MPF-1-CPU! #< st_mpfserver.cmd.Vx # Newport MM4000 driver setup parameters: # (1) maximum number of controllers in system @@ -53,10 +46,7 @@ MM4000Setup(1, 0, 10) # (2) port type: 0-GPIB_PORT or 1-RS232_PORT, # (3) GPIB link or MPF server location # (4) GPIB address or MPF serial server name -# !SERIAL! #MM4000Config(0, 1, MPF_Server_Location, "a-Serial[0]") -# !GPIB! #GPIB_Link = 10 -# !GPIB! #GPIB_Addr = 1 -# !GPIB! #MM4000Config(0, 0, GPIB_Link, GPIB_Addr) +MM4000Config(0, 1, MPF_Server_Location, "a-Serial[0]") # Newport PM500 driver setup parameters: # (1) maximum number of controllers in system @@ -102,8 +92,18 @@ MM4000Setup(1, 0, 10) # MCB4BConfig(0, 1, "a-Serial[0]") MPF card 1, port 0 on IP slot A. #MCB4BConfig(0, MPF_Server_Location, "a-Serial[3]") -# !GPIB! ## !MPF-1-CPU! #Server_Mod_Name = GPIB_Module_Name -# !GPIB! ## !MPF-2-CPU! #Server_Mod_Name = "GPIB0" -# !GPIB! #HiDEOSGpibLinkConfig(GPIB_Link, GPIB_Addr, Server_Mod_Name) +# Newport ESP300 driver setup parameters: +# (1) maximum number of controllers in system +# (2) N/A +# (3) motor task polling rate (min=1Hz,max=60Hz) +#ESP300Setup(1, 0, 10) + +# Newport ESP300 driver configuration parameters: +# (1) controller# being configured, +# (2) port type: 0-GPIB_PORT or 1-RS232_PORT, +# (3) MPF server location +# (4) GPIB address or MPF serial server name +#ESP300Config(0, 1, MPF_Server_Location, "a-Serial[0]") +#drvESP300debug = 4 iocInit diff --git a/iocBoot/iocWithAsyn/st.cmd.linux b/iocBoot/iocWithAsyn/st.cmd.linux new file mode 100644 index 00000000..76b1ae87 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.linux @@ -0,0 +1,18 @@ +# Start errlog Task before any possible error messsage to prevent +# erroneous "Interrupted system call" message on Linux OS. +errlogInit(0) + +dbLoadDatabase("../../dbd/WithMPF.dbd") +registerRecordDeviceDriver(pdbbase) +dbLoadRecords("../../db/WithMPF.db") + +routerInit +localMessageRouterStart(1) + +# Configure the MPF server code. This MUST be configured too! +< st_mpfserver.cmd.linux + +MM4000Setup(1, 0, 60) +MM4000Config(0, 1, 1, "serial0") + +iocInit diff --git a/iocBoot/iocWithAsyn/st.cmd.sun b/iocBoot/iocWithAsyn/st.cmd.sun new file mode 100644 index 00000000..e61b2701 --- /dev/null +++ b/iocBoot/iocWithAsyn/st.cmd.sun @@ -0,0 +1,18 @@ +# Start errlog Task before any possible error messsage to prevent +# erroneous "Interrupted system call" message on Linux OS. +errlogInit(0) + +dbLoadDatabase("../../dbd/WithMPF.dbd") +registerRecordDeviceDriver(pdbbase) +dbLoadRecords("../../db/WithMPF.db") + +routerInit +localMessageRouterStart(1) + +# Configure the MPF server code. This MUST be configured too! +< st_mpfserver.cmd.sun + +IM483PLSetup(1, 0, 5) +IM483PLConfig(0, 1, 1, "serial0") + +iocInit diff --git a/iocBoot/iocWithAsyn/st_mpfserver.cmd b/iocBoot/iocWithAsyn/st_mpfserver.cmd deleted file mode 100644 index d5a2846e..00000000 --- a/iocBoot/iocWithAsyn/st_mpfserver.cmd +++ /dev/null @@ -1,30 +0,0 @@ -# This configures the MPF server stuff. GPIB support is commented out, but can -# added by simply deleting the "# !GPIB! #" comments. - -############################################################################### -# Initialize IP carrier -# ipacAddCarrier(ipac_carrier_t *pcarrier, char *cardParams) -# pcarrier - pointer to carrier driver structure -# cardParams - carrier-specific init parameters - -carrier = "ipac" -ipacAddCarrier(&ipmv162, "A:l=3,3 m=0xe0000000,64;B:l=3,3 m=0xe0010000,64;C:l=3,3 m=0xe0020000,64;D:l=3,3 m=0xe0030000,64") -initIpacCarrier(carrier, 0) - -############################################################################### -# Initialize Octal UART module -#initOctalUART("moduleName","carrierName","carrierSite",nports,intVec) -initOctalUART("octalUart0",carrier,"IP_a",8,100) - -# initOctalUARTPort(char* portName,char* moduleName,int port,int baud, -# char* parity,int stop_bits,int bits_char,char* flow_control) -# 'baud' is the baud rate. 1200, 2400, 4800, 9600, 19200, 38400 -# 'parity' is "E" for even, "O" for odd, "N" for none. -# 'bits_per_character' = {5,6,7,8} -# 'stop_bits' = {1,2} -# 'flow_control' is "N" for none, "H" for hardware -# Port 0 is Generic Serial Record - -initOctalUARTPort("UART[0]","octalUart0",0, 9600,"N",1,8,"N") -initSerialServer("a-Serial[0]","UART[0]",1000,20,"\r",1) - diff --git a/iocBoot/iocWithAsyn/st_mpfserver.cmd.Vx b/iocBoot/iocWithAsyn/st_mpfserver.cmd.Vx new file mode 100644 index 00000000..b3298bcc --- /dev/null +++ b/iocBoot/iocWithAsyn/st_mpfserver.cmd.Vx @@ -0,0 +1,19 @@ +# This configures the MPF server stuff. +############################################################################### +# Initialize IP carrier +# ipacAddCarrier(ipac_carrier_t *pcarrier, char *cardParams) +# pcarrier - pointer to carrier driver structure +# cardParams - carrier-specific init parameters + +carrier = "ipac" +ipacAddCarrier(&ipmv162, "A:l=3,3 m=0xe0000000,64") + +tyGSOctalDrv(1) +taskDelay(10) +octalUart0 = tyGSOctalModuleInit("GSIP_OCTAL232", 0x80, 0, 0) +taskDelay(3) +port0 = tyGSOctalDevCreate("/tyGS/0/0",octalUart0,0,1000,1000) +tyGSOctalConfig(port0,9600,'N',1,8,'N') +initTtyPort("tyGS00","/tyGS/0/0",9600,1000) +initSerialServer("serial0","tyGS00",100,2,"") + diff --git a/iocBoot/iocWithAsyn/st_mpfserver.cmd.linux b/iocBoot/iocWithAsyn/st_mpfserver.cmd.linux new file mode 100644 index 00000000..798549a8 --- /dev/null +++ b/iocBoot/iocWithAsyn/st_mpfserver.cmd.linux @@ -0,0 +1,3 @@ +initTtyPort("port0","/dev/ttyS0",9600,"N",1,8,"N",1000) +initSerialServer("serial0","port0",1000,2,"") + diff --git a/iocBoot/iocWithAsyn/st_mpfserver.cmd.sun b/iocBoot/iocWithAsyn/st_mpfserver.cmd.sun new file mode 100644 index 00000000..357880fb --- /dev/null +++ b/iocBoot/iocWithAsyn/st_mpfserver.cmd.sun @@ -0,0 +1,3 @@ +initTtyPort("port0","/dev/ttyb",9600,"N",1,8,"N",1000) +initSerialServer("serial0","port0",1000,2,"") + diff --git a/iocBoot/iocWithMPF/st.cmd b/iocBoot/iocWithMPF/st.cmd.Vx similarity index 76% rename from iocBoot/iocWithMPF/st.cmd rename to iocBoot/iocWithMPF/st.cmd.Vx index 0d13cce0..35ff0542 100644 --- a/iocBoot/iocWithMPF/st.cmd +++ b/iocBoot/iocWithMPF/st.cmd.Vx @@ -2,11 +2,6 @@ # IMS483 controller. The examples must be configured by including or omitting # comment characters (i.e., #'s) from this file. -# The Newport example can be configured for either serial or GPIB communication -# by omitting/including comments (i.e., remove "# !SERIAL! #" or "# !GPIB! #" -# for serial or GPIB communication, respectively. The IMS example is serial -# communication only, in "single mode". - # The MPF option is either single or double CPU board configuration and is # selected by deleting either the "# !MPF-1-CPU! #" for the "# !MPF-2-CPU! #" # comments. @@ -15,23 +10,21 @@ # The following must be added for many board support packages #cd "... IOC st.cmd complete directory path ... " -#< ../nfsCommands < cdCommands -< ../MPFconfig.cmd +#< ../nfsCommands.rls -cd appbin +cd topbin # If the VxWorks kernel was built using the project facility, the following must # be added before any C++ code is loaded (see SPR #28980). sysCplusEnable=1 -ld < WithMPFLib - -# !GPIB! ## !MPF-1-CPU! #ld < GpibHideosLocal.o -# !GPIB! ## !MPF-2-CPU! #ld < GpibHideosRemote.o +ld < WithMPFVx.munch cd startup -dbLoadDatabase("../../dbd/WithMPFApp.dbd") +dbLoadDatabase("../../dbd/WithMPFVx.dbd") +registerRecordDeviceDriver(pdbbase) + dbLoadRecords("../../db/WithMPF.db") routerInit @@ -40,7 +33,7 @@ MPF_Server_Location = 0 # !MPF-2-CPU! #tcpMessageRouterClientStart(MPF_Server_Location,9900,"164.54.53.78",1500,40) # Configure the MPF server code. This MUST be configured too! -# !MPF-1-CPU! #< st_mpfserver.cmd +# !MPF-1-CPU! #< st_mpfserver.cmd.Vx # Newport MM4000 driver setup parameters: # (1) maximum number of controllers in system @@ -53,10 +46,7 @@ MM4000Setup(1, 0, 10) # (2) port type: 0-GPIB_PORT or 1-RS232_PORT, # (3) GPIB link or MPF server location # (4) GPIB address or MPF serial server name -# !SERIAL! #MM4000Config(0, 1, MPF_Server_Location, "a-Serial[0]") -# !GPIB! #GPIB_Link = 10 -# !GPIB! #GPIB_Addr = 1 -# !GPIB! #MM4000Config(0, 0, GPIB_Link, GPIB_Addr) +MM4000Config(0, 1, MPF_Server_Location, "a-Serial[0]") # Newport PM500 driver setup parameters: # (1) maximum number of controllers in system @@ -102,8 +92,18 @@ MM4000Setup(1, 0, 10) # MCB4BConfig(0, 1, "a-Serial[0]") MPF card 1, port 0 on IP slot A. #MCB4BConfig(0, MPF_Server_Location, "a-Serial[3]") -# !GPIB! ## !MPF-1-CPU! #Server_Mod_Name = GPIB_Module_Name -# !GPIB! ## !MPF-2-CPU! #Server_Mod_Name = "GPIB0" -# !GPIB! #HiDEOSGpibLinkConfig(GPIB_Link, GPIB_Addr, Server_Mod_Name) +# Newport ESP300 driver setup parameters: +# (1) maximum number of controllers in system +# (2) N/A +# (3) motor task polling rate (min=1Hz,max=60Hz) +#ESP300Setup(1, 0, 10) + +# Newport ESP300 driver configuration parameters: +# (1) controller# being configured, +# (2) port type: 0-GPIB_PORT or 1-RS232_PORT, +# (3) MPF server location +# (4) GPIB address or MPF serial server name +#ESP300Config(0, 1, MPF_Server_Location, "a-Serial[0]") +#drvESP300debug = 4 iocInit diff --git a/iocBoot/iocWithMPF/st.cmd.linux b/iocBoot/iocWithMPF/st.cmd.linux new file mode 100644 index 00000000..76b1ae87 --- /dev/null +++ b/iocBoot/iocWithMPF/st.cmd.linux @@ -0,0 +1,18 @@ +# Start errlog Task before any possible error messsage to prevent +# erroneous "Interrupted system call" message on Linux OS. +errlogInit(0) + +dbLoadDatabase("../../dbd/WithMPF.dbd") +registerRecordDeviceDriver(pdbbase) +dbLoadRecords("../../db/WithMPF.db") + +routerInit +localMessageRouterStart(1) + +# Configure the MPF server code. This MUST be configured too! +< st_mpfserver.cmd.linux + +MM4000Setup(1, 0, 60) +MM4000Config(0, 1, 1, "serial0") + +iocInit diff --git a/iocBoot/iocWithMPF/st.cmd.sun b/iocBoot/iocWithMPF/st.cmd.sun new file mode 100644 index 00000000..e61b2701 --- /dev/null +++ b/iocBoot/iocWithMPF/st.cmd.sun @@ -0,0 +1,18 @@ +# Start errlog Task before any possible error messsage to prevent +# erroneous "Interrupted system call" message on Linux OS. +errlogInit(0) + +dbLoadDatabase("../../dbd/WithMPF.dbd") +registerRecordDeviceDriver(pdbbase) +dbLoadRecords("../../db/WithMPF.db") + +routerInit +localMessageRouterStart(1) + +# Configure the MPF server code. This MUST be configured too! +< st_mpfserver.cmd.sun + +IM483PLSetup(1, 0, 5) +IM483PLConfig(0, 1, 1, "serial0") + +iocInit diff --git a/iocBoot/iocWithMPF/st_mpfserver.cmd b/iocBoot/iocWithMPF/st_mpfserver.cmd deleted file mode 100644 index d5a2846e..00000000 --- a/iocBoot/iocWithMPF/st_mpfserver.cmd +++ /dev/null @@ -1,30 +0,0 @@ -# This configures the MPF server stuff. GPIB support is commented out, but can -# added by simply deleting the "# !GPIB! #" comments. - -############################################################################### -# Initialize IP carrier -# ipacAddCarrier(ipac_carrier_t *pcarrier, char *cardParams) -# pcarrier - pointer to carrier driver structure -# cardParams - carrier-specific init parameters - -carrier = "ipac" -ipacAddCarrier(&ipmv162, "A:l=3,3 m=0xe0000000,64;B:l=3,3 m=0xe0010000,64;C:l=3,3 m=0xe0020000,64;D:l=3,3 m=0xe0030000,64") -initIpacCarrier(carrier, 0) - -############################################################################### -# Initialize Octal UART module -#initOctalUART("moduleName","carrierName","carrierSite",nports,intVec) -initOctalUART("octalUart0",carrier,"IP_a",8,100) - -# initOctalUARTPort(char* portName,char* moduleName,int port,int baud, -# char* parity,int stop_bits,int bits_char,char* flow_control) -# 'baud' is the baud rate. 1200, 2400, 4800, 9600, 19200, 38400 -# 'parity' is "E" for even, "O" for odd, "N" for none. -# 'bits_per_character' = {5,6,7,8} -# 'stop_bits' = {1,2} -# 'flow_control' is "N" for none, "H" for hardware -# Port 0 is Generic Serial Record - -initOctalUARTPort("UART[0]","octalUart0",0, 9600,"N",1,8,"N") -initSerialServer("a-Serial[0]","UART[0]",1000,20,"\r",1) - diff --git a/iocBoot/iocWithMPF/st_mpfserver.cmd.Vx b/iocBoot/iocWithMPF/st_mpfserver.cmd.Vx new file mode 100644 index 00000000..b3298bcc --- /dev/null +++ b/iocBoot/iocWithMPF/st_mpfserver.cmd.Vx @@ -0,0 +1,19 @@ +# This configures the MPF server stuff. +############################################################################### +# Initialize IP carrier +# ipacAddCarrier(ipac_carrier_t *pcarrier, char *cardParams) +# pcarrier - pointer to carrier driver structure +# cardParams - carrier-specific init parameters + +carrier = "ipac" +ipacAddCarrier(&ipmv162, "A:l=3,3 m=0xe0000000,64") + +tyGSOctalDrv(1) +taskDelay(10) +octalUart0 = tyGSOctalModuleInit("GSIP_OCTAL232", 0x80, 0, 0) +taskDelay(3) +port0 = tyGSOctalDevCreate("/tyGS/0/0",octalUart0,0,1000,1000) +tyGSOctalConfig(port0,9600,'N',1,8,'N') +initTtyPort("tyGS00","/tyGS/0/0",9600,1000) +initSerialServer("serial0","tyGS00",100,2,"") + diff --git a/iocBoot/iocWithMPF/st_mpfserver.cmd.linux b/iocBoot/iocWithMPF/st_mpfserver.cmd.linux new file mode 100644 index 00000000..798549a8 --- /dev/null +++ b/iocBoot/iocWithMPF/st_mpfserver.cmd.linux @@ -0,0 +1,3 @@ +initTtyPort("port0","/dev/ttyS0",9600,"N",1,8,"N",1000) +initSerialServer("serial0","port0",1000,2,"") + diff --git a/iocBoot/iocWithMPF/st_mpfserver.cmd.sun b/iocBoot/iocWithMPF/st_mpfserver.cmd.sun new file mode 100644 index 00000000..357880fb --- /dev/null +++ b/iocBoot/iocWithMPF/st_mpfserver.cmd.sun @@ -0,0 +1,3 @@ +initTtyPort("port0","/dev/ttyb",9600,"N",1,8,"N",1000) +initSerialServer("serial0","port0",1000,2,"") +