Original version.

This commit is contained in:
Ron Sluiter
2000-08-29 13:50:32 +00:00
parent 2cf352b10c
commit adcc69afed
12 changed files with 378 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
TOP = ../..
include $(TOP)/config/CONFIG_APP
ARCH = mv167
include $(TOP)/config/RULES.ioc
+25
View File
@@ -0,0 +1,25 @@
# This example if for OMS VME8/44 controllers. Since OMS controllers
# communicate across the VME backplace, this example does not require
# MPF.
#The following must be added for many board support packages
#cd "... IOC st.cmd complete directory path ... "
< cdCommands
#< ../nfsCommands
cd appbin
ld < NoMPFLib
cd startup
dbLoadDatabase("../../dbd/NoMPFApp.dbd")
dbLoadRecords("../../db/NoMPF.db")
# OMS VME driver setup parameters:
# (1)cards, (2)axes per card, (3)base address(short, 16-byte boundary),
# (4)interrupt vector (0=disable or 64 - 255), (5)interrupt level (1 - 6),
# (6)motor task polling rate (min=1Hz,max=60Hz)
omsSetup(1, 8, 0xFC00, 180, 5, 60)
iocInit
+4
View File
@@ -0,0 +1,4 @@
TOP = ../..
include $(TOP)/config/CONFIG_APP
ARCH = mv167
include $(TOP)/config/RULES.ioc
+25
View File
@@ -0,0 +1,25 @@
# This example if for OMS VME8/44 controllers. Since OMS controllers
# communicate across the VME backplace, this example does not require
# MPF.
#The following must be added for many board support packages
#cd "... IOC st.cmd complete directory path ... "
< cdCommands
#< ../nfsCommands
cd appbin
ld < NoMPFLib
cd startup
dbLoadDatabase("../../dbd/NoMPFApp.dbd")
dbLoadRecords("../../db/NoMPF.db")
# OMS VME driver setup parameters:
# (1)cards, (2)axes per card, (3)base address(short, 16-byte boundary),
# (4)interrupt vector (0=disable or 64 - 255), (5)interrupt level (1 - 6),
# (6)motor task polling rate (min=1Hz,max=60Hz)
omsSetup(1, 8, 0xFC00, 180, 5, 60)
iocInit
+4
View File
@@ -0,0 +1,4 @@
TOP = ../..
include $(TOP)/config/CONFIG_APP
ARCH = mv167
include $(TOP)/config/RULES.ioc
+69
View File
@@ -0,0 +1,69 @@
# The is the MPF example for communication to either a Newport MM4000/5 or an
# 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.
# The following must be added for many board support packages
#cd "... IOC st.cmd complete directory path ... "
< cdCommands
#< ../nfsCommands
cd appbin
ld < WithMPFLib
cd startup
dbLoadDatabase("../../dbd/WithMPFApp.dbd")
dbLoadRecords("../../db/WithMPF.db")
routerInit
MPF_Server_Location = 1
# !MPF-1-CPU! #localMessageRouterStart(MPF_Server_Location)
# !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
# Newport MM4000 driver setup parameters:
# (1) max. controllers, (2)Unused, (3)polling rate (min=1Hz,max=60Hz)
MM4000Setup(1, 0, 10)
# Newport MM4000 driver configuration parameters:
# (1)controller# being configured,
# (2)port type: 0-GPIB_PORT or 1-RS232_PORT,
# (3)GPIB link, hideos_card# or MPF server location# (specified by either
# localMessageRouterStart(location) or
# tcpMessageRouterClientStart(location,port,"address",bufSize,queueSize)
# (4)GPIB address or hideos_task 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)
# IMS IM483 driver setup parameters:
# (1) maximum number of controllers in system
# (2) N/A
# (3) motor task polling rate (min=1Hz,max=60Hz)
#IM483SMSetup(1, 0, 1)
# IMS IM483 configuration parameters:
# (1) card being configured
# (2) port type (1-RS232_PORT)
# (3) link for GPIB or hideos_card for RS-232
# (4) GPIB address or hideos_task
#IM483SMConfig(0, 1, 0, "a-Serial[0]")
# !MPF-2-CPU! #GPIB_ServerName = "GPIB0"
# !GPIB! #HiDEOSGpibLinkConfig(GPIB_Link, GPIB_Addr, GPIB_ServerName)
iocInit
+52
View File
@@ -0,0 +1,52 @@
# 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 GPIB module
# !GPIB! #initGpibGsTi9914("GS-IP488-0",carrier,"IP_d",104)
# !GPIB! #GPIB_ServerName = "GPIB0"
# !GPIB! #initGpibServer(GPIB_ServerName,"GS-IP488-0",1024,1000)
###############################################################################
# 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")
initOctalUARTPort("UART[1]","octalUart0",1, 9600,"N",1,8,"N")
initOctalUARTPort("UART[2]","octalUart0",2, 9600,"N",1,8,"N")
initOctalUARTPort("UART[3]","octalUart0",3, 9600,"N",1,8,"N")
initOctalUARTPort("UART[4]","octalUart0",4, 9600,"N",1,8,"N")
initOctalUARTPort("UART[5]","octalUart0",5, 9600,"N",1,8,"N")
initOctalUARTPort("UART[6]","octalUart0",6, 9600,"N",1,8,"N")
initOctalUARTPort("UART[7]","octalUart0",7, 9600,"N",1,8,"N")
initSerialServer("a-Serial[0]","UART[0]",1000,20,"\r",1)
initSerialServer("a-Serial[1]","UART[1]",1000,20,"\r",1)
initSerialServer("a-Serial[2]","UART[2]",1000,20,"\r",1)
initSerialServer("a-Serial[3]","UART[3]",1000,20,"\r",1)
initSerialServer("a-Serial[4]","UART[4]",1000,20,"\r",1)
initSerialServer("a-Serial[5]","UART[5]",1000,20,"\r",1)
initSerialServer("a-Serial[6]","UART[6]",1000,20,"\r",1)
initSerialServer("a-Serial[7]","UART[7]",1000,20,"\r",1)
+4
View File
@@ -0,0 +1,4 @@
TOP = ../..
include $(TOP)/config/CONFIG_APP
ARCH = mv167
include $(TOP)/config/RULES.ioc
+69
View File
@@ -0,0 +1,69 @@
# The is the MPF example for communication to either a Newport MM4000/5 or an
# 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.
# The following must be added for many board support packages
#cd "... IOC st.cmd complete directory path ... "
< cdCommands
#< ../nfsCommands
cd appbin
ld < WithMPFLib
cd startup
dbLoadDatabase("../../dbd/WithMPFApp.dbd")
dbLoadRecords("../../db/WithMPF.db")
routerInit
MPF_Server_Location = 1
# !MPF-1-CPU! #localMessageRouterStart(MPF_Server_Location)
# !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
# Newport MM4000 driver setup parameters:
# (1) max. controllers, (2)Unused, (3)polling rate (min=1Hz,max=60Hz)
MM4000Setup(1, 0, 10)
# Newport MM4000 driver configuration parameters:
# (1)controller# being configured,
# (2)port type: 0-GPIB_PORT or 1-RS232_PORT,
# (3)GPIB link, hideos_card# or MPF server location# (specified by either
# localMessageRouterStart(location) or
# tcpMessageRouterClientStart(location,port,"address",bufSize,queueSize)
# (4)GPIB address or hideos_task 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)
# IMS IM483 driver setup parameters:
# (1) maximum number of controllers in system
# (2) N/A
# (3) motor task polling rate (min=1Hz,max=60Hz)
#IM483SMSetup(1, 0, 1)
# IMS IM483 configuration parameters:
# (1) card being configured
# (2) port type (1-RS232_PORT)
# (3) link for GPIB or hideos_card for RS-232
# (4) GPIB address or hideos_task
#IM483SMConfig(0, 1, 0, "a-Serial[0]")
# !MPF-2-CPU! #GPIB_ServerName = "GPIB0"
# !GPIB! #HiDEOSGpibLinkConfig(GPIB_Link, GPIB_Addr, GPIB_ServerName)
iocInit
+52
View File
@@ -0,0 +1,52 @@
# 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 GPIB module
# !GPIB! #initGpibGsTi9914("GS-IP488-0",carrier,"IP_d",104)
# !GPIB! #GPIB_ServerName = "GPIB0"
# !GPIB! #initGpibServer(GPIB_ServerName,"GS-IP488-0",1024,1000)
###############################################################################
# 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")
initOctalUARTPort("UART[1]","octalUart0",1, 9600,"N",1,8,"N")
initOctalUARTPort("UART[2]","octalUart0",2, 9600,"N",1,8,"N")
initOctalUARTPort("UART[3]","octalUart0",3, 9600,"N",1,8,"N")
initOctalUARTPort("UART[4]","octalUart0",4, 9600,"N",1,8,"N")
initOctalUARTPort("UART[5]","octalUart0",5, 9600,"N",1,8,"N")
initOctalUARTPort("UART[6]","octalUart0",6, 9600,"N",1,8,"N")
initOctalUARTPort("UART[7]","octalUart0",7, 9600,"N",1,8,"N")
initSerialServer("a-Serial[0]","UART[0]",1000,20,"\r",1)
initSerialServer("a-Serial[1]","UART[1]",1000,20,"\r",1)
initSerialServer("a-Serial[2]","UART[2]",1000,20,"\r",1)
initSerialServer("a-Serial[3]","UART[3]",1000,20,"\r",1)
initSerialServer("a-Serial[4]","UART[4]",1000,20,"\r",1)
initSerialServer("a-Serial[5]","UART[5]",1000,20,"\r",1)
initSerialServer("a-Serial[6]","UART[6]",1000,20,"\r",1)
initSerialServer("a-Serial[7]","UART[7]",1000,20,"\r",1)
+4
View File
@@ -0,0 +1,4 @@
TOP = ../..
include $(TOP)/config/CONFIG_APP
ARCH = mv167
include $(TOP)/config/RULES.ioc
+66
View File
@@ -0,0 +1,66 @@
# This configures the MPF server stuff. GPIB support is commented out, but can
# be added by simply deleting the "# !GPIB! #" comments.
#< ../nfsCommands
#The following must be added for many board support packages
#cd "... IOC st.cmd complete directory path ... "
< cdCommands
cd appbin
ld < ipServerLib
cd startup
#start message router
routerInit
tcpMessageRouterServerStart(1,9900,"164.54.53.78",1500,40)
###############################################################################
# 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 GPIB module
# !GPIB! #initGpibGsTi9914("GS-IP488-0",carrier,"IP_d",104)
# !GPIB! #initGpibServer("GPIB0","GS-IP488-0",1024,1000)
###############################################################################
# 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")
initOctalUARTPort("UART[1]","octalUart0",1, 9600,"N",1,8,"N")
initOctalUARTPort("UART[2]","octalUart0",2, 9600,"N",1,8,"N")
initOctalUARTPort("UART[3]","octalUart0",3, 9600,"N",1,8,"N")
initOctalUARTPort("UART[4]","octalUart0",4, 9600,"N",1,8,"N")
initOctalUARTPort("UART[5]","octalUart0",5, 9600,"N",1,8,"N")
initOctalUARTPort("UART[6]","octalUart0",6, 9600,"N",1,8,"N")
initOctalUARTPort("UART[7]","octalUart0",7, 9600,"N",1,8,"N")
initSerialServer("a-Serial[0]","UART[0]",1000,20,"\r",1)
initSerialServer("a-Serial[1]","UART[1]",1000,20,"\r",1)
initSerialServer("a-Serial[2]","UART[2]",1000,20,"\r",1)
initSerialServer("a-Serial[3]","UART[3]",1000,20,"\r",1)
initSerialServer("a-Serial[4]","UART[4]",1000,20,"\r",1)
initSerialServer("a-Serial[5]","UART[5]",1000,20,"\r",1)
initSerialServer("a-Serial[6]","UART[6]",1000,20,"\r",1)
initSerialServer("a-Serial[7]","UART[7]",1000,20,"\r",1)