diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..0f0a2c46 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "modules/motorNewport"] + path = modules/motorNewport + url = https://github.com/epics-motor/motorNewport.git diff --git a/iocBoot/iocWithAsyn/README b/iocBoot/iocWithAsyn/README index aeed602c..863f7e69 100644 --- a/iocBoot/iocWithAsyn/README +++ b/iocBoot/iocWithAsyn/README @@ -13,7 +13,7 @@ To build the iocWithAsyn example; Finally, cd ; gnumake clean uninstall; gnumake -To run this Newport MM4000/5, "asyn" example on a Unix OS; +To run this "asyn" example on a Unix OS; - Set the EPICS_HOST_ARCH environment variable correctly. - Edit the st.cmd.unix file for either sun or linux. - Start the ioc from this directory by executing the following command. diff --git a/iocBoot/iocWithAsyn/XPSAux.substitutions b/iocBoot/iocWithAsyn/XPSAux.substitutions deleted file mode 100644 index c98970d0..00000000 --- a/iocBoot/iocWithAsyn/XPSAux.substitutions +++ /dev/null @@ -1,118 +0,0 @@ -file "$(TOP)/db/XPSAuxLi.db" -{ -pattern -{P, R, PORT, CHAN, SCAN} -{IOC:, XPSAux1Li, XPS_AUX1, 0, "I/O Intr"} -{IOC:, XPSAux2Li, XPS_AUX1, 1, "I/O Intr"} -{IOC:, XPSAux3Li, XPS_AUX1, 2, "I/O Intr"} -{IOC:, XPSAux4Li, XPS_AUX1, 3, "I/O Intr"} -} - -file "$(TOP)/db/XPSAuxBi.db" -{ -pattern -{P, R, PORT, CHAN, MASK, SCAN} -{IOC:, XPSAux1Bi0, XPS_AUX1, 0, 0x000001, "I/O Intr"} -{IOC:, XPSAux1Bi1, XPS_AUX1, 0, 0x000002, "I/O Intr"} -{IOC:, XPSAux1Bi2, XPS_AUX1, 0, 0x000004, "I/O Intr"} -{IOC:, XPSAux1Bi3, XPS_AUX1, 0, 0x000008, "I/O Intr"} -{IOC:, XPSAux1Bi4, XPS_AUX1, 0, 0x000010, "I/O Intr"} -{IOC:, XPSAux1Bi5, XPS_AUX1, 0, 0x000020, "I/O Intr"} -{IOC:, XPSAux1Bi6, XPS_AUX1, 0, 0x000040, "I/O Intr"} -{IOC:, XPSAux1Bi7, XPS_AUX1, 0, 0x000080, "I/O Intr"} -{IOC:, XPSAux2Bi0, XPS_AUX1, 1, 0x000001, "I/O Intr"} -{IOC:, XPSAux2Bi1, XPS_AUX1, 1, 0x000002, "I/O Intr"} -{IOC:, XPSAux2Bi2, XPS_AUX1, 1, 0x000004, "I/O Intr"} -{IOC:, XPSAux2Bi3, XPS_AUX1, 1, 0x000008, "I/O Intr"} -{IOC:, XPSAux2Bi4, XPS_AUX1, 1, 0x000010, "I/O Intr"} -{IOC:, XPSAux2Bi5, XPS_AUX1, 1, 0x000020, "I/O Intr"} -{IOC:, XPSAux3Bi0, XPS_AUX1, 2, 0x000001, "I/O Intr"} -{IOC:, XPSAux3Bi1, XPS_AUX1, 2, 0x000002, "I/O Intr"} -{IOC:, XPSAux3Bi2, XPS_AUX1, 2, 0x000004, "I/O Intr"} -{IOC:, XPSAux3Bi3, XPS_AUX1, 2, 0x000008, "I/O Intr"} -{IOC:, XPSAux3Bi4, XPS_AUX1, 2, 0x000010, "I/O Intr"} -{IOC:, XPSAux3Bi5, XPS_AUX1, 2, 0x000020, "I/O Intr"} -{IOC:, XPSAux4Bi0, XPS_AUX1, 3, 0x000001, "I/O Intr"} -{IOC:, XPSAux4Bi1, XPS_AUX1, 3, 0x000002, "I/O Intr"} -{IOC:, XPSAux4Bi2, XPS_AUX1, 3, 0x000004, "I/O Intr"} -{IOC:, XPSAux4Bi3, XPS_AUX1, 3, 0x000008, "I/O Intr"} -{IOC:, XPSAux4Bi4, XPS_AUX1, 3, 0x000010, "I/O Intr"} -{IOC:, XPSAux4Bi5, XPS_AUX1, 3, 0x000020, "I/O Intr"} -{IOC:, XPSAux4Bi6, XPS_AUX1, 3, 0x000040, "I/O Intr"} -{IOC:, XPSAux4Bi7, XPS_AUX1, 3, 0x000080, "I/O Intr"} -{IOC:, XPSAux4Bi8, XPS_AUX1, 3, 0x000100, "I/O Intr"} -{IOC:, XPSAux4Bi9, XPS_AUX1, 3, 0x000200, "I/O Intr"} -{IOC:, XPSAux4Bi10, XPS_AUX1, 3, 0x000400, "I/O Intr"} -{IOC:, XPSAux4Bi11, XPS_AUX1, 3, 0x000800, "I/O Intr"} -{IOC:, XPSAux4Bi12, XPS_AUX1, 3, 0x001000, "I/O Intr"} -{IOC:, XPSAux4Bi13, XPS_AUX1, 3, 0x002000, "I/O Intr"} -{IOC:, XPSAux4Bi14, XPS_AUX1, 3, 0x004000, "I/O Intr"} -{IOC:, XPSAux4Bi15, XPS_AUX1, 3, 0x008000, "I/O Intr"} -} - -file "$(TOP)/db/XPSAuxBo.db" -{ -pattern -{P, R, PORT, CHAN, MASK} -{IOC:, XPSAux1Bo0, XPS_AUX1, 0, 0x000001} -{IOC:, XPSAux1Bo1, XPS_AUX1, 0, 0x000002} -{IOC:, XPSAux1Bo2, XPS_AUX1, 0, 0x000004} -{IOC:, XPSAux1Bo3, XPS_AUX1, 0, 0x000008} -{IOC:, XPSAux1Bo4, XPS_AUX1, 0, 0x000010} -{IOC:, XPSAux1Bo5, XPS_AUX1, 0, 0x000020} -{IOC:, XPSAux1Bo6, XPS_AUX1, 0, 0x000040} -{IOC:, XPSAux1Bo7, XPS_AUX1, 0, 0x000080} -{IOC:, XPSAux3Bo0, XPS_AUX1, 1, 0x000001} -{IOC:, XPSAux3Bo1, XPS_AUX1, 1, 0x000002} -{IOC:, XPSAux3Bo2, XPS_AUX1, 1, 0x000004} -{IOC:, XPSAux3Bo3, XPS_AUX1, 1, 0x000008} -{IOC:, XPSAux3Bo4, XPS_AUX1, 1, 0x000010} -{IOC:, XPSAux3Bo5, XPS_AUX1, 1, 0x000020} -{IOC:, XPSAux4Bo0, XPS_AUX1, 2, 0x000001} -{IOC:, XPSAux4Bo1, XPS_AUX1, 2, 0x000002} -{IOC:, XPSAux4Bo2, XPS_AUX1, 2, 0x000004} -{IOC:, XPSAux4Bo3, XPS_AUX1, 2, 0x000008} -{IOC:, XPSAux4Bo4, XPS_AUX1, 2, 0x000010} -{IOC:, XPSAux4Bo5, XPS_AUX1, 2, 0x000020} -{IOC:, XPSAux4Bo6, XPS_AUX1, 2, 0x000040} -{IOC:, XPSAux4Bo7, XPS_AUX1, 2, 0x000080} -{IOC:, XPSAux4Bo8, XPS_AUX1, 2, 0x000100} -{IOC:, XPSAux4Bo9, XPS_AUX1, 2, 0x000200} -{IOC:, XPSAux4Bo10, XPS_AUX1, 2, 0x000400} -{IOC:, XPSAux4Bo11, XPS_AUX1, 2, 0x000800} -{IOC:, XPSAux4Bo12, XPS_AUX1, 2, 0x001000} -{IOC:, XPSAux4Bo13, XPS_AUX1, 2, 0x002000} -{IOC:, XPSAux4Bo14, XPS_AUX1, 2, 0x004000} -{IOC:, XPSAux4Bo15, XPS_AUX1, 2, 0x008000} -} - -file "$(TOP)/db/XPSAuxLo.db" -{ -pattern -{P, R, PORT, CHAN} -{IOC:, XPSAux1Lo, XPS_AUX1, 0} -{IOC:, XPSAux3Lo, XPS_AUX1, 1} -{IOC:, XPSAux4Lo, XPS_AUX1, 2} -} - - -file "$(TOP)/db/XPSAuxAi.db" -{ -pattern -{P, R, PORT, CHAN, LOPR, HOPR, PREC, SCAN} -{IOC:, XPSAuxAi0, XPS_AUX1, 0, -10.0, 10.0, 4, "1 second"} -{IOC:, XPSAuxAi1, XPS_AUX1, 1, -10.0, 10.0, 4, "1 second"} -{IOC:, XPSAuxAi2, XPS_AUX1, 2, -10.0, 10.0, 4, "1 second"} -{IOC:, XPSAuxAi3, XPS_AUX1, 3, -10.0, 10.0, 4, "1 second"} -} - -file "$(TOP)/db/XPSAuxAo.db" -{ -pattern -{P, R, PORT, CHAN, DRVL, LOPR, DRVH, HOPR, PREC} -{IOC:, XPSAuxAo0, XPS_AUX1, 0, -10.0, -10.0, 10.0, 10.0, 4} -{IOC:, XPSAuxAo1, XPS_AUX1, 1, -10.0, -10.0, 10.0, 10.0, 4} -{IOC:, XPSAuxAo2, XPS_AUX1, 2, -10.0, -10.0, 10.0, 10.0, 4} -{IOC:, XPSAuxAo3, XPS_AUX1, 3, -10.0, -10.0, 10.0, 10.0 4} -} - diff --git a/iocBoot/iocWithAsyn/connect_AG_CONEX b/iocBoot/iocWithAsyn/connect_AG_CONEX deleted file mode 100755 index 9eb1f138..00000000 --- a/iocBoot/iocWithAsyn/connect_AG_CONEX +++ /dev/null @@ -1,2 +0,0 @@ -sudo modprobe -v ftdi_sio vendor=0x104d product=0x3006 -sudo chmod o+rw /dev/ttyUSB* diff --git a/iocBoot/iocWithAsyn/connect_AG_UC b/iocBoot/iocWithAsyn/connect_AG_UC deleted file mode 100755 index 55798578..00000000 --- a/iocBoot/iocWithAsyn/connect_AG_UC +++ /dev/null @@ -1,2 +0,0 @@ -sudo modprobe -v ftdi_sio vendor=0x104d product=0x3000 -sudo chmod o+rw /dev/ttyUSB* diff --git a/iocBoot/iocWithAsyn/motor.cmd.hxp b/iocBoot/iocWithAsyn/motor.cmd.hxp deleted file mode 100644 index b076fd70..00000000 --- a/iocBoot/iocWithAsyn/motor.cmd.hxp +++ /dev/null @@ -1,11 +0,0 @@ -dbLoadTemplate("motor.substitutions.hxp") - -HXPCreateController("HXP1", "192.168.1.42", 5001, 200, 1000) -# A shorter, idle-poll period is desirable if the motors -# are moved using HXP_moveAll.adl, since this period determines -# how long it takes for the motor records to see that an -# external move has been initiated. -#!HXPCreateController("HXP1", "192.168.1.42", 5001, 200, 200) - -#asynSetTraceIOMask("HXP1", 0, 2) -#asynSetTraceMask("HXP1", 0, 255) diff --git a/iocBoot/iocWithAsyn/motor.substitutions.AG_CONEX b/iocBoot/iocWithAsyn/motor.substitutions.AG_CONEX deleted file mode 100644 index 2fd4a8a7..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.AG_CONEX +++ /dev/null @@ -1,6 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", Agilis1, 0, "Horizontal", mm, Pos, .5, 0.1, .25, 0, 1, .2, .0001, 4, 28, -1, ""} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.AG_UC b/iocBoot/iocWithAsyn/motor.substitutions.AG_UC deleted file mode 100644 index aa6098b8..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.AG_UC +++ /dev/null @@ -1,7 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", Agilis1, 0, "Horizontal", mm, Pos, .5, 0.1, .25, 0, 1, .2, .001, 3, 3, -3, ""} -{IOC:, 2, "m$(N)", "asynMotor", Agilis1, 1, "Vertical", mm, Pos, .5, 0.1, .25, 0, 1, .2, .001, 3, 3, -3, ""} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP b/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP deleted file mode 100644 index 78df4c27..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.CONEX-PP +++ /dev/null @@ -1,9 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -# Newport NSA12 stage, 6.35 microns/full step, 128 micro-steps/s -{IOC:, 1, "m$(N)", "asynMotor", CONEX1, 0, "X", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} -{IOC:, 2, "m$(N)", "asynMotor", CONEX2, 0, "Y", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} -{IOC:, 3, "m$(N)", "asynMotor", CONEX3, 0, "Z", mm, Pos, 1., 0.1, .25, 0, 1, .2, 4.9609375e-5, 4, 28, -1, ""} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.SMC100 b/iocBoot/iocWithAsyn/motor.substitutions.SMC100 deleted file mode 100644 index 3b4ea840..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.SMC100 +++ /dev/null @@ -1,6 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT, RTRY} -{IOC:, 1, "m$(N)", "asynMotor", "SMC100_1", 0, "GTS30V", mm, Pos, 1, 0, .2, 0, .5, .2, 0.00001, 6, 25, -5, ""} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.hxp b/iocBoot/iocWithAsyn/motor.substitutions.hxp deleted file mode 100644 index f5f3c941..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.hxp +++ /dev/null @@ -1,27 +0,0 @@ -file "$(MOTOR)/motorApp/Db/asyn_motor.db" -{ - pattern - {P, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VMAX, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT, RTRY} - {xxx:hxp:c0:, m1, "asynMotor", HXP1, 0, "X", mm, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} - {xxx:hxp:c0:, m2, "asynMotor", HXP1, 1, "Y", mm, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} - {xxx:hxp:c0:, m3, "asynMotor", HXP1, 2, "Z", mm, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} - {xxx:hxp:c0:, m4, "asynMotor", HXP1, 3, "U", degrees, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} - {xxx:hxp:c0:, m5, "asynMotor", HXP1, 4, "V", degrees, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} - {xxx:hxp:c0:, m6, "asynMotor", HXP1, 5, "W", degrees, Pos, 15., 3., .05, .5, 0, 1.0, 2, 0.00001, 5, 0, 0, "", 0} -} - -# Extra HXP controller support (moveAll, status and error PVs) -file "$(MOTOR)/motorApp/Db/HXP_extra.db" -{ - pattern - {P, R, PORT, CHAN} - {xxx:, hxp:c0:, HXP1, 0} -} - -# HXP coordinate-system support (reading and redefining) -file "$(MOTOR)/motorApp/Db/HXP_coords.db" -{ - pattern - {P, R, PORT, CHAN, M1, M2, M3, M4, M5, M6} - {xxx:, hxp:c0:, HXP1, 0, m1, m2, m3, m4, m5, m6} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.xps b/iocBoot/iocWithAsyn/motor.substitutions.xps deleted file mode 100644 index a324da49..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.xps +++ /dev/null @@ -1,16 +0,0 @@ -file "$(MOTOR)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", XPS1, 0, "motor $(N)", mm, Pos, .3, .1, .2, 0, 1, .2, 0.000048828, 5, 62.5, 50, ""} -{IOC:, 2, "m$(N)", "asynMotor", XPS1, 1, "motor $(N)", mm, Pos, .3, .1, .2, 0, 1, .2, 0.000147750, 5, 10, 0, ""} -{IOC:, 3, "m$(N)", "asynMotor", XPS1, 2, "motor $(N)", mm, Pos, .3, .1, .2, 0, 1, .2, 0.000048828, 5, 62.5, 50, ""} -} -file "$(MOTOR)/db/XPS_extra.db" -{ -pattern -{P, R, PORT, ADDR} -{IOC:, m1, XPS1, 0} -{IOC:, m2, XPS1 1} -{IOC:, m3, XPS1 2} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.xps3 b/iocBoot/iocWithAsyn/motor.substitutions.xps3 deleted file mode 100644 index e02b406b..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.xps3 +++ /dev/null @@ -1,61 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", XPS1, 0, "scanX", mm, Neg, 5., 1, 0.5, 0, 1, .2, 0.000001, 5, 12.4, -12.4, ""} -{IOC:, 2, "m$(N)", "asynMotor", XPS1, 1, "scanY", mm, Pos, 5., 1, 0.5, 0, 1, .2, 0.00002, 5, 2.4, -2.4, ""} -{IOC:, 3, "m$(N)", "asynMotor", XPS1, 2, "theta", degrees, Pos, 20., 1, 0.5, 0, 1, .2, 0.0005, 4, 150.0, -150.0, ""} -{IOC:, 4, "m$(N)", "asynMotor", XPS1, 3, "stageX", mm, Neg, 5., 1, 1.0, 0, 1, .5, 0.0005, 4, 100.0, -100.0, ""} -{IOC:, 5, "m$(N)", "asynMotor", XPS1, 4, "stageZ", mm, Neg, 5., 1, 1.0, 0, 1, .5, 0.0005, 4, 100.0, -100.0, ""} -{IOC:, 6, "m$(N)", "asynMotor", XPS1, 5, "stageY", mm, Pos, 5., 1, 1.0, 0, 2, .2, 0.0002, 4, 292.0, -8.0, ""} -} - -file "$(TOP)/db/XPS_extra.db" -{ -pattern -{P, R, PORT, ADDR} -{IOC:, m1, XPS1, 0} -{IOC:, m2, XPS1 1} -{IOC:, m3, XPS1 2} -{IOC:, m4, XPS1 3} -{IOC:, m5, XPS1 4} -{IOC:, m6, XPS1 5} -} - -file "$(TOP)/db/profileMoveController.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveControllerXPS.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveAxis.template" -{ -pattern -{P, R, N, M, PORT, ADDR,NPOINTS, NREADBACK, DIR_LINK, OFF_LINK, RES_LINK, PREC, TIMEOUT} -{IOC:, Prof1:, 1, "m$(N)", XPS1, 0, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 5, 1} -{IOC:, Prof1:, 2, "m$(N)", XPS1, 1, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 5, 1} -{IOC:, Prof1:, 3, "m$(N)", XPS1, 2, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 4, 1} -{IOC:, Prof1:, 4, "m$(N)", XPS1, 3, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 4, 1} -{IOC:, Prof1:, 5, "m$(N)", XPS1, 4, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 4, 1} -{IOC:, Prof1:, 6, "m$(N)", XPS1, 5, 2000, 2000, "IOC:$(M).DIR", "IOC:$(M).OFF", "IOC:$(M).MRES", 4, 1} -} - -file "$(TOP)/db/profileMoveAxisXPS.template" -{ -pattern -{P, R, N, M, PORT, ADDR,NPOINTS, NREADBACK, PREC, TIMEOUT} -{IOC:, Prof1:, 1, "m$(N)", XPS1, 0, 2000, 2000, 5, 1} -{IOC:, Prof1:, 2, "m$(N)", XPS1, 1, 2000, 2000, 5, 1} -{IOC:, Prof1:, 3, "m$(N)", XPS1, 2, 2000, 2000, 4, 1} -{IOC:, Prof1:, 4, "m$(N)", XPS1, 3, 2000, 2000, 4, 1} -{IOC:, Prof1:, 5, "m$(N)", XPS1, 4, 2000, 2000, 4, 1} -{IOC:, Prof1:, 6, "m$(N)", XPS1, 5, 2000, 2000, 4, 1} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.xps4 b/iocBoot/iocWithAsyn/motor.substitutions.xps4 deleted file mode 100644 index da778eaf..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.xps4 +++ /dev/null @@ -1,62 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", XPS1, 0, "Phi", degrees, Pos, 15.9, 0.1, 1, 0, 1, .2, .001, 5, 180, -180, ""} -{IOC:, 2, "m$(N)", "asynMotor", XPS1, 1, "Kappa", degrees, Pos, 15.9, 0.1, 1, 0, 1, .2, .0002, 5, 180, -180, ""} -{IOC:, 3, "m$(N)", "asynMotor", XPS1, 2, "Omega", degrees, Pos, 15.9, 0.1, 1, 0, 1, .2, .0002, 5, 360, -180, ""} -{IOC:, 4, "m$(N)", "asynMotor", XPS1, 3, "Psi", degrees, Pos, 3.9, 0.1, .5, 0, 1, .2, .00025, 5, 230, -230, ""} -{IOC:, 5, "m$(N)", "asynMotor", XPS1, 4, "2theta", degrees, Pos, 7.9, 0.1, 1, 0, 1, .2, .0001, 5, 190, -10, ""} -{IOC:, 6, "m$(N)", "asynMotor", XPS1, 5, "Nu", degrees, Pos, 3.9, 0.1, .5, 0, 1, .2, .00025, 5, 230, -230, ""} -} - - -file "$(TOP)/db/XPS_extra.db" -{ -pattern -{P, R, PORT, ADDR} -{IOC:, m1, XPS1, 0} -{IOC:, m2, XPS1 1} -{IOC:, m3, XPS1 2} -{IOC:, m4, XPS1 3} -{IOC:, m5, XPS1 4} -{IOC:, m6, XPS1 5} -} - -file "$(TOP)/db/profileMoveController.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveControllerXPS.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveAxis.template" -{ -pattern -{P, R, M, PORT, ADDR,NPOINTS, NREADBACK, MOTOR, PREC, TIMEOUT} -{IOC:, Prof1:, 1, XPS1, 0, 2000, 2000, IOC:m1, 5, 1} -{IOC:, Prof1:, 2, XPS1, 1, 2000, 2000, IOC:m2, 5, 1} -{IOC:, Prof1:, 3, XPS1, 2, 2000, 2000, IOC:m3, 4, 1} -{IOC:, Prof1:, 4, XPS1, 3, 2000, 2000, IOC:m4, 4, 1} -{IOC:, Prof1:, 5, XPS1, 4, 2000, 2000, IOC:m5, 4, 1} -{IOC:, Prof1:, 6, XPS1, 5, 2000, 2000, IOC:m6, 4, 1} -} - -file "$(TOP)/db/profileMoveAxisXPS.template" -{ -pattern -{P, R, M, PORT, ADDR,NPOINTS, NREADBACK, PREC, TIMEOUT} -{IOC:, Prof1:, 1, XPS1, 0, 2000, 2000, 5, 1} -{IOC:, Prof1:, 2, XPS1, 1, 2000, 2000, 5, 1} -{IOC:, Prof1:, 3, XPS1, 2, 2000, 2000, 4, 1} -{IOC:, Prof1:, 4, XPS1, 3, 2000, 2000, 4, 1} -{IOC:, Prof1:, 5, XPS1, 4, 2000, 2000, 4, 1} -{IOC:, Prof1:, 6, XPS1, 5, 2000, 2000, 4, 1} -} diff --git a/iocBoot/iocWithAsyn/motor.substitutions.xps5 b/iocBoot/iocWithAsyn/motor.substitutions.xps5 deleted file mode 100644 index b9f667c9..00000000 --- a/iocBoot/iocWithAsyn/motor.substitutions.xps5 +++ /dev/null @@ -1,68 +0,0 @@ -file "$(TOP)/db/basic_asyn_motor.db" -{ -pattern -{P, N, M, DTYP, PORT, ADDR, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, PREC, DHLM, DLLM, INIT} -{IOC:, 1, "m$(N)", "asynMotor", XPS1, 0, "Phi", degrees, Neg, 4.0, 0.1, .25, 0, 1, .2, .001, 3, 180, -180, ""} -{IOC:, 2, "m$(N)", "asynMotor", XPS1, 1, "Kappa", degrees, Neg, 6.0, 0.1, .88, 0, 1, .2, .0001, 4, 180, -180, ""} -{IOC:, 3, "m$(N)", "asynMotor", XPS1, 2, "Omega", degrees, Neg, 7.0, 0.1, 1.5, 0, 1, .2, .0001, 4, 360, -180, ""} -{IOC:, 4, "m$(N)", "asynMotor", XPS1, 3, "Psi", degrees, Neg, 4.0, 0.1, .5, 0, 1, .2, .00025, 4, 190, -190, ""} -{IOC:, 5, "m$(N)", "asynMotor", XPS1, 4, "2theta", degrees, Neg, 4.0, 0.1, 1.0, 0, 1, .2, .0001, 4, 196, -17, ""} -{IOC:, 6, "m$(N)", "asynMotor", XPS1, 5, "Nu", degrees, Neg, 4.0, 0.1, .5, 0, 1, .2, .00025, 4, 190, -190, ""} -{IOC:, 7, "m$(N)", "asynMotor", XPS1, 6, "Dummy1", degrees, Neg, 4.0, 0.1, .5, 0, 1, .2, .00025, 4, 190, -190, ""} -{IOC:, 8, "m$(N)", "asynMotor", XPS1, 7, "Dummy2", degrees, Neg, 4.0, 0.1, .5, 0, 1, .2, .00025, 4, 190, -190, ""} -} - - -file "$(TOP)/db/XPS_extra.db" -{ -pattern -{P, R, PORT, ADDR} -{IOC:, m1, XPS1, 0} -{IOC:, m2, XPS1 1} -{IOC:, m3, XPS1 2} -{IOC:, m4, XPS1 3} -{IOC:, m5, XPS1 4} -{IOC:, m6, XPS1 5} -} - -file "$(TOP)/db/profileMoveController.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveControllerXPS.template" -{ -pattern -{P, R, PORT, NAXES, NPOINTS, NPULSES, TIMEOUT} -{IOC:, Prof1:, XPS1, 6, 2000, 2000, 1} -} - -file "$(TOP)/db/profileMoveAxis.template" -{ -pattern -{P, R, M, PORT, ADDR,NPOINTS, NREADBACK, MOTOR, PREC, TIMEOUT} -{IOC:, Prof1:, 1, XPS1, 0, 2000, 2000, IOC:m1, 3, 1} -{IOC:, Prof1:, 2, XPS1, 1, 2000, 2000, IOC:m2, 4, 1} -{IOC:, Prof1:, 3, XPS1, 2, 2000, 2000, IOC:m3, 4, 1} -{IOC:, Prof1:, 4, XPS1, 3, 2000, 2000, IOC:m4, 4, 1} -{IOC:, Prof1:, 5, XPS1, 4, 2000, 2000, IOC:m5, 4, 1} -{IOC:, Prof1:, 6, XPS1, 5, 2000, 2000, IOC:m6, 4, 1} -{IOC:, Prof1:, 7, XPS1, 6, 2000, 2000, IOC:m6, 4, 1} -{IOC:, Prof1:, 8, XPS1, 7, 2000, 2000, IOC:m6, 4, 1} -} - -file "$(TOP)/db/profileMoveAxisXPS.template" -{ -pattern -{P, R, M, PORT, ADDR,NPOINTS, NREADBACK, PREC, TIMEOUT} -{IOC:, Prof1:, 1, XPS1, 0, 2000, 2000, 3, 1} -{IOC:, Prof1:, 2, XPS1, 1, 2000, 2000, 4, 1} -{IOC:, Prof1:, 3, XPS1, 2, 2000, 2000, 4, 1} -{IOC:, Prof1:, 4, XPS1, 3, 2000, 2000, 4, 1} -{IOC:, Prof1:, 5, XPS1, 4, 2000, 2000, 4, 1} -{IOC:, Prof1:, 6, XPS1, 5, 2000, 2000, 4, 1} -{IOC:, Prof1:, 7, XPS1, 6, 2000, 2000, 4, 1} -{IOC:, Prof1:, 8, XPS1, 7, 2000, 2000, 4, 1} -} diff --git a/iocBoot/iocWithAsyn/st.cmd.AG_CONEX b/iocBoot/iocWithAsyn/st.cmd.AG_CONEX deleted file mode 100644 index 2aaee5b5..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.AG_CONEX +++ /dev/null @@ -1,39 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.AG_CONEX" - -# For Windows -#drvAsynSerialPortConfigure("serial1", "COM3", 0, 0, 0) -# For Linux -drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0) -asynOctetSetInputEos("serial1",0,"\r\n") -asynOctetSetOutputEos("serial1",0,"\r\n") -asynSetOption("serial1",0,"baud","921600") -asynSetOption("serial1",0,"bits","8") -asynSetOption("serial1",0,"stop","1") -asynSetOption("serial1",0,"parity","none") -asynSetOption("serial1",0,"clocal","Y") -asynSetOption("serial1",0,"crtscts","N") - -asynSetTraceIOMask("serial1", 0, 2) -#asynSetTraceMask("serial1", 0, 9) - -# Load asyn record -dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") - -# AG_CONEXCreateController(asyn port, serial port, controllerID, -# active poll period (ms), idle poll period (ms)) -AG_CONEXCreateController("Agilis1", "serial1", 1, 50, 500) -asynSetTraceIOMask("Agilis1", 0, 2) -#asynSetTraceMask("Agilis1", 0, 255) - -iocInit - -dbpf IOC:m1.RTRY 0 -dbpf IOC:m1.NTM 0 diff --git a/iocBoot/iocWithAsyn/st.cmd.AG_UC b/iocBoot/iocWithAsyn/st.cmd.AG_UC deleted file mode 100644 index 00accc6a..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.AG_UC +++ /dev/null @@ -1,40 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.AG_UC" - -# For Windows -#drvAsynSerialPortConfigure("serial1", "COM3", 0, 0, 0) -# For Linux -drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0) -asynOctetSetInputEos("serial1",0,"\r\n") -asynOctetSetOutputEos("serial1",0,"\r\n") -asynSetOption("serial1",0,"baud","921600") -asynSetOption("serial1",0,"bits","8") -asynSetOption("serial1",0,"stop","1") -asynSetOption("serial1",0,"parity","none") -asynSetOption("serial1",0,"clocal","Y") -asynSetOption("serial1",0,"crtscts","N") - -asynSetTraceIOMask("serial1", 0, 2) -#asynSetTraceMask("serial1", 0, 9) - -# Load asynRecord records -dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") - -# AG_UCCreateController(asyn port, serial port, number of axes, -# active poll period (ms), idle poll period (ms)) -AG_UCCreateController("Agilis1", "serial1", 2, 50, 500) -asynSetTraceIOMask("Agilis1", 0, 2) -#asynSetTraceMask("Agilis1", 0, 255) - -# AG_UCCreateAxis((AG_UC controller port, axis, hasLimits, forwardAmplitude, reverseAmplitude) -AG_UCCreateAxis("Agilis1", 0, 0, 50, -30) -AG_UCCreateAxis("Agilis1", 1, 0, 40, -50) - -iocInit diff --git a/iocBoot/iocWithAsyn/st.cmd.CONEX-PP b/iocBoot/iocWithAsyn/st.cmd.CONEX-PP deleted file mode 100644 index 4447b287..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.CONEX-PP +++ /dev/null @@ -1,45 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.CONEX-PP" - -# For Windows -drvAsynSerialPortConfigure("serial1", "COM8", 0, 0, 0) -# For Linux -#drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0) -asynOctetSetInputEos("serial1",0,"\r\n") -asynOctetSetOutputEos("serial1",0,"\r\n") -asynSetOption("serial1",0,"baud","115200") -asynSetOption("serial1",0,"bits","8") -asynSetOption("serial1",0,"stop","1") -asynSetOption("serial1",0,"parity","none") -asynSetOption("serial1",0,"clocal","Y") -asynSetOption("serial1",0,"crtscts","N") - -asynSetTraceIOMask("serial1", 0, 2) -#asynSetTraceMask("serial1", 0, 9) - -# Load asyn record -dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") - -# AG_CONEXCreateController(asyn port, serial port, controllerID, -# active poll period (ms), idle poll period (ms)) -AG_CONEXCreateController("CONEX1", "serial1", 1, 50, 500) -asynSetTraceIOMask("CONEX1", 0, 2) -#asynSetTraceMask("CONEX1", 0, 255) -AG_CONEXCreateController("CONEX2", "serial1", 2, 50, 500) -asynSetTraceIOMask("CONEX2", 0, 2) -#asynSetTraceMask("CONEX2", 0, 255) -AG_CONEXCreateController("CONEX3", "serial1", 3, 50, 500) -asynSetTraceIOMask("CONEX3", 0, 2) -#asynSetTraceMask("CONEX3", 0, 255) - -iocInit - -dbpf IOC:m1.RTRY 0 -dbpf IOC:m1.NTM 0 diff --git a/iocBoot/iocWithAsyn/st.cmd.SMC100 b/iocBoot/iocWithAsyn/st.cmd.SMC100 deleted file mode 100644 index e931732b..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.SMC100 +++ /dev/null @@ -1,15 +0,0 @@ - -### Motors -dbLoadTemplate "motor.substitutions.SMC100" - -### Serial port setup -drvAsynSerialPortConfigure("serial1", "/dev/ttyS0", 0, 0, 0) -asynSetOption(serial1,0,baud,57600) -asynOctetSetInputEos("serial1",0,"\r\n") -asynOctetSetOutputEos("serial1",0,"\r\n") - -### Newport SMC100 support -# (driver port, serial port, axis num, ms mov poll, ms idle poll, egu per step) -SMC100CreateController("SMC100_1", "serial1",1, 100, 0, "0.00005") - -iocInit diff --git a/iocBoot/iocWithAsyn/st.cmd.Vx b/iocBoot/iocWithAsyn/st.cmd.Vx index 50f3cb2e..d62d4d0c 100644 --- a/iocBoot/iocWithAsyn/st.cmd.Vx +++ b/iocBoot/iocWithAsyn/st.cmd.Vx @@ -1,4 +1,4 @@ -# The is the "ASYN" example for communication to either a Newport MM4000/5 or an +# The is the "ASYN" example for communication to an # IMS483 controller. The examples must be configured by including or omitting # comment characters (i.e., #'s) from this file. @@ -28,42 +28,6 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") # Configure the ASYN server code. This MUST be configured too! < st_asynserver.cmd.Vx -# Newport MM3000 and MM4000/5/6 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!MM3000Setup(1, 10) -#!MM4000Setup(1, 10) - -# Newport MM3000 and MM4000/5/6 driver configuration parameters: -# (1) controller# being configured -# (2) ASYN port name -# (3) address (GPIB only) -#!MM3000Config(0, "a-Serial[0]") -#!drvMM3000debug=4 -#!MM4000Config(0, "a-Serial[0]") -#!drvMM4000debug=4 - -# The MM4000 driver does not set end of string (EOS). -# for RS232 serial, -#!asynOctetSetInputEos( "a-Serial[0]",0,"\r") -#!asynOctetSetOutputEos("a-Serial[0]",0,"\r") -# for GPIB, -#!asynInterposeEosConfig("L0", 10, 1, 1) -#!asynOctetSetInputEos( "L0",10,"\r") -#!asynOctetSetOutputEos("L0",10,"\r") - -# Newport PM500 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!PM500Setup(1, 10) - -# Newport PM500 configuration parameters: -# (1) controller# being configured -# (2) ASYN port name -# (3) address (GPIB only) -#!PM500Config(0, "a-Serial[0]") -#!drvPM500debug=4 - # IMS IM483 driver setup parameters: # (1) maximum number of controllers in system # (2) motor task polling rate (min=1Hz,max=60Hz) @@ -93,18 +57,6 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") #!asynOctetSetOutputEos("a-Serial[0]",0,"\r") #!drvMCB4BDebug=4 -# Newport ESP300 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!ESP300Setup(1, 10) - -# Newport ESP300 driver configuration parameters: -# (1) controller# being configured -# (2) ASYN port name -# (3) address (GPIB only) -#!ESP300Config(0, "a-Serial[0]") -#!drvESP300debug = 4 - # MicroMo MVP2001 driver setup parameters: # # NOTE: The 1st controller on each chain should have it's address = 1. @@ -209,34 +161,6 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") #!MDriveConfig(0, "a-Serial[0]") #!drvMDrivedebug = 4 -# Newport XPS driver setup parameters: -# (1) maximum number of controllers in system -#!XPSSetup(2) - -# Newport XPS driver configuration parameters: -# (1) Controller # being configured -# (2) IP address or IP name -# (3) IP port number that XPS is listening on -# (4) Number of axes this controller supports -# (5) Time to poll (msec) when an axis is in motion -# (6) Time to poll (msec) when an axis is idle. 0 for no polling -#!XPSConfig(0, "xxx.xx.xxx.1", 5001, 5, 100, 500) -#!XPSConfig(1, "xxx.xx.xxx.2", 5001, 4, 100, 500) - -# Newport XPS group and positioner name configuration: -# (1) Controller # being configured -# (2) axis number 0-7 -# (3) groupName.positionerName e.g. Diffractometer.Phi -# (4) steps per user unit - -#!XPSConfigAxis(0, 0, "GROUP1.PHI", 10000) -#!XPSConfigAxis(0, 1, "GROUP1.KAPPA", 10000) - -#!XPSConfigAxis(1, 0, "GROUP1.Y1_BASE", 1000) -#!XPSConfigAxis(1, 1, "GROUP2.Y2_BASE", 1000) -#!XPSConfigAxis(1, 2, "GROUP3.Y3_BASE", 1000) - - # OMS PC68/78 stand-alone serial driver setup parameters: # (1) maximum number of controllers in system # (2) motor task polling rate (min=1Hz,max=60Hz) @@ -317,28 +241,12 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") # (6) Time to poll (msec) when an axis is idle. 0 for no polling #!EnsembleAsynConfig(0, EnsemblePort, 0, 1, 100, 1000) - -# Newport MM4000/5/6 asyn motor driver setup parameter. -#!MM4000AsynSetup(1) /* number of MM4000 controllers in system. */ - -# Newport MM4000/5/6 asyn motor driver configure parameters. -# (1) Controller number being configured -# (2) ASYN port name -# (3) ASYN address (GPIB only) -# (4) Number of axes this controller supports -# (5) Time to poll (msec) when an axis is in motion -# (6) Time to poll (msec) when an axis is idle. 0 for no polling -#!MM4000AsynConfig(0, "a-Serial[1]", 0, 1, 100, 250) - # Asyn-based Motor Record support # (1) Asyn port # (2) Driver name # (3) Controller index # (4) Max. number of axes -#!drvAsynMotorConfigure("MM4", "motorMM4000", 0, 4) #!drvAsynMotorConfigure("ANC150","motorANC150", 0, 2 ) -#!drvAsynMotorConfigure("XPS1", "motorXPS", 0, 5) -#!drvAsynMotorConfigure("XPS2", "motorXPS", 1, 5) #!drvAsynMotorConfigure("AeroE1","motorEnsemble", 0, 1) #!drvAsynMotorConfigure("AeroE2","motorEnsemble", 1, 1) diff --git a/iocBoot/iocWithAsyn/st.cmd.unix b/iocBoot/iocWithAsyn/st.cmd.unix index ff88360e..e53621a8 100644 --- a/iocBoot/iocWithAsyn/st.cmd.unix +++ b/iocBoot/iocWithAsyn/st.cmd.unix @@ -1,4 +1,4 @@ -# The is the ASYN example for communication to a Newport MM4000/5/6. +# The is the ASYN example for communication # "#!" marks lines that can be uncommented. < envPaths @@ -21,43 +21,6 @@ asynSetOption("L0", -1, "stop", "1") asynSetOption("L0", -1, "clocal", "Y") asynSetOption("L0", -1, "crtscts", "N") - -# Newport MM3000 and MM4000/5/6 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!MM3000Setup(1, 10) -MM4000Setup(1, 10) - -# Newport MM3000 and MM4000/5/6 driver configuration parameters: -# (1) controller# being configured -# (2) ASYN port name -# (3) address (GPIB only) -#!MM3000Config(0, "a-Serial[0]") -#!drvMM3000debug=4 -MM4000Config(0, "L0") -#!var drvMM4000debug 4 - -# The MM4000 driver does not set end of string (EOS). -# for RS232 serial, -#!asynOctetSetInputEos( "a-Serial[0]",0,"\r") -#!asynOctetSetOutputEos("a-Serial[0]",0,"\r") -# for GPIB, -#!asynInterposeEosConfig("L0", 10, 1, 1) -#!asynOctetSetInputEos( "L0",10,"\r") -#!asynOctetSetOutputEos("L0",10,"\r") - -# Newport PM500 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!PM500Setup(1, 10) - -# Newport PM500 configuration parameters: -# (1) controller# being configured, -# (2) ASYN port name -# (3) address (GPIB only) -#!PM500Config(0, "L0") -#!var drvPM500debug 4 - # IMS IM483 driver setup parameters: # (1) maximum number of controllers in system # (2) motor task polling rate (min=1Hz,max=60Hz) @@ -87,18 +50,6 @@ MM4000Config(0, "L0") #!asynOctetSetOutputEos("L0",0,"\r") #!var drvMCB4BDebug 4 -# Newport ESP300 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!ESP300Setup(1, 10) - -# Newport ESP300 driver configuration parameters: -# (1) controller# being configured, -# (2) ASYN port name -# (3) address (GPIB only) -#!ESP300Config(0, "L0") -#!var drvESP300debug 4 - # MicroMo MVP2001 driver setup parameters: # # NOTE: The 1st controller on each chain should have it's address = 1. @@ -217,25 +168,11 @@ MM4000Config(0, "L0") # (2) asyn port name (string) #!EnsembleConfig(0, "a-Serial[0]") - -# Newport MM4000/5/6 asyn motor driver setup parameter. -#!MM4000AsynSetup(1) /* number of MM4000 controllers in system. */ - -# Newport MM4000/5/6 asyn motor driver configure parameters. -# (1) Controller number being configured -# (2) ASYN port name -# (3) ASYN address (GPIB only) -# (4) Number of axes this controller supports -# (5) Time to poll (msec) when an axis is in motion -# (6) Time to poll (msec) when an axis is idle. 0 for no polling -#!MM4000AsynConfig(0, "a-Serial[1]", 0, 1, 100, 250) - # Asyn-based Motor Record support # (1) Asyn port # (2) Driver name # (3) Controller index # (4) Max. number of axes -#!drvAsynMotorConfigure("MM4", "motorMM4000", 0, 4) #!drvAsynMotorConfigure("ANC150","motorANC150", 0, 1) diff --git a/iocBoot/iocWithAsyn/st.cmd.win32 b/iocBoot/iocWithAsyn/st.cmd.win32 index a3cc8d64..a100c2f1 100755 --- a/iocBoot/iocWithAsyn/st.cmd.win32 +++ b/iocBoot/iocWithAsyn/st.cmd.win32 @@ -1,4 +1,4 @@ -# The is the ASYN example for communication to a Newport MM4000/5/6. +# The is the ASYN example for communication # "#!" marks lines that can be uncommented. < envPaths @@ -10,33 +10,6 @@ dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=IOC:") # This is for WIN32, local serial ports not supported. Must use IP terminal server. -# Newport MM3000 and MM4000/5/6 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!MM3000Setup(1, 10) -MM4000Setup(1, 10) - -# Newport MM3000 and MM4000/5/6 driver configuration parameters: -# (1) controller# being configured -# (2) ASYN port name -# (3) address (GPIB only) -#!MM3000Config(0, "a-Serial[0]") -#!drvMM3000debug=4 -MM4000Config(0, "L0") -#!var drvMM4000debug 4 - -# Newport PM500 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!PM500Setup(1, 10) - -# Newport PM500 configuration parameters: -# (1) controller# being configured, -# (2) ASYN port name -# (3) address (GPIB only) -#!PM500Config(0, "L0") -#!var drvPM500debug 4 - # IMS IM483 driver setup parameters: # (1) maximum number of controllers in system # (2) motor task polling rate (min=1Hz,max=60Hz) @@ -66,18 +39,6 @@ MM4000Config(0, "L0") #!asynOctetSetOutputEos("L0",0,"\r") #!var drvMCB4BDebug 4 -# Newport ESP300 driver setup parameters: -# (1) maximum number of controllers in system -# (2) motor task polling rate (min=1Hz,max=60Hz) -#!ESP300Setup(1, 10) - -# Newport ESP300 driver configuration parameters: -# (1) controller# being configured, -# (2) ASYN port name -# (3) address (GPIB only) -#!ESP300Config(0, "L0") -#!var drvESP300debug 4 - # MicroMo MVP2001 driver setup parameters: # # NOTE: The 1st controller on each chain should have it's address = 1. diff --git a/iocBoot/iocWithAsyn/st.cmd.xps b/iocBoot/iocWithAsyn/st.cmd.xps deleted file mode 100644 index 73e6db65..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.xps +++ /dev/null @@ -1,51 +0,0 @@ -errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. in this build from CARS -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.xps" - -dbLoadTemplate "XPSAux.substitutions" - -# cards (total controllers) -XPSSetup(1) - -# card, IP, PORT, number of axes, active poll period (ms), idle poll period (ms) -XPSConfig(0, "newport-xps3", 5001, 3, 10, 5000) - -# asynPort, IP address, IP port, poll period (ms) -XPSAuxConfig("XPS_AUX1", "newport-xps3", 5001, 50) -#asynSetTraceMask("XPS_AUX1", 0, 255) -#asynSetTraceIOMask("XPS_AUX1", 0, 2) - -# asyn port, driver name, controller index, max. axes) -drvAsynMotorConfigure("XPS1", "motorXPS", 0, 3) -XPSInterpose("XPS1") - -# card, axis, groupName.positionerName -XPSConfigAxis(0,0,"GROUP1.POSITIONER",20480) -XPSConfigAxis(0,1,"GROUP2.POSITIONER1",6768) -XPSConfigAxis(0,2,"GROUP2.POSITIONER2",20480) - -#asynSetTraceMask newport-xps3:5001:0 0 255 -#asynSetTraceIOMask newport-xps3:5001:0 0 2 -#asynSetTraceMask newport-xps3:5001:1 0 255 -#asynSetTraceIOMask newport-xps3:5001:1 0 2 -#asynSetTraceMask XPS1 0 255 -#asynSetTraceIOMask XPS1 0 2 -#asynSetTraceMask XPS1 1 255 -#asynSetTraceIOMask XPS1 1 2 -#asynSetTraceMask XPS1 2 255 -#asynSetTraceIOMask XPS1 2 2 -#asynSetTraceMask newport-xps3:5001:3 0 255 -#asynSetTraceIOMask newport-xps3:5001:3 0 2 - -dbLoadRecords("$(MOTOR)/motorApp/Db/trajectoryScan.db", "P=IOC:,R=traj1,NAXES=2,NELM=2000,NPULSE=2000,DONPV=13LAB:str:EraseStart,DONV=1,DOFFPV=13LAB:str:StopAll,DOFFV=1") - -iocInit - -seq(XPS_trajectoryScan,"P=IOC:,R=traj1,M1=m2,M2=m3,IPADDR=164.54.160.34,PORT=5001,GROUP=GROUP2,P1=POSITIONER1,P2=POSITIONER2") - diff --git a/iocBoot/iocWithAsyn/st.cmd.xps3 b/iocBoot/iocWithAsyn/st.cmd.xps3 deleted file mode 100644 index 3252eb6c..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.xps3 +++ /dev/null @@ -1,46 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. in this build from CARS -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.xps3" - -dbLoadTemplate "XPSAux.substitutions" - -# asyn port, IP address, IP port, number of axes, active poll period (ms), idle poll period (ms) -XPSConfig("XPS1", "164.54.160.180", 5001, 6, 20, 500) - -# asynPort, IP address, IP port, poll period (ms) -XPSAuxConfig("XPS_AUX1", "164.54.160.180", 5001, 50) -#asynSetTraceMask("XPS_AUX1", 0, 255) -#asynSetTraceIOMask("XPS_AUX1", 0, 2) - -# XPS asyn port, axis, groupName.positionerName, stepSize -XPSConfigAxis("XPS1",0,"FINE.X", 100000) # VP-25XL -XPSConfigAxis("XPS1",1,"FINE.Y", 50000) # VP-5ZA -XPSConfigAxis("XPS1",2,"THETA.POSITIONER", 2000) # URS75CC -XPSConfigAxis("XPS1",3,"COARSEX.POSITIONER", 2000) # ILS200CC -XPSConfigAxis("XPS1",4,"COARSEY.POSITIONER", 2000) # ILS200CC -XPSConfigAxis("XPS1",5,"COARSEZ.POSITIONER", 5000) # IMS300CC - -XPSEnableSetPosition(XPS1, 0) -XPSSetPositionSettlingTime(XPS1, 200) - -iocInit - -# This IOC does not use save/restore, so set values of some PVs -dbpf("IOC:m1.RTRY", "0") -dbpf("IOC:m1.TWV", "0.1") -dbpf("IOC:m2.RTRY", "0") -dbpf("IOC:m2.TWV", "0.1") -dbpf("IOC:m3.RTRY", "0") -dbpf("IOC:m3.TWV", "0.1") -dbpf("IOC:m4.RTRY", "0") -dbpf("IOC:m4.TWV", "0.1") -dbpf("IOC:m5.RTRY", "0") -dbpf("IOC:m5.TWV", "0.1") -dbpf("IOC:m6.RTRY", "0") -dbpf("IOC:m6.TWV", "0.1") diff --git a/iocBoot/iocWithAsyn/st.cmd.xps4 b/iocBoot/iocWithAsyn/st.cmd.xps4 deleted file mode 100644 index 2e843a42..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.xps4 +++ /dev/null @@ -1,54 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. in this build from CARS -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.xps4" - -dbLoadTemplate "XPSAux.substitutions" - -# asyn port, IP address, IP port, number of axes, -# active poll period (ms), idle poll period (ms), -# enable set position, set position settling time (ms) -XPSConfig("XPS1", "164.54.160.124", 5001, 6, 10, 500, 0, 500) -asynSetTraceIOMask("XPS1", 0, 2) -#asynSetTraceMask("XPS1", 0, 255) - -# asynPort, IP address, IP port, poll period (ms) -XPSAuxConfig("XPS_AUX1", "164.54.160.124", 5001, 50) -#asynSetTraceIOMask("XPS_AUX1", 0, 2) -#asynSetTraceMask("XPS_AUX1", 0, 255) - -# XPS asyn port, axis, groupName.positionerName, stepSize -XPSConfigAxis("XPS1",0,"GROUP1.PHI", 1000) -XPSConfigAxis("XPS1",1,"GROUP1.KAPPA", 5000) -XPSConfigAxis("XPS1",2,"GROUP1.OMEGA", 5000) -XPSConfigAxis("XPS1",3,"GROUP1.PSI", 4000) -XPSConfigAxis("XPS1",4,"GROUP1.2THETA", 10000) -XPSConfigAxis("XPS1",5,"GROUP1.NU", 4000) - -# XPS asyn port, max points, FTP username, FTP password -# Note: this must be done after configuring axes -XPSConfigProfile("XPS1", 2000, "Administrator", "Administrator") - -XPSEnableSetPosition(XPS1, 0) -XPSSetPositionSettlingTime(XPS1, 200) - -iocInit - -# This IOC does not use save/restore, so set values of some PVs -dbpf("IOC:m1.RTRY", "0") -dbpf("IOC:m1.TWV", "0.1") -dbpf("IOC:m2.RTRY", "0") -dbpf("IOC:m2.TWV", "0.1") -dbpf("IOC:m3.RTRY", "0") -dbpf("IOC:m3.TWV", "0.1") -dbpf("IOC:m4.RTRY", "0") -dbpf("IOC:m4.TWV", "0.1") -dbpf("IOC:m5.RTRY", "0") -dbpf("IOC:m5.TWV", "0.1") -dbpf("IOC:m6.RTRY", "0") -dbpf("IOC:m6.TWV", "0.1") diff --git a/iocBoot/iocWithAsyn/st.cmd.xps5 b/iocBoot/iocWithAsyn/st.cmd.xps5 deleted file mode 100644 index ecb44093..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.xps5 +++ /dev/null @@ -1,51 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. in this build from CARS -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.xps5" - -dbLoadTemplate "XPSAux.substitutions" - -# asyn port, IP address, IP port, number of axes, -# active poll period (ms), idle poll period (ms), -# enable set position, set position settling time (ms) -XPSCreateController("XPS1", "164.54.160.55", 5001, 6, 10, 500, 0, 500) -asynSetTraceIOMask("XPS1", 0, 2) -#asynSetTraceMask("XPS1", 0, 255) - -# asynPort, IP address, IP port, poll period (ms) -XPSAuxConfig("XPS_AUX1", "164.54.160.55", 5001, 50) -#asynSetTraceIOMask("XPS_AUX1", 0, 2) -#asynSetTraceMask("XPS_AUX1", 0, 255) - -# XPS asyn port, axis, groupName.positionerName, stepSize -XPSCreateAxis("XPS1",0,"GROUP.PHI", "1000") -XPSCreateAxis("XPS1",1,"GROUP.KAPPA", "10000") -XPSCreateAxis("XPS1",2,"GROUP.OMEGA", "10000") -XPSCreateAxis("XPS1",3,"GROUP.PSI", "4000") -XPSCreateAxis("XPS1",4,"GROUP.THETA", "10000") -XPSCreateAxis("XPS1",5,"GROUP.NU", "4000") - -# XPS asyn port, max points, FTP username, FTP password -# Note: this must be done after configuring axes -XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator") - -iocInit - -# This IOC does not use save/restore, so set values of some PVs -dbpf("IOC:m1.RTRY", "0") -dbpf("IOC:m1.TWV", "0.1") -dbpf("IOC:m2.RTRY", "0") -dbpf("IOC:m2.TWV", "0.1") -dbpf("IOC:m3.RTRY", "0") -dbpf("IOC:m3.TWV", "0.1") -dbpf("IOC:m4.RTRY", "0") -dbpf("IOC:m4.TWV", "0.1") -dbpf("IOC:m5.RTRY", "0") -dbpf("IOC:m5.TWV", "0.1") -dbpf("IOC:m6.RTRY", "0") -dbpf("IOC:m6.TWV", "0.1") diff --git a/iocBoot/iocWithAsyn/st.cmd.xps6 b/iocBoot/iocWithAsyn/st.cmd.xps6 deleted file mode 100755 index cf7b7a56..00000000 --- a/iocBoot/iocWithAsyn/st.cmd.xps6 +++ /dev/null @@ -1,46 +0,0 @@ -#errlogInit(5000) -< envPaths -# Tell EPICS all about the record types, device-support modules, drivers, -# etc. in this build from CARS -dbLoadDatabase("../../dbd/WithAsyn.dbd") -WithAsyn_registerRecordDeviceDriver(pdbbase) - -### Motors -dbLoadTemplate "motor.substitutions.xps6" - -dbLoadTemplate "XPSAux.substitutions" - -# asyn port, IP address, IP port, number of axes, -# active poll period (ms), idle poll period (ms), -# enable set position, set position settling time (ms) -XPSCreateController("XPS1", "164.54.164.24", 5001, 4, 10, 500, 0, 500) -asynSetTraceIOMask("XPS1", 0, 2) -#asynSetTraceMask("XPS1", 0, 255) - -# asynPort, IP address, IP port, poll period (ms) -XPSAuxConfig("XPS_AUX1", "164.54.164.24", 5001, 50) -#asynSetTraceIOMask("XPS_AUX1", 0, 2) -#asynSetTraceMask("XPS_AUX1", 0, 255) - -# XPS asyn port, axis, groupName.positionerName, stepSize -XPSCreateAxis("XPS1",0,"Group1.Pos", "10000") -XPSCreateAxis("XPS1",1,"Group2.Pos", "10000") -XPSCreateAxis("XPS1",2,"Group3.Pos", "20000") -XPSCreateAxis("XPS1",3,"Group4.Pos", "2000") - -# XPS asyn port, max points, FTP username, FTP password -# Note: this must be done after configuring axes -XPSCreateProfile("XPS1", 2000, "Administrator", "Administrator") - -iocInit - -# This IOC does not use save/restore, so set values of some PVs -dbpf("IOC:m1.RTRY", "0") -dbpf("IOC:m1.TWV", "0.1") -dbpf("IOC:m2.RTRY", "0") -dbpf("IOC:m2.TWV", "0.1") -dbpf("IOC:m3.RTRY", "0") -dbpf("IOC:m3.TWV", "0.1") -dbpf("IOC:m4.RTRY", "0") -dbpf("IOC:m4.TWV", "0.1") - diff --git a/iocsh/Newport_ESP300.iocsh b/iocsh/Newport_ESP300.iocsh deleted file mode 100644 index e681164a..00000000 --- a/iocsh/Newport_ESP300.iocsh +++ /dev/null @@ -1,30 +0,0 @@ -# ### Newport_ESP300.iocsh ### - -#- ################################################### -#- PORT - Serial port for communications -#- CONTROLLER - Optional: Which controller is being configured -#- Default: 0 -#- -#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured -#- Default: 1 -#- -#- POLL_RATE - Optional: Polling increment in 1/60 sec -#- Default: 6 -#- ################################################### - -#- Newport ESP300 driver setup parameters: -#- (1) maximum number of controllers in system -#- (2) motor task polling rate (min=1Hz,max=60Hz) -$(ESP300_INIT_COMPLETE="") ESP300Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) - -# Newport ESP300 serial connection settings -iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=8, STOP=1, PARITY=none") -asynOctetSetInputEos( "$(PORT)", -1, "") -asynOctetSetOutputEos("$(PORT)", -1, "") - -#- Newport ESP300 driver configuration parameters: -#- (1) controller# being configured -#- (2) ASYN port name -ESP300Config($(CONTROLLER=0), "$(PORT)") - -epicsEnvSet("ESP300_INIT_COMPLETE", "#") diff --git a/iocsh/Newport_MM4000.iocsh b/iocsh/Newport_MM4000.iocsh deleted file mode 100644 index 5b33aadd..00000000 --- a/iocsh/Newport_MM4000.iocsh +++ /dev/null @@ -1,32 +0,0 @@ -# ### Newport_NM4000.iocsh ### - -#- ################################################### -#- PORT - Serial port for communications -#- CONTROLLER - Optional: Which controller is being configured -#- Default: 0 -#- -#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured -#- Default: 1 -#- -#- POLL_RATE - Optional: Controller poll rate in hertz -#- Default: 10 -#- ################################################### - - -#- Newport MM4000 driver setup parameters: -#- (1) maximum # of controllers, -#- (2) motor task polling rate (min=1Hz, max=60Hz) -$(MM4000_INIT_COMPLETE="") MM4000Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) - -# Newport MM4000 serial connection settings -iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=38400, BITS=8, STOP=1, PARITY=none") -asynOctetSetInputEos( "$(PORT)", -1, "\r") -asynOctetSetOutputEos("$(PORT)", -1, "\r") - -# Newport MM4000 driver configuration parameters: -# (1) controller -# (2) asyn port name (e.g. serial0 or gpib1) -# (3) GPIB address (0 for serial) -MM4000Config($(CONTROLLER=0), "$(PORT)", 0) - -epicsEnvSet("MM4000_INIT_COMPLETE", "#") diff --git a/iocsh/Newport_PM500.iocsh b/iocsh/Newport_PM500.iocsh deleted file mode 100644 index bf37a272..00000000 --- a/iocsh/Newport_PM500.iocsh +++ /dev/null @@ -1,30 +0,0 @@ -# ### Newport_PM500.iocsh ### - -#- ################################################### -#- PORT - Serial port for communications -#- CONTROLLER - Optional: Which controller is being configured -#- Default: 0 -#- -#- MAX_CONTROLLERS - Optional: Max number of controllers that will be configured -#- Default: 1 -#- -#- POLL_RATE - Optional: Controller poll rate in hertz -#- Default: 10 -#- ################################################### - -#- Newport PM500 driver setup parameters: -#- (1) maximum number of controllers in system -#- (2) motor task polling rate (min=1Hz,max=60Hz) -$(PM500_INIT_COMPLETE="") PM500Setup($(MAX_CONTROLLERS=1), $(POLL_RATE=10)) - -#- Newport PM500 serial connection settings -iocshLoad("$(IP)/iocsh/setSerialParams.iocsh", "PORT=$(PORT), BAUD=9600, BITS=7, STOP=2, PARITY=even, HANDSHAKE=hardware") -asynOctetSetInputEos( "$(PORT)", -1, "\r") -asynOctetSetOutputEos("$(PORT)", -1, "\r") - -#- Newport PM500 configuration parameters: -#- (1) controller -#- (2) asyn port name (e.g. serial0 or gpib1) -PM500Config($(CONTROLLER=0), "$(PORT)") - -epicsEnvSet("PM500_INIT_COMPLETE", "#") diff --git a/modules/Makefile b/modules/Makefile index a96e3e1c..ae9161aa 100644 --- a/modules/Makefile +++ b/modules/Makefile @@ -3,6 +3,7 @@ include $(TOP)/configure/CONFIG # Submodules #SUBMODULES += motorVendor +SUBMODULES += motorNewport # Allow sites to add extra submodules -include Makefile.local diff --git a/modules/motorNewport b/modules/motorNewport new file mode 160000 index 00000000..11ea6d08 --- /dev/null +++ b/modules/motorNewport @@ -0,0 +1 @@ +Subproject commit 11ea6d08c7b16360533668eede818aa799336159 diff --git a/motorApp/Db/HXP_coords.db b/motorApp/Db/HXP_coords.db deleted file mode 100644 index 7f2de2f0..00000000 --- a/motorApp/Db/HXP_coords.db +++ /dev/null @@ -1,277 +0,0 @@ -# CS selection menu -record(mbbo,"$(P)$(R)CS_TO_SET") { - field(DESC,"Coord sys menu") - field(DTYP, "asynInt32") - field(OUT,"@asynMask($(PORT) 0 0xFFFF)HXP_COORD_SYS_TO_SET") - field(ZRVL,"0") - field(ZRST,"None") - field(ONVL,"1") - field(ONST,"Work") - field(TWVL,"2") - field(TWST,"Tool") - field(THVL,"3") - field(THST,"Base") - field(VAL, "0") -} - -# CS set button -record(bo,"$(P)$(R)SET_CS") { - field(DESC,"Set Coord System") - field(DTYP,"asynInt32") - field(ZNAM,"Done") - field(ONAM,"Setting") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET") - field(VAL, "0") -} - -# Monitor set-CS PV and initiate sync on release of button -record(calcout,"$(P)$(R)syncCalc") { - field(DESC,"HXP sync calc") - field(DTYP,"Soft Channel") - field(SCAN,"Passive") - field(INPA,"$(P)$(R)SET_CS.VAL CP NMS") - field(B, "1.0") - field(CALC,"A") - field(OCAL,"B") - field(ODLY,"0.5") - field(OOPT,"Transition To Zero") - field(DOPT,"Use OCAL") - field(OUT, "$(P)$(R)syncSeq.PROC PP NMS") -} - -# Sync target positions and update CS readbacks after setting a CS -record(sseq, "$(P)$(R)syncSeq") { - field(DESC,"HXP sync seq") - field(SCAN,"Passive") - field(STR1,"1") - field(LNK1,"$(P)$(R)$(M1).SYNC PP NMS") - field(STR2,"1") - field(LNK2,"$(P)$(R)$(M2).SYNC PP NMS") - field(STR3,"1") - field(LNK3,"$(P)$(R)$(M3).SYNC PP NMS") - field(STR4,"1") - field(LNK4,"$(P)$(R)$(M4).SYNC PP NMS") - field(STR5,"1") - field(LNK5,"$(P)$(R)$(M5).SYNC PP NMS") - field(STR6,"1") - field(LNK6,"$(P)$(R)$(M6).SYNC PP NMS") - field(STR7,"1") - field(LNK7,"$(P)$(R)READ_CS.VAL PP NMS") - field(DLY8,"0.25") - field(STR8,"0") - field(LNK8,"$(P)$(R)READ_CS.VAL PP NMS") -} - -# CS input fields -record(ao,"$(P)$(R)CS_SET_X") { - field(DESC,"CS X target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_X") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)CS_SET_Y") { - field(DESC,"CS Y target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_Y") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)CS_SET_Z") { - field(DESC,"CS Z target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_Z") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)CS_SET_U") { - field(DESC,"CS U target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_U") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)CS_SET_V") { - field(DESC,"CS V target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_V") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)CS_SET_W") { - field(DESC,"CS W target") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_SET_W") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -# -record(bo,"$(P)$(R)READ_CS") { - field(DESC,"Read Coord Systems") - field(DTYP,"asynInt32") - field(ZNAM,"Done") - field(ONAM,"Read") - field(OUT, "@asyn($(PORT),0)HXP_COORD_SYS_READ_ALL") - field(VAL, "1") - field(PINI,"YES") -} - -# TOOL CS readbacks -record(ai,"$(P)$(R)TOOL:X") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_X") - field(PREC,"5") -} - -record(ai,"$(P)$(R)TOOL:Y") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_Y") - field(PREC,"5") -} - -record(ai,"$(P)$(R)TOOL:Z") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_Z") - field(PREC,"5") -} - -record(ai,"$(P)$(R)TOOL:U") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_U") - field(PREC,"5") -} - -record(ai,"$(P)$(R)TOOL:V") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_V") - field(PREC,"5") -} - -record(ai,"$(P)$(R)TOOL:W") { - field(DESC,"TOOL coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_TOOL_W") - field(PREC,"5") -} - -# WORK CS readbacks -record(ai,"$(P)$(R)WORK:X") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_X") - field(PREC,"5") -} - -record(ai,"$(P)$(R)WORK:Y") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_Y") - field(PREC,"5") -} - -record(ai,"$(P)$(R)WORK:Z") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_Z") - field(PREC,"5") -} - -record(ai,"$(P)$(R)WORK:U") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_U") - field(PREC,"5") -} - -record(ai,"$(P)$(R)WORK:V") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_V") - field(PREC,"5") -} - -record(ai,"$(P)$(R)WORK:W") { - field(DESC,"WORK coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_WORK_W") - field(PREC,"5") -} - -# BASE CS readbacks -record(ai,"$(P)$(R)BASE:X") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_X") - field(PREC,"5") -} - -record(ai,"$(P)$(R)BASE:Y") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_Y") - field(PREC,"5") -} - -record(ai,"$(P)$(R)BASE:Z") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_Z") - field(PREC,"5") -} - -record(ai,"$(P)$(R)BASE:U") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_U") - field(PREC,"5") -} - -record(ai,"$(P)$(R)BASE:V") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_V") - field(PREC,"5") -} - -record(ai,"$(P)$(R)BASE:W") { - field(DESC,"BASE coordSys def") - field(DTYP,"asynFloat64") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_COORD_SYS_BASE_W") - field(PREC,"5") -} - diff --git a/motorApp/Db/HXP_extra.db b/motorApp/Db/HXP_extra.db deleted file mode 100644 index 2b8ec60b..00000000 --- a/motorApp/Db/HXP_extra.db +++ /dev/null @@ -1,98 +0,0 @@ -record(mbbo,"$(P)$(R)CS") { - field(DESC,"Coordinate System") - field(DTYP,"asynInt32") - field(OUT, "@asynMask($(PORT) 0 0xFFFF)HXP_MOVE_COORD_SYS") - field(ZRVL,"0") - field(ZRST,"Work") - field(ONVL,"1") - field(ONST,"Tool") - field(VAL, "0") - field(PINI,"YES") -} - -record(ai,"$(P)$(R)STATUS") { - field(DESC,"HXP Group Status") - field(DTYP,"asynInt32") - field(PINI,"1") - field(PREC,"0") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_STATUS") -} - -record(ai,"$(P)$(R)ERROR") { - field(DESC,"HXP Group Error") - field(DTYP,"asynInt32") - field(PREC,"0") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_ERROR") -} - -record(stringin, "$(P)$(R)ERR_DESC") { - field(DESC,"Error Description") - field(DTYP,"asynOctetRead") - field(SCAN,"I/O Intr") - field(INP, "@asyn($(PORT),0)HXP_ERROR_DESC") -} - -record(bo,"$(P)$(R)MOVE_ALL") { - field(DESC,"Move all motors") - field(DTYP,"asynInt32") - field(ZNAM,"Off") - field(ONAM,"On") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL") -} - -record(ao,"$(P)$(R)T1") { - field(DESC,"X target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_X") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)T2") { - field(DESC,"Y target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_Y") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)T3") { - field(DESC,"Z target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_Z") - field(PREC,"5") - field(VAL, "12.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)T4") { - field(DESC,"U target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_U") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)T5") { - field(DESC,"V target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_V") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - -record(ao,"$(P)$(R)T6") { - field(DESC,"W target pos") - field(DTYP,"asynFloat64") - field(OUT, "@asyn($(PORT),0)HXP_MOVE_ALL_TARGET_W") - field(PREC,"5") - field(VAL, "0.0") - field(PINI,"YES") -} - diff --git a/motorApp/Db/Makefile b/motorApp/Db/Makefile index 2c539228..415690d5 100644 --- a/motorApp/Db/Makefile +++ b/motorApp/Db/Makefile @@ -19,17 +19,6 @@ DB += motor.db DB += basic_motor.db DB += basic_asyn_motor.db DB += IMS_extra.db -DB += XPSAuxAi.db -DB += XPSAuxAo.db -DB += XPSAuxBi.db -DB += XPSAuxBo.db -DB += XPSAuxLi.db -DB += XPSAuxLo.db -DB += XPS_extra.db -DB += XPSPositionCompare.db -DB += XPSTclScript.template -DB += HXP_extra.db -DB += HXP_coords.db DB += ACRAux.template DB += ACRAuxRead.template DB += ACRAuxLi.template @@ -41,8 +30,6 @@ DB += motorUtil.db DB += asyn_motor.db DB += profileMoveController.template DB += profileMoveAxis.template -DB += profileMoveControllerXPS.template -DB += profileMoveAxisXPS.template DB += PI_Support.db PI_SupportCtrl.db DB += Phytron_motor.db Phytron_I1AM01.db Phytron_MCM01.db DB += asyn_auto_power.db diff --git a/motorApp/Db/XPSAuxAi.db b/motorApp/Db/XPSAuxAi.db deleted file mode 100644 index 5fa0abb7..00000000 --- a/motorApp/Db/XPSAuxAi.db +++ /dev/null @@ -1,24 +0,0 @@ -record(ai,"$(P)$(R)") -{ - field(SCAN,"$(SCAN)") - field(DTYP,"asynFloat64Average") - field(INP,"@asyn($(PORT) $(CHAN))ANALOG_INPUT") - field(HOPR,"$(HOPR)") - field(LOPR,"$(LOPR)") - field(PREC,"$(PREC)") -} - -grecord(mbbo,"$(P)$(R)Gain") { - field(DESC,"Input gain") - field(DTYP, "asynUInt32Digital") - field(OUT,"@asynMask($(PORT) $(CHAN) 0xFFFF)ANALOG_GAIN") - field(ZRVL,"1") - field(ZRST,"1") - field(ONVL,"2") - field(ONST,"2") - field(TWVL,"4") - field(TWST,"4") - field(THVL,"8") - field(THST,"8") -} - diff --git a/motorApp/Db/XPSAuxAo.db b/motorApp/Db/XPSAuxAo.db deleted file mode 100644 index c9cf1917..00000000 --- a/motorApp/Db/XPSAuxAo.db +++ /dev/null @@ -1,23 +0,0 @@ -record(ao,"$(P)$(R)") { - field(DTYP,"asynFloat64") - field(OUT,"@asyn($(PORT) $(CHAN))ANALOG_OUTPUT") - field(DRVL,"$(DRVL)") - field(LOPR,"$(LOPR)") - field(DRVH,"$(DRVH)") - field(HOPR,"$(HOPR)") - field(PREC,"$(PREC)") -} - -record(ao,"$(P)$(R)_tweakVal") { - field(PREC,"$(PREC)") -} - -record(transform,"$(P)$(R)_tweak") { - field(CLCE,"a?d-c:b?d+c:d") - field(INPC,"$(P)$(R)_tweakVal.VAL NPP MS") - field(INPD,"$(P)$(R).VAL NPP MS") - field(OUTE,"$(P)$(R).VAL PP MS") - field(OUTF,"$(P)$(R)_tweak.A NPP MS") - field(OUTG,"$(P)$(R)_tweak.B NPP MS") - field(PREC,"3") -} diff --git a/motorApp/Db/XPSAuxBi.db b/motorApp/Db/XPSAuxBi.db deleted file mode 100644 index ca4f2061..00000000 --- a/motorApp/Db/XPSAuxBi.db +++ /dev/null @@ -1,9 +0,0 @@ -grecord(bi,"$(P)$(R)") -{ - field(PINI, "YES") - field(DTYP,"asynUInt32Digital") - field(INP,"@asynMask($(PORT) $(CHAN) $(MASK))BINARY_INPUT") - field(SCAN, "$(SCAN)") - field(ZNAM, "Low") - field(ONAM, "High") -} diff --git a/motorApp/Db/XPSAuxBo.db b/motorApp/Db/XPSAuxBo.db deleted file mode 100644 index ba1e4ca4..00000000 --- a/motorApp/Db/XPSAuxBo.db +++ /dev/null @@ -1,8 +0,0 @@ -grecord(bo,"$(P)$(R)") -{ - field(DTYP,"asynUInt32Digital") - field(OUT,"@asynMask($(PORT) $(CHAN) $(MASK))BINARY_OUTPUT") - field(VAL, "1") - field(ZNAM, "Low") - field(ONAM, "High") -} diff --git a/motorApp/Db/XPSAuxLi.db b/motorApp/Db/XPSAuxLi.db deleted file mode 100644 index 05320d40..00000000 --- a/motorApp/Db/XPSAuxLi.db +++ /dev/null @@ -1,7 +0,0 @@ -grecord(longin,"$(P)$(R)") -{ - field(PINI, "YES") - field(DTYP,"asynUInt32Digital") - field(INP,"@asynMask($(PORT) $(CHAN) 0xffffffff)BINARY_INPUT") - field(SCAN, "$(SCAN)") -} diff --git a/motorApp/Db/XPSAuxLo.db b/motorApp/Db/XPSAuxLo.db deleted file mode 100644 index b249a3fa..00000000 --- a/motorApp/Db/XPSAuxLo.db +++ /dev/null @@ -1,5 +0,0 @@ -grecord(longout,"$(P)$(R)") -{ - field(DTYP,"asynUInt32Digital") - field(OUT,"@asynMask($(PORT) $(CHAN) 0xffffffff)BINARY_OUTPUT") -} diff --git a/motorApp/Db/XPSPositionCompare.db b/motorApp/Db/XPSPositionCompare.db deleted file mode 100644 index 11658387..00000000 --- a/motorApp/Db/XPSPositionCompare.db +++ /dev/null @@ -1,131 +0,0 @@ -# Database for PositionerPositionCompare functions in Newport XPS -# Mark Rivers -# March 10, 2015 - -record(mbbo,"$(P)$(R)PositionCompareMode") { - field(DTYP, "asynInt32") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MODE") - field(ZRVL, "0") - field(ZRST, "Disable") - field(ONVL, "1") - field(ONST, "Position compare") - field(TWVL, "2") - field(TWST, "AquadB windowed") - field(THVL, "3") - field(THST, "AquadB always") -} - -record(mbbi,"$(P)$(R)PositionCompareMode_RBV") { - field(DTYP, "asynInt32") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MODE") - field(ZRVL, "0") - field(ZRST, "Disable") - field(ONVL, "1") - field(ONST, "Position compare") - field(TWVL, "2") - field(TWST, "AquadB windowed") - field(THVL, "3") - field(THST, "AquadB always") - field(SCAN, "I/O Intr") -} - -record(ao,"$(P)$(R)PositionCompareMinPosition") { - field(PINI, "YES") - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MIN_POSITION") -} - -record(ai,"$(P)$(R)PositionCompareMinPosition_RBV") { - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MIN_POSITION") - field(SCAN, "I/O Intr") -} - -record(ao,"$(P)$(R)PositionCompareMaxPosition") { - field(PINI, "YES") - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MAX_POSITION") -} - -record(ai,"$(P)$(R)PositionCompareMaxPosition_RBV") { - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_MAX_POSITION") - field(SCAN, "I/O Intr") -} - -record(ao,"$(P)$(R)PositionCompareStepSize") { - field(PINI, "YES") - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_STEP_SIZE") -} - -record(ai,"$(P)$(R)PositionCompareStepSize_RBV") { - field(PREC,"$(PREC)") - field(DTYP, "asynFloat64") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_STEP_SIZE") - field(SCAN, "I/O Intr") -} - -record(mbbo,"$(P)$(R)PositionComparePulseWidth") { - field(PINI, "YES") - field(DTYP, "asynInt32") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_PULSE_WIDTH") - field(ZRVL, "0") - field(ZRST, "0.2") - field(ONVL, "1") - field(ONST, "1.0") - field(TWVL, "2") - field(TWST, "2.5") - field(THVL, "3") - field(THST, "10.0") -} - -record(mbbi,"$(P)$(R)PositionComparePulseWidth_RBV") { - field(PINI, "YES") - field(DTYP, "asynInt32") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_PULSE_WIDTH") - field(ZRVL, "0") - field(ZRST, "0.2") - field(ONVL, "1") - field(ONST, "1.0") - field(TWVL, "2") - field(TWST, "2.5") - field(THVL, "3") - field(THST, "10.0") - field(SCAN, "I/O Intr") -} - -record(mbbo,"$(P)$(R)PositionCompareSettlingTime") { - field(PINI, "YES") - field(DTYP, "asynInt32") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_SETTLING_TIME") - field(ZRVL, "0") - field(ZRST, "0.075") - field(ONVL, "1") - field(ONST, "1.0") - field(TWVL, "2") - field(TWST, "4.0") - field(THVL, "3") - field(THST, "12.0") -} - -record(mbbi,"$(P)$(R)PositionCompareSettlingTime_RBV") { - field(PINI, "YES") - field(DTYP, "asynInt32") - field(INP,"@asyn($(PORT),$(ADDR))XPS_POSITION_COMPARE_SETTLING_TIME") - field(ZRVL, "0") - field(ZRST, "0.075") - field(ONVL, "1") - field(ONST, "1.0") - field(TWVL, "2") - field(TWST, "4.0") - field(THVL, "3") - field(THST, "12.0") - field(SCAN, "I/O Intr") -} - diff --git a/motorApp/Db/XPSPositionCompare_settings.req b/motorApp/Db/XPSPositionCompare_settings.req deleted file mode 100644 index b810b555..00000000 --- a/motorApp/Db/XPSPositionCompare_settings.req +++ /dev/null @@ -1,6 +0,0 @@ -$(P)$(R)PositionCompareMode -$(p)$(r)pOSITIONcompareMinPosition -$(P)$(R)PositionCompareMaxPosition -$(P)$(R)PositionCompareStepSize -$(P)$(R)PositionComparePulseWidth -$(P)$(R)PositionCompareSettlingTime diff --git a/motorApp/Db/XPSTclScript.template b/motorApp/Db/XPSTclScript.template deleted file mode 100755 index ccd2b3f5..00000000 --- a/motorApp/Db/XPSTclScript.template +++ /dev/null @@ -1,44 +0,0 @@ -#################################################### -# -# Template for executing TCL script on an XPS. -# Uses parameters in model 3 XPS driver (XPSController). -# -# Matthew Pearson -# July 2013 -# -# Macros: -# $(P) - PV name prefix -# $(R) - PV base record name -# $(PORT) - asyn port for the controller -# $(ADDR) - asyn address (normally 0) -# $(TIMEOUT) - asyn timeout -# -#################################################### - -# /// -# /// Name of the TCL script to execute -# /// -record(waveform, "$(P)$(R)TCLScript") -{ - field(DESC, "Name of the TCL script") - field(PINI, "YES") - field(DTYP, "asynOctetWrite") - field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_TCL_SCRIPT") - field(FTVL, "CHAR") - field(NELM, "256") - info(autosaveFields, "VAL") -} - -# /// -# /// Execute the TCL script (non blocking) -# /// -record(bo, "$(P)$(R)TCLScriptExecute") -{ - field(DESC, "Execute TCL Script") - field(DTYP, "asynInt32") - field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_TCL_SCRIPT_EXECUTE") - field(ZNAM, "TCL Execute") - field(ONAM, "TCL Execute") -} - - diff --git a/motorApp/Db/XPS_extra.db b/motorApp/Db/XPS_extra.db deleted file mode 100644 index 6b982936..00000000 --- a/motorApp/Db/XPS_extra.db +++ /dev/null @@ -1,33 +0,0 @@ -# Database for Newport XPS - -grecord(ao,"$(P)$(R)MIN_JERK_TIME") { - field(DESC,"Min jerk time") - field(PREC,"3") - field(VAL,".01") - field(DTYP, "asynFloat64") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_MIN_JERK") -} -grecord(ao,"$(P)$(R)MAX_JERK_TIME") { - field(DESC,"Max jerk time") - field(PREC,"3") - field(VAL,".03") - field(DTYP, "asynFloat64") - field(OUT,"@asyn($(PORT),$(ADDR))XPS_MAX_JERK") -} -grecord(ai,"$(P)$(R)READBACK") { - field(DESC,"Readback") - field(PREC,"4") - field(PINI, "1") - field(DTYP, "asynFloat64") - field(SCAN, "I/O Intr") - field(INP,"@asyn($(PORT),$(ADDR))MOTOR_POSITION") -} - -grecord(ai,"$(P)$(R)XPS_STATUS") { - field(DESC,"XPS Group Status") - field(DTYP, "asynInt32") - field(PINI, "1") - field(PREC,"0") - field(SCAN, "I/O Intr") - field(INP,"@asyn($(PORT),$(ADDR))XPS_STATUS") -} diff --git a/motorApp/Db/profileMoveAxisXPS.template b/motorApp/Db/profileMoveAxisXPS.template deleted file mode 100644 index c1712ff7..00000000 --- a/motorApp/Db/profileMoveAxisXPS.template +++ /dev/null @@ -1,59 +0,0 @@ -# Database for profile moves with asynMotor -# This database defined records specific to each XPS axis -# -# Mark Rivers -# April 3, 2011 -# -# -# Macro paramters: -# $(P) - PV name prefix -# $(R) - PV base record name -# $(M) - PV motor name -# $(PORT) - asyn port for this controller -# $(ADDR) - asyn addr for this axis -# $(TIMEOUT) - asyn timeout for this axis -# $(PREC) - Precision for this axis - -# -# Readback of minimum position -# -record(ai,"$(P)$(R)M$(M)MinPosition") { - field(DESC, "Axis $(ADDR) min position") - field(DTYP, "asynFloat64") - field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_PROFILE_MIN_POSITION") - field(PREC, "$(PREC)") - field(SCAN, "I/O Intr") -} - -# -# Readback of maximum position -# -record(ai,"$(P)$(R)M$(M)MaxPosition") { - field(DESC, "Axis $(ADDR) max position") - field(DTYP, "asynFloat64") - field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_PROFILE_MAX_POSITION") - field(PREC, "$(PREC)") - field(SCAN, "I/O Intr") -} - -# -# Readback of maximum velocity -# -record(ai,"$(P)$(R)M$(M)MaxVelocity") { - field(DESC, "Axis $(ADDR) max velocity") - field(DTYP, "asynFloat64") - field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_PROFILE_MAX_VELOCITY") - field(PREC, "$(PREC)") - field(SCAN, "I/O Intr") -} - -# -# Readback of maximum acceleration -# -record(ai,"$(P)$(R)M$(M)MaxAcceleration") { - field(DESC, "Axis $(ADDR) max acceleration") - field(DTYP, "asynFloat64") - field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))XPS_PROFILE_MAX_ACCELERATION") - field(PREC, "$(PREC)") - field(SCAN, "I/O Intr") -} diff --git a/motorApp/Db/profileMoveControllerXPS.template b/motorApp/Db/profileMoveControllerXPS.template deleted file mode 100644 index 73aa0bb0..00000000 --- a/motorApp/Db/profileMoveControllerXPS.template +++ /dev/null @@ -1,30 +0,0 @@ -# Database for profile moves with asynMotor -# This database defined records specific to the XPS controller -# -# Mark Rivers -# April 3, 2011 -# -# -# Macro paramters: -# $(P) - PV name prefix -# $(R) - PV base record name -# $(PORT) - asyn port for this controller -# $(TIMEOUT) - asyn timeout - -# Name of the trajectory file that is built and FTP'd to the XPS -record(stringout, "$(P)$(R)TrajectoryFile") { - field(DESC, "XPS trajectory file") - field(PINI, "YES") - field(DTYP, "asynOctetWrite") - field(OUT, "@asyn($(PORT),0,$(TIMEOUT))XPS_TRAJECTORY_FILE") - field(VAL, "TrajectoryScan.trj") -} - -# Group name for XPS trajectory scanning -record(stringout, "$(P)$(R)GroupName") { - field(DESC, "XPS PVT group name") - field(PINI, "YES") - field(DTYP, "asynOctetWrite") - field(OUT, "@asyn($(PORT),0,$(TIMEOUT))XPS_PROFILE_GROUP_NAME") - field(VAL, "Group1") -} diff --git a/motorApp/Db/profileMoveControllerXPS_settings.req b/motorApp/Db/profileMoveControllerXPS_settings.req deleted file mode 100644 index a3ef015a..00000000 --- a/motorApp/Db/profileMoveControllerXPS_settings.req +++ /dev/null @@ -1,2 +0,0 @@ -$(P)$(R)TrajectoryFile -$(P)$(R)GroupName diff --git a/motorApp/Db/xpsSlave.db b/motorApp/Db/xpsSlave.db deleted file mode 100644 index ec1da696..00000000 --- a/motorApp/Db/xpsSlave.db +++ /dev/null @@ -1,41 +0,0 @@ -record(longout, "$(P)$(R):debug") -{ - field(DESC, "Debug level") - field(VAL, "5") - field(PINI, "YES") -} -record(bo, "$(P)$(R):ok") -{ - field(DESC, "Slave mode ok?") - field(ZNAM, "No") - field(ONAM, "Yes") - field(VAL, "0") -} - -record(bo, "$(P)$(R):init") -{ - field(DESC, "Initialize") - field(ZNAM, "Done") - field(ONAM, "Initializing") - field(VAL, "0") -} - -record(bo, "$(P)$(R):on") -{ - field(DESC, "Slave mode") - field(ZNAM, "Off") - field(ONAM, "On") - field(VAL, "0") -} - -record(ao, "$(P)$(R):ratio") -{ - field(DESC, "Gear ratio") - field(VAL, "1") -} - -record(ao, "$(P)$(R):ratioRdbk") -{ - field(DESC, "Gear ratio") - field(VAL, "1") -} diff --git a/motorApp/Makefile b/motorApp/Makefile index d3275a0c..cdffbf22 100644 --- a/motorApp/Makefile +++ b/motorApp/Makefile @@ -27,9 +27,6 @@ OmsAsynSrc_DEPEND_DIRS = MotorSrc DIRS += MotorSimSrc MotorSimSrc_DEPEND_DIRS = MotorSrc -DIRS += NewportSrc -NewportSrc_DEPEND_DIRS = MotorSrc - DIRS += ImsSrc ImsSrc_DEPEND_DIRS = MotorSrc diff --git a/motorApp/NewportSrc/AG_CONEX.cpp b/motorApp/NewportSrc/AG_CONEX.cpp deleted file mode 100644 index 04af446f..00000000 --- a/motorApp/NewportSrc/AG_CONEX.cpp +++ /dev/null @@ -1,545 +0,0 @@ -/* -FILENAME... AG_CONEX.cpp -USAGE... Motor driver support for the Newport CONEX-AGP, CONEX-CC and CONEX-PP series controllers. - -Mark Rivers -April 11, 2013 - -*/ - - -#include -#include -#include -#include - -#include -#include - -#include - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#include -#include "AG_CONEX.h" - -#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) - -#define CONEX_TIMEOUT 2.0 -#define LINUX_WRITE_DELAY 0.1 - -// We force minus end-of-run home type for Conex-PP for now -#define HOME_TYPE_MINUS_EOR 4 - -/** Creates a new AG_CONEXController object. - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] serialPortName The name of the drvAsynSerialPort that was created previously to connect to the CONEX controller - * \param[in] numAxes The number of axes that this controller supports - * \param[in] movingPollPeriod The time between polls when any axis is moving - * \param[in] idlePollPeriod The time between polls when no axis is moving - */ -AG_CONEXController::AG_CONEXController(const char *portName, const char *serialPortName, int controllerID, - double movingPollPeriod, double idlePollPeriod) - : asynMotorController(portName, 1, NUM_AG_CONEX_PARAMS, - 0, // No additional interfaces beyond those in base class - 0, // No additional callback interfaces beyond those in base class - ASYN_CANBLOCK | ASYN_MULTIDEVICE, - 1, // autoconnect - 0, 0), // Default priority and stack size - controllerID_(controllerID) - -{ - asynStatus status; - static const char *functionName = "AG_CONEXController::AG_CONEXController"; - - /* Connect to CONEX controller */ - status = pasynOctetSyncIO->connect(serialPortName, 0, &pasynUserController_, NULL); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s: cannot connect to CONEX controller\n", - functionName); - return; - } - - // Flush any characters that controller has, read firmware version - sprintf(outString_, "%dVE", controllerID_); - status = writeReadController(); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s: cannot read version information from AG_CONEX controller\n", - functionName); - return; - } - strcpy(controllerVersion_, &inString_[4]); - - // Create the axis object - new AG_CONEXAxis(this); - - startPoller(movingPollPeriod, idlePollPeriod, 2); -} - - -/** Creates a new AG_CONEXController object. - * Configuration command, called directly or from iocsh - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] serialPortName The name of the drvAsynIPPPort that was created previously to connect to the CONEX controller - * \param[in] numAxes The number of axes that this controller supports - * \param[in] movingPollPeriod The time in ms between polls when any axis is moving - * \param[in] idlePollPeriod The time in ms between polls when no axis is moving - */ -extern "C" { - -int AG_CONEXCreateController(const char *portName, const char *serialPortName, int controllerID, - int movingPollPeriod, int idlePollPeriod) -{ - new AG_CONEXController(portName, serialPortName, controllerID, movingPollPeriod/1000., idlePollPeriod/1000.); - return(asynSuccess); -} - -} // extern "C" - - -/** Writes a string to the controller. - * Calls writeCONEX() with a default location of the string to write and a default timeout. */ -asynStatus AG_CONEXController::writeCONEX() -{ - return writeCONEX(outString_, CONEX_TIMEOUT); -} - -/** Writes a string to the controller. - * \param[in] output The string to be written. - * \param[in] timeout Timeout before returning an error.*/ -asynStatus AG_CONEXController::writeCONEX(const char *output, double timeout) -{ - size_t nwrite; - asynStatus status; - // const char *functionName="writeCONEX"; - - status = pasynOctetSyncIO->write(pasynUserController_, output, - strlen(output), timeout, &nwrite); - - // On Linux it seems to be necessary to delay a short time between writes - #ifdef linux - epicsThreadSleep(LINUX_WRITE_DELAY); - #endif - - return status ; -} - -/** Reports on status of the driver - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * If details > 0 then information is printed about each axis. - * After printing controller-specific information it calls asynMotorController::report() - */ -void AG_CONEXController::report(FILE *fp, int level) -{ - fprintf(fp, "CONEX motor driver %s, controllerID=%d, version=\"%s\n" - " moving poll period=%f, idle poll period=%f\n", - this->portName, controllerID_, controllerVersion_, movingPollPeriod_, idlePollPeriod_); - - // Call the base class method - asynMotorController::report(fp, level); -} - -/** Returns a pointer to an AG_CONEXAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] pasynUser asynUser structure that encodes the axis index number. */ -AG_CONEXAxis* AG_CONEXController::getAxis(asynUser *pasynUser) -{ - return static_cast(asynMotorController::getAxis(pasynUser)); -} - -/** Returns a pointer to an AG_CONEXAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] axisNo Axis index number. */ -AG_CONEXAxis* AG_CONEXController::getAxis(int axisNo) -{ - return static_cast(asynMotorController::getAxis(axisNo)); -} - - -// These are the AG_CONEXAxis methods - -/** Creates a new AG_CONEXAxis object. - * \param[in] pC Pointer to the AG_CONEXController to which this axis belongs. - * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. - * - * Initializes register numbers, etc. - */ -AG_CONEXAxis::AG_CONEXAxis(AG_CONEXController *pC) - : asynMotorAxis(pC, 0), - pC_(pC), - currentPosition_(0.) -{ - static const char *functionName = "AG_CONEXAxis::AG_CONEXAxis"; - - // Figure out what model this is - if (strstr(pC->controllerVersion_, "CONEX-AGP")) { - conexModel_ = ModelConexAGP; - KPMax_ = 3000.; - KIMax_ = 3000.; - LFMax_ = 1000.; - } - else if (strstr(pC->controllerVersion_, "CONEX-CC")) { - conexModel_ = ModelConexCC; - KPMax_ = 1.e6; - KIMax_ = 1.e6; - KDMax_ = 1.e6; - } - else if (strstr(pC->controllerVersion_, "Conex PP")) { - conexModel_ = ModelConexPP; - } - else { - asynPrint(pC->pasynUserSelf, ASYN_TRACE_ERROR, - "%s: unknown model, firmware string=%s\n", - functionName, pC->controllerVersion_); - return; - } - - // Read the stage ID - sprintf(pC_->outString_, "%dID?", pC->controllerID_); - pC_->writeReadController(); - strcpy(stageID_, &pC_->inString_[3]); - - // Read the encoder increment (CC and AGP only) - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - sprintf(pC_->outString_, "%dSU?", pC->controllerID_); - pC_->writeReadController(); - encoderIncrement_ = atof(&pC_->inString_[3]); - } else { - encoderIncrement_ = 1.; - } - - // Read the interpolation factor (AGP only) - if (conexModel_ == ModelConexAGP) { - sprintf(pC_->outString_, "%dIF?", pC->controllerID_); - pC_->writeReadController(); - interpolationFactor_ = atof(&pC_->inString_[3]); - } else { - interpolationFactor_ = 1.; - } - - if (conexModel_ == ModelConexPP) { - sprintf(pC_->outString_, "%dFRM?", pC->controllerID_); - pC_->writeReadController(); - microStepsPerFullStep_ = atoi(&pC_->inString_[4]); - sprintf(pC_->outString_, "%dFRS?", pC->controllerID_); - pC_->writeReadController(); - fullStepSize_ = atof(&pC_->inString_[4]); - } - - // Compute the minimum step size - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - stepSize_ = encoderIncrement_ / interpolationFactor_; - } else { - stepSize_ = fullStepSize_ / microStepsPerFullStep_ / 1000.; - } - - // Read the low and high software limits - sprintf(pC_->outString_, "%dSL?", pC->controllerID_); - pC_->writeReadController(); - lowLimit_ = atof(&pC_->inString_[3]); - sprintf(pC_->outString_, "%dSR?", pC->controllerID_); - pC_->writeReadController(); - highLimit_ = atof(&pC_->inString_[3]); - - // Tell the motor record that we have an gain support (CC and AGP only) - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - setIntegerParam(pC_->motorStatusGainSupport_, 1); - } -} - -/** Reports on status of the axis - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * After printing device-specific information calls asynMotorAxis::report() - */ -void AG_CONEXAxis::report(FILE *fp, int level) -{ - if (level > 0) { - // Read KOP, KI, LF (CC and AGP only) - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - sprintf(pC_->outString_, "%dKP?", pC_->controllerID_); - pC_->writeReadController(); - KP_ = atof(&pC_->inString_[3]); - sprintf(pC_->outString_, "%dKI?", pC_->controllerID_); - pC_->writeReadController(); - KI_ = atof(&pC_->inString_[3]); - if (conexModel_ == ModelConexAGP) { - sprintf(pC_->outString_, "%dLF?", pC_->controllerID_); - pC_->writeReadController(); - LF_ = atof(&pC_->inString_[3]); - } else if (conexModel_ == ModelConexCC) { - sprintf(pC_->outString_, "%dKD?", pC_->controllerID_); - pC_->writeReadController(); - KD_ = atof(&pC_->inString_[3]); - LF_ = KD_; // For printout below - } - } - - fprintf(fp, " stageID=%s\n" - " currentPosition=%f, encoderIncrement=%f\n" - " interpolationFactor=%f, stepSize=%f, lowLimit=%f, highLimit=%f\n" - " KP=%f, KI=%f, KD/LF=%f\n" - " fullStepSize=%f, microStepsPerFullStep=%d\n", - stageID_, - currentPosition_, encoderIncrement_, - interpolationFactor_, stepSize_, lowLimit_, highLimit_, - KP_, KI_, LF_, - fullStepSize_, microStepsPerFullStep_); - } - - // Call the base class method - asynMotorAxis::report(fp, level); -} - -asynStatus AG_CONEXAxis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) -{ - asynStatus status; - // static const char *functionName = "AG_CONEXAxis::move"; - - // The CONEX-CC and CONEX-PP support velocity and acceleration, the CONEX-AGP does not - if ((conexModel_ == ModelConexCC) || (conexModel_ == ModelConexPP)) { - sprintf(pC_->outString_, "%dAC%f", pC_->controllerID_, acceleration*stepSize_); - status = pC_->writeCONEX(); - sprintf(pC_->outString_, "%dVA%f", pC_->controllerID_, maxVelocity*stepSize_); - status = pC_->writeCONEX(); - } - - if (relative) { - sprintf(pC_->outString_, "%dPR%f", pC_->controllerID_, position*stepSize_); - } else { - sprintf(pC_->outString_, "%dPA%f", pC_->controllerID_, position*stepSize_); - } - status = pC_->writeCONEX(); - return status; -} - -asynStatus AG_CONEXAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) -{ - asynStatus status; - //static const char *functionName = "AG_CONEXAxis::home"; - - // Must go to unreferenced state to home - sprintf(pC_->outString_, "%dRS", pC_->controllerID_); - status = pC_->writeCONEX(); - epicsThreadSleep(1.0); - - // The CONEX-CC supports home velocity, but only by going to Configuration state (PW1) - // and writing to non-volatile memory with the OH command. - // This is time-consuming and can only be done a limited number of times so we don't do it here. - - // The CONEX-PP supports home velocity and home type. We force negative limit switch home type. - if (conexModel_ == ModelConexPP) { - sprintf(pC_->outString_, "%dOH%f", pC_->controllerID_, maxVelocity); - status = pC_->writeCONEX(); - sprintf(pC_->outString_, "%dHT%d", pC_->controllerID_, HOME_TYPE_MINUS_EOR); - status = pC_->writeCONEX(); - } - - sprintf(pC_->outString_, "%dOR", pC_->controllerID_); - status = pC_->writeCONEX(); - return status; -} - -asynStatus AG_CONEXAxis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) -{ - asynStatus status; - double position; - //static const char *functionName = "AG_CONEXAxis::moveVelocity"; - - // The CONEX does not have a jog command. Move almost to soft limit. - if (maxVelocity > 0) position = highLimit_ - stepSize_; - else position = lowLimit_ + stepSize_; - - sprintf(pC_->outString_, "%dPA%f", pC_->controllerID_, position); - status = pC_->writeCONEX(); - return status; -} - -asynStatus AG_CONEXAxis::stop(double acceleration ) -{ - asynStatus status; - //static const char *functionName = "AG_CONEXAxis::stop"; - - sprintf(pC_->outString_, "%dST", pC_->controllerID_); - status = pC_->writeCONEX(); - return status; -} - -asynStatus AG_CONEXAxis::setPosition(double position) -{ - //static const char *functionName = "AG_CONEXAxis::setPosition"; - - return asynSuccess; -} - -asynStatus AG_CONEXAxis::setClosedLoop(bool closedLoop) -{ - asynStatus status; - //static const char *functionName = "AG_CONEXAxis::setClosedLoop"; - - sprintf(pC_->outString_, "%dMM%d", pC_->controllerID_, closedLoop ? 1 : 0); - status = pC_->writeCONEX(); - return status; -} - -asynStatus AG_CONEXAxis::getClosedLoop(bool *closedLoop) -{ - int status; - asynStatus comStatus; - - // Read the status of the motor - sprintf(pC_->outString_, "%dMM?", pC_->controllerID_); - comStatus = pC_->writeReadController(); - // The response string is of the form "1MMn" - sscanf(pC_->inString_, "%*dMM%x", &status); - *closedLoop = (status >= 0x1e) && (status <= 0x34); - return comStatus; -} - -asynStatus AG_CONEXAxis::setPGain(double pGain) -{ - asynStatus status = asynSuccess; - bool closedLoop; - //static const char *functionName = "AG_CONEXAxis::setPGain"; - - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - getClosedLoop(&closedLoop); - setClosedLoop(false); - // The pGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKP%f", pC_->controllerID_, pGain*KPMax_); - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); - } - return status; -} - -asynStatus AG_CONEXAxis::setIGain(double iGain) -{ - asynStatus status = asynSuccess; - bool closedLoop; - //static const char *functionName = "AG_CONEXAxis::setIGain"; - - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - getClosedLoop(&closedLoop); - setClosedLoop(false); - // The iGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, iGain*KIMax_); - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); - } - return status; -} - -asynStatus AG_CONEXAxis::setDGain(double dGain) -{ - asynStatus status = asynSuccess; - bool closedLoop; - //static const char *functionName = "AG_CONEXAxis::setPGain"; - - if ((conexModel_ == ModelConexAGP) || (conexModel_ == ModelConexCC)) { - getClosedLoop(&closedLoop); - setClosedLoop(false); - if (conexModel_ == ModelConexCC) { - // The dGain value from the motor record is between 0 and 1. - sprintf(pC_->outString_, "%dKI%f", pC_->controllerID_, dGain*KDMax_); - } else if (conexModel_ == ModelConexAGP) { - // We are using the DGain for the Low pass filter frequency. - // DGain value is between 0 and 1 - sprintf(pC_->outString_, "%dLF%f", pC_->controllerID_, dGain*LFMax_); - } - status = pC_->writeCONEX(); - if (closedLoop) setClosedLoop(true); - } - return status; -} - -/** Polls the axis. - * This function reads the motor position, the limit status, the home status, the moving status, - * and the drive power-on status. - * It calls setIntegerParam() and setDoubleParam() for each item that it polls, - * and then calls callParamCallbacks() at the end. - * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ -asynStatus AG_CONEXAxis::poll(bool *moving) -{ - int done=1; - double position; - unsigned int status; - unsigned int state; - int highLimit=0, lowLimit=0; - int count; - bool closedLoop; - asynStatus comStatus; - - // Read the current motor position - sprintf(pC_->outString_, "%dTP", pC_->controllerID_); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1TPxxx" - position = atof(&pC_->inString_[3]); - currentPosition_ = position /stepSize_; - setDoubleParam(pC_->motorPosition_, currentPosition_); - - // Read the moving status of this motor - sprintf(pC_->outString_, "%dTS", pC_->controllerID_); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1TSabcdef" - count = sscanf(pC_->inString_, "%*dTS%*4c%x", &status); - if (count != 1) goto skip; - - state = status & 0xff; - if ((state == 0x1e) || (state == 0x28)) done = 0; - setIntegerParam(pC_->motorStatusDone_, done); - *moving = done ? false:true; - - // The meaning of the error bits is different for the CC, AGP, and PP - if ((conexModel_ == ModelConexCC) || (conexModel_ == ModelConexPP)) { - if (status & 0x100) lowLimit = 1; - if (status & 0x200) highLimit = 1; - } - - setIntegerParam(pC_->motorStatusLowLimit_, lowLimit); - setIntegerParam(pC_->motorStatusHighLimit_, highLimit); - - // Set the power-on (closed loop) status of the motor - comStatus = getClosedLoop(&closedLoop); - if (comStatus) goto skip; - setIntegerParam(pC_->motorStatusPowerOn_, closedLoop ? 1:0); - - skip: - setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0); - callParamCallbacks(); - return comStatus ? asynError : asynSuccess; -} - -/** Code for iocsh registration */ -static const iocshArg AG_CONEXCreateControllerArg0 = {"Port name", iocshArgString}; -static const iocshArg AG_CONEXCreateControllerArg1 = {"Serial port name", iocshArgString}; -static const iocshArg AG_CONEXCreateControllerArg2 = {"Controller ID", iocshArgInt}; -static const iocshArg AG_CONEXCreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt}; -static const iocshArg AG_CONEXCreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt}; -static const iocshArg * const AG_CONEXCreateControllerArgs[] = {&AG_CONEXCreateControllerArg0, - &AG_CONEXCreateControllerArg1, - &AG_CONEXCreateControllerArg2, - &AG_CONEXCreateControllerArg3, - &AG_CONEXCreateControllerArg4}; -static const iocshFuncDef AG_CONEXCreateControllerDef = {"AG_CONEXCreateController", 5, AG_CONEXCreateControllerArgs}; -static void AG_CONEXCreateContollerCallFunc(const iocshArgBuf *args) -{ - AG_CONEXCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival); -} - -static void AG_CONEXRegister(void) -{ - iocshRegister(&AG_CONEXCreateControllerDef, AG_CONEXCreateContollerCallFunc); -} - -extern "C" { -epicsExportRegistrar(AG_CONEXRegister); -} diff --git a/motorApp/NewportSrc/AG_CONEX.h b/motorApp/NewportSrc/AG_CONEX.h deleted file mode 100644 index f5ffbdf8..00000000 --- a/motorApp/NewportSrc/AG_CONEX.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -FILENAME... AG_CONEX.h -USAGE... Motor driver support for the Newport CONEX-AGP and CONEX-CC series of controllers. - -Mark Rivers -April 11, 2013 - -*/ - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -typedef enum { - ModelConexAGP, - ModelConexCC, - ModelConexPP -} ConexModel_t; - -// No controller-specific parameters yet -#define NUM_AG_CONEX_PARAMS 0 - -class epicsShareClass AG_CONEXAxis : public asynMotorAxis -{ -public: - /* These are the methods we override from the base class */ - AG_CONEXAxis(class AG_CONEXController *pC); - void report(FILE *fp, int level); - asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); - asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); - asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); - asynStatus stop(double acceleration); - asynStatus poll(bool *moving); - asynStatus setPosition(double position); - asynStatus setClosedLoop(bool closedLoop); - asynStatus setPGain(double pGain); - asynStatus setIGain(double iGain); - asynStatus setDGain(double dGain); - -private: - AG_CONEXController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. - * Abbreviated because it is used very frequently */ - asynStatus getClosedLoop(bool *closedLoop); - double currentPosition_; - double encoderIncrement_; - double interpolationFactor_; - double stepSize_; - double fullStepSize_; - int microStepsPerFullStep_; - double highLimit_; - double lowLimit_; - double KP_; - double KI_; - double KD_; - double LF_; - double KPMax_; - double KDMax_; - double KIMax_; - double LFMax_; - char stageID_[40]; - ConexModel_t conexModel_; - -friend class AG_CONEXController; -}; - -class epicsShareClass AG_CONEXController : public asynMotorController { -public: - AG_CONEXController(const char *portName, const char *serialPortName, int controllerID, double movingPollPeriod, double idlePollPeriod); - - void report(FILE *fp, int level); - AG_CONEXAxis* getAxis(asynUser *pasynUser); - AG_CONEXAxis* getAxis(int axisNo); - asynStatus writeCONEX(); - asynStatus writeCONEX(const char *output, double timeout); - -private: - int controllerID_; - char controllerVersion_[40]; - - friend class AG_CONEXAxis; -}; diff --git a/motorApp/NewportSrc/AG_UC.cpp b/motorApp/NewportSrc/AG_UC.cpp deleted file mode 100644 index dc0796f5..00000000 --- a/motorApp/NewportSrc/AG_UC.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* -FILENAME... AG_UC.cpp -USAGE... Motor driver support for the Newport Agilis UC series controllers. - -Mark Rivers -April 11, 2013 - -*/ - - -#include -#include -#include -#include - -#include -#include - -#include - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#include -#include "AG_UC.h" - -#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) - -#define AGILIS_TIMEOUT 2.0 -#define WRITE_DELAY 0.01 - -/** Creates a new AG_UCController object. - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] serialPortName The name of the drvAsynSerialPort that was created previously to connect to the Agilis controller - * \param[in] numAxes The number of axes that this controller supports - * \param[in] movingPollPeriod The time between polls when any axis is moving - * \param[in] idlePollPeriod The time between polls when no axis is moving - */ -AG_UCController::AG_UCController(const char *portName, const char *serialPortName, int numAxes, - double movingPollPeriod, double idlePollPeriod) - : asynMotorController(portName, numAxes, NUM_AG_UC_PARAMS, - 0, // No additional interfaces beyond those in base class - 0, // No additional callback interfaces beyond those in base class - ASYN_CANBLOCK | ASYN_MULTIDEVICE, - 1, // autoconnect - 0, 0) // Default priority and stack size -{ - asynStatus status; - static const char *functionName = "AG_UCController::AG_UCController"; - - /* Connect to Agilis controller */ - status = pasynOctetSyncIO->connect(serialPortName, 0, &pasynUserController_, NULL); - if (status) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s: cannot connect to Agilis controller\n", - functionName); - } - - // Reset the controller - sprintf(outString_, "RS"); - status = writeAgilis(0); - // Reset takes some time? - epicsThreadSleep(0.5); - - // Put the controller in remote mode - sprintf(outString_, "MR"); - status = writeAgilis(0); - - // Flush any characters that controller has, read firmware version - sprintf(outString_, "VE"); - status = writeReadController(); - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - printf("Agilis controller firmware version = %s\n", inString_); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s: cannot read version information from Agilis controller\n", - functionName); - return; - } - strcpy(controllerVersion_, inString_); - // Figure out what model this is - if (strstr(controllerVersion_, "AG-UC2")) { - AG_UCModel_ = ModelAG_UC2; - } - else if (strstr(controllerVersion_, "AG-UC8PC")) { - AG_UCModel_ = ModelAG_UC8PC; - } - else if (strstr(controllerVersion_, "AG-UC8")) { - AG_UCModel_ = ModelAG_UC8; - } - else { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s: unknown model, firmware string=%s\n", - functionName, controllerVersion_); - return; - } - - startPoller(movingPollPeriod, idlePollPeriod, 2); -} - - -/** Creates a new AG_UCController object. - * Configuration command, called directly or from iocsh - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] serialPortName The name of the drvAsynIPPPort that was created previously to connect to the Agilis controller - * \param[in] numAxes The number of axes that this controller supports - * \param[in] movingPollPeriod The time in ms between polls when any axis is moving - * \param[in] idlePollPeriod The time in ms between polls when no axis is moving - */ -extern "C" { - -int AG_UCCreateController(const char *portName, const char *serialPortName, int numAxes, - int movingPollPeriod, int idlePollPeriod) -{ - new AG_UCController(portName, serialPortName, numAxes, movingPollPeriod/1000., idlePollPeriod/1000.); - return(asynSuccess); -} - -asynStatus AG_UCCreateAxis(const char *AG_UCName, /* specify which controller by port name */ - int axis, /* axis number 0-7 */ - int hasLimits, /* Actuator has limits 0 or 1 */ - int forwardAmplitude, /* Step amplitude in forward direction */ - int reverseAmplitude) /* Step amplitude in reverse direction */ -{ - AG_UCController *pC; - static const char *functionName = "AG_UCCreateAxis"; - - pC = (AG_UCController*) findAsynPortDriver(AG_UCName); - if (!pC) { - printf("%s: Error port %s not found\n", - functionName, AG_UCName); - return asynError; - } - pC->lock(); - new AG_UCAxis(pC, axis, hasLimits ? true:false, forwardAmplitude, reverseAmplitude); - pC->unlock(); - return asynSuccess; -} -} // extern "C" - - -/** Writes a string to the controller. - * Calls writeAgilis() with a default location of the string to write and a default timeout. */ -asynStatus AG_UCController::writeAgilis(int channelID) -{ - return writeAgilis(channelID, outString_, AGILIS_TIMEOUT); -} - - -/** Writes a string to the controller. - * \param[in] output The string to be written. - * \param[in] timeout Timeout before returning an error.*/ -asynStatus AG_UCController::writeAgilis(int channelID, const char *output, double timeout) -{ - size_t nwrite; - asynStatus status; - // const char *functionName="writeAgilis"; - - // If channelID is non-zero then we need to send the CC command first - - if (channelID != 0) setChannel(channelID); - - status = pasynOctetSyncIO->write(pasynUserController_, output, - strlen(output), timeout, &nwrite); - - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - - return status ; -} - -asynStatus AG_UCController::setChannel(int channelID) -{ - char tempString[40]; - asynStatus status; - - sprintf(tempString, "CC%d", channelID); - status = writeController(tempString, AGILIS_TIMEOUT); - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - return status; -} - -/** Reports on status of the driver - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * If details > 0 then information is printed about each axis. - * After printing controller-specific information it calls asynMotorController::report() - */ -void AG_UCController::report(FILE *fp, int level) -{ - fprintf(fp, "Agilis UC motor driver %s, model=%d, numAxes=%d, moving poll period=%f, idle poll period=%f\n", - this->portName, AG_UCModel_, numAxes_, movingPollPeriod_, idlePollPeriod_); - fprintf(fp, "controller version %s\n", - controllerVersion_); - - // Call the base class method - asynMotorController::report(fp, level); -} - -/** Returns a pointer to an AG_UCAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] pasynUser asynUser structure that encodes the axis index number. */ -AG_UCAxis* AG_UCController::getAxis(asynUser *pasynUser) -{ - return static_cast(asynMotorController::getAxis(pasynUser)); -} - -/** Returns a pointer to an AG_UCAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] axisNo Axis index number. */ -AG_UCAxis* AG_UCController::getAxis(int axisNo) -{ - return static_cast(asynMotorController::getAxis(axisNo)); -} - - -// These are the AG_UCAxis methods - -/** Creates a new AG_UCAxis object. - * \param[in] pC Pointer to the AG_UCController to which this axis belongs. - * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. - * - * Initializes register numbers, etc. - */ -AG_UCAxis::AG_UCAxis(AG_UCController *pC, int axisNo, bool hasLimits, - int forwardAmplitude, int reverseAmplitude) - : asynMotorAxis(pC, axisNo), - pC_(pC), hasLimits_(hasLimits), - forwardAmplitude_(forwardAmplitude), reverseAmplitude_(reverseAmplitude), - currentPosition_(0), positionOffset_(0) -{ - axisID_ = (axisNo % 2) + 1; // Either 1 or 2 - if (pC_->AG_UCModel_ == ModelAG_UC2) { - channelID_ = 0; - } else { - channelID_ = axisNo/2 + 1; - } - if (forwardAmplitude_ <= 0) forwardAmplitude_ = 50; - if (reverseAmplitude_ >= 0) forwardAmplitude_ = -50; - sprintf(pC_->outString_, "%dSU%d", axisID_, forwardAmplitude_); - writeAgilis(); - sprintf(pC_->outString_, "%dSU%d", axisID_, reverseAmplitude_); - writeAgilis(); -} - -/** Reports on status of the axis - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * After printing device-specific information calls asynMotorAxis::report() - */ -void AG_UCAxis::report(FILE *fp, int level) -{ - if (level > 0) { - fprintf(fp, " axisID=%d, channelID=%d, hasLimits=%d\n" - " forwardAmplitude=%d, reverseAmplitude=%d\n" - " currentPosition=%d, positionOffset=%d\n", - axisID_, channelID_, hasLimits_, - forwardAmplitude_, reverseAmplitude_, - currentPosition_, positionOffset_); - } - - // Call the base class method - asynMotorAxis::report(fp, level); -} - -asynStatus AG_UCAxis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) -{ - asynStatus status; - int steps = NINT(position); - // static const char *functionName = "AG_UCAxis::move"; - - if (relative) { - sprintf(pC_->outString_, "%dPR%d", axisID_, steps); - } else { - steps = NINT(position - currentPosition_); - sprintf(pC_->outString_, "%dPR%d", axisID_, steps); - } - status = writeAgilis(); - return status; -} - -int AG_UCAxis::velocityToSpeedCode(double velocity) -{ - int speed; - if (fabs(velocity) <= 5) speed = 1; - else if (fabs(velocity) <= 100) speed = 2; - else if (fabs(velocity) <= 666) speed = 4; - else speed = 3; - if (velocity < 0) speed = -speed; - return speed; -} - -asynStatus AG_UCAxis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) -{ - asynStatus status; - //static const char *functionName = "AG_UCAxis::home"; - - if (!hasLimits_) return asynError; - sprintf(pC_->outString_, "%dMV%d", axisID_, velocityToSpeedCode(maxVelocity)); - status = writeAgilis(); - return status; -} - -asynStatus AG_UCAxis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) -{ - asynStatus status; - //static const char *functionName = "AG_UCAxis::moveVelocity"; - - sprintf(pC_->outString_, "%dJA%d", axisID_, velocityToSpeedCode(maxVelocity)); - status = writeAgilis(); - return status; -} - -asynStatus AG_UCAxis::stop(double acceleration ) -{ - asynStatus status; - //static const char *functionName = "AG_UCAxis::stop"; - - sprintf(pC_->outString_, "%dST", axisID_); - status = writeAgilis(); - return status; -} - -asynStatus AG_UCAxis::setPosition(double position) -{ - //static const char *functionName = "AG_UCAxis::setPosition"; - - positionOffset_ = NINT(position) - currentPosition_; - return asynSuccess; -} - -/** Polls the axis. - * This function reads the motor position, the limit status, the home status, the moving status, - * and the drive power-on status. - * It calls setIntegerParam() and setDoubleParam() for each item that it polls, - * and then calls callParamCallbacks() at the end. - * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ -asynStatus AG_UCAxis::poll(bool *moving) -{ - int done; - int lim, limit=0; - int position; - asynStatus comStatus; - - // Select this channel - pC_->setChannel(channelID_); - - // Read the current motor position - sprintf(pC_->outString_, "%dTP", axisID_); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - // The response string is of the form "1TPxxx" - position = atoi(&pC_->inString_[3]); - currentPosition_ = position + positionOffset_; - setDoubleParam(pC_->motorPosition_, double(currentPosition_)); - - // Read the moving status of this motor - sprintf(pC_->outString_, "%dTS", axisID_); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - // The response string is of the form "1TSn" - done = (pC_->inString_[3] == '0') ? 1:0; - setIntegerParam(pC_->motorStatusDone_, done); - *moving = done ? false:true; - - // Read the limit status - sprintf(pC_->outString_, "PH"); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // Seems to be necessary to delay a short time between writes - epicsThreadSleep(WRITE_DELAY); - // The response string is of the form "PHn" - lim = atoi(&pC_->inString_[2]); - if ((axisID_ == 1) && (lim == 1 || lim == 3)) limit = 1; - if ((axisID_ == 2) && (lim == 3 || lim == 3)) limit = 1; - setIntegerParam(pC_->motorStatusLowLimit_, limit); - setIntegerParam(pC_->motorStatusHighLimit_, limit); - - skip: - setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0); - callParamCallbacks(); - return comStatus ? asynError : asynSuccess; -} - -/** Writes a string to the controller. - * Calls writeAgilis() with a default location of the string to write and a default timeout. */ -asynStatus AG_UCAxis::writeAgilis() -{ - return pC_->writeAgilis(channelID_, pC_->outString_, AGILIS_TIMEOUT); -} - - -asynStatus AG_UCAxis::writeAgilis(const char *output, double timeout) -{ - return pC_->writeAgilis(channelID_, output, timeout); -} - -/** Code for iocsh registration */ -static const iocshArg AG_UCCreateControllerArg0 = {"Port name", iocshArgString}; -static const iocshArg AG_UCCreateControllerArg1 = {"Serial port name", iocshArgString}; -static const iocshArg AG_UCCreateControllerArg2 = {"Number of axes", iocshArgInt}; -static const iocshArg AG_UCCreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt}; -static const iocshArg AG_UCCreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt}; -static const iocshArg * const AG_UCCreateControllerArgs[] = {&AG_UCCreateControllerArg0, - &AG_UCCreateControllerArg1, - &AG_UCCreateControllerArg2, - &AG_UCCreateControllerArg3, - &AG_UCCreateControllerArg4}; -static const iocshFuncDef AG_UCCreateControllerDef = {"AG_UCCreateController", 5, AG_UCCreateControllerArgs}; -static void AG_UCCreateContollerCallFunc(const iocshArgBuf *args) -{ - AG_UCCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival); -} - -/* AG_UCCreateAxis */ -static const iocshArg AG_UCCreateAxisArg0 = {"Controller port name", iocshArgString}; -static const iocshArg AG_UCCreateAxisArg1 = {"Axis number", iocshArgInt}; -static const iocshArg AG_UCCreateAxisArg2 = {"Has Limits", iocshArgInt}; -static const iocshArg AG_UCCreateAxisArg3 = {"Forward amplitude", iocshArgInt}; -static const iocshArg AG_UCCreateAxisArg4 = {"Reverse amplitude", iocshArgInt}; -static const iocshArg * const AG_UCCreateAxisArgs[] = {&AG_UCCreateAxisArg0, - &AG_UCCreateAxisArg1, - &AG_UCCreateAxisArg2, - &AG_UCCreateAxisArg3, - &AG_UCCreateAxisArg4}; -static const iocshFuncDef AG_UCCreateAxisDef = {"AG_UCCreateAxis", 5, AG_UCCreateAxisArgs}; - -static void AG_UCCreateAxisCallFunc(const iocshArgBuf *args) -{ - AG_UCCreateAxis(args[0].sval, args[1].ival, args[2].ival, args[3].ival, args[4].ival); -} - -static void AG_UCRegister(void) -{ - iocshRegister(&AG_UCCreateControllerDef, AG_UCCreateContollerCallFunc); - iocshRegister(&AG_UCCreateAxisDef, AG_UCCreateAxisCallFunc); -} - -extern "C" { -epicsExportRegistrar(AG_UCRegister); -} diff --git a/motorApp/NewportSrc/AG_UC.h b/motorApp/NewportSrc/AG_UC.h deleted file mode 100644 index 2858cb44..00000000 --- a/motorApp/NewportSrc/AG_UC.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -FILENAME... AG_UC.h -USAGE... Motor driver support for the Newport Agilis AG-UC series of controllers. - -Mark Rivers -April 11, 2013 - -*/ - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -typedef enum { - ModelAG_UC2, - ModelAG_UC8, - ModelAG_UC8PC -} AG_UCModel_t; - -// No controller-specific parameters yet -#define NUM_AG_UC_PARAMS 0 - -class epicsShareClass AG_UCAxis : public asynMotorAxis -{ -public: - /* These are the methods we override from the base class */ - AG_UCAxis(class AG_UCController *pC, int axis, bool hasLimits, int forwardAmplitude, int reverseAmplitude); - void report(FILE *fp, int level); - asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); - asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); - asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); - asynStatus stop(double acceleration); - asynStatus poll(bool *moving); - asynStatus setPosition(double position); - -private: - int velocityToSpeedCode(double velocity); - asynStatus writeAgilis(); - asynStatus writeAgilis(const char *output, double timeout); - AG_UCController *pC_; /**< Pointer to the asynMotorController to which this axis belongs. - * Abbreviated because it is used very frequently */ - bool hasLimits_; - int forwardAmplitude_; - int reverseAmplitude_; - int currentPosition_; - int positionOffset_; - int axisID_; - int channelID_; - -friend class AG_UCController; -}; - -class epicsShareClass AG_UCController : public asynMotorController { -public: - AG_UCController(const char *portName, const char *serialPortName, int numAxes, double movingPollPeriod, double idlePollPeriod); - - void report(FILE *fp, int level); - AG_UCAxis* getAxis(asynUser *pasynUser); - AG_UCAxis* getAxis(int axisNo); - asynStatus setChannel(int channelID); - asynStatus writeAgilis(int channelID); - asynStatus writeAgilis(int channelID, const char *output, double timeout); - - friend class AG_UCAxis; - -private: - char controllerVersion_[40]; - AG_UCModel_t AG_UCModel_; -}; diff --git a/motorApp/NewportSrc/Firmware.txt b/motorApp/NewportSrc/Firmware.txt deleted file mode 100644 index 79b23690..00000000 --- a/motorApp/NewportSrc/Firmware.txt +++ /dev/null @@ -1,6 +0,0 @@ -Version 1.4.1 http://www.newport.com/file_store/Software_Drivers/XPS_Firmware-V1_4_1.zip - -Version 1.5.x ftp://mail.newport-fr.com/FTP_SUPPORT/XPS Controller/XPS-C8_Updates/XPS-C8 V1.5.x/ - -Version 2.0.x ftp://webmail.newport-fr.com/FTP_SUPPORT/XPS Controller/XPS-C8_Updates/XPS-C8 V2.0.x/ - diff --git a/motorApp/NewportSrc/HXPDriver.cpp b/motorApp/NewportSrc/HXPDriver.cpp deleted file mode 100644 index ce67bfff..00000000 --- a/motorApp/NewportSrc/HXPDriver.cpp +++ /dev/null @@ -1,726 +0,0 @@ -/* -FILENAME... HXPDriver.cpp -USAGE... Motor driver support for the Newport Hexapod controller. - -Note: This driver was tested with the v1.3.x of the firmware - -*/ - - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#include -#include "hxp_drivers.h" -#include "HXPDriver.h" - -#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) -#define NUM_AXES 6 -#define GROUP "HEXAPOD" -#define MRES 0.00001 - -static const char *driverName = "HXPDriver"; - -/** Creates a new HXPController object. - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] IPAddress The Newport hexapod controller's ip address - * \param[in] IPPort TCP/IP port used to communicate with the hexapod controller - * \param[in] movingPollPeriod The time between polls when any axis is moving - * \param[in] idlePollPeriod The time between polls when no axis is moving - */ -HXPController::HXPController(const char *portName, const char *IPAddress, int IPPort, - double movingPollPeriod, double idlePollPeriod) - : asynMotorController(portName, NUM_AXES, NUM_HXP_PARAMS, - 0, // No additional interfaces beyond those in base class - 0, // No additional callback interfaces beyond those in base class - ASYN_CANBLOCK | ASYN_MULTIDEVICE, - 1, // autoconnect - 0, 0) // Default priority and stack size -{ - int axis; - HXPAxis *pAxis; - static const char *functionName = "HXPController::HXPController"; - - axisNames_ = epicsStrDup("XYZUVW"); - - IPAddress_ = epicsStrDup(IPAddress); - IPPort_ = IPPort; - - createParam(HXPMoveCoordSysString, asynParamInt32, &HXPMoveCoordSys_); - createParam(HXPStatusString, asynParamInt32, &HXPStatus_); - createParam(HXPErrorString, asynParamInt32, &HXPError_); - createParam(HXPErrorDescString, asynParamOctet, &HXPErrorDesc_); - createParam(HXPMoveAllString, asynParamInt32, &HXPMoveAll_); - createParam(HXPMoveAllTargetXString, asynParamFloat64, &HXPMoveAllTargetX_); - createParam(HXPMoveAllTargetYString, asynParamFloat64, &HXPMoveAllTargetY_); - createParam(HXPMoveAllTargetZString, asynParamFloat64, &HXPMoveAllTargetZ_); - createParam(HXPMoveAllTargetUString, asynParamFloat64, &HXPMoveAllTargetU_); - createParam(HXPMoveAllTargetVString, asynParamFloat64, &HXPMoveAllTargetV_); - createParam(HXPMoveAllTargetWString, asynParamFloat64, &HXPMoveAllTargetW_); - createParam(HXPCoordSysReadAllString, asynParamInt32, &HXPCoordSysReadAll_); - createParam(HXPCoordSysToolXString, asynParamFloat64, &HXPCoordSysToolX_); - createParam(HXPCoordSysToolYString, asynParamFloat64, &HXPCoordSysToolY_); - createParam(HXPCoordSysToolZString, asynParamFloat64, &HXPCoordSysToolZ_); - createParam(HXPCoordSysToolUString, asynParamFloat64, &HXPCoordSysToolU_); - createParam(HXPCoordSysToolVString, asynParamFloat64, &HXPCoordSysToolV_); - createParam(HXPCoordSysToolWString, asynParamFloat64, &HXPCoordSysToolW_); - createParam(HXPCoordSysWorkXString, asynParamFloat64, &HXPCoordSysWorkX_); - createParam(HXPCoordSysWorkYString, asynParamFloat64, &HXPCoordSysWorkY_); - createParam(HXPCoordSysWorkZString, asynParamFloat64, &HXPCoordSysWorkZ_); - createParam(HXPCoordSysWorkUString, asynParamFloat64, &HXPCoordSysWorkU_); - createParam(HXPCoordSysWorkVString, asynParamFloat64, &HXPCoordSysWorkV_); - createParam(HXPCoordSysWorkWString, asynParamFloat64, &HXPCoordSysWorkW_); - createParam(HXPCoordSysBaseXString, asynParamFloat64, &HXPCoordSysBaseX_); - createParam(HXPCoordSysBaseYString, asynParamFloat64, &HXPCoordSysBaseY_); - createParam(HXPCoordSysBaseZString, asynParamFloat64, &HXPCoordSysBaseZ_); - createParam(HXPCoordSysBaseUString, asynParamFloat64, &HXPCoordSysBaseU_); - createParam(HXPCoordSysBaseVString, asynParamFloat64, &HXPCoordSysBaseV_); - createParam(HXPCoordSysBaseWString, asynParamFloat64, &HXPCoordSysBaseW_); - createParam(HXPCoordSysSetString, asynParamInt32, &HXPCoordSysSet_); - createParam(HXPCoordSysToSetString, asynParamInt32, &HXPCoordSysToSet_); - createParam(HXPCoordSysSetXString, asynParamFloat64, &HXPCoordSysSetX_); - createParam(HXPCoordSysSetYString, asynParamFloat64, &HXPCoordSysSetY_); - createParam(HXPCoordSysSetZString, asynParamFloat64, &HXPCoordSysSetZ_); - createParam(HXPCoordSysSetUString, asynParamFloat64, &HXPCoordSysSetU_); - createParam(HXPCoordSysSetVString, asynParamFloat64, &HXPCoordSysSetV_); - createParam(HXPCoordSysSetWString, asynParamFloat64, &HXPCoordSysSetW_); - - // This socket is used for polling by the controller and all axes - pollSocket_ = HXPTCP_ConnectToServer((char *)IPAddress, IPPort, HXP_POLL_TIMEOUT); - if (pollSocket_ < 0) { - printf("%s:%s: error calling TCP_ConnectToServer for pollSocket\n", - driverName, functionName); - } - - HXPFirmwareVersionGet(pollSocket_, firmwareVersion_); - - for (axis=0; axis 0 then information is printed about each axis. - * After printing controller-specific information it calls asynMotorController::report() - */ -void HXPController::report(FILE *fp, int level) -{ - int coordSys; - - getIntegerParam(HXPMoveCoordSys_, &coordSys); - - fprintf(fp, "Newport hexapod motor driver %s, numAxes=%d, moving poll period=%f, idle poll period=%f, coordSys=%d\n", - this->portName, NUM_AXES, movingPollPeriod_, idlePollPeriod_, coordSys); - - // Call the base class method - asynMotorController::report(fp, level); -} - -/** Returns a pointer to an HXPAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] pasynUser asynUser structure that encodes the axis index number. */ -HXPAxis* HXPController::getAxis(asynUser *pasynUser) -{ - return static_cast(asynMotorController::getAxis(pasynUser)); -} - -/** Returns a pointer to an HXPAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] axisNo Axis index number. */ -HXPAxis* HXPController::getAxis(int axisNo) -{ - return static_cast(asynMotorController::getAxis(axisNo)); -} - - -/** Called when asyn clients call pasynInt32->write(). - * Extracts the function and axis number from pasynUser. - * Sets the value in the parameter library. - * If the function is HXPMoveAll_ then it calls moves all motors with a single command - * For all other functions it calls asynMotorController::writeInt32. - * Calls any registered callbacks for this pasynUser->reason and address. - * \param[in] pasynUser asynUser structure that encodes the reason and address. - * \param[in] value Value to write. */ -asynStatus HXPController::writeInt32(asynUser *pasynUser, epicsInt32 value) -{ - int function = pasynUser->reason; - asynStatus status = asynSuccess; - HXPAxis *pAxis = getAxis(pasynUser); - static const char *functionName = "writeInt32"; - - /* Set the parameter and readback in the parameter library. This may be overwritten when we read back the - * status at the end, but that's OK */ - status = setIntegerParam(pAxis->axisNo_, function, value); - - if (function == HXPMoveAll_) - { - /* if value == 1: motors are moved - if value == 0: nothing is done and parameter is simply reset */ - if (value == 1) - { - moveAll(pAxis); - } - } - else if (function == HXPCoordSysReadAll_) - { - if (value == 1) - { - readAllCS(pAxis); - } - } - else if (function == HXPCoordSysSet_) - { - if (value == 1) - { - setCS(pAxis); - } - } - else - { - /* Call base class method */ - status = asynMotorController::writeInt32(pasynUser, value); - } - - /* Do callbacks so higher layers see any changes */ - callParamCallbacks(pAxis->axisNo_); - if (status) - asynPrint(pasynUser, ASYN_TRACE_ERROR, - "%s:%s: error, status=%d function=%d, value=%d\n", - driverName, functionName, status, function, value); - else - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "%s:%s: function=%d, value=%d\n", - driverName, functionName, function, value); - return status; -} - - -/** - * Moves all hexpod axes to new target positions - */ -int HXPController::moveAll(HXPAxis *pAxis) -{ - int status; - double x, y, z, u, v, w; - - getDoubleParam(0, HXPMoveAllTargetX_, &x); - getDoubleParam(0, HXPMoveAllTargetY_, &y); - getDoubleParam(0, HXPMoveAllTargetZ_, &z); - getDoubleParam(0, HXPMoveAllTargetU_, &u); - getDoubleParam(0, HXPMoveAllTargetV_, &v); - getDoubleParam(0, HXPMoveAllTargetW_, &w); - - status = HXPHexapodMoveAbsolute(pAxis->moveSocket_, GROUP, "Work", x, y, z, u, v, w); - - postError(pAxis, status); - - /* callParamCallback() is called from postError, so it isn't needed here */ - - return status; -} - -/** - * Reads the Tool, Work, and Base coordinate-system definitions - */ -int HXPController::readAllCS(HXPAxis *pAxis) -{ - int status; - double x, y, z, u, v, w; - - status = HXPHexapodCoordinateSystemGet(pAxis->moveSocket_, GROUP, "Tool", &x, &y , &z, &u, &v, &w); - - setDoubleParam(0, HXPCoordSysToolX_, x); - setDoubleParam(0, HXPCoordSysToolY_, y); - setDoubleParam(0, HXPCoordSysToolZ_, z); - setDoubleParam(0, HXPCoordSysToolU_, u); - setDoubleParam(0, HXPCoordSysToolV_, v); - setDoubleParam(0, HXPCoordSysToolW_, w); - - postError(pAxis, status); - - status = HXPHexapodCoordinateSystemGet(pAxis->moveSocket_, GROUP, "Work", &x, &y , &z, &u, &v, &w); - - setDoubleParam(0, HXPCoordSysWorkX_, x); - setDoubleParam(0, HXPCoordSysWorkY_, y); - setDoubleParam(0, HXPCoordSysWorkZ_, z); - setDoubleParam(0, HXPCoordSysWorkU_, u); - setDoubleParam(0, HXPCoordSysWorkV_, v); - setDoubleParam(0, HXPCoordSysWorkW_, w); - - postError(pAxis, status); - - status = HXPHexapodCoordinateSystemGet(pAxis->moveSocket_, GROUP, "Base", &x, &y , &z, &u, &v, &w); - - setDoubleParam(0, HXPCoordSysBaseX_, x); - setDoubleParam(0, HXPCoordSysBaseY_, y); - setDoubleParam(0, HXPCoordSysBaseZ_, z); - setDoubleParam(0, HXPCoordSysBaseU_, u); - setDoubleParam(0, HXPCoordSysBaseV_, v); - setDoubleParam(0, HXPCoordSysBaseW_, w); - - postError(pAxis, status); - - /* callParamCallback() is called from postError, so it isn't needed here */ - - return status; -} - -/** - * Redefine the origins of the hexapod coordinate-systems - */ -int HXPController::setCS(HXPAxis *pAxis) -{ - int status = 0; - int cs; // 0=None,1=Work,2=Tool,3=Base - double x, y, z, u, v, w; - - getIntegerParam(0, HXPCoordSysToSet_, &cs); - getDoubleParam(0, HXPCoordSysSetX_, &x); - getDoubleParam(0, HXPCoordSysSetY_, &y); - getDoubleParam(0, HXPCoordSysSetZ_, &z); - getDoubleParam(0, HXPCoordSysSetU_, &u); - getDoubleParam(0, HXPCoordSysSetV_, &v); - getDoubleParam(0, HXPCoordSysSetW_, &w); - - if (cs == 1) - { - status = HXPHexapodCoordinateSystemSet(pAxis->moveSocket_, GROUP, "Work", x, y, z, u, v, w); - } - else if (cs == 2) - { - status = HXPHexapodCoordinateSystemSet(pAxis->moveSocket_, GROUP, "Tool", x, y, z, u, v, w); - } - else if (cs == 3) - { - status = HXPHexapodCoordinateSystemSet(pAxis->moveSocket_, GROUP, "Base", x, y, z, u, v, w); - } - - postError(pAxis, status); - - return status; -} - -void HXPController::postError(HXPAxis *pAxis, int status) -{ - /* This is similar to what is done in HXPAxis::move() */ - if (status < 0) - { - /* Set the error */ - setIntegerParam(HXPError_, status); - - /* Get the error string */ - HXPErrorStringGet(pAxis->moveSocket_, status, pAxis->errorDescFull_); - - /* Trim the error string */ - strncpy(pAxis->errorDesc_, pAxis->errorDescFull_, 39); - pAxis->errorDesc_[39] = 0; - - /* Set the error description */ - setStringParam(HXPErrorDesc_, pAxis->errorDesc_); - } - else - { - /* Clear the error */ - setIntegerParam(HXPError_, 0); - setStringParam(HXPErrorDesc_, ""); - } - callParamCallbacks(); - - return; -} - -/** Polls the controller. - * This function reads the motor position, the limit status, the home status, the moving status, - * and the drive power-on status. - * It calls setIntegerParam() and setDoubleParam() for each item that it polls, - * and then calls callParamCallbacks() at the end. - * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ -asynStatus HXPController::poll() -{ - int status; - //char readResponse[25]; - - static const char *functionName = "HXPController::poll"; - - status = HXPGroupStatusGet(pollSocket_, - GROUP, - &groupStatus_); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: [%s]: error calling GroupStatusGet status=%d; pollSocket=%d\n", - driverName, functionName, portName, status, pollSocket_); - goto done; - } - - asynPrint(pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: [%s]: %s groupStatus=%d\n", - driverName, functionName, portName, GROUP, groupStatus_); - /* Set the status */ - setIntegerParam(HXPStatus_, groupStatus_); - - /* If the group is not moving then the axis is not moving */ - if ((groupStatus_ < 43) || (groupStatus_ > 48)) - moving_ = false; - else - moving_ = true; - - /* Set the motor done parameter */ - setIntegerParam(motorStatusDone_, moving_?0:1); - - /*Test for states that mean we cannot move an axis (disabled, uninitialised, etc.) - and set problem bit in MSTA.*/ - if ((groupStatus_ < 10) || ((groupStatus_ >= 20) && (groupStatus_ <= 42)) || - (groupStatus_ == 50) || (groupStatus_ == 64)) - { - /* Don't consider a normal disabled status to be a problem */ - if ( groupStatus_==20 ) - { - setIntegerParam(motorStatusProblem_, 0); - } - else - { - asynPrint(pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: [%s]: in unintialised/disabled/not referenced. XPS State Code: %d\n", - driverName, functionName, portName, groupStatus_); - setIntegerParam(motorStatusProblem_, 1); - } - - /* Group status indicates power is off */ - setIntegerParam(motorStatusPowerOn_, 0); - } - else - { - setIntegerParam(motorStatusProblem_, 0); - setIntegerParam(motorStatusPowerOn_, 1); - } - - status = HXPGroupPositionCurrentGet(pollSocket_, - GROUP, - MAX_HXP_AXES, - encoderPosition_); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: [%s]: error calling GroupPositionCurrentGet status=%d\n", - driverName, functionName, portName, status); - goto done; - } - - status = HXPGroupPositionSetpointGet(pollSocket_, - GROUP, - MAX_HXP_AXES, - setpointPosition_); - if (status) { - asynPrint(pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: [%s]: error calling GroupPositionSetpointGet status=%d\n", - driverName, functionName, portName, status); - goto done; - } - - done: - setIntegerParam(motorStatusProblem_, status ? 1:0); - callParamCallbacks(); - return status ? asynError : asynSuccess; -} - - -// These are the HXPAxis methods - -/** Creates a new HXPAxis object. - * \param[in] pC Pointer to the HXPController to which this axis belongs. - * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. - * - * Initializes register numbers, etc. - */ -HXPAxis::HXPAxis(HXPController *pC, int axisNo) - : asynMotorAxis(pC, axisNo), - pC_(pC) -{ - axisName_ = pC_->axisNames_[axisNo]; - sprintf(positionerName_, "%s.%c", GROUP, (char) axisName_); - - // Couldn't a negative timeout be used here instead? - moveSocket_ = HXPTCP_ConnectToServer(pC_->IPAddress_, pC->IPPort_, HXP_POLL_TIMEOUT); - - /* Set the poll rate on the moveSocket to a negative number, which means that SendAndReceive should do only a write, no read */ - HXPTCP_SetTimeout(moveSocket_, -0.1); - pollSocket_ = pC_->pollSocket_; - - /* Enable gain support so that the CNEN field to enable/disable the hexapod */ - setIntegerParam(pC_->motorStatusGainSupport_, 1); - // does the hexapod read encoders from the stages? leave in for now to test relative moves - setIntegerParam(pC_->motorStatusHasEncoder_, 1); - -} - -/** Reports on status of the axis - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * After printing device-specific information calls asynMotorAxis::report() - */ -void HXPAxis::report(FILE *fp, int level) -{ - if (level > 0) { - fprintf(fp, " axis %d\n", axisNo_); - fprintf(fp, " axisName %c\n", axisName_); - } - - // Call the base class method - asynMotorAxis::report(fp, level); -} - -asynStatus HXPAxis::move(double position, int relative, double baseVelocity, double slewVelocity, double acceleration) -{ - int status; - double start_pos; - double end_pos; - double diff_pos; - double cur_pos[NUM_AXES]; - double rel_pos[NUM_AXES] = {}; - double *pos; - int coordSys; // 0 = work, 1 = tool - static const char *functionName = "HXPAxis::move"; - asynStatus retval = asynSuccess; - - pC_->getIntegerParam(pC_->HXPMoveCoordSys_, &coordSys); - - if (relative) { - rel_pos[axisNo_] = position * MRES; - pos = rel_pos; - - if (coordSys == 0) - { - status = HXPHexapodMoveIncremental(moveSocket_, GROUP, "Work", pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]); - } - else - { - status = HXPHexapodMoveIncremental(moveSocket_, GROUP, "Tool", pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]); - } - - if (status != 0 && status != -27) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing HexapodMoveIncremental[%s,%d] %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move! */ - retval = asynError; - } - } else { - // get current positions before moving (could an error overflow the array?) - status = HXPGroupPositionCurrentGet(pollSocket_, GROUP, 6, (double *) &cur_pos); - - // Capture current position for relative move calc - start_pos = cur_pos[axisNo_]; - - end_pos = position * MRES; - - if (coordSys == 0) - { - // Update position of axis to be moved - cur_pos[axisNo_] = end_pos; - pos = cur_pos; - - status = HXPHexapodMoveAbsolute(moveSocket_, GROUP, "Work", pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]); - } - else - { - // Calculate relative move amount (needed for Tool coord-sys moves) - diff_pos = end_pos - start_pos; - - // Update position of axis to be moved - rel_pos[axisNo_] = diff_pos; - pos = rel_pos; - - status = HXPHexapodMoveIncremental(moveSocket_, GROUP, "Tool", pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]); - - } - - if (status != 0 && status != -27) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing HexapodMoveAbsolute[%s,%d] %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move! */ - retval = asynError; - } - } - - if (status < 0) - { - /* Set the error */ - pC_->setIntegerParam(pC_->HXPError_, status); - - /* Get the error string */ - HXPErrorStringGet(moveSocket_, status, errorDescFull_); - - /* Trim the error string */ - strncpy(errorDesc_, errorDescFull_, 39); - errorDesc_[39] = 0; - - /* Set the error description */ - pC_->setStringParam(pC_->HXPErrorDesc_, errorDesc_); - - } - else - { - /* Clear the error */ - pC_->setIntegerParam(pC_->HXPError_, 0); - pC_->setStringParam(pC_->HXPErrorDesc_, ""); - } - callParamCallbacks(); - - return retval; - -} - -asynStatus HXPAxis::home(double baseVelocity, double slewVelocity, double acceleration, int forwards) -{ - // static const char *functionName = "HXPAxis::home"; - - // kill all - HXPGroupKill(moveSocket_, GROUP); - // initialize - HXPGroupInitialize(moveSocket_, GROUP); - // home - HXPGroupHomeSearch(moveSocket_, GROUP); - - return asynSuccess; -} - -asynStatus HXPAxis::stop(double acceleration ) -{ - int status; - //static const char *functionName = "HXPAxis::stop"; - - status = HXPGroupMoveAbort(moveSocket_, GROUP); - - return asynSuccess; -} - -asynStatus HXPAxis::setClosedLoop(bool closedLoop) -{ - int status; - static const char *functionName = "HXPAxis::setClosedLoop"; - - if (closedLoop) { - status = HXPGroupMotionEnable(pollSocket_, GROUP); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupMotionEnable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - } else { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: set XPS %s, axis %d closed loop enable\n", - driverName, functionName, pC_->portName, axisNo_); - } - } else { - status = HXPGroupMotionDisable(pollSocket_, GROUP); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupMotionDisable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - } else { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: motorAxisSetInteger set XPS %s, axis %d closed loop disable\n", - driverName, functionName, pC_->portName, axisNo_); - } - } - - return (asynStatus)status; -} - -/** Polls the axis. - * This function reads the motor position, the limit status, the home status, the moving status, - * and the drive power-on status. - * It calls setIntegerParam() and setDoubleParam() for each item that it polls, - * and then calls callParamCallbacks() at the end. - * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ -asynStatus HXPAxis::poll(bool *moving) -{ - int status; - //char readResponse[25]; - - static const char *functionName = "HXPAxis::poll"; - - /* If the group is not moving then the axis is not moving */ - moving_ = pC_->moving_; - - /* Set the axis done parameter */ - *moving = moving_; - setIntegerParam(pC_->motorStatusDone_, *moving?0:1); - - encoderPosition_ = pC_->encoderPosition_[axisNo_]; - setpointPosition_ = pC_->setpointPosition_[axisNo_]; - - //setDoubleParam(pC_->motorEncoderPosition_, (encoderPosition_/stepSize_)); - setDoubleParam(pC_->motorEncoderPosition_, encoderPosition_ / MRES); - - //setDoubleParam(pC_->motorPosition_, (setpointPosition_/stepSize_)); - setDoubleParam(pC_->motorPosition_, setpointPosition_ / MRES); - - // limit check? - - // dir flag? - - callParamCallbacks(); - return asynSuccess; -} - -/** Code for iocsh registration */ -static const iocshArg HXPCreateControllerArg0 = {"Port name", iocshArgString}; -static const iocshArg HXPCreateControllerArg1 = {"IP address", iocshArgString}; -static const iocshArg HXPCreateControllerArg2 = {"Port", iocshArgInt}; -static const iocshArg HXPCreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt}; -static const iocshArg HXPCreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt}; -static const iocshArg * const HXPCreateControllerArgs[] = {&HXPCreateControllerArg0, - &HXPCreateControllerArg1, - &HXPCreateControllerArg2, - &HXPCreateControllerArg3, - &HXPCreateControllerArg4}; -static const iocshFuncDef HXPCreateControllerDef = {"HXPCreateController", 5, HXPCreateControllerArgs}; -static void HXPCreateControllerCallFunc(const iocshArgBuf *args) -{ - HXPCreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival); -} - -static void HXPRegister(void) -{ - iocshRegister(&HXPCreateControllerDef, HXPCreateControllerCallFunc); -} - -extern "C" { -epicsExportRegistrar(HXPRegister); -} diff --git a/motorApp/NewportSrc/HXPDriver.h b/motorApp/NewportSrc/HXPDriver.h deleted file mode 100644 index 441b1bcb..00000000 --- a/motorApp/NewportSrc/HXPDriver.h +++ /dev/null @@ -1,160 +0,0 @@ -/* -FILENAME... HXPDriver.h -USAGE... Motor driver support for the Newport Hexapod controller. - -*/ - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#define MAX_HXP_AXES 6 -#define HXP_POLL_TIMEOUT 2.0 -#define HXP_MOVE_TIMEOUT 100000.0 // "Forever" - -// drvInfo strings for extra parameters that the HXP controller supports -#define HXPMoveCoordSysString "HXP_MOVE_COORD_SYS" -#define HXPStatusString "HXP_STATUS" -#define HXPErrorString "HXP_ERROR" -#define HXPErrorDescString "HXP_ERROR_DESC" -#define HXPMoveAllString "HXP_MOVE_ALL" -#define HXPMoveAllTargetXString "HXP_MOVE_ALL_TARGET_X" -#define HXPMoveAllTargetYString "HXP_MOVE_ALL_TARGET_Y" -#define HXPMoveAllTargetZString "HXP_MOVE_ALL_TARGET_Z" -#define HXPMoveAllTargetUString "HXP_MOVE_ALL_TARGET_U" -#define HXPMoveAllTargetVString "HXP_MOVE_ALL_TARGET_V" -#define HXPMoveAllTargetWString "HXP_MOVE_ALL_TARGET_W" -#define HXPCoordSysReadAllString "HXP_COORD_SYS_READ_ALL" -#define HXPCoordSysToolXString "HXP_COORD_SYS_TOOL_X" -#define HXPCoordSysToolYString "HXP_COORD_SYS_TOOL_Y" -#define HXPCoordSysToolZString "HXP_COORD_SYS_TOOL_Z" -#define HXPCoordSysToolUString "HXP_COORD_SYS_TOOL_U" -#define HXPCoordSysToolVString "HXP_COORD_SYS_TOOL_V" -#define HXPCoordSysToolWString "HXP_COORD_SYS_TOOL_W" -#define HXPCoordSysWorkXString "HXP_COORD_SYS_WORK_X" -#define HXPCoordSysWorkYString "HXP_COORD_SYS_WORK_Y" -#define HXPCoordSysWorkZString "HXP_COORD_SYS_WORK_Z" -#define HXPCoordSysWorkUString "HXP_COORD_SYS_WORK_U" -#define HXPCoordSysWorkVString "HXP_COORD_SYS_WORK_V" -#define HXPCoordSysWorkWString "HXP_COORD_SYS_WORK_W" -#define HXPCoordSysBaseXString "HXP_COORD_SYS_BASE_X" -#define HXPCoordSysBaseYString "HXP_COORD_SYS_BASE_Y" -#define HXPCoordSysBaseZString "HXP_COORD_SYS_BASE_Z" -#define HXPCoordSysBaseUString "HXP_COORD_SYS_BASE_U" -#define HXPCoordSysBaseVString "HXP_COORD_SYS_BASE_V" -#define HXPCoordSysBaseWString "HXP_COORD_SYS_BASE_W" -#define HXPCoordSysSetString "HXP_COORD_SYS_SET" -#define HXPCoordSysToSetString "HXP_COORD_SYS_TO_SET" -#define HXPCoordSysSetXString "HXP_COORD_SYS_SET_X" -#define HXPCoordSysSetYString "HXP_COORD_SYS_SET_Y" -#define HXPCoordSysSetZString "HXP_COORD_SYS_SET_Z" -#define HXPCoordSysSetUString "HXP_COORD_SYS_SET_U" -#define HXPCoordSysSetVString "HXP_COORD_SYS_SET_V" -#define HXPCoordSysSetWString "HXP_COORD_SYS_SET_W" - - -class epicsShareClass HXPAxis : public asynMotorAxis -{ -public: - /* These are the methods we override from the base class */ - HXPAxis(class HXPController *pC, int axis); - void report(FILE *fp, int level); - asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); - asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); - asynStatus stop(double acceleration); - asynStatus poll(bool *moving); - asynStatus setClosedLoop(bool closedLoop); - -private: - HXPController *pC_; /* Pointer to the asynMotorController to which this axis belongs. - Abbreviated because it is used very frequently */ - int moveSocket_; - int pollSocket_; - char axisName_; - char positionerName_[12]; - char errorDesc_[40]; - char errorDescFull_[1024]; - double encoderPosition_; - double setpointPosition_; - int axisStatus_; - double mres_; - bool moving_; - -friend class HXPController; -}; - -class epicsShareClass HXPController : public asynMotorController { -public: - HXPController(const char *portName, const char *HXPPortName, int numAxes, double movingPollPeriod, double idlePollPeriod); - - /* These are the methods that we override from asynMotorDriver */ - asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); /* needed for implementation of moveAll */ - void report(FILE *fp, int level); - HXPAxis* getAxis(asynUser *pasynUser); - HXPAxis* getAxis(int axisNo); - asynStatus poll(); - - /* These are the methods that are new to this class */ - int moveAll(HXPAxis* pAxis); - int readAllCS(HXPAxis* pAxis); - int setCS(HXPAxis* pAxis); - void postError(HXPAxis* pAxis, int status); - -protected: - #define FIRST_HXP_PARAM HXPMoveCoordSys_ - int HXPMoveCoordSys_; - int HXPStatus_; - int HXPError_; - int HXPErrorDesc_; - int HXPMoveAll_; - int HXPMoveAllTargetX_; - int HXPMoveAllTargetY_; - int HXPMoveAllTargetZ_; - int HXPMoveAllTargetU_; - int HXPMoveAllTargetV_; - int HXPMoveAllTargetW_; - int HXPCoordSysReadAll_; - int HXPCoordSysToolX_; - int HXPCoordSysToolY_; - int HXPCoordSysToolZ_; - int HXPCoordSysToolU_; - int HXPCoordSysToolV_; - int HXPCoordSysToolW_; - int HXPCoordSysWorkX_; - int HXPCoordSysWorkY_; - int HXPCoordSysWorkZ_; - int HXPCoordSysWorkU_; - int HXPCoordSysWorkV_; - int HXPCoordSysWorkW_; - int HXPCoordSysBaseX_; - int HXPCoordSysBaseY_; - int HXPCoordSysBaseZ_; - int HXPCoordSysBaseU_; - int HXPCoordSysBaseV_; - int HXPCoordSysBaseW_; - int HXPCoordSysSet_; - int HXPCoordSysToSet_; - int HXPCoordSysSetX_; - int HXPCoordSysSetY_; - int HXPCoordSysSetZ_; - int HXPCoordSysSetU_; - int HXPCoordSysSetV_; - int HXPCoordSysSetW_; - #define LAST_HXP_PARAM HXPCoordSysSetW_ - - #define NUM_HXP_PARAMS ((int) (&LAST_HXP_PARAM - &FIRST_HXP_PARAM + 1)) - -private: - char *IPAddress_; - int IPPort_; - int pollSocket_; - // only needed for profile moves - //int moveSocket_; - char firmwareVersion_[100]; - char *axisNames_; - int groupStatus_; - double encoderPosition_[MAX_HXP_AXES]; - double setpointPosition_[MAX_HXP_AXES]; - bool moving_; - -friend class HXPAxis; -}; diff --git a/motorApp/NewportSrc/MM4005_trajectoryScan.st b/motorApp/NewportSrc/MM4005_trajectoryScan.st deleted file mode 100644 index 2370affd..00000000 --- a/motorApp/NewportSrc/MM4005_trajectoryScan.st +++ /dev/null @@ -1,679 +0,0 @@ -program MM4005_trajectoryScan("P=13IDC:,R=traj1,M1=M1,M2=M2,M3=M3,M4=M4,M5=M5,M6=M6,M7=M7,M8=M8,PORT=serial1") - -/* This sequencer program works with trajectoryScan.db. It implements - * coordinated trajectory motion with the Newport MM4005 motor controller. - * It can be used with the Newport General Purpose Diffractometer or with any - * other set of motors connected to that controller. - * - * Mark Rivers - * August 12, 2000 -*/ - -%% #include /* for atof() */ -%% #include -%% #include -%% #include -%% #include - -#include /* definition of MAGIC */ -#define VERSION_INT(MAJ,MIN) ((MAJ)*1000000+(MIN)*1000) -#define LT_SEQ_VERSION(MAJ,MIN) ((MAGIC) < VERSION_INT(MAJ,MIN)) - -/* This program must be compiled with the recursive option */ -option +r; - -/* Maximum # of trajectory elements. The MM4005 allows 2000, and this is also - * the channel access limit with a double data type. However this uses - * a lot of memory, the variable motorTrajectory uses MAX_AXES*MAX_ELEMENTS*8 - * bytes in this SNL program (up to 128KB). Similar memory will be required - * for the records in the database. Restrict to 1000 for now. - */ -#define MAX_ELEMENTS 2000 - -/* Maximum # of output pulses. The MM4005 allows 2000, and this is also - * the channel access limit with a double data type. However this uses - * a lot of memory, the variables motorActual and motorError each use - * MAX_AXES*MAX_PULSES*8 bytes (up to 256KB total). Similar memory will be - * required for the records in the database. Restrict to 1000 for now. - */ -#define MAX_PULSES 2000 - -/* Note that MAX_AXES, MAX_ELEMENTS, and MAX_PULSES must be defined before - * including the trajectoryScan.h */ -#include "trajectoryScan.h" - -/* Maximum size of string to/from MM4005, typically for TQ command. */ -#define MAX_MM4000_STRING 256 - -/* Buffer sizes */ -#define NAME_LEN 100 - -/* Maximum size of string in EPICS string PVs. This is defined in - * epicsTypes.h, but in order to include that file it must be escaped, and then - * SNL compiler gives a warning. */ -#define MAX_STRING_SIZE 40 - -/* Time for each "padding" trajectory element added to trajectory because it - * is not a multiple of 4 elements */ -#define PAD_TIME 0.1 - -/* Polling interval for waiting for motors to reach their targets */ -#define POLL_INTERVAL 0.1 - - -char stringOut[MAX_MM4000_STRING]; -char stringIn[MAX_MM4000_STRING]; -char *asynPort; -char *pasynUser; /* This is really asynUser* */ -int status; -int i; -int j; -int k; -double delay; -int anyMoving; -int ncomplete; -int nextra; -int npoints; -int dir; -double dtime; -double dpos; -double posActual; -double posTheory; -double expectedTime; -double initialPos[MAX_AXES]; -char macroBuf[NAME_LEN]; -char motorName[NAME_LEN]; -char *p; -char *tok_save; - -/* All PVs which will be accessed in local C functions need to have their index - * extracted with pvIndex() */ -int motorCurrentIndex[MAX_AXES]; -int epicsMotorDoneIndex[MAX_AXES]; - -/* Note, this should be time_t, but SNL doesn't understand that. This is - * the defininition in vxWorks. */ -unsigned long startTime; - -/* Define escaped C functions at end of file */ -%% static int writeOnly(SS_ID ssId, struct UserVar *pVar, char *command); -%% static int writeRead(SS_ID ssId, struct UserVar *pVar, char *command); -%% static int getMotorPositions(SS_ID ssId, struct UserVar *pVar, double *pos); -%% static int getMotorMoving(SS_ID ssId, struct UserVar *pVar); -%% static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar); -%% static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar); - - -ss trajectoryScan { - - /* Initialize things when first starting */ - state init { - when() { - /* Force numAxes to be <= MAX_AXES */ - if (numAxes > MAX_AXES) numAxes = MAX_AXES; - for (i=0; istatus = pasynOctetSyncIO->connect(pVar->asynPort, 0, - %% (asynUser **)&pVar->pasynUser, - %% NULL); - if (status != 0) { - printf("trajectoryScan error in pasynOctetSyncIO->connect\n"); - printf(" status=%d, port=%s\n", status, asynPort); - } - for (j=0; jstringOut); - /* Parse the return string which is of the form 1GCxxx */ - motorMDVS[j] = atof(stringIn+3); - pvPut(motorMDVS[j]); - } - /* Clear all event flags */ - efClear(buildMon); - efClear(executeMon); - efClear(abortMon); - efClear(readbackMon); - efClear(nelementsMon); - efClear(motorMDVSMon); - } state monitor_inputs - } - - - /* Monitor inputs which control what to do (Build, Execute, Read) */ - state monitor_inputs { - when(efTestAndClear(buildMon) && (build==1)) { - } state build - - when(efTestAndClear(executeMon) && (execute==1)) { - } state execute - - when(efTestAndClear(readbackMon) && (readback==1)) { - } state readback - - when(efTestAndClear(nelementsMon) && (nelements>=1)) { - /* If nelements changes, then change endPulses to this value, - * since this is what the user normally wants. endPulses can be - * changed again after changing nelements if this is desired. */ - endPulses = nelements; - pvPut(endPulses); - } state monitor_inputs - - when(efTestAndClear(motorMDVSMon)) { - /* One of the motorMDVS values has changed. The event flag is on - * the array, so we can't tell which one. No harm in writing all - * the values to the MM4005. */ - for (j=0; jstringOut); - } - } state monitor_inputs - } - - - /* Build and verify trajectory */ - state build { - when() { - /* Set busy flag while building */ - buildState = BUILD_STATE_BUSY; - pvPut(buildState); - buildStatus=STATUS_UNDEFINED; - pvPut(buildStatus); - /* Initialize new trajectory */ - strcpy(stringOut, "NC"); - %%writeOnly(ssId, pVar, pVar->stringOut); - /* Define which motors are to be moved */ - for (i=0; istringOut); - } - /* Set acceleration time */ - sprintf(stringOut, "UC%f", accel); - %%writeOnly(ssId, pVar, pVar->stringOut); - /* If time mode is TIME_MODE_TOTAL then construct timeTrajectory - * and post it */ - if (timeMode == TIME_MODE_TOTAL) { - dtime = time_PV/nelements; - for (i=0; istringOut); - for (j=0; jstringOut); - } - /* The following command is intended to prevent buffer overflow in - * the MM4005 by reading introducing a delay (reading status) when - * downloading many-element trajectories */ - if (((i+1) % 20) == 0) %%writeRead(ssId, pVar, "TB"); - } - /* Define pulse output for trajectory */ - if (npulses > 0) { - /* Check validity, modify values if necessary */ - if (startPulses < 1) startPulses = 1; - if (startPulses > npoints) startPulses = npoints; - pvPut(startPulses); - if (endPulses < startPulses) endPulses = startPulses; - if (endPulses > npoints) endPulses = npoints; - pvPut(endPulses); - /* There seems to be a bug in the MM4005, it puts out one fewer - * pulse than requested. Add one */ - sprintf(stringOut, "MB%d,ME%d,MN%d", - startPulses, endPulses, npulses+1); - %%writeOnly(ssId, pVar, pVar->stringOut); - } - /* Verify trajectory */ - strcpy(buildMessage, "Verifying trajectory"); - pvPut(buildMessage); - strcpy(stringOut, "VC"); - %%writeOnly(ssId, pVar, pVar->stringOut); - /* Read error code back from MM4000 */ - %%writeRead(ssId, pVar, "TB"); - /* Set status and message string */ - if (stringIn[2] == '@') { - buildStatus = STATUS_SUCCESS; - strcpy(buildMessage, " "); - } else { - buildStatus = STATUS_FAILURE; - strncpy(buildMessage, stringIn, MAX_STRING_SIZE-1); - } - /* Read dynamic parameters, post them */ - for (j=0; jstringOut); - motorMDVE[j] = atoi(p+3); - pvPut(motorMDVE[j]); - sprintf(stringOut, "%dRC2", j+1); - %%writeRead(ssId, pVar, pVar->stringOut); - motorMDVA[j] = atof(p+3); - pvPut(motorMDVA[j]); - /* Maximum velocity element and value */ - sprintf(stringOut, "%dRC3", j+1); - %%writeRead(ssId, pVar, pVar->stringOut); - motorMVE[j] = atoi(p+3); - pvPut(motorMVE[j]); - sprintf(stringOut, "%dRC4", j+1); - %%writeRead(ssId, pVar, pVar->stringOut); - motorMVA[j] = atof(p+3); - pvPut(motorMVA[j]); - /* Maximum acceleration element and value */ - sprintf(stringOut, "%dRC5", j+1); - %%writeRead(ssId, pVar, pVar->stringOut); - motorMAE[j] = atoi(p+3); - pvPut(motorMAE[j]); - sprintf(stringOut, "%dRC6", j+1); - %%writeRead(ssId, pVar, pVar->stringOut); - motorMAA[j] = atof(p+3); - pvPut(motorMAA[j]); - } - /* Clear busy flag, post status */ - buildState = BUILD_STATE_DONE; - pvPut(buildState); - pvPut(buildStatus); - pvPut(buildMessage); - /* Clear build command, post. This is a "busy" record, don't want - * to do this until build is complete. */ - build=0; - pvPut(build); - } state monitor_inputs - } - - - state execute { - when () { - /* Set busy flag */ - execState = EXECUTE_STATE_MOVE_START; - pvPut(execState); - /* Set status to INVALID */ - execStatus = STATUS_UNDEFINED; - pvPut(execStatus); - /* Get the initial positions of the motors */ - for (j=0; jstringOut); - /* Get start time of execute */ - startTime = time(0); - execState = EXECUTE_STATE_EXECUTING; - pvPut(execState); - /* This is an attempt to fix the problem of TP sometimes not responding */ - epicsThreadSleep(0.1); - } state wait_execute - } - - - /* Wait for trajectory to complete */ - state wait_execute { - when (execStatus == STATUS_ABORT) { - /* The trajectory_abort state set has detected an abort. It has - * already posted the status and message. Don't execute flyback - * return to top */ - execState = EXECUTE_STATE_DONE; - pvPut(execState); - /* Clear execute command, post. This is a "busy" record, don't - * want to do this until execution is complete. */ - execute=0; - pvPut(execute); - } state monitor_inputs - - when(execState==EXECUTE_STATE_EXECUTING) { - /* Get the current motor positions, post them */ - %%getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; janyMoving = getMotorMoving(ssId, pVar); - if (!anyMoving) { - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_SUCCESS; - strcpy(execMessage, " "); - } - /* See if the elapsed time is more than twice expected, time out */ - if (difftime(time(0), startTime) > expectedTime*timeScale*2.) { - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_TIMEOUT; - strcpy(execMessage, "Timeout"); - } - /* Send TB command, read any error messages */ - %%writeRead(ssId, pVar, "TB"); - /* Parse the return string, of form "TBx message". If 'x' is '@' - then there is no error, else stop with error code */ - if (stringIn[2] != '@') { - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_FAILURE; - strncpy(execMessage, stringIn, MAX_STRING_SIZE-1); - } - } state wait_execute - - when(execState==EXECUTE_STATE_FLYBACK) { - pvPut(execState); - pvPut(execStatus); - pvPut(execMessage); - /* Get the current motor positions, post them */ - %%getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jstringOut); - /* Parse the return string which is of the form - * 15TQ,1TH2.7,1TP2.65,2TH3.1,2TP3.1 ... */ - tok_save = 0; - /* Skip the first token, which is nnTQ */ - p = epicsStrtok_r(stringIn, ",", &tok_save); - for (j=0; (jstringOut); - execStatus = STATUS_ABORT; - pvPut(execStatus); - strcpy(execMessage, "Motion aborted"); - pvPut(execMessage); - /* Clear abort command, post. This is a "busy" record, don't - * want to do this until abort command has been sent. */ - abort=0; - pvPut(abort); - } state monitorAbort - } -} - - -/* C functions */ -%{ - -/* writeOnly sends a command to the MM4005 */ -static int writeOnly(SS_ID ssId, struct UserVar *pVar, char *command) -{ - asynStatus status; - size_t nwrite; - char buffer[MAX_MM4000_STRING]; - - /* Copy command so we can add terminator */ - strncpy(buffer, command, MAX_MM4000_STRING-3); - strcat(buffer, "\r"); - status = pasynOctetSyncIO->write((asynUser *)pVar->pasynUser, buffer, - strlen(buffer), 1.0, &nwrite); - return(status); -} - -/* writeRead sends a command to the MM4005 and reads the response - * It also writes the response string to another PV so it can be displayed. */ -static int writeRead(SS_ID ssId, struct UserVar *pVar, char *command) -{ - asynStatus status; - size_t nwrite, nread; - int eomReason; - char buffer[MAX_MM4000_STRING]; - - /* Copy command so we can add terminator */ - strncpy(buffer, command, MAX_MM4000_STRING-3); - strcat(buffer, "\r"); - /* Use 30 second timeout, some commands take a long time to reply */ - status = pasynOctetSyncIO->writeRead((asynUser *)pVar->pasynUser, buffer, - strlen(buffer), pVar->stringIn, MAX_MM4000_STRING, - 30.0, &nwrite, &nread, &eomReason); - return(status); -} - - -/* getMotorPositions returns the positions of each motor */ -static int getMotorPositions(SS_ID ssId, struct UserVar *pVar, double *pos) -{ - char *p, *tok_save; - int j; - int dir; - - /* Read the current positions of all the axes */ - writeRead(ssId, pVar, "TP"); - /* Parse the return string which is of the form - * 1TP2.65,2TP3.1 ... */ - tok_save = 0; - p = epicsStrtok_r(pVar->stringIn, ",", &tok_save); - for (j=0; (jnumAxes && p!=0); j++) { - if (pVar->epicsMotorDir[j] == 0) dir=1; else dir=-1; - pos[j] = atof(p+3)*dir + pVar->epicsMotorOff[j]; - p = epicsStrtok_r(0, ",", &tok_save); - } - return(0); -} - - -/* getMotorMoving returns the moving status of each motor, packed into a single - * int. Bit 0 = motor 1, bit 1 = motor 2, etc. 0=not moving, 1=moving. - * If the entire int is 0 then no motors are moving */ -static int getMotorMoving(SS_ID ssId, struct UserVar *pVar) -{ - char *p, *tok_save; - int j; - int result=0, mask=0x01; - - /* Read the current status of all the axes */ - writeRead(ssId, pVar, "MS"); - /* Parse the return string which is of the form - * 1MSA,2MS@ ... */ - tok_save = 0; - p = epicsStrtok_r(pVar->stringIn, ",", &tok_save); - for (j=0; (jnumAxes && p!=0); j++) { - /* The low order bit in the status byte is the MOVING bit */ - if (*(p+3) & 0x01) result |= mask; - mask = mask << 1; - p = epicsStrtok_r(0, ",", &tok_save); - } - return(result); -} - -/* getEpicsMotorMoving returns the EPICS moving status of each motor, packed into - * a single int. Bit 0 = motor 1, bit 1 = motor 2, etc. 0=not moving, 1=moving. - * If the entire int is 0 then no motors are moving */ -static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar) -{ - int j; - int result=0, mask=0x01; - - for (j=0; jnumAxes; j++) { - seq_pvGet(ssId, pVar->epicsMotorDoneIndex[j], 0); - if (pVar->epicsMotorDone[j] == 0) result |= mask; - mask = mask << 1; - } - return(result); -} - - -/* waitEpicsMotors waits for all motors to stop moving using the EPICS motor - * records.. It reads and posts the motor positions during each loop. */ -static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar) -{ - int j; - - /* Logic is that we always want to post position motor positions - * after the end of move is detected. */ - while(getEpicsMotorMoving(ssId, pVar)) { - /* Get the current motor positions, post them */ - for (j=0; jnumAxes; j++) { - pVar->motorCurrent[j] = pVar->epicsMotorPos[j]; - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - epicsThreadSleep(POLL_INTERVAL); - } - for (j=0; jnumAxes; j++) { - pVar->motorCurrent[j] = pVar->epicsMotorPos[j]; - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - return(0); -} - -}% diff --git a/motorApp/NewportSrc/Makefile b/motorApp/NewportSrc/Makefile deleted file mode 100644 index 87aca9a5..00000000 --- a/motorApp/NewportSrc/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# Makefile -TOP = ../.. -include $(TOP)/configure/CONFIG -# -# Both the following line, and a line in the *.dbd file, -# must be uncommented to use diagnostic debugging messages. -#!USR_CXXFLAGS += -DDEBUG - -# The Newport XPS_C8_driver.cpp file uses "char *" when they should use "const char *". -# Turn off warnings when we call this functions with string constants -USR_CPPFLAGS_Linux += -Wno-write-strings - -# Install the XPS header file in case applications in another module need to use it -INC += XPS_C8_drivers.h - -DBD += devNewport.dbd -ifdef SNCSEQ -DBD += devNewportSeq.dbd -endif - -LIBRARY_IOC = Newport - -Newport_SRCS += NewportRegister.cc - -# MM3000 (i.e., MM3000) device driver. -Newport_SRCS += devMM3000.cc drvMM3000.cc - -# MM4000/5 (i.e., MM4000) device driver. -Newport_SRCS += devMM4000.cc drvMM4000.cc -Newport_SRCS += drvMM4000Asyn.c -ifdef SNCSEQ -Newport_SRCS += MM4005_trajectoryScan.st -endif - -# PM500 device driver. -Newport_SRCS += devPM500.cc drvPM500.cc - -# ESP300 device driver. -Newport_SRCS += devESP300.cc drvESP300.cc - -# SMC100 device driver -Newport_SRCS += SMC100Driver.cpp - -# Agilis device drivers -Newport_SRCS += AG_UC.cpp -Newport_SRCS += AG_CONEX.cpp - -# XPS C8 device driver -Newport_SRCS += asynOctetSocket.cpp -Newport_SRCS += XPS_C8_drivers.cpp -Newport_SRCS += drvXPSAsynAux.c -Newport_SRCS += xps_ftp.c -# This is the model 2 asyn driver -Newport_SRCS += drvXPSAsyn.c XPSAsynInterpose.c -# This is the model 3 asyn driver -Newport_SRCS += XPSController.cpp -Newport_SRCS += XPSAxis.cpp -ifdef SNCSEQ -Newport_SRCS += XPS_trajectoryScan.st -Newport_SRCS += xpsSlave.st -endif -# -Newport_SRCS += hxp_drivers.cpp -Newport_SRCS += HXPDriver.cpp - -# strtok_r needed on WIN32 -Newport_SRCS_WIN32 += strtok_r.c - -# XPS Gathering test function -Newport_SRCS += XPSGathering.c -Newport_SRCS += XPSGatheringRegister.c - -# Function which will run a tcl script on an XPS -Newport_SRCS += tclCall.cc - -Newport_LIBS += motor asyn -ifdef SNCSEQ -Newport_LIBS += seq pv -endif -Newport_LIBS += $(EPICS_BASE_IOC_LIBS) -Newport_SYS_LIBS_WIN32 += ws2_32 - -PROD_IOC += XPSGatheringMain -XPSGatheringMain_SRCS += XPSGatheringMain.c -XPSGatheringMain_LIBS += Newport motor asyn -ifdef SNCSEQ -XPSGatheringMain_LIBS += seq pv -endif -XPSGatheringMain_LIBS += $(EPICS_BASE_IOC_LIBS) -XPSGatheringMain_SYS_LIBS_solaris += socket nsl - -PROD_IOC += XPSGathering2 -XPSGathering2_SRCS += XPSGathering2.c -XPSGathering2_LIBS += Newport motor asyn -XPSGathering2_LIBS += $(EPICS_BASE_IOC_LIBS) -XPSGathering2_SYS_LIBS_solaris += socket nsl - -include $(TOP)/configure/RULES - diff --git a/motorApp/NewportSrc/NewportRegister.cc b/motorApp/NewportSrc/NewportRegister.cc deleted file mode 100644 index 92390af7..00000000 --- a/motorApp/NewportSrc/NewportRegister.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* -FILENAME... NewportRegister.cc -USAGE... Register Newport motor device driver shell commands. - -*/ - -/***************************************************************** - COPYRIGHT NOTIFICATION -***************************************************************** - -(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO - -This software was developed under a United States Government license -described on the COPYRIGHT_UniversityOfChicago file included as part -of this distribution. -**********************************************************************/ - -#include -#include "NewportRegister.h" -#include "tclCall.h" -#include "epicsExport.h" - -extern "C" -{ - -// Newport Setup arguments -static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; -static const iocshArg setupArg1 = {"Polling rate", iocshArgInt}; -// Newport Config arguments -static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg configArg1 = {"asyn port name", iocshArgString}; -static const iocshArg configArg2 = {"asyn address (GPIB)", iocshArgInt}; -// Newport Asyn Setup arguments -static const iocshArg asynSetupArg0 = {"Max. controller count", iocshArgInt}; -// Newport Asyn Config arguments -static const iocshArg asynConfigArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg asynConfigArg1 = {"asyn port name", iocshArgString}; -static const iocshArg asynConfigArg2 = {"asyn address (GPIB)", iocshArgInt}; -static const iocshArg asynConfigArg3 = {"Number of Axes", iocshArgInt}; -static const iocshArg asynConfigArg4 = {"Moving poll rate", iocshArgInt}; -static const iocshArg asynConfigArg5 = {"Idle poll rate", iocshArgInt}; - -static const iocshArg * const NewportSetupArgs[2] = {&setupArg0, - &setupArg1}; -static const iocshArg * const NewportAsynSetupArgs[2] = {&asynSetupArg0}; -static const iocshArg * const NewportConfigArgs[3] = {&configArg0, - &configArg1, - &configArg2}; -static const iocshArg * const NewportAsynConfigArgs[6] = {&asynConfigArg0, - &asynConfigArg1, - &asynConfigArg2, - &asynConfigArg3, - &asynConfigArg4, - &asynConfigArg5}; - -static const iocshFuncDef setupMM3000 = {"MM300Setup", 2, NewportSetupArgs}; -static const iocshFuncDef setupMM4000 = {"MM4000Setup",2, NewportSetupArgs}; -static const iocshFuncDef setupMM4000Asyn = {"MM4000AsynSetup",1, NewportAsynSetupArgs}; -static const iocshFuncDef setupPM500 = {"PM500Setup", 2, NewportSetupArgs}; -static const iocshFuncDef setupESP300 = {"ESP300Setup",2, NewportSetupArgs}; - -static const iocshFuncDef configMM3000 = {"MM3000Config", 3, NewportConfigArgs}; -static const iocshFuncDef configMM4000 = {"MM4000Config", 3, NewportConfigArgs}; -static const iocshFuncDef configMM4000Asyn = {"MM4000AsynConfig", 6, NewportAsynConfigArgs}; -static const iocshFuncDef configPM500 = {"PM500Config", 3, NewportConfigArgs}; -static const iocshFuncDef configESP300 = {"ESP300Config", 3, NewportConfigArgs}; - -static void setupMM3000CallFunc(const iocshArgBuf *args) -{ - MM3000Setup(args[0].ival, args[1].ival); -} - -static void setupMM4000CallFunc(const iocshArgBuf *args) -{ - MM4000Setup(args[0].ival, args[1].ival); -} - -static void setupMM4000AsynCallFunc(const iocshArgBuf *args) -{ - MM4000AsynSetup(args[0].ival); -} - -static void setupPM500CallFunc(const iocshArgBuf *args) -{ - PM500Setup(args[0].ival, args[1].ival); -} - -static void setupESP300CallFunc(const iocshArgBuf *args) -{ - ESP300Setup(args[0].ival, args[1].ival); -} - -static void configMM3000CallFunc(const iocshArgBuf *args) -{ - MM3000Config(args[0].ival, args[1].sval, args[2].ival); -} - -static void configMM4000CallFunc(const iocshArgBuf *args) -{ - MM4000Config(args[0].ival, args[1].sval, args[2].ival); -} - -static void configMM4000AsynCallFunc(const iocshArgBuf *args) -{ - MM4000AsynConfig(args[0].ival, args[1].sval, args[2].ival, - args[3].ival, args[4].ival, args[5].ival); -} - -static void configPM500CallFunc(const iocshArgBuf *args) -{ - PM500Config(args[0].ival, args[1].sval, args[2].ival); -} - -static void configESP300CallFunc(const iocshArgBuf *args) -{ - ESP300Config(args[0].ival, args[1].sval, args[2].ival); -} - - -static void NewportRegister(void) -{ - iocshRegister(&setupMM3000, setupMM3000CallFunc); - iocshRegister(&setupMM4000, setupMM4000CallFunc); - iocshRegister(&setupMM4000Asyn, setupMM4000AsynCallFunc); - iocshRegister(&setupPM500, setupPM500CallFunc); - iocshRegister(&setupESP300, setupESP300CallFunc); - - iocshRegister(&configMM3000, configMM3000CallFunc); - iocshRegister(&configMM4000, configMM4000CallFunc); - iocshRegister(&configMM4000Asyn, configMM4000AsynCallFunc); - iocshRegister(&configPM500, configPM500CallFunc); - iocshRegister(&configESP300, configESP300CallFunc); -} - -epicsExportRegistrar(NewportRegister); - -} // extern "C" diff --git a/motorApp/NewportSrc/NewportRegister.h b/motorApp/NewportSrc/NewportRegister.h deleted file mode 100644 index d3d36a5c..00000000 --- a/motorApp/NewportSrc/NewportRegister.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -FILENAME... NewportRegister.h -USAGE... This file contains function prototypes for Newport IOC shell commands. - -*/ - -/* - * Original Author: Ron Sluiter - * Date: 05/19/03 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - */ - -#include "motor.h" -#include "motordrvCom.h" - -#include "drvXPSAsyn.h" -#include "drvMM4000Asyn.h" - -/* Function prototypes. */ -extern RTN_STATUS MM3000Setup(int, int); -extern RTN_STATUS MM4000Setup(int, int); -extern RTN_STATUS PM500Setup(int, int); -extern RTN_STATUS ESP300Setup(int, int); -extern RTN_STATUS MM3000Config(int, const char *, int); -extern RTN_STATUS MM4000Config(int, const char *, int); -extern RTN_STATUS PM500Config(int, const char *, int); -extern RTN_STATUS ESP300Config(int, const char *, int); diff --git a/motorApp/NewportSrc/README b/motorApp/NewportSrc/README deleted file mode 100644 index dc98c04f..00000000 --- a/motorApp/NewportSrc/README +++ /dev/null @@ -1,237 +0,0 @@ -Newport ESP300 -============== - -Serial communication using the GreensSpring XM Octal I/O. ---------------------------------------------------------- - -The GreensSpring XM Octal I/O has a 16 pin jumper block for each serial port. -Assume (the manual does not define this) that the jumper pins are numbered -from, top to bottom, and from left to right; i.e., - 1 2 3 4 - 5 6 7 8 - 9 10 11 12 - 13 14 15 16 - -Then the "Default jumbering ..." depicted in Fig. 2 of the GreensSpring XM -Octal I/O manual is jumpered as follows; 1-5, 2-6, 9-13, 10-14. - -The correct jumpering for the ESP300 is; 1-5, 2-6, 9-13, 10-11, 15-16. - - -Setting the motor resolution (MRES) and Engineering Units fields to the -SAME values as the controller's. -------------------------------------------------------------------------- - -For DC motors, set MRES to the ESP300's response to the SU? command. - -If there is no other mechanism (e.g., generic serial record, dumb terminal, -etc.) to communicate to the ESP300, the response to the SU? command can be -determined by following this procedure; - -1 - uncomment the "USR_CFLAGS += -DDEBUG" line in the NewportSrc/Makefile.Vx - file (This selects the diagnostic messages to be compiled). -2 - "cd /motorApp/NewportSrc; gnumake clean; gnumake"; this re-compiles - the device drivers with the diagnostic messages selected. -3 - Rebuild your IOC; "cd ; gnumake". -4 - Add "drvESP300debug = 4" to the IOC's st.cmd file before "iocInit". -5 - Connect to the VxWorks shell and reboot the IOC. - -The VxWorks shell output should contain lines like the following; - -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Starting iocInit -send_mess(): message = VE? -recv_mess(): message = "ESP300 Version 3.08 09/09/02" -send_mess(): message = ZU -recv_mess(): message = "0H" -send_mess(): message = 01ST -send_mess(): message = 02ST -send_mess(): message = 03ST -send_mess(): message = 01SN? -recv_mess(): message = "2" -send_mess(): message = 01SU? -recv_mess(): message = "0.00003539317" -send_mess(): message = 01MD -recv_mess(): message = "1" -send_mess(): message = 01TP -recv_mess(): message = "0.00000" -send_mess(): message = 01PH -recv_mess(): message = "18000606H, 6H" -send_mess(): message = 01MO? -recv_mess(): message = "0" -send_mess(): message = 01TE? -recv_mess(): message = "0" -send_mess(): message = 02SN? -recv_mess(): message = "2" -send_mess(): message = 02SU? -recv_mess(): message = "0.00009765625" -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -Note the response to the SU? and SN? commands and set MRES to that value. - -All three supported controllers (ESP100/300/301) have the same response -to the SN? command; 0 to 10 where -0 = encoder count 6 = micro-inches -1 = motor step 7 = degree -2 = millimeter 8 = gradian -3 = micrometer 9 = radian -4 = inches 10 = milliradian -5 = milli-inches 11 = microradian - -5 - Set the motor record's EGU field to "mm" (based on SN-2) and the MRES field - to 3.539317E-5 (based on SU = 0.00003539317). -6 - Turn off diagnostic messages. Either set drvESP300debug = 0 in the st.cmd - file (there is a very small amount of CPU overhead associated with leaving - the diagnostic messages loaded), or go to step #1, and reverse the steps; - comment out the "USR_CFLAGS += -DDEBUG" line in the NewportSrc/Makefile.Vx, - etc., etc., - -Setting the motor record's Engineering Units field (EGU) to a value DIFFERENT -from the controller's EGU. -------------------------------------------------------------------------------- -In the above example the controller returned SU = "0.00003539317" and SN = "2" -for axis #1. If the user prefers the motor record EGU to be in inches rather -than millimeters, then set EGU = "inch" and, -MRES = (3.539317E-5 mm / 1 encoder tick) X (1 inch / 25.4 mm) - = 1.39343189E-6 inch / 1 encoder tick - -Newport ESP100 -============== - -Configuration -------------- - -- Unlike the ESP300, the ESP100 must be told what type of motor it is connected -to. This is done using the "Set Motor Type" command; QM. "QM" arguments are -as follows: -0 - motor type undefined (default). -1 - DC servo motor. -2 - stepper motor. -3 - commutated stepper motor. -4 - commutated brushless DC servo motor. -After setting the motor type, the value must be saved to non-volatile memory -using the "SM" command. - -Example -------- - -Setting and saving an ESP100 for use with a DC servo motor driven stage (e.g., -850G); - - 1QM 1 - SM - - -Newport MM4000 -============== - -The MM4000 controller has an approximately 50ms delay before it responds to a -status query. Hence, it is impossible to get more that a 20 Hz update rate -from the MM4000; 7 or 8 Hz is attainable. This 50ms delay exists with both -RS232 and GPIB communication interfaces. - - -Newport PM500 -============= - -The PM500 has high and low speed loops. Since the EPICS PM500 device driver -does not set any of the low speed parameters (i.e., LSIZE, LACCEL, LDECEL, LV), -the low speed loop feature may interfere with EPICS setting the slew velocity. -I recommend preventing the PM500 from ever using the low speed velocity loop by -setting the Low Speed Loop Threshold (LSIZE) to the motor record's Retry -Deadband field (RDBD). - -The LSIZE can be set from the EPICS motor record by entering the PM500 command -in the record's INIT field. LSIZE is in units of either um or arc-sec. For -example, if your RDBD = 0.123 mm, then set the INIT field to "LSIZE 123.0". - - -Newport SMC100 -============== -The SMC100 controller has a fixed baud rate of 57,600. This means that it -cannot be used with the IP-Octal232. If you want to use it from a vxWorks ioc, -you will need to connect it via a Moxa or similar. I have tested this code on -both Linux and Cygwin soft ioc's. The stage I tested it with is a GTS30V. -Initially, the controller needs to be connected to the stage it will be running, -and then configured with Newport's software. I used Newport's PC program called -"SMC100 User Tool", which allows for the controller to set and keep all of the -settings for the stage. - - -******************************************************************************** -What's what in this directory ------------------------------ - -misc EPICS stuff ----------------- -NewportRegister.cc -NewportRegister.h - -Model 2 asyn driver -------------------- -XPSAsynInterpose.c -XPSAsynInterpose.h -drvXPSAsyn.c -drvXPSAsyn.h -tclCall.cc -tclCall.h - -asyn-model-independent ----------------------- -drvXPSAsynAux.c (non-motor aspects of XPS controller) - -Model 3 asyn driver -------------------- -XPSAxis.cpp -XPSAxis.h -XPSController.cpp -XPSController.h -SMC100Driver.cpp -SMC100Driver.h -SMC100Register.cc -SMC100Register.h - -support code common to models 2 and 3 -------------------------------------- -XPS_C8_drivers.cpp -XPS_C8_drivers.h -XPS_C8_errors.h -strtok_r.c -strtok_r.h -Socket.cpp -Socket.h -asynOctetSocket.cpp - -Model 1 device support ----------------------- -devESP300.cc -devMM3000.cc -devMM4000.cc -devPM500.cc - - -Model 1 drivers ---------------- -drvESP300.cc -drvMM4000Asyn.c -drvMM4000Asyn.h -drvMM3000.cc -drvMM4000.cc -drvMMCom.h -drvPM500.cc - -other - Note the XPS Model 3 driver has built-in trajectory scanning. XPS_trajectoryScan.st is - - for use with the Model 2 XPS driver. ------ -trajectoryScan.h -xps_ftp.c -xps_ftp.h -XPS_trajectoryScan.st -MM4005_trajectoryScan.st - -test code ---------- -XPSGathering.c -XPSGathering2.c -XPSGatheringMain.c -XPSGatheringRegister.c diff --git a/motorApp/NewportSrc/SMC100Driver.cpp b/motorApp/NewportSrc/SMC100Driver.cpp deleted file mode 100644 index 05e9ef00..00000000 --- a/motorApp/NewportSrc/SMC100Driver.cpp +++ /dev/null @@ -1,382 +0,0 @@ -/* -FILENAME... SMC100Driver.cpp -USAGE... Motor driver support for the Newport SMC100 controller. - -Based on the ACS MCB-4B Model 3 device driver written by: -Mark Rivers -March 1, 2012 - -K. Goetze 2012-03-23 Initial version - 2013-06-07 Allow motor resolution to be set using "SMC100CreateController" at boot time - -*/ - - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include -#include "SMC100Driver.h" - -#define NINT(f) (int)((f)>0 ? (f)+0.5 : (f)-0.5) - -/** Creates a new SMC100Controller object. - * \param[in] portName The name of the asyn port that will be created for this driver - * \param[in] SMC100PortName The name of the drvAsynSerialPort that was created previously to connect to the SMC100 controller - * \param[in] numAxes The number of axes that this controller supports - * \param[in] movingPollPeriod The time between polls when any axis is moving - * \param[in] idlePollPeriod The time between polls when no axis is moving - */ -SMC100Controller::SMC100Controller(const char *portName, const char *SMC100PortName, int numAxes, - double movingPollPeriod, double idlePollPeriod, double stepSize) - : asynMotorController(portName, numAxes, NUM_SMC100_PARAMS, - 0, // No additional interfaces beyond those in base class - 0, // No additional callback interfaces beyond those in base class - ASYN_CANBLOCK | ASYN_MULTIDEVICE, - 1, // autoconnect - 0, 0) // Default priority and stack size -{ - int axis; - asynStatus status; - SMC100Axis *pAxis; - static const char *functionName = "SMC100Controller::SMC100Controller"; - - /* Connect to SMC100 controller */ - status = pasynOctetSyncIO->connect(SMC100PortName, 0, &pasynUserController_, NULL); - if (status) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s: cannot connect to SMC100 controller\n", - functionName); - } - for (axis=0; axis 0 then information is printed about each axis. - * After printing controller-specific information it calls asynMotorController::report() - */ -void SMC100Controller::report(FILE *fp, int level) -{ - fprintf(fp, "SMC100 motor driver %s, numAxes=%d, moving poll period=%f, idle poll period=%f\n", - this->portName, numAxes_, movingPollPeriod_, idlePollPeriod_); - - // Call the base class method - asynMotorController::report(fp, level); -} - -/** Returns a pointer to an SMC100Axis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] pasynUser asynUser structure that encodes the axis index number. */ -SMC100Axis* SMC100Controller::getAxis(asynUser *pasynUser) -{ - return static_cast(asynMotorController::getAxis(pasynUser)); -} - -/** Returns a pointer to an SMC100Axis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] No Axis index number. */ -SMC100Axis* SMC100Controller::getAxis(int axisNo) -{ - return static_cast(asynMotorController::getAxis(axisNo)); -} - - -// These are the SMC100Axis methods - -/** Creates a new SMC100Axis object. - * \param[in] pC Pointer to the SMC100Controller to which this axis belongs. - * \param[in] axisNo Index number of this axis, range 0 to pC->numAxes_-1. - * - * Initializes register numbers, etc. - */ -SMC100Axis::SMC100Axis(SMC100Controller *pC, int axisNo, double stepSize) - : asynMotorAxis(pC, axisNo), - pC_(pC), stepSize_(stepSize) -{ - -} - -/** Reports on status of the axis - * \param[in] fp The file pointer on which report information will be written - * \param[in] level The level of report detail desired - * - * After printing device-specific information calls asynMotorAxis::report() - */ -void SMC100Axis::report(FILE *fp, int level) -{ - if (level > 0) { - fprintf(fp, " axis %d\n", - axisNo_ + 1); - } - - // Call the base class method - asynMotorAxis::report(fp, level); -} - -asynStatus SMC100Axis::sendAccelAndVelocity(double acceleration, double velocity) -{ - asynStatus status; - // static const char *functionName = "SMC100::sendAccelAndVelocity"; - - // Send the velocity in egus - sprintf(pC_->outString_, "%1dVA%f", axisNo_ + 1, (velocity*stepSize_)); - status = pC_->writeController(); - - // Send the acceleration in egus/sec/sec - //printf("velocity: %f\n", velocity); - //printf("acceleration: %f", acceleration); - sprintf(pC_->outString_, "%1dAC%f", axisNo_ + 1, (acceleration*stepSize_)); - status = pC_->writeController(); - return status; -} - - -asynStatus SMC100Axis::move(double position, int relative, double minVelocity, double maxVelocity, double acceleration) -{ - asynStatus status; - // static const char *functionName = "SMC100Axis::move"; - - status = sendAccelAndVelocity(acceleration, maxVelocity); - - if (relative) { - sprintf(pC_->outString_, "%1dPR%f", axisNo_ + 1, (position*stepSize_)); - } else { - sprintf(pC_->outString_, "%1dPA%f", axisNo_ + 1, (position*stepSize_)); - } - status = pC_->writeController(); - return status; -} - -asynStatus SMC100Axis::home(double minVelocity, double maxVelocity, double acceleration, int forwards) -{ - asynStatus status; - // static const char *functionName = "SMC100Axis::home"; - - // set Home search velocity - //sprintf(pC_->outString_, "%1dOH%f", axisNo_ + 1, maxVelocity); - //status = pC_->writeController(); - - sprintf(pC_->outString_, "%1dOR", axisNo_ + 1); - - status = pC_->writeController(); - return status; -} - -// Jog -asynStatus SMC100Axis::moveVelocity(double minVelocity, double maxVelocity, double acceleration) -{ - double high_limit; - double low_limit; - asynStatus comStatus; - static const char *functionName = "SMC100Axis::moveVelocity"; - - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s: minVelocity=%f, maxVelocity=%f, acceleration=%f\n", - functionName, minVelocity, maxVelocity, acceleration); - - comStatus = sendAccelAndVelocity(acceleration, maxVelocity); - if (comStatus) goto skip; - - /* SMC100 supports the notion of jog, but only for a remote control keypad */ - // SMC100 will not allow moves outside of those set with the SL and SR commands - // first we query these limits and then make the jog a move to the limit - - // get the high limit - sprintf(pC_->outString_, "%1dSR?", axisNo_ + 1); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1SR25.0" - high_limit = (atof(&pC_->inString_[3])); - - // get the low limit - sprintf(pC_->outString_, "%1dSL?", axisNo_ + 1); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1SL-5.0" - low_limit = (atof(&pC_->inString_[3])); - - if (maxVelocity > 0.) { - /* This is a positive move in SMC100 coordinates (egus) */ - sprintf(pC_->outString_, "%1dPA%f", axisNo_ + 1, high_limit); - } else { - /* This is a negative move in SMC100 coordinates (egus) */ - sprintf(pC_->outString_, "%1dPA%f", axisNo_ + 1, low_limit); - } - comStatus = pC_->writeController(); - if (comStatus) goto skip; - - skip: - setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0); - callParamCallbacks(); - return comStatus ? asynError : asynSuccess; - -} - -asynStatus SMC100Axis::stop(double acceleration ) -{ - asynStatus status; - //static const char *functionName = "SMC100Axis::stop"; - - sprintf(pC_->outString_, "%1dST", axisNo_ + 1); - status = pC_->writeController(); - return status; -} - -asynStatus SMC100Axis::setPosition(double position) -{ - asynStatus status; - //static const char *functionName = "SMC100Axis::setPosition"; - - // ? not sure yet - //sprintf(pC_->outString_, "#%02dP=%+d", axisNo_ + 1, NINT(position)); - status = pC_->writeReadController(); - return status; -} - -asynStatus SMC100Axis::setClosedLoop(bool closedLoop) -{ - asynStatus status; - //static const char *functionName = "SMC100Axis::setClosedLoop"; - - // ? not sure yet - //sprintf(pC_->outString_, "#%02dW=%d", axisNo_ + 1, closedLoop ? 1:0); - status = pC_->writeReadController(); - return status; -} - -/** Polls the axis. - * This function reads motor position, limit status, home status, and moving status - * It calls setIntegerParam() and setDoubleParam() for each item that it polls, - * and then calls callParamCallbacks() at the end. - * \param[out] moving A flag that is set indicating that the axis is moving (true) or done (false). */ -asynStatus SMC100Axis::poll(bool *moving) -{ - int done; - //int driveOn; - int limit; - double position; - asynStatus comStatus; - - // Read the current motor position - sprintf(pC_->outString_, "%1dTP", axisNo_ + 1); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1TP-0.123" - position = (atof(&pC_->inString_[3]) / stepSize_); - //printf("\n * * * * SMC100 stepSize_ : %f \n", stepSize_); - setDoubleParam(pC_->motorPosition_, position); - - // Read the moving status of this motor - sprintf(pC_->outString_, "%1dTS", axisNo_ + 1); - comStatus = pC_->writeReadController(); - if (comStatus) goto skip; - // The response string is of the form "1TS000028" - // May need to add logic for moving while homing - done = ((pC_->inString_[7] == '2') && (pC_->inString_[8] == '8')) ? 0:1; - setIntegerParam(pC_->motorStatusDone_, done); - *moving = done ? false:true; - - // Read the limit status - // The response string is of the form "1TS001328" - // - // The stage I tested this with is a GTS30V vertical jack. When the controller is initialized - // for this device using Newport's software, +25 and -5 limits get set. The controller does not - // let you set limits outside these values, so I never was able to run into a "hard" limit. - // The controller also does not allow position settings outside these limits, and does not give - // an indication. So, my recommendation is to leave the controller's travel limits set to the - // Newport defaults, and use the motor record's soft limits, set to the controller's limits or within. - // - // Should a hard limit be actually encounted, this code *should* report it to the motor record - limit = (pC_->inString_[6] == '2') ? 1:0; - setIntegerParam(pC_->motorStatusHighLimit_, limit); - limit = (pC_->inString_[6] == '1') ? 1:0; - setIntegerParam(pC_->motorStatusLowLimit_, limit); - limit = ((pC_->inString_[7] == '3') && (pC_->inString_[8] == '2')) ? 1:0; - setIntegerParam(pC_->motorStatusAtHome_, limit); - - // Read the drive power on status - //sprintf(pC_->outString_, "#%02dE", axisNo_ + 1); - //comStatus = pC_->writeReadController(); - //if (comStatus) goto skip; - //driveOn = (pC_->inString_[5] == '1') ? 1:0; - //setIntegerParam(pC_->motorStatusPowerOn_, driveOn); - //setIntegerParam(pC_->motorStatusProblem_, 0); - - skip: - setIntegerParam(pC_->motorStatusProblem_, comStatus ? 1:0); - callParamCallbacks(); - return comStatus ? asynError : asynSuccess; -} - -/** Code for iocsh registration */ -static const iocshArg SMC100CreateControllerArg0 = {"Port name", iocshArgString}; -static const iocshArg SMC100CreateControllerArg1 = {"SMC100 port name", iocshArgString}; -static const iocshArg SMC100CreateControllerArg2 = {"Number of axes", iocshArgInt}; -static const iocshArg SMC100CreateControllerArg3 = {"Moving poll period (ms)", iocshArgInt}; -static const iocshArg SMC100CreateControllerArg4 = {"Idle poll period (ms)", iocshArgInt}; -static const iocshArg SMC100CreateControllerArg5 = {"EGUs per step", iocshArgString}; -static const iocshArg * const SMC100CreateControllerArgs[] = {&SMC100CreateControllerArg0, - &SMC100CreateControllerArg1, - &SMC100CreateControllerArg2, - &SMC100CreateControllerArg3, - &SMC100CreateControllerArg4, - &SMC100CreateControllerArg5}; -static const iocshFuncDef SMC100CreateControllerDef = {"SMC100CreateController", 6, SMC100CreateControllerArgs}; -static void SMC100CreateContollerCallFunc(const iocshArgBuf *args) -{ - SMC100CreateController(args[0].sval, args[1].sval, args[2].ival, args[3].ival, args[4].ival, args[5].sval); -} - -static void SMC100Register(void) -{ - iocshRegister(&SMC100CreateControllerDef, SMC100CreateContollerCallFunc); -} - -extern "C" { -epicsExportRegistrar(SMC100Register); -} diff --git a/motorApp/NewportSrc/SMC100Driver.h b/motorApp/NewportSrc/SMC100Driver.h deleted file mode 100644 index ddd39b84..00000000 --- a/motorApp/NewportSrc/SMC100Driver.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -FILENAME... SMC100Driver.h -USAGE... Motor driver support for the Newport SMC100 controller. - -Based on the ACS MCB-4B Model 3 device driver written by: -Mark Rivers -March 1, 2012 - -K. Goetze 2012-03-23 - -*/ - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#define MAX_SMC100_AXES 1 - -// No controller-specific parameters yet -#define NUM_SMC100_PARAMS 0 - -class epicsShareClass SMC100Axis : public asynMotorAxis -{ -public: - /* These are the methods we override from the base class */ - SMC100Axis(class SMC100Controller *pC, int axis, double stepSize); - void report(FILE *fp, int level); - asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); - asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); - asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); - asynStatus stop(double acceleration); - asynStatus poll(bool *moving); - asynStatus setPosition(double position); - asynStatus setClosedLoop(bool closedLoop); - -private: - SMC100Controller *pC_; /**< Pointer to the asynMotorController to which this axis belongs. - * Abbreviated because it is used very frequently */ - asynStatus sendAccelAndVelocity(double accel, double velocity); - double stepSize_; /**< Encoder increment value obtained with SU? command _or_ resolution, set at boot time */ - /* with SMC100CreateController command */ - -friend class SMC100Controller; -}; - -class SMC100Controller : public asynMotorController { -public: - SMC100Controller(const char *portName, const char *SMC100PortName, int numAxes, double movingPollPeriod, double idlePollPeriod, double stepSize); - - void report(FILE *fp, int level); - SMC100Axis* getAxis(asynUser *pasynUser); - SMC100Axis* getAxis(int axisNo); - -friend class SMC100Axis; -}; diff --git a/motorApp/NewportSrc/SMC100Register.cc b/motorApp/NewportSrc/SMC100Register.cc deleted file mode 100644 index 103d1fd6..00000000 --- a/motorApp/NewportSrc/SMC100Register.cc +++ /dev/null @@ -1,55 +0,0 @@ -/* -FILENAME... SMC100Register.cc -USAGE... Register SMC100 motor device driver shell commands. - -*/ - -/***************************************************************** - COPYRIGHT NOTIFICATION -***************************************************************** - -(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO - -This software was developed under a United States Government license -described on the COPYRIGHT_UniversityOfChicago file included as part -of this distribution. -**********************************************************************/ - -#include -#include "SMC100Register.h" -#include "epicsExport.h" - -extern "C" -{ - -// SMC100 Setup arguments -static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; -static const iocshArg setupArg1 = {"Polling rate", iocshArgInt}; -// SMC100 Config arguments -static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg configArg1 = {"asyn port name", iocshArgString}; - -static const iocshArg * const SMC100SetupArgs[2] = {&setupArg0, &setupArg1}; -static const iocshArg * const SMC100ConfigArgs[2] = {&configArg0, &configArg1}; - -static const iocshFuncDef setupSMC100 = {"SMC100Setup", 2, SMC100SetupArgs}; -static const iocshFuncDef configSMC100 = {"SMC100Config", 2, SMC100ConfigArgs}; - -static void setupSMC100CallFunc(const iocshArgBuf *args) -{ - SMC100Setup(args[0].ival, args[1].ival); -} -static void configSMC100CallFunc(const iocshArgBuf *args) -{ - SMC100Config(args[0].ival, args[1].sval); -} - -static void SMC100Register(void) -{ - iocshRegister(&setupSMC100, setupSMC100CallFunc); - iocshRegister(&configSMC100, configSMC100CallFunc); -} - -epicsExportRegistrar(SMC100Register); - -} // extern "C" diff --git a/motorApp/NewportSrc/SMC100Register.h b/motorApp/NewportSrc/SMC100Register.h deleted file mode 100644 index e0f6bab3..00000000 --- a/motorApp/NewportSrc/SMC100Register.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -FILENAME... SMC100Register.h -USAGE... This file contains function prototypes for SMC100 IOC shell commands. - -*/ - -/* - * Original Author: Ron Sluiter - * Date: 05/19/03 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - */ - -#include "motor.h" -#include "motordrvCom.h" - -/* Function prototypes. */ -extern RTN_STATUS SMC100Setup(int, int); -extern RTN_STATUS SMC100Config(int, const char *); - diff --git a/motorApp/NewportSrc/Socket.cpp b/motorApp/NewportSrc/Socket.cpp deleted file mode 100644 index 2d128814..00000000 --- a/motorApp/NewportSrc/Socket.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/*/////////////////////////////////////////////////////////////////////////////// -* Socket.cpp -*/ -#include "Socket.h" - -#define TIMEOUT 300 -#define SMALL_BUFFER_SIZE 256 -#define MAX_NB_SOCKETS 100 - -void Delay(double timedelay); - -CAsyncSocket m_sConnectSocket[MAX_NB_SOCKETS]; -BOOL UsedSocket[MAX_NB_SOCKETS] = { FALSE}; -double TimeoutSocket[MAX_NB_SOCKETS]; -int NbSockets = 0; - -/***************************************************************************************/ -int ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) -{ - int flag = 1; - int socketID = 0; - DWORD sockPendingFlag = 1; - - if (!AfxSocketInit()) - { - AfxMessageBox("Fatal Error: MFC Socket initialization failed"); - return -1; - } - /* Select a socket number */ - if (NbSockets < MAX_NB_SOCKETS) - { - while ((UsedSocket[socketID] == TRUE) && (socketID < MAX_NB_SOCKETS)) - socketID++; - - if (socketID == MAX_NB_SOCKETS) - return -1; - } - else - return -1; - UsedSocket[socketID] = TRUE; - NbSockets++; - - /* Socket creation */ - if ((m_sConnectSocket[socketID].Create() == 0) - || (m_sConnectSocket[socketID].SetSockOpt(TCP_NODELAY,(char *)&flag,(int)sizeof( flag ),IPPROTO_TCP) == 0)) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Connect */ - if (m_sConnectSocket[socketID].Connect(Ip_Address,Ip_Port) == 0) - { - int SocketError = m_sConnectSocket[socketID].GetLastError(); - if (SocketError != WSAEWOULDBLOCK) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - } - - /* Set timeout */ - if (TimeOut > 0) - { - if (TimeOut < 1e-3) - TimeoutSocket[socketID] = 1e-3; - else - TimeoutSocket[socketID] = TimeOut; - } - else - TimeoutSocket[socketID] = TIMEOUT; - - /* Socket array */ - struct fd_set *Sockets = new struct fd_set; - FD_ZERO(Sockets); - FD_SET(m_sConnectSocket[socketID], Sockets); - - /* Time structure */ - struct timeval *TimeOutStruct = new struct timeval; - TimeOutStruct->tv_sec = (long) TimeoutSocket[socketID]; - TimeOutStruct->tv_usec = (long) ((TimeoutSocket[socketID] - (long)TimeoutSocket[socketID])* 1e9); - - /* Checking connection is ok */ - int SelectReturn = select(0, NULL, Sockets, NULL, TimeOutStruct); - if (SelectReturn == SOCKET_ERROR - || SelectReturn == 0) - { - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Force no pending */ - if (m_sConnectSocket[socketID].IOCtl(FIONBIO,&sockPendingFlag) == 0) - { - m_sConnectSocket[socketID].Close(); - UsedSocket[socketID] = FALSE; - NbSockets--; - return -1; - } - - /* Delay unless -1 return for the first API */ - Sleep(10); - - /* Return socket ID */ - return socketID; -} - -/***************************************************************************************/ -void SetTCPTimeout(int SocketIndex, double TimeOut) -{ - if ((SocketIndex >= 0) && (SocketIndex < MAX_NB_SOCKETS) && (UsedSocket[SocketIndex] == TRUE)) - { - if (TimeOut > 0) - { - if (TimeOut < 1e-3) - TimeoutSocket[SocketIndex] = 1e-3; - else - TimeoutSocket[SocketIndex] = TimeOut; - } - } -} - -/***************************************************************************************/ -void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize) -{ - char sSocketBuffer[SMALL_BUFFER_SIZE + 1] = {'\0'}; - int iReceiveByteNumber = 0; - int iErrorNo = 0; - fd_set readFds; - int iSelectStatus; - double dTimeout; - struct timeval cTimeout; - clock_t start, stop; - - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS) && (UsedSocket[socketID] == TRUE)) - { - /* Clear receive buffer */ - do - { - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - } - while (iReceiveByteNumber != SOCKET_ERROR); - sReturnString[0] = '\0'; - - /* Send String to controller and wait for response */ - m_sConnectSocket[socketID].Send(sSendString,strlen(sSendString)); - - /* Get reply with timeout */ - dTimeout = TimeoutSocket[socketID]; - do - { - /* Get time */ - start = clock(); - - /* Check reply */ - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - iErrorNo = GetLastError() & 0xffff; - - /* Wait for reply */ - if ((iReceiveByteNumber == SOCKET_ERROR) && (iErrorNo == WSAEWOULDBLOCK)) - { - FD_ZERO(&readFds); - FD_SET(m_sConnectSocket[socketID].m_hSocket, &readFds); - cTimeout.tv_sec = (long)dTimeout; - cTimeout.tv_usec = (long)((dTimeout - (long)dTimeout) * 1e6); - iSelectStatus = select(FD_SETSIZE, (fd_set *)&readFds, (fd_set *) NULL, (fd_set *) NULL, &cTimeout); - if ((iSelectStatus > 0) && (FD_ISSET(m_sConnectSocket[socketID].m_hSocket, &readFds))) - iReceiveByteNumber = m_sConnectSocket[socketID].Receive(sSocketBuffer,SMALL_BUFFER_SIZE); - else - { - iErrorNo = GetLastError() & 0xffff; - sprintf(sSocketBuffer,"-2,%s,EndOfAPI",sSendString); - strncpyWithEOS(sReturnString, sSocketBuffer, strlen(sSocketBuffer), iReturnStringSize); - iReceiveByteNumber = SOCKET_ERROR; - } - } - - /* Concatenation */ - if ((iReceiveByteNumber >= 0) && (iReceiveByteNumber <= SMALL_BUFFER_SIZE)) - { - sSocketBuffer[iReceiveByteNumber] = '\0'; - strncat(sReturnString, sSocketBuffer, iReturnStringSize - strlen(sReturnString) - 1); - } - - /* Calculate new timeout */ - stop = clock(); - dTimeout = dTimeout - (double)(stop - start) / CLOCKS_PER_SEC; - if (dTimeout < 1e-3) - dTimeout = 1e-3; - } - while ((iReceiveByteNumber != SOCKET_ERROR) && (strstr(sReturnString, "EndOfAPI") == NULL)); - } - else - sReturnString[0] = '\0'; - - return; -} - -/***************************************************************************************/ -void CloseSocket(int socketID) -{ - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) - { - if (UsedSocket[socketID] == TRUE) - { - m_sConnectSocket[socketID].Close(); - UsedSocket[socketID] = FALSE; - TimeoutSocket[socketID] = TIMEOUT; - NbSockets--; - } - } -} - -/***************************************************************************************/ -char * GetError(int socketID) -{ - if ((socketID >= 0) && (socketID < MAX_NB_SOCKETS)) - { - int error = m_sConnectSocket[socketID].GetLastError(); - switch (error) - { - case WSANOTINITIALISED: - return (_T("A successful AfxSocketInit must occur before using this API.")); - case WSAENETDOWN: - return(_T("The Windows Sockets implementation detected that the network subsystem failed.")); - case WSAEADDRINUSE: - return(_T("The specified address is already in use.")); - case WSAEINPROGRESS: - return(_T("A blocking Windows Sockets call is in progress.")); - case WSAEADDRNOTAVAIL: - return(_T("The specified address is not available from the local machine.")); - case WSAEAFNOSUPPORT: - return(_T("Addresses in the specified family cannot be used with this socket.")); - case WSAECONNREFUSED: - return(_T("The attempt to connect was rejected.")); - case WSAEDESTADDRREQ: - return(_T("A destination address is required.")); - case WSAEFAULT: - return(_T("The nSockAddrLen argument is incorrect.")); - case WSAEINVAL: - return(_T("Invalid host address.")); - case WSAEISCONN: - return(_T("The socket is already connected.")); - case WSAEMFILE: - return(_T("No more file descriptors are available.")); - case WSAENETUNREACH: - return(_T("The network cannot be reached from this host at this time.")); - case WSAENOBUFS: - return(_T("No buffer space is available. The socket cannot be connected.")); - case WSAENOTSOCK: - return(_T("The descriptor is not a socket.")); - case WSAETIMEDOUT: - return(_T("Attempt to connect timed out without establishing a connection.")); - case WSAEWOULDBLOCK: - return(_T("The socket is marked as nonblocking and the connection cannot be completed immediately.")); - case WSAEPROTONOSUPPORT: - return(_T("The specified port is not supported.")); - case WSAEPROTOTYPE: - return(_T("The specified port is the wrong type for this socket.")); - case WSAESOCKTNOSUPPORT: - return(_T("The specified socket type is not supported in this address family.")); - } - return(_T("")); - } - else - return(_T("")); -} - -/***************************************************************************************/ -void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize) -{ - if (nNumberOfCharToCopy < nStringOutSize) - { - strncpy (szStringOut, szStringIn, nNumberOfCharToCopy); - szStringOut[nNumberOfCharToCopy] = '\0'; - } - else - { - strncpy (szStringOut, szStringIn, nStringOutSize - 1); - szStringOut[nStringOutSize - 1] = '\0'; - } -} - diff --git a/motorApp/NewportSrc/Socket.h b/motorApp/NewportSrc/Socket.h deleted file mode 100644 index 67e2f69c..00000000 --- a/motorApp/NewportSrc/Socket.h +++ /dev/null @@ -1,14 +0,0 @@ -/*/////////////////////////////////////////////////////////////////////////////// - * Socket.h - */ - -#ifdef _WIN -#include // MFC socket extensions -#endif - -int ConnectToServer (char *Ip_Address, int Ip_Port, double TimeOut); -void SetTCPTimeout (int SocketID, double Timeout); -void SendAndReceive(int socketID, char sSendString[], char sReturnString[], int iReturnStringSize); -void CloseSocket (int SocketID); -char * GetError (int SocketID); -void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize); diff --git a/motorApp/NewportSrc/XPSAsynInterpose.c b/motorApp/NewportSrc/XPSAsynInterpose.c deleted file mode 100644 index a63dbd80..00000000 --- a/motorApp/NewportSrc/XPSAsynInterpose.c +++ /dev/null @@ -1,151 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef struct { - XPSCommand command; - char *commandString; -} XPSCommandStruct; - -static XPSCommandStruct XPSCommands[XPS_NUM_PARAMS] = { - {minJerkTime, "XPS_MIN_JERK"}, - {maxJerkTime, "XPS_MAX_JERK"}, - {XPSStatus, "XPS_STATUS"} -}; - -typedef struct { - char *portName; - asynInterface drvUser; - asynDrvUser *drvUserPrev; - void *drvUserPrevPvt; -} XPSInterposePvt; - -static asynStatus drvUserCreate (void *drvPvt, asynUser *pasynUser, - const char *drvInfo, - const char **pptypeName, size_t *psize); -static asynStatus drvUserGetType (void *drvPvt, asynUser *pasynUser, - const char **pptypeName, size_t *psize); -static asynStatus drvUserDestroy (void *drvPvt, asynUser *pasynUser); - - - -static asynDrvUser XPSDrvUser = { - drvUserCreate, - drvUserGetType, - drvUserDestroy -}; - -int XPSInterpose(const char *portName) -{ - XPSInterposePvt *pPvt; - asynInterface *drvUserPrev; - asynStatus status; - - pPvt = callocMustSucceed(1, sizeof(*pPvt), "XPSInterpose"); - pPvt->portName = epicsStrDup(portName); - - pPvt->drvUser.interfaceType = asynDrvUserType; - pPvt->drvUser.pinterface = (void *)&XPSDrvUser; - pPvt->drvUser.drvPvt = pPvt; - - status = pasynManager->interposeInterface(portName, -1, &pPvt->drvUser, &drvUserPrev); - if (status != asynSuccess) { - errlogPrintf("XPSInterpose ERROR: calling interpose interface.\n"); - return -1; - } - pPvt->drvUserPrev = drvUserPrev->pinterface; - pPvt->drvUserPrevPvt = drvUserPrev->drvPvt; - return(asynSuccess); -} - - -/* asynDrvUser routines */ -static asynStatus drvUserCreate(void *drvPvt, asynUser *pasynUser, - const char *drvInfo, - const char **pptypeName, size_t *psize) -{ - XPSInterposePvt *pPvt = (XPSInterposePvt *) drvPvt; - int i; - char *pstring; - int ncommands = sizeof(XPSCommands)/sizeof(XPSCommands[0]); - - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "XPSInterpose::drvUserCreate, drvInfo=%s, pptypeName=%p, psize=%p, pasynUser=%p\n", - drvInfo, pptypeName, psize, pasynUser); - - for (i=0; i < ncommands; i++) { - pstring = XPSCommands[i].commandString; - if (epicsStrCaseCmp(drvInfo, pstring) == 0) { - break; - } - } - if (i < ncommands) { - pasynUser->reason = XPSCommands[i].command; - if (pptypeName) { - *pptypeName = epicsStrDup(pstring); - } - if (psize) { - *psize = sizeof(XPSCommands[i].command); - } - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "XPSInterpose::drvUserCreate, command=%s\n", pstring); - return(asynSuccess); - } else { - /* This command is not recognized, call the previous driver's routine */ - return(pPvt->drvUserPrev->create(pPvt->drvUserPrevPvt, pasynUser, drvInfo, pptypeName, psize)); - } -} - -static asynStatus drvUserGetType(void *drvPvt, asynUser *pasynUser, - const char **pptypeName, size_t *psize) -{ - XPSInterposePvt *pPvt = (XPSInterposePvt *) drvPvt; - XPSCommand command = pasynUser->reason; - - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "XPSInterpose::drvUserGetType entered"); - - if ((command >= minJerkTime) && - (command <= maxJerkTime)) { - *pptypeName = NULL; - *psize = 0; - if (pptypeName) - *pptypeName = epicsStrDup(XPSCommands[command-MOTOR_AXIS_NUM_PARAMS].commandString); - if (psize) *psize = sizeof(command); - return(asynSuccess); - } else { - return(pPvt->drvUserPrev->getType(pPvt->drvUserPrevPvt, pasynUser, - pptypeName, psize)); - } -} - -static asynStatus drvUserDestroy(void *drvPvt, asynUser *pasynUser) -{ - XPSInterposePvt *pPvt = (XPSInterposePvt *) drvPvt; - - return(pPvt->drvUserPrev->destroy(pPvt->drvUserPrevPvt, pasynUser)); -} - -static const iocshArg XPSInterposeArg0 = {"Port Name", iocshArgString}; -static const iocshArg * const XPSInterposeArgs[1] = {&XPSInterposeArg0}; - -static const iocshFuncDef XPSInterposeDef = {"XPSInterpose", 1, XPSInterposeArgs}; - -static void XPSInterposeCallFunc(const iocshArgBuf *args) -{ - XPSInterpose(args[0].sval); -} - - -static void XPSInterposeRegister(void) -{ - iocshRegister(&XPSInterposeDef, XPSInterposeCallFunc); -} - -epicsExportRegistrar(XPSInterposeRegister); diff --git a/motorApp/NewportSrc/XPSAsynInterpose.h b/motorApp/NewportSrc/XPSAsynInterpose.h deleted file mode 100644 index aafd500f..00000000 --- a/motorApp/NewportSrc/XPSAsynInterpose.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "motor_interface.h" - -typedef enum { - minJerkTime = MOTOR_AXIS_NUM_PARAMS, - maxJerkTime, - XPSStatus -} XPSCommand; - -#define XPS_NUM_PARAMS 3 - diff --git a/motorApp/NewportSrc/XPSAxis.cpp b/motorApp/NewportSrc/XPSAxis.cpp deleted file mode 100644 index 4eb3bcba..00000000 --- a/motorApp/NewportSrc/XPSAxis.cpp +++ /dev/null @@ -1,1745 +0,0 @@ -/* -FILENAME... XPSMotorDriver.cpp -USAGE... Newport XPS EPICS asyn motor device driver - -*/ - -/* -Original Author: Mark Rivers -*/ - -/* -Copyright (c) 2005 University of Chicago and the Regents of the University of -California. All rights reserved. - -synApps is distributed subject to the following license conditions: -SOFTWARE LICENSE AGREEMENT -Software: synApps -Versions: Release 4-5 and higher. - - 1. The "Software", below, refers to synApps (in either source code, or - binary form and accompanying documentation). Each licensee is addressed - as "you" or "Licensee." - - 2. The copyright holders shown above and their third-party licensors hereby - grant Licensee a royalty-free nonexclusive license, subject to the - limitations stated herein and U.S. Government license rights. - - 3. You may modify and make a copy or copies of the Software for use within - your organization, if you meet the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement. - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy. - - 4. You may modify a copy or copies of the Software or any portion of it, thus - forming a work based on the Software, and distribute copies of such work - outside your organization, if you meet all of the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement; - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy; - 3. Modified copies and works based on the Software must carry - prominent notices stating that you changed specified portions of - the Software. - - 5. Portions of the Software resulted from work developed under a - U.S. Government contract and are subject to the following license: - the Government is granted for itself and others acting on its behalf a - paid-up, nonexclusive, irrevocable worldwide license in this computer - software to reproduce, prepare derivative works, and perform publicly and - display publicly. - - 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF - ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED - STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) - DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY - OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE - SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT - INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL - FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE - CORRECTED. - - 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR - THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF - ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, - CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, - INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY - REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF - CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, - EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH - LOSS OR DAMAGES. -*/ - -#include -#include -#include -#include - -#include -using std::cout; -using std::endl; - -#include -#include -#include -#include -#include - -#include "asynMotorController.h" -#include "asynMotorAxis.h" -#include -#include "XPSController.h" -#include "XPS_C8_drivers.h" -#include "asynOctetSocket.h" -#include "XPSAxis.h" - -#define XPSC8_END_OF_RUN_MINUS 0x80000100 -#define XPSC8_END_OF_RUN_PLUS 0x80000200 -#define XPSC8_ZM_HIGH_LEVEL 0x00000004 -/** Deadband to use for the velocity comparison with zero. */ -#define XPS_VELOCITY_DEADBAND 0.0000001 - -static const char *driverName = "XPSAxis"; - -typedef enum { none, positionMove, velocityMove, homeReverseMove, homeForwardsMove } moveType; - -/** Struct for a list of strings describing the different corrector types possible on the XPS.*/ -typedef struct { - char *PIPosition; - char *PIDFFVelocity; - char *PIDFFAcceleration; - char *PIDDualFFVoltage; - char *NoCorrector; -} CorrectorTypes_t; - -const static CorrectorTypes_t CorrectorTypes = { - "PositionerCorrectorPIPosition", - "PositionerCorrectorPIDFFVelocity", - "PositionerCorrectorPIDFFAcceleration", - "PositionerCorrectorPIDDualFFVoltage", - "NoCorrector" -}; - -static void shutdownCallback(void *pPvt) -{ - XPSController *pC = static_cast(pPvt); - - pC->lock(); - pC->shuttingDown_ = 1; - pC->unlock(); -} - -// These are the XPSAxis:: methods -XPSAxis::XPSAxis(XPSController *pC, int axisNo, const char *positionerName, double stepSize) - : asynMotorAxis(pC, axisNo), - pC_(pC) -{ - static const char *functionName = "XPSAxis"; - char *index; - double minJerkTime, maxJerkTime; - - moveSocket_ = TCP_ConnectToServer(pC_->IPAddress_, pC->IPPort_, XPS_POLL_TIMEOUT); - if (moveSocket_ < 0) { - printf("%s:%s: error calling TCP_ConnectToServer for move socket\n", - driverName, functionName); - } - /* Set the poll rate on the moveSocket to a negative number, which means that SendAndReceive should do only a write, no read */ - TCP_SetTimeout(moveSocket_, -0.1); - pollSocket_ = pC_->pollSocket_; - - /* Set an EPICS exit handler that will shut down polling before asyn kills the IP sockets */ - epicsAtExit(shutdownCallback, pC_); - - setIntegerParam(pC_->motorStatusGainSupport_, 1); - setIntegerParam(pC_->motorStatusHasEncoder_, 1); - setDoubleParam(pC_->motorPGain_, xpsCorrectorInfo_.KP); - setDoubleParam(pC_->motorIGain_, xpsCorrectorInfo_.KI); - setDoubleParam(pC_->motorDGain_, xpsCorrectorInfo_.KD); - callParamCallbacks(); - /* Initialise deferred move flags. */ - deferredRelative_ = false; - deferredPosition_ = 0.0; - /* Disable deferred move for the axis. Should not cause move of this axis - if other axes in same group do deferred move. */ - deferredMove_ = false; - - // Assume axis is not moving - moving_ = false; - - index = (char *)strchr(positionerName, '.'); - if (index == NULL) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: positionerName must be of form group.positioner = %s\n", - driverName, functionName, positionerName); - } - positionerName_ = epicsStrDup(positionerName); - groupName_ = epicsStrDup(positionerName); - index = strchr(groupName_, '.'); - if (index != NULL) *index = '\0'; /* Terminate group name at place of '.' */ - - stepSize_ = stepSize; - /* Read some information from the controller for this axis */ - PositionerSGammaParametersGet(pollSocket_, - positionerName_, - &velocity_, - &accel_, - &minJerkTime, - &maxJerkTime); - setDoubleParam(pC_->XPSMinJerk_, minJerkTime); - setDoubleParam(pC_->XPSMaxJerk_, maxJerkTime); - - /* NOTE: this will require PID to be allowed to be set greater than 1 in motor record. */ - /* And we need to implement this in Asyn layer. */ - getPID(); - - /* Wake up the poller task which will make it do a poll, - * updating values for this axis to use the new resolution (stepSize_) */ - pC_->wakeupPoller(); - -} - - -void XPSAxis::report(FILE *fp, int details) -{ - fprintf(fp, " axis %d\n" - " name = %s\n" - " step size = %g\n" - " poll socket = %d, moveSocket = %d\n" - " status = %d\n", - axisNo_, - positionerName_, - stepSize_, - pollSocket_, moveSocket_, - axisStatus_); -} - - -asynStatus XPSAxis::move(double position, int relative, double min_velocity, double max_velocity, double acceleration) -{ - char errorString[100]; - double deviceUnits; - int status; - double minJerk, maxJerk; - static const char *functionName = "move"; - - pC_->getDoubleParam(axisNo_, pC_->XPSMinJerk_, &minJerk); - pC_->getDoubleParam(axisNo_, pC_->XPSMaxJerk_, &maxJerk); - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: Set XPS %s, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f, minJerk=%f, maxJerk=%f\n", - driverName, functionName, pC_->portName, axisNo_, position, min_velocity, max_velocity, acceleration, minJerk, maxJerk); - - /* Look at the last poll value of the positioner status. If it is disabled, then enable it */ - /* This can be disabled by calling XPSDisableAutoEnable() at the IOC shell.*/ - if (axisStatus_ >= 20 && axisStatus_ <= 36) { - if (pC_->autoEnable_) { - status = GroupMotionEnable(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: motorAxisMove[%s,%d]: error performing GroupMotionEnable %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - } else { - //Return error if a move is attempted and auto enable is turned off. - return asynError; - } - } - - status = PositionerSGammaParametersSet(pollSocket_, - positionerName_, - max_velocity*stepSize_, - acceleration*stepSize_, - minJerk, - maxJerk); - if (status != 0) { - ErrorStringGet(pollSocket_, status, errorString); - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing PositionerSGammaParametersSet[%s,%d] %d: %s\n", - driverName, functionName, pC_->portName, axisNo_, status, errorString); - return asynError; - } - - deviceUnits = position * stepSize_; - if (relative) { - if (pC_->movesDeferred_ == 0) { - status = GroupMoveRelative(moveSocket_, - positionerName_, - 1, - &deviceUnits); - if (status != 0 && status != -27) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupMoveRelative[%s,%d] %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move! */ - return asynError; - } - moving_ = true; - } else { - deferredPosition_ = deviceUnits; - deferredMove_ = true; - deferredRelative_ = (relative != 0); - } - } else { - if (pC_->movesDeferred_ == 0) { - status = GroupMoveAbsolute(moveSocket_, - positionerName_, - 1, - &deviceUnits); - if (status != 0 && status != -27) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupMoveAbsolute[%s,%d] %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move!*/ - return asynError; - } - moving_ = true; - } else { - deferredPosition_ = deviceUnits; - deferredMove_ = true; - deferredRelative_ = (relative != 0); - } - } - - return asynSuccess; -} - -asynStatus XPSAxis::home(double min_velocity, double max_velocity, double acceleration, int forwards) -{ - int status; - int groupStatus; - char errorBuffer[100]; - static const char *functionName = "home"; - - /* Find out if any axes are in the same group, and set referencing mode for them all.*/ - XPSAxis *pTempAxis = NULL; - for (int axis=0; axisnumAxes_; axis++) { - pTempAxis = pC_->getAxis(axis); - if (strcmp(groupName_, pTempAxis->groupName_) == 0) { - pTempAxis->referencingMode_ = 0; - } - } - - status = GroupStatusGet(pollSocket_, groupName_, &groupStatus); - /* The XPS won't allow a home command if the group is in the Ready state - * If the group is Ready, then make it not Ready */ - if (groupStatus >= 10 && groupStatus <= 18) { - status = GroupKill(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupKill error=%s\n", - driverName, functionName, pC_->portName, axisNo_, getXPSError(status, errorBuffer)); - return asynError; - } - } - status = GroupStatusGet(pollSocket_, groupName_, &groupStatus); - /* If axis not initialized, then initialize it */ - if ((groupStatus >= 0 && groupStatus <= 9) || (groupStatus == 50) || (groupStatus == 63)) { - status = GroupInitialize(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupInitialize error=%s\n", - driverName, functionName, pC_->portName, axisNo_, getXPSError(status, errorBuffer)); - return asynError; - } - } - status = GroupHomeSearch(moveSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupHomeSearch error=%s\n", - driverName, functionName, pC_->portName, axisNo_, getXPSError(status, errorBuffer)); - return asynError; - } - moving_ = true; - - setIntegerParam(pC_->motorStatusProblem_, 0); - - return asynSuccess; -} - - -asynStatus XPSAxis::moveVelocity(double min_velocity, double max_velocity, double acceleration) -{ - int status; - double deviceVelocity, deviceAcceleration; - static const char *functionName = "moveVelocity"; - - status = GroupJogModeEnable(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupJogModeEnable error=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - deviceVelocity = max_velocity * stepSize_; - deviceAcceleration = acceleration * stepSize_; - status = GroupJogParametersSet(moveSocket_, positionerName_, 1, &deviceVelocity, &deviceAcceleration); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupJogParametersSet error=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - moving_ = true; - - return asynSuccess; -} - -asynStatus XPSAxis::setPosition(double position) -{ - XPSAxis *pAxis; - int status=0; - int axisIndex; - int axisIndexInGrp; - int axesInGroup; - double positions[XPS_MAX_AXES]; - static const char *functionName = "setPosition"; - - - /* If the user has disabled setting the controller position, skip this.*/ - if (!pC_->enableSetPosition_) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS set position is disabled. Enable it by setting enableSetPosition parameter in XPSCreateController).\n", - driverName, functionName); - return asynError; - } - /* Test if this axis is in a XPS group.*/ - axesInGroup = isInGroup(); - if (axesInGroup>1) { - /* We are in a group, so we need to read the positions of all the axes in the group, - kill the group, and set all the positions in the group using referencing mode. - We read the positions seperately, rather than in one command, because we can't assume - that the ordering is the same in the XPS as in the driver.*/ - for (axisIndex=0; axisIndexnumAxes_; axisIndex++) { - pAxis = pC_->getAxis(axisIndex); - status = GroupPositionCurrentGet(pollSocket_, - pAxis->positionerName_, - 1, - &positions[axisIndex]); - } - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupPositionCurrentGet(%s,%d). Aborting set position. XPS API Error: %d.\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - status = GroupKill(pollSocket_, groupName_); - status = GroupInitialize(pollSocket_, groupName_); - if (status != 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupKill/GroupInitialize(%s,%d). Aborting set position. XPS API Error: %d.\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - /* Wait after axis initialisation (we don't want to set position immediately after - * initialisation because the stage can oscillate slightly). */ - epicsThreadSleep(pC_->setPositionSettlingTime_); - - status = GroupReferencingStart(pollSocket_, groupName_); - axisIndexInGrp = 0; - /* Set positions for all axes in the group using the cached values. */ - for (axisIndex=0; axisIndexnumAxes_; axisIndex++) { - pAxis = pC_->getAxis(axisIndex); - if (!strcmp(groupName_, pAxis->groupName_)) { - /* But skip the current axis, because we do this just after the loop.*/ - if (strcmp(positionerName_, pAxis->positionerName_)) { - status = GroupReferencingActionExecute(pollSocket_, - pAxis->positionerName_, - "SetPosition", - "None", - positions[axisIndexInGrp]); - } - ++axisIndexInGrp; - } - } - /* Now reset the position of the axis we are interested in, using the argument passed into this function.*/ - status = GroupReferencingActionExecute(pollSocket_, - positionerName_, - "SetPosition", - "None", - position*(stepSize_)); - /* Stop referencing, then we are homed on all axes in group.*/ - /*Some types of XPS axes (eg. spindle) need a sleep here, otherwise - the axis can be left in referencing mode.*/ - epicsThreadSleep(0.05); - status = GroupReferencingStop(pollSocket_, - groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing referencing set position (%s,%d). XPS API Error: %d.\n", - driverName, functionName, pC_->portName, axisNo_, status); - } - } else { - /* We are not in a group, so we just need to use the XPS - referencing mode to set the position.*/ - status = GroupKill(pollSocket_, groupName_); - status = GroupInitialize(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupKill/GroupInitialize(%s,%d). XPS API Error: %d. Aborting set position.\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - /* Wait after axis initialisation (we don't want to set position immediately after - initialisation because the stage can oscillate slightly).*/ - epicsThreadSleep(pC_->setPositionSettlingTime_); - - status = GroupReferencingStart(pollSocket_, - groupName_); - status = GroupReferencingActionExecute(pollSocket_, - positionerName_, - "SetPosition", - "None", - position*(stepSize_)); - status = GroupReferencingStop(pollSocket_, - groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error performing referencing set position (%s,%d). XPS API Error: %d.", - driverName, functionName, pC_->portName, axisNo_, status); - } - } - return asynSuccess; -} - -asynStatus XPSAxis::stop(double acceleration) -{ - int status; - static const char *functionName = "stopAxis"; - - /* We need to read the status, because a jog is stopped differently from a move */ - status = GroupStatusGet(pollSocket_, groupName_, &axisStatus_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupStatusGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - if ((axisStatus_ == 44) || (axisStatus_ == 45) || (axisStatus_ == 47)) { - status = GroupMoveAbort(moveSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupMoveAbort status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - GroupMoveAbort(moveSocket_, groupName_); - return asynError; - } - } - - if (axisStatus_ == 43) { - status = GroupKill(moveSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupKill status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - } - - /* Clear defer move flag for this axis. */ - deferredMove_ = false; - - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: XPS %s, axis %d stop with accel=%f\n", - driverName, functionName, pC_->portName, axisNo_, acceleration); - - return asynSuccess; -} - -asynStatus XPSAxis::poll(bool *moving) -{ - int status; - char readResponse[25]; - char statusString[MAX_MESSAGE_LEN] = {0}; - static const char *functionName = "poll"; - - status = GroupStatusGet(pollSocket_, - groupName_, - &axisStatus_); - if (!status) { - status = GroupStatusStringGet(pollSocket_, - axisStatus_, - statusString); - } - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupStatusGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: [%s,%d]: %s axisStatus=%d, statusString=%s\n", - driverName, functionName, pC_->portName, axisNo_, positionerName_, axisStatus_, statusString); - /* Set the status */ - setIntegerParam(pC_->XPSStatus_, axisStatus_); - setStringParam(pC_->XPSStatusString_, statusString); - - /* Previously we set the motion done flag by seeing if axisStatus_ was >=43 && <= 48, which means moving, - * homing, jogging, etc. However, this information is about the group, not the axis, so if one - * motor in the group was moving, then they all appeared to be moving. This is not what we want, because - * the EPICS motor record required the first motor to stop before the second motor could be moved. - * Instead we look for a response on the moveSocket_ to see when the motor motion was complete. - NOTE: by default this mode is disabled. To enable it use the XPSController::enableMovingMode() function.*/ - - /* If the group is not moving then the axis is not moving */ - if ((axisStatus_ < 43) || (axisStatus_ > 48)) { - moving_ = false; - } else { - if (!pC_->enableMovingMode_) { - moving_ = true; - } - } - - /* If the axis is moving then read from the moveSocket to see if it is done - * We currently assume the move is complete if we get any response, we don't - * check the actual response. */ - if (pC_->enableMovingMode_) { - if (moving_) { - status = ReadXPSSocket(moveSocket_, readResponse, sizeof(readResponse), 0); - if (status < 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling ReadXPSSocket status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - if (status > 0) { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: [%s,%d]: readXPSSocket returned nRead=%d, [%s]\n", - driverName, functionName, pC_->portName, axisNo_, status, readResponse); - status = 0; - moving_ = false; - } - } - } - - /* Set the axis done parameter */ - *moving = moving_; - if (deferredMove_) *moving = true; - setIntegerParam(pC_->motorStatusDone_, *moving?0:1); - - /*Read the controller software limits in case these have been changed by a TCL script.*/ - status = PositionerUserTravelLimitsGet(pollSocket_, positionerName_, &lowLimit_, &highLimit_); - if (status == 0) { - setDoubleParam(pC_->motorHighLimit_, (highLimit_/stepSize_)); - setDoubleParam(pC_->motorLowLimit_, (lowLimit_/stepSize_)); - } - - /* Set the ATHM signal.*/ - if (axisStatus_ == 11) { - if (referencingMode_ == 0) { - setIntegerParam(pC_->motorStatusHome_, 1); - } else { - setIntegerParam(pC_->motorStatusHome_, 0); - } - } else { - setIntegerParam(pC_->motorStatusHome_, 0); - } - - /* Set the HOMED signal.*/ - if ((axisStatus_ >= 10 && axisStatus_ <= 21) || - (axisStatus_ == 44) || (axisStatus_ == 45) || (axisStatus_ == 47)) { - if (referencingMode_ == 0) { - setIntegerParam(pC_->motorStatusHomed_, 1); - } else { - setIntegerParam(pC_->motorStatusHomed_, 0); - } - } else { - setIntegerParam(pC_->motorStatusHomed_, 0); - } - - /* Test for following error, and set appropriate param. */ - if ((axisStatus_ == 21 || axisStatus_ == 22) || - (axisStatus_ >= 24 && axisStatus_ <= 26) || - (axisStatus_ == 28 || axisStatus_ == 35)) { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: [%s,%d]: in following error. XPS State Code: %d\n", - driverName, functionName, pC_->portName, axisNo_, axisStatus_); - setIntegerParam(pC_->motorStatusFollowingError_, 1); - } else { - setIntegerParam(pC_->motorStatusFollowingError_, 0); - } - - /*Test for states that mean we cannot move an axis (disabled, uninitialised, etc.) - and set problem bit in MSTA.*/ - if ((axisStatus_ < 10) || ((axisStatus_ >= 20) && (axisStatus_ <= 42)) || - (axisStatus_ == 50) || (axisStatus_ == 64)) { - if ( (pC_->noDisableError_ > 0) && (axisStatus_==20) ) { - setIntegerParam(pC_->motorStatusProblem_, 0); - } else { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: [%s,%d]: in unintialised/disabled/not referenced. XPS State Code: %d\n", - driverName, functionName, pC_->portName, axisNo_, axisStatus_); - setIntegerParam(pC_->motorStatusProblem_, 1); - } - } else { - setIntegerParam(pC_->motorStatusProblem_, 0); - } - - status = GroupPositionCurrentGet(pollSocket_, - positionerName_, - 1, - &encoderPosition_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupPositionCurrentGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - setDoubleParam(pC_->motorEncoderPosition_, (encoderPosition_/stepSize_)); - - status = GroupPositionSetpointGet(pollSocket_, - positionerName_, - 1, - &setpointPosition_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupPositionSetpointGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - setDoubleParam(pC_->motorPosition_, (setpointPosition_/stepSize_)); - - status = PositionerErrorGet(pollSocket_, - positionerName_, - &positionerError_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerErrorGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - /* These are hard limits */ - if (positionerError_ & XPSC8_END_OF_RUN_PLUS) { - setIntegerParam(pC_->motorStatusHighLimit_, 1); - } else { - setIntegerParam(pC_->motorStatusHighLimit_, 0); - } - if (positionerError_ & XPSC8_END_OF_RUN_MINUS) { - setIntegerParam(pC_->motorStatusLowLimit_, 1); - } else { - setIntegerParam(pC_->motorStatusLowLimit_, 0); - } - - /* Read the current velocity and use it set motor direction and moving flag. */ - status = GroupVelocityCurrentGet(pollSocket_, - positionerName_, - 1, - ¤tVelocity_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupPositionVelocityGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - setIntegerParam(pC_->motorStatusDirection_, (currentVelocity_ > XPS_VELOCITY_DEADBAND)); - setIntegerParam(pC_->motorStatusMoving_, (fabs(currentVelocity_) > XPS_VELOCITY_DEADBAND)); - - done: - setIntegerParam(pC_->motorStatusCommsError_, status ? 1 : 0); - callParamCallbacks(); - return status ? asynError : asynSuccess; -} - -asynStatus XPSAxis::setLowLimit(double value) -{ - double deviceValue; - int status; - static const char *functionName = "setLowLimit"; - - deviceValue = value*stepSize_; - /* We need to read the current highLimit because otherwise we could be setting it to an invalid value */ - status = PositionerUserTravelLimitsGet(pollSocket_, - positionerName_, - &lowLimit_, &highLimit_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error performing PositionerUserTravelLimitsGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - status = PositionerUserTravelLimitsSet(pollSocket_, - positionerName_, - deviceValue, highLimit_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error performing PositionerUserTravelLimitsSet for lowLim=%f status=%d\n", - driverName, functionName, pC_->portName, axisNo_, deviceValue, status); - goto done; - } - lowLimit_ = deviceValue; - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: Set XPS %s, axis %d low limit to %f\n", - driverName, functionName, pC_->portName, axisNo_, deviceValue); - - done: - return (asynStatus)status; -} - - -asynStatus XPSAxis::setHighLimit(double value) -{ - double deviceValue; - int status; - static const char *functionName = "setHighLimit"; - - deviceValue = value*stepSize_; - /* We need to read the current highLimit because otherwise we could be setting it to an invalid value */ - status = PositionerUserTravelLimitsGet(pollSocket_, - positionerName_, - &lowLimit_, &highLimit_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error performing PositionerUserTravelLimitsGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - goto done; - } - status = PositionerUserTravelLimitsSet(pollSocket_, - positionerName_, - lowLimit_, deviceValue); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error performing PositionerUserTravelLimitsSet for highLim=%f status=%d\n", - driverName, functionName, pC_->portName, axisNo_, deviceValue, status); - goto done; - } - highLimit_ = deviceValue; - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: Set XPS %s, axis %d high limit to %f\n", - driverName, functionName, pC_->portName, axisNo_, deviceValue); - - done: - return (asynStatus)status; -} - - -asynStatus XPSAxis::setPGain(double value) -{ - return setPID(&value, 0); -} - - -asynStatus XPSAxis::setIGain(double value) -{ - return setPID(&value, 1); -} - - -asynStatus XPSAxis::setDGain(double value) -{ - return setPID(&value, 2); -} - - -asynStatus XPSAxis::setClosedLoop(bool closedLoop) -{ - int status; - static const char *functionName = "setClosedLoop"; - - if (closedLoop) { - status = GroupMotionEnable(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupMotionEnable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - } else { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: set XPS %s, axis %d closed loop enable\n", - driverName, functionName, pC_->portName, axisNo_); - } - } else { - status = GroupMotionDisable(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling GroupMotionDisable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - } else { - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: motorAxisSetInteger set XPS %s, axis %d closed loop disable\n", - driverName, functionName, pC_->portName, axisNo_); - } - } - return (asynStatus)status; -} - -double XPSAxis::motorRecPositionToXPSPosition(double motorRecPosition) -{ - int direction; - double offset, resolution, XPSPosition; - - pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); - pC_->getDoubleParam (axisNo_, pC_->motorRecOffset_, &offset); - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - - if (direction != 0) resolution = -resolution; - if (resolution == 0) resolution = 1; - XPSPosition = (motorRecPosition - offset) / resolution * stepSize_; - return XPSPosition; -} - -double XPSAxis::XPSPositionToMotorRecPosition(double XPSPosition) -{ - int direction; - double offset, resolution, motorRecPosition; - - pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); - pC_->getDoubleParam (axisNo_, pC_->motorRecOffset_, &offset); - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - - if (direction != 0) resolution = -resolution; - if (stepSize_ == 0) stepSize_ = 1; - motorRecPosition = XPSPosition * resolution / stepSize_ + offset; - return motorRecPosition; -} - -double XPSAxis::motorRecStepToXPSStep(double motorRecStep) -{ - int direction; - double resolution, XPSStep; - - pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - - if (direction != 0) resolution = -resolution; - if (resolution == 0) resolution = 1; - XPSStep = motorRecStep / resolution * stepSize_; - return XPSStep; -} - -double XPSAxis::XPSStepToMotorRecStep(double XPSStep) -{ - int direction; - double resolution, motorRecStep; - - pC_->getDoubleParam (axisNo_, pC_->motorRecResolution_, &resolution); - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - - if (direction != 0) resolution = -resolution; - if (stepSize_ == 0) stepSize_ = 1; - motorRecStep = XPSStep * resolution / stepSize_; - return motorRecStep; -} - -asynStatus XPSAxis::setPositionCompare() -{ - int mode; - double minPosition, maxPosition, stepSize, pulseWidth, settlingTime; - int itemp; - int direction; - int status; - static const char *functionName = "setPositionCompare"; - - pC_->getIntegerParam(axisNo_, pC_->XPSPositionCompareMode_, &mode); - pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareMinPosition_, &minPosition); - pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareMaxPosition_, &maxPosition); - pC_->getDoubleParam (axisNo_, pC_->XPSPositionCompareStepSize_, &stepSize); - pC_->getIntegerParam(axisNo_, pC_->XPSPositionComparePulseWidth_, &itemp); - pulseWidth = positionComparePulseWidths[itemp]; - pC_->getIntegerParam(axisNo_, pC_->XPSPositionCompareSettlingTime_, &itemp); - settlingTime = positionCompareSettlingTimes[itemp]; - - // minPosition and maxPosition are in motor record units. Convert to XPS units - minPosition = motorRecPositionToXPSPosition(minPosition); - maxPosition = motorRecPositionToXPSPosition(maxPosition); - stepSize = fabs(motorRecStepToXPSStep(stepSize)); - - // Swap max and min positions if needed - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - if (direction != 0) { - double temp=maxPosition; - maxPosition = minPosition; - minPosition = temp; - } - - // Disable the position compare so we can set parameters - status = PositionerPositionCompareDisable(pollSocket_, positionerName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareDisable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - status = PositionerPositionComparePulseParametersSet(pollSocket_, positionerName_, pulseWidth, settlingTime); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionComparePulseParametersSet" - " status=%d, pulseWidth=%f, settlingTime=%f\n", - driverName, functionName, pC_->portName, axisNo_, status, pulseWidth, settlingTime); - return asynError; - } - switch (mode) { - case XPSPositionCompareModeDisable: - break; - - case XPSPositionCompareModePulse: - status = PositionerPositionCompareSet(pollSocket_, positionerName_, minPosition, maxPosition, stepSize); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareSet" - " status=%d, minPosition=%f, maxPosition=%f, stepSize=%f\n", - driverName, functionName, pC_->portName, axisNo_, status, minPosition, maxPosition, stepSize); - return asynError; - } - status = PositionerPositionCompareEnable(pollSocket_, positionerName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareEnable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - break; - - case XPSPositionCompareModeAquadBWindowed: - status = PositionerPositionCompareAquadBWindowedSet(pollSocket_, positionerName_, minPosition, maxPosition); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareAquadBWindowedSet" - " status=%d, minPosition=%f, maxPosition=%f\n", - driverName, functionName, pC_->portName, axisNo_, status, minPosition, maxPosition); - return asynError; - } - status = PositionerPositionCompareEnable(pollSocket_, positionerName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareEnable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - break; - - case XPSPositionCompareModeAquadBAlways: - status = PositionerPositionCompareAquadBAlwaysEnable(pollSocket_, positionerName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionCompareAquadBAlwaysEnable status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - break; - } - - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: set XPS %s, axis %d positionCompare set and enable\n", - driverName, functionName, pC_->portName, axisNo_); - - return asynSuccess; -} - -asynStatus XPSAxis::getPositionCompare() -{ - bool enable; - int status; - int i; - int direction; - double minPosition=0, maxPosition=0, stepSize=0, pulseWidth, settlingTime; - static const char *functionName = "getPositionCompare"; - - pC_->getIntegerParam(axisNo_, pC_->motorRecDirection_, &direction); - - status = PositionerPositionComparePulseParametersGet(pollSocket_, positionerName_, &pulseWidth, &settlingTime); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: [%s,%d]: error calling PositionerPositionComparePulseParametersGet status=%d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - status = PositionerPositionCompareGet(pollSocket_, positionerName_, &minPosition, &maxPosition, &stepSize, &enable); - if (status == 0) { - // Swap max and min positions if needed - if (direction != 0) { - double temp=maxPosition; - maxPosition = minPosition; - minPosition = temp; - } -// setDoubleParam(pC_->XPSPositionCompareMinPosition_, XPSPositionToMotorRecPosition(minPosition)); -// setDoubleParam(pC_->XPSPositionCompareMaxPosition_, XPSPositionToMotorRecPosition(maxPosition)); - setDoubleParam(pC_->XPSPositionCompareStepSize_, fabs(XPSStepToMotorRecStep(stepSize))); - } - status = PositionerPositionCompareAquadBWindowedGet(pollSocket_, positionerName_, &minPosition, &maxPosition, &enable); - if (status == 0) { - // Swap max and min positions if needed - if (direction != 0) { - double temp=maxPosition; - maxPosition = minPosition; - minPosition = temp; - } -// setDoubleParam(pC_->XPSPositionCompareMinPosition_, XPSPositionToMotorRecPosition(minPosition)); -// setDoubleParam(pC_->XPSPositionCompareMaxPosition_, XPSPositionToMotorRecPosition(maxPosition)); - } - asynPrint(pasynUser_, ASYN_TRACE_FLOW, - "%s:%s: set XPS %s, axis %d " - " enable=%d, minPosition=%f, maxPosition=%f, stepSize=%f, pulseWidth=%f, settlingTime=%f\n", - driverName, functionName, pC_->portName, axisNo_, - enable, minPosition, maxPosition, stepSize, pulseWidth, settlingTime); - - for (i=0; iXPSPositionComparePulseWidth_, i); - for (i=0; iXPSPositionCompareSettlingTime_, i); - return asynSuccess; -} - -char *XPSAxis::getXPSError(int status, char *buffer) -{ - status = ErrorStringGet(pollSocket_, status, buffer); - return buffer; -} - -/** - * Test if axis is configured as an XPS single axis or a group. - * This is done by comparing cached group names. - * @return 1 if in group single group, or return the number of axes in the group. - */ -int XPSAxis::isInGroup() -{ - XPSAxis *pAxis; - int i; - int group=0; - - for(i=0; inumAxes_; i++) { - pAxis = pC_->getAxis(i); - if (!strcmp(groupName_, pAxis->groupName_)) { - ++group; - } - } - return group; -} - -/** - * Function to set the XPS controller PID parameters. - * @param pAxis Axis struct AXIS_HDL - * @param value The desired value of the parameter. - * @param pidoption Set to 0 for P, 1 for I and 2 for D. - * - * @return Zero if success, non-zero if error (and equal to XPS API error if error is from XPS). - */ -asynStatus XPSAxis::setPID(const double * value, int pidoption) -{ - int status = 0; - char correctorType[250] = {'\0'}; - static const char *functionName = "setPID"; - - /*The XPS function that we use to set the PID parameters is dependant on the - type of corrector in use for that axis.*/ - status = PositionerCorrectorTypeGet(pollSocket_, - positionerName_, - correctorType); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorTypeGet. XPS: %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - if (!strcmp(correctorType, CorrectorTypes.PIPosition)) { - /*Read the PID parameters first.*/ - status = PositionerCorrectorPIPositionGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIPositionGet. Aborting setting PID XPS: %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - /*Set the P, I or D parameter in the xpsCorrectorInfo struct.*/ - setPIDValue(value, pidoption); - - /*Now set the parameters in the XPS.*/ - status = PositionerCorrectorPIPositionSet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIPositionSet: %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFVelocity)) { - status = PositionerCorrectorPIDFFVelocityGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDFFVelocityGet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - setPIDValue(value, pidoption); - - status = PositionerCorrectorPIDFFVelocitySet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDFFVelocitySet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFAcceleration)) { - status = PositionerCorrectorPIDFFAccelerationGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDFFAccelerationGet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - setPIDValue(value, pidoption); - - status = PositionerCorrectorPIDFFAccelerationSet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDFFAccelerationSet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDDualFFVoltage)) { - status = PositionerCorrectorPIDDualFFVoltageGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDDualFFVoltageGet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - setPIDValue(value, pidoption); - - status = PositionerCorrectorPIDDualFFVoltageSet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorPIDDualFFVoltageSet. Aborting setting PID %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.NoCorrector)) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s:. XPS %s axis %d corrector type is %s. Cannot set PID.\n", - driverName, functionName, pC_->portName, axisNo_, correctorType); - return asynError; - } else { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s:. XPS %s axis %d not a valid corrector type: %s. Cannot set PID.\n", - driverName, functionName, pC_->portName, axisNo_, correctorType); - return asynError; - } - return asynSuccess; -} - -/** - * Function to read the PID values from the XPS (and any other XPS corrector info that is valid for the axis). - * The read values are set in the AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Zero if success, non-zero if error (and equal to XPS API error if error is from XPS). - */ -asynStatus XPSAxis::getPID() -{ - int status = 0; - char correctorType[250] = {'\0'}; - static const char *functionName = "getPID"; - - /* The XPS function that we use to set the PID parameters is dependant on the - type of corrector in use for that axis.*/ - status = PositionerCorrectorTypeGet(pollSocket_, - positionerName_, - correctorType); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: Error with PositionerCorrectorTypeGet. XPS: %s, Axis: %d, XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - if (!strcmp(correctorType, CorrectorTypes.PIPosition)) { - /*Read the PID parameters and set in pAxis.*/ - status = PositionerCorrectorPIPositionGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS %s, Axis: %d, Error with PositionerCorrectorPIPositionGet. XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFVelocity)) { - status = PositionerCorrectorPIDFFVelocityGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS %s, Axis: %d, Error with PositionerCorrectorPIDFFVelocityGet. XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFAcceleration)) { - status = PositionerCorrectorPIDFFAccelerationGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS %s, Axis: %d, Error with PositionerCorrectorPIDFFAccelerationGet. XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDDualFFVoltage)) { - status = PositionerCorrectorPIDDualFFVoltageGet(); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS %s, Axis: %d, Error with PositionerCorrectorPIDDualFFVoltageGet. XPS API Error: %d\n", - driverName, functionName, pC_->portName, axisNo_, status); - return asynError; - } - - } else if (!strcmp(correctorType, CorrectorTypes.NoCorrector)) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s:. XPS %s axis %d corrector type is %s. Cannot get PID.\n", - driverName, functionName, pC_->portName, axisNo_, correctorType); - return asynError; - } else { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s:. XPS %s axis %d not a valid corrector type: %s. Cannot set PID.\n", - driverName, functionName, pC_->portName, axisNo_, correctorType); - return asynError; - } - return asynSuccess; -} - -/** - * Set the P, I or D parameter in a xpsCorrectorInfo_t struct. - * @param xpsCorrectorInfo Pointer to a xpsCorrectorInfo_t struct. - * @param value The value to set. - * @param pidoption Set to 0 for P, 1 for I and 2 for D. - */ -asynStatus XPSAxis::setPIDValue(const double * value, int pidoption) -{ - static const char *functionName = "setPIDValue"; - - if ((pidoption < 0) || (pidoption > 2)) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, - "%s:%s: XPS %s axis %d pidoption out of range=%d\n", - driverName, functionName, pC_->portName, axisNo_, pidoption); - return asynError; - } else { - switch (pidoption) { - case 0: - xpsCorrectorInfo_.KP = *value; - break; - case 1: - xpsCorrectorInfo_.KI = *value; - break; - case 2: - xpsCorrectorInfo_.KD = *value; - break; - default: - /*Do nothing.*/ - break; - } - } - return asynSuccess; -} - - - -/** - * Wrapper function for PositionerCorrectorPIPositionGet. - * It will set parameters in this object.. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIPositionGet() -{ - int status; - status = ::PositionerCorrectorPIPositionGet(pollSocket_, - positionerName_, - &xpsCorrectorInfo_.ClosedLoopStatus, - &xpsCorrectorInfo_.KP, - &xpsCorrectorInfo_.KI, - &xpsCorrectorInfo_.IntegrationTime); - return status ? asynError : asynSuccess; -} - -/** - * Wrapper function for PositionerCorrectorPIDFFVelocityGet. - * It will set parameters in this object.. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIDFFVelocityGet() -{ - int status; - status = ::PositionerCorrectorPIDFFVelocityGet(pollSocket_, - positionerName_, - &xpsCorrectorInfo_.ClosedLoopStatus, - &xpsCorrectorInfo_.KP, - &xpsCorrectorInfo_.KI, - &xpsCorrectorInfo_.KD, - &xpsCorrectorInfo_.KS, - &xpsCorrectorInfo_.IntegrationTime, - &xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo_.GKP, - &xpsCorrectorInfo_.GKI, - &xpsCorrectorInfo_.GKD, - &xpsCorrectorInfo_.KForm, - &xpsCorrectorInfo_.FeedForwardGainVelocity); - return status ? asynError : asynSuccess; -} - - -/** - * Wrapper function for PositionerCorrectorPIDFFAccelerationGet. - * It will set parameters in this object.. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIDFFAccelerationGet() -{ - int status; - status = ::PositionerCorrectorPIDFFAccelerationGet(pollSocket_, - positionerName_, - &xpsCorrectorInfo_.ClosedLoopStatus, - &xpsCorrectorInfo_.KP, - &xpsCorrectorInfo_.KI, - &xpsCorrectorInfo_.KD, - &xpsCorrectorInfo_.KS, - &xpsCorrectorInfo_.IntegrationTime, - &xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo_.GKP, - &xpsCorrectorInfo_.GKI, - &xpsCorrectorInfo_.GKD, - &xpsCorrectorInfo_.KForm, - &xpsCorrectorInfo_.FeedForwardGainAcceleration); - return status ? asynError : asynSuccess; -} - - -/** - * Wrapper function for PositionerCorrectorPIDDualFFVoltageGet. - * It will set parameters in this object.. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIDDualFFVoltageGet() -{ - int status; - status = ::PositionerCorrectorPIDDualFFVoltageGet(pollSocket_, - positionerName_, - &xpsCorrectorInfo_.ClosedLoopStatus, - &xpsCorrectorInfo_.KP, - &xpsCorrectorInfo_.KI, - &xpsCorrectorInfo_.KD, - &xpsCorrectorInfo_.KS, - &xpsCorrectorInfo_.IntegrationTime, - &xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo_.GKP, - &xpsCorrectorInfo_.GKI, - &xpsCorrectorInfo_.GKD, - &xpsCorrectorInfo_.KForm, - &xpsCorrectorInfo_.FeedForwardGainVelocity, - &xpsCorrectorInfo_.FeedForwardGainAcceleration, - &xpsCorrectorInfo_.Friction); - return status ? asynError : asynSuccess; -} - - -/** - * Wrapper function for PositionerCorrectorPIPositionSet. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIPositionSet() -{ - int status; - status = ::PositionerCorrectorPIPositionSet(pollSocket_, - positionerName_, - xpsCorrectorInfo_.ClosedLoopStatus, - xpsCorrectorInfo_.KP, - xpsCorrectorInfo_.KI, - xpsCorrectorInfo_.IntegrationTime); - return status ? asynError : asynSuccess; -} - - -/** - * Wrapper function for PositionerCorrectorPIDFFVelocitySet. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIDFFVelocitySet() -{ - int status; - status = ::PositionerCorrectorPIDFFVelocitySet(pollSocket_, - positionerName_, - xpsCorrectorInfo_.ClosedLoopStatus, - xpsCorrectorInfo_.KP, - xpsCorrectorInfo_.KI, - xpsCorrectorInfo_.KD, - xpsCorrectorInfo_.KS, - xpsCorrectorInfo_.IntegrationTime, - xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - xpsCorrectorInfo_.GKP, - xpsCorrectorInfo_.GKI, - xpsCorrectorInfo_.GKD, - xpsCorrectorInfo_.KForm, - xpsCorrectorInfo_.FeedForwardGainVelocity); - return status ? asynError : asynSuccess; -} - -/** - * Wrapper function for PositionerCorrectorPIDFFAccelerationSet. - * @return Return value from XPS function. - */ -asynStatus XPSAxis:: PositionerCorrectorPIDFFAccelerationSet() -{ - int status; - status = ::PositionerCorrectorPIDFFAccelerationSet(pollSocket_, - positionerName_, - xpsCorrectorInfo_.ClosedLoopStatus, - xpsCorrectorInfo_.KP, - xpsCorrectorInfo_.KI, - xpsCorrectorInfo_.KD, - xpsCorrectorInfo_.KS, - xpsCorrectorInfo_.IntegrationTime, - xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - xpsCorrectorInfo_.GKP, - xpsCorrectorInfo_.GKI, - xpsCorrectorInfo_.GKD, - xpsCorrectorInfo_.KForm, - xpsCorrectorInfo_.FeedForwardGainAcceleration); - return status ? asynError : asynSuccess; -} - -/** - * Wrapper function for PositionerCorrectorPIDDualFFVoltageSet. - * @return Return value from XPS function. - */ -asynStatus XPSAxis::PositionerCorrectorPIDDualFFVoltageSet() -{ - int status; - status = ::PositionerCorrectorPIDDualFFVoltageSet(pollSocket_, - positionerName_, - xpsCorrectorInfo_.ClosedLoopStatus, - xpsCorrectorInfo_.KP, - xpsCorrectorInfo_.KI, - xpsCorrectorInfo_.KD, - xpsCorrectorInfo_.KS, - xpsCorrectorInfo_.IntegrationTime, - xpsCorrectorInfo_.DerivativeFilterCutOffFrequency, - xpsCorrectorInfo_.GKP, - xpsCorrectorInfo_.GKI, - xpsCorrectorInfo_.GKD, - xpsCorrectorInfo_.KForm, - xpsCorrectorInfo_.FeedForwardGainVelocity, - xpsCorrectorInfo_.FeedForwardGainAcceleration, - xpsCorrectorInfo_.Friction); - return status ? asynError : asynSuccess; -} - -/** Function to define the motor positions for a profile move. - * This calls the base class function to convert to steps, but since the - * XPS works in user-units we need to do an additional conversion by stepSize_. - * \param[in] positions Array of profile positions for this axis in user units. - * \param[in] numPoints The number of positions in the array. - */ -asynStatus XPSAxis::defineProfile(double *positions, size_t numPoints) -{ - size_t i; - asynStatus status; - //static const char *functionName = "defineProfile"; - - // Call the base class function - status = asynMotorAxis::defineProfile(positions, numPoints); - if (status) return status; - - // Convert to XPS units from steps - for (i=0; igetIntegerParam(pC_->profileNumReadbacks_, &numReadbacks); - if (status) return asynError; - - // Convert to steps - for (i=0; i= 10 && groupStatus <= 18) { - status = GroupKill(moveSocket_, groupName_); - } - epicsThreadSleep(0.05); - status = GroupInitialize(pollSocket_, groupName_); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: error calling GroupInitialize\n", driverName, functionName); - return asynError; - } - epicsThreadSleep(0.05); - status = GroupReferencingStart(moveSocket_, groupName_); - epicsThreadSleep(0.05); - status = GroupReferencingStop(moveSocket_, groupName_); - epicsThreadSleep(0.05); - - status = GroupStatusGet(pollSocket_, groupName_, &groupStatus); - if (groupStatus != 11) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: error putting axis into referencing mode.\n", driverName, functionName); - return asynError; - } - - /* Find out if any axes are in the same group, and set referencing mode for them all.*/ - for (axis=0; axisnumAxes_; axis++) { - pTempAxis = pC_->getAxis(axis); - if (strcmp(groupName_, pTempAxis->groupName_) == 0) { - pTempAxis->referencingMode_ = 1; - } - } - - /*Set status bits correctly*/ - pC_->lock(); - setIntegerParam(pC_->motorStatusHomed_, 0); - setIntegerParam(pC_->motorStatusHome_, 0); - callParamCallbacks(); - pC_->unlock(); - - /*Read which side of the home switch we are on.*/ - status = PositionerHardwareStatusGet(pollSocket_, positionerName_, &initialHardwareStatus); - if (status) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: error calling PositionerHardwareStatusGet.\n", driverName, functionName); - return asynError; - } - - if (!(XPSC8_ZM_HIGH_LEVEL & initialHardwareStatus)) { - defaultDistance = defaultDistance * -1.0; - } - - /*I want to set a slow speed here, so as not to move at default (max) speed. The user must have chance to - stop things if it looks like it has past the home switch and is not stopping. First I need to read what is currently - set for velocity, and then I divide it by 2.*/ - status = PositionerSGammaParametersGet(pollSocket_, - positionerName_, - &vel, &accel, &minJerk, &maxJerk); - if (status != 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing PositionerSGammaParametersGet.\n", driverName, functionName); - GroupKill(moveSocket_, groupName_); - return asynError; - - } - status = PositionerSGammaParametersSet(pollSocket_, - positionerName_, - (vel/2), accel, minJerk, maxJerk); - if (status != 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing PositionerSGammaParametersSet.\n", driverName, functionName); - GroupKill(moveSocket_, groupName_); - return asynError; - } - epicsThreadSleep(0.05); - - /*Move in direction of home switch.*/ - status = GroupMoveRelative(moveSocket_, positionerName_, 1, - &defaultDistance); - if (status != 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing GroupMoveRelative.\n", driverName, functionName); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(moveSocket_, groupName_); - return asynError; - } - - epicsThreadSleep(0.1); - - status = GroupStatusGet(pollSocket_, groupName_, &groupStatus); - - if (groupStatus == 44) { - while (1) { - epicsThreadSleep(0.2); - status = PositionerHardwareStatusGet(pollSocket_, positionerName_, &hardwareStatus); - if (hardwareStatus != initialHardwareStatus) { - break; - } - status = GroupStatusGet(pollSocket_, groupName_, &groupStatus); - if (groupStatus != 44) { - /* move finished for some other reason.*/ - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing GroupMoveRelative.\n", driverName, functionName); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(moveSocket_, groupName_); - return asynError; - } - } - } else { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing GroupMoveRelative.\n", driverName, functionName); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(moveSocket_, groupName_); - return asynError; - } - - status = GroupMoveAbort(pollSocket_, groupName_); - if (status != 0) { - asynPrint(pasynUser_, ASYN_TRACE_ERROR, "%s:%s: Error performing GroupMoveAbort.\n", driverName, functionName); - /*This should really have worked. Do a kill instead.*/ - status = GroupKill(moveSocket_, groupName_); - return asynError; - } - - return asynSuccess; - -} - - diff --git a/motorApp/NewportSrc/XPSAxis.h b/motorApp/NewportSrc/XPSAxis.h deleted file mode 100644 index 2a04fd53..00000000 --- a/motorApp/NewportSrc/XPSAxis.h +++ /dev/null @@ -1,104 +0,0 @@ -/* -FILENAME... XPSMotorDriver.cpp -USAGE... Newport XPS EPICS asyn motor device driver -*/ -#ifndef XPSMotorAxis_H -#define XPSMotorAxis_H - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -/** Struct that contains information about the XPS corrector loop.*/ -typedef struct -{ - bool ClosedLoopStatus; - double KP; /**< Main proportional term from PID loop.*/ - double KI; /**< Main integral term from PID loop.*/ - double KD; /**< Main differential term from PID loop.*/ - double KS; - double IntegrationTime; - double DerivativeFilterCutOffFrequency; - double GKP; - double GKI; - double GKD; - double KForm; - double FeedForwardGainVelocity; - double FeedForwardGainAcceleration; - double Friction; -} xpsCorrectorInfo_t; - -class XPSController; - -class epicsShareClass XPSAxis : public asynMotorAxis -{ - public: - /* These are the methods we override from the base class */ - XPSAxis(XPSController *pController, int axisNo, const char *positionerName, double stepSize); - void report(FILE *fp, int details); - asynStatus move(double position, int relative, double min_velocity, double max_velocity, double acceleration); - asynStatus moveVelocity(double min_velocity, double max_velocity, double acceleration); - asynStatus home(double min_velocity, double max_velocity, double acceleration, int forwards); - asynStatus stop(double acceleration); - asynStatus poll(bool *moving); - asynStatus doMoveToHome(); - asynStatus setPosition(double position); - asynStatus setLowLimit(double limit); - asynStatus setHighLimit(double limit); - asynStatus setPGain(double gain); - asynStatus setIGain(double gain); - asynStatus setDGain(double gain); - asynStatus setClosedLoop(bool closedLoop); - asynStatus setPositionCompare(); - asynStatus getPositionCompare(); - - virtual asynStatus defineProfile(double *positions, size_t numPoints); - virtual asynStatus readbackProfile(); - - private: - XPSController *pC_; - char *getXPSError(int status, char *buffer); - int isInGroup(); - asynStatus setPID(const double * value, int pidoption); - asynStatus getPID(); - asynStatus setPIDValue(const double * value, int pidoption); - double motorRecPositionToXPSPosition(double motorRecPosition); - double XPSPositionToMotorRecPosition(double XPSPosition); - double motorRecStepToXPSStep(double motorRecStep); - double XPSStepToMotorRecStep(double XPSStep); - - /* Wrapper functions for the verbose PositionerCorrector functions. */ - asynStatus PositionerCorrectorPIPositionGet(); - asynStatus PositionerCorrectorPIDFFVelocityGet(); - asynStatus PositionerCorrectorPIDFFAccelerationGet(); - asynStatus PositionerCorrectorPIDDualFFVoltageGet(); - asynStatus PositionerCorrectorPIPositionSet(); - asynStatus PositionerCorrectorPIDFFVelocitySet(); - asynStatus PositionerCorrectorPIDFFAccelerationSet(); - asynStatus PositionerCorrectorPIDDualFFVoltageSet(); - - int pollSocket_; - int moveSocket_; - double setpointPosition_; - double encoderPosition_; - double currentVelocity_; - double velocity_; - double accel_; - double highLimit_; - double lowLimit_; - double stepSize_; - char *positionerName_; - char *groupName_; - int positionerError_; - int axisStatus_; - bool moving_; - double profilePreDistance_; - double profilePostDistance_; - xpsCorrectorInfo_t xpsCorrectorInfo_; - double deferredPosition_; - bool deferredMove_; - bool deferredRelative_; - - friend class XPSController; -}; - -#endif /* XPSMotorAxis_H */ diff --git a/motorApp/NewportSrc/XPSController.cpp b/motorApp/NewportSrc/XPSController.cpp deleted file mode 100644 index 4ab26be6..00000000 --- a/motorApp/NewportSrc/XPSController.cpp +++ /dev/null @@ -1,1540 +0,0 @@ -/* -FILENAME... XPSMotorDriver.cpp -USAGE... Newport XPS EPICS asyn motor device driver - -*/ - -/* -Original Author: Mark Rivers -*/ - -/* -Copyright (c) 2005 University of Chicago and the Regents of the University of -California. All rights reserved. - -synApps is distributed subject to the following license conditions: -SOFTWARE LICENSE AGREEMENT -Software: synApps -Versions: Release 4-5 and higher. - - 1. The "Software", below, refers to synApps (in either source code, or - binary form and accompanying documentation). Each licensee is addressed - as "you" or "Licensee." - - 2. The copyright holders shown above and their third-party licensors hereby - grant Licensee a royalty-free nonexclusive license, subject to the - limitations stated herein and U.S. Government license rights. - - 3. You may modify and make a copy or copies of the Software for use within - your organization, if you meet the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement. - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy. - - 4. You may modify a copy or copies of the Software or any portion of it, thus - forming a work based on the Software, and distribute copies of such work - outside your organization, if you meet all of the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement; - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy; - 3. Modified copies and works based on the Software must carry - prominent notices stating that you changed specified portions of - the Software. - - 5. Portions of the Software resulted from work developed under a - U.S. Government contract and are subject to the following license: - the Government is granted for itself and others acting on its behalf a - paid-up, nonexclusive, irrevocable worldwide license in this computer - software to reproduce, prepare derivative works, and perform publicly and - display publicly. - - 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF - ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED - STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) - DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY - OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE - SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT - INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL - FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE - CORRECTED. - - 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR - THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF - ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, - CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, - INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY - REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF - CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, - EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH - LOSS OR DAMAGES. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "asynMotorController.h" -#include "asynMotorAxis.h" - -#include -#include "XPSController.h" -#include "XPS_C8_drivers.h" -#include "xps_ftp.h" -#include "XPSAxis.h" - -static const char *driverName = "XPSController"; - -static void XPSProfileThreadC(void *pPvt); - -/** Struct for a list of strings describing the different corrector types possible on the XPS.*/ -typedef struct { - char *PIPosition; - char *PIDFFVelocity; - char *PIDFFAcceleration; - char *PIDDualFFVoltage; - char *NoCorrector; -} CorrectorTypes_t; - -const static CorrectorTypes_t CorrectorTypes = { - "PositionerCorrectorPIPosition", - "PositionerCorrectorPIDFFVelocity", - "PositionerCorrectorPIDFFAcceleration", - "PositionerCorrectorPIDDualFFVoltage", - "NoCorrector" -}; - -/* The maximum size of the item names in gathering, e.g. "GROUP2.POSITIONER1.CurrentPosition" */ -#define MAX_GATHERING_AXIS_STRING 60 -/* Number of items per axis */ -#define NUM_GATHERING_ITEMS 2 -/* Total length of gathering configuration string */ -#define MAX_GATHERING_STRING MAX_GATHERING_AXIS_STRING * NUM_GATHERING_ITEMS * XPS_MAX_AXES -// Maximum number of bytes that GatheringDataMultipleLinesGet() can return -#define GATHERING_MAX_READ_LEN 65536 - -#ifndef MAX -#define MAX(a,b) ((a)>(b)? (a): (b)) -#endif -#ifndef MIN -#define MIN(a,b) ((a)<(b)? (a): (b)) -#endif - - -XPSController::XPSController(const char *portName, const char *IPAddress, int IPPort, - int numAxes, double movingPollPeriod, double idlePollPeriod, - int enableSetPosition, double setPositionSettlingTime) - : asynMotorController(portName, numAxes, NUM_XPS_PARAMS, - 0, // No additional interfaces - 0, // No addition interrupt interfaces - ASYN_CANBLOCK | ASYN_MULTIDEVICE, - 1, // autoconnect - 0, 0), // Default priority and stack size - enableSetPosition_((enableSetPosition!=0)?true:false), - setPositionSettlingTime_(setPositionSettlingTime), - ftpUsername_(NULL), ftpPassword_(NULL) -{ - static const char *functionName = "XPSController"; - - IPAddress_ = epicsStrDup(IPAddress); - IPPort_ = IPPort; - pAxes_ = (XPSAxis **)(asynMotorController::pAxes_); - movesDeferred_ = false; - - // Create controller-specific parameters - createParam(XPSMinJerkString, asynParamFloat64, &XPSMinJerk_); - createParam(XPSMaxJerkString, asynParamFloat64, &XPSMaxJerk_); - createParam(XPSPositionCompareModeString, asynParamInt32, &XPSPositionCompareMode_); - createParam(XPSPositionCompareMinPositionString, asynParamFloat64, &XPSPositionCompareMinPosition_); - createParam(XPSPositionCompareMaxPositionString, asynParamFloat64, &XPSPositionCompareMaxPosition_); - createParam(XPSPositionCompareStepSizeString, asynParamFloat64, &XPSPositionCompareStepSize_); - createParam(XPSPositionComparePulseWidthString, asynParamInt32, &XPSPositionComparePulseWidth_); - createParam(XPSPositionCompareSettlingTimeString, asynParamInt32, &XPSPositionCompareSettlingTime_); - createParam(XPSProfileMaxVelocityString, asynParamFloat64, &XPSProfileMaxVelocity_); - createParam(XPSProfileMaxAccelerationString, asynParamFloat64, &XPSProfileMaxAcceleration_); - createParam(XPSProfileMinPositionString, asynParamFloat64, &XPSProfileMinPosition_); - createParam(XPSProfileMaxPositionString, asynParamFloat64, &XPSProfileMaxPosition_); - createParam(XPSProfileGroupNameString, asynParamOctet, &XPSProfileGroupName_); - createParam(XPSTrajectoryFileString, asynParamOctet, &XPSTrajectoryFile_); - createParam(XPSStatusString, asynParamInt32, &XPSStatus_); - createParam(XPSStatusStringString, asynParamOctet, &XPSStatusString_); - createParam(XPSTclScriptString, asynParamOctet, &XPSTclScript_); - createParam(XPSTclScriptExecuteString, asynParamInt32, &XPSTclScriptExecute_); - - // This socket is used for polling by the controller and all axes - pollSocket_ = TCP_ConnectToServer((char *)IPAddress, IPPort, XPS_POLL_TIMEOUT); - if (pollSocket_ < 0) { - printf("%s:%s: error calling TCP_ConnectToServer for pollSocket\n", - driverName, functionName); - } - - // This socket is used for moving motors during profile moves - // Each axis also has its own moveSocket - moveSocket_ = TCP_ConnectToServer((char *)IPAddress, IPPort, XPS_MOVE_TIMEOUT); - if (moveSocket_ < 0) { - printf("%s:%s: error calling TCP_ConnectToServer for moveSocket\n", - driverName, functionName); - } - - FirmwareVersionGet(pollSocket_, firmwareVersion_); - - /* Create the poller thread for this controller - * NOTE: at this point the axis objects don't yet exist, but the poller tolerates this */ - startPoller(movingPollPeriod, idlePollPeriod, 10); - - /* Start the thread that will handle move to home commands.*/ - startMoveToHomeThread(); - - // Create the event that wakes up the thread for profile moves - profileExecuteEvent_ = epicsEventMustCreate(epicsEventEmpty); - - // Create the thread that will execute profile moves - epicsThreadCreate("XPSProfile", - epicsThreadPriorityLow, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC)XPSProfileThreadC, (void *)this); - - //By default, automatically enable axes that have been disabled. - autoEnable_ = 1; - - /* Flag used to turn off setting MSTA problem bit when the axis is disabled.*/ - noDisableError_ = 0; - - /* Flag to disable a mode to change the moving state determination for an axis.*/ - /* See function XPSController::enableMovingMode().*/ - enableMovingMode_ = false; - -} - -void XPSController::report(FILE *fp, int level) -{ - fprintf(fp, "XPS motor driver: %s\n", this->portName); - fprintf(fp, " numAxes: %d\n", numAxes_); - fprintf(fp, " firmware version: %s\n", firmwareVersion_); - fprintf(fp, " moving poll period: %f\n", movingPollPeriod_); - fprintf(fp, " idle poll period: %f\n", idlePollPeriod_); - - if (level > 0) { - fprintf(fp, " enableSetPosition: %d\n", enableSetPosition_); - fprintf(fp, " setPositionSettlingTime: %f\n", setPositionSettlingTime_); - fprintf(fp, " IPAddress: %s\n", IPAddress_); - fprintf(fp, " IPPort: %d\n", IPPort_); - fprintf(fp, " ftpUserName: %s\n", ftpUsername_); - fprintf(fp, " ftpUserPassword: %s\n", ftpPassword_); - fprintf(fp, " movesDeferred: %d\n", movesDeferred_); - fprintf(fp, " autoEnable: %d\n", autoEnable_); - fprintf(fp, " noDisableError: %d\n", noDisableError_); - } - - // Call the base class method - asynMotorController::report(fp, level); -} - -asynStatus XPSController::writeInt32(asynUser *pasynUser, epicsInt32 value) -{ - int function = pasynUser->reason; - int status = asynSuccess; - XPSAxis *pAxis; - //static const char *functionName = "writeInt32"; - - pAxis = this->getAxis(pasynUser); - if (!pAxis) return asynError; - - /* Set the parameter and readback in the parameter library. This may be overwritten when we read back the - * status at the end, but that's OK */ - status = pAxis->setIntegerParam(function, value); - - if (function == XPSTclScriptExecute_) { - /* Execute the TCL script */ - char fileName[MAX_FILENAME_LEN]; - getStringParam(XPSTclScript_, (int)sizeof(fileName), fileName); - if (fileName != NULL) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "Executing TCL script %s on XPS: %s\n", - fileName, this->portName); - status = TCLScriptExecute(pAxis->moveSocket_, - fileName,"0","0"); - if (status != 0) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "TCLScriptExecute returned error %d, on XPS: %s\n", - status, this->portName); - status = asynError; - } - } else { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "TCL script name has not been set on XPS: %s\n", - this->portName); - status = asynError; - } - - } else if ((function == XPSPositionCompareMode_) || - (function == XPSPositionComparePulseWidth_) || - (function == XPSPositionCompareStepSize_)) { - status = pAxis->setPositionCompare(); - status = pAxis->getPositionCompare(); - - } else { - /* Call base class method */ - status = asynMotorController::writeInt32(pasynUser, value); - } - - /* Do callbacks so higher layers see any changes */ - pAxis->callParamCallbacks(); - - return (asynStatus)status; - -} - -/** Called when asyn clients call pasynFloat64->write(). - * \param[in] pasynUser asynUser structure that encodes the reason and address. - * \param[in] value Value to write. */ -asynStatus XPSController::writeFloat64(asynUser *pasynUser, epicsFloat64 value) -{ - int function = pasynUser->reason; - XPSAxis *pAxis; - asynStatus status = asynError; - //static const char *functionName = "writeFloat64"; - - pAxis = getAxis(pasynUser); - if (!pAxis) return asynError; - - /* Set the parameter and readback in the parameter library. */ - status = pAxis->setDoubleParam(function, value); - - if ((function == XPSPositionCompareMinPosition_) || - (function == XPSPositionCompareMaxPosition_) || - (function == XPSPositionCompareStepSize_)) { - status = pAxis->setPositionCompare(); - status = pAxis->getPositionCompare(); - - } else { - /* Call base class method */ - status = asynMotorController::writeFloat64(pasynUser, value); - - } - /* Do callbacks so higher layers see any changes */ - pAxis->callParamCallbacks(); - - return status; - -} - -/** - * Perform a deferred move (a coordinated group move) on all the axes in a group. - * @param groupName Pointer to string naming the group on which to perform the group move. - * @return motor driver status code. - */ -asynStatus XPSController::processDeferredMovesInGroup(char *groupName) -{ - double positions[XPS_MAX_AXES]; - int positions_index = 0; - int first_loop = 1; - int axis = 0; - int NbPositioners = 0; - int relativeMove = 0; - int status = 0; - XPSAxis *pAxis=NULL; - - /* Loop over all axes in this controller. */ - for (axis=0; axispasynUserSelf, ASYN_TRACE_FLOW, - "Executing deferred move on XPS: %s, Group: %s\n", - this->portName, groupName); - - /* Ignore axes in other groups. */ - if (!strcmp(pAxis->groupName_, groupName)) { - if (first_loop) { - /* Get the number of axes in this group. */ - NbPositioners = pAxis->isInGroup(); - first_loop = 0; - } - - /* Set relative flag for the actual move at the end of the funtion.*/ - if (pAxis->deferredRelative_) { - relativeMove = 1; - } - - /* Build position buffer.*/ - if (pAxis->deferredMove_) { - positions[positions_index] = - pAxis->deferredRelative_ ? (pAxis->setpointPosition_ + pAxis->deferredPosition_) : pAxis->deferredPosition_; - } else { - positions[positions_index] = - pAxis->deferredRelative_ ? 0 : pAxis->setpointPosition_; - } - - /* Next axis in this group. */ - positions_index++; - } - } - - /* Send the group move command. */ - if (relativeMove) { - status = GroupMoveRelative(pAxis->moveSocket_, - groupName, - NbPositioners, - positions); - } else { - status = GroupMoveAbsolute(pAxis->moveSocket_, - groupName, - NbPositioners, - positions); - } - - /* Clear the defer flag for all the axes in this group. */ - /* We need to do this for the XPS, because we cannot do partial group moves. Every axis - in the group will be included the next time we do a group move. */ - /* Loop over all axes in this controller. */ - for (axis=0; axisgroupName_, groupName)) { - pAxis->deferredMove_ = false; - } - } - - if (status!=0) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "Error peforming GroupMoveAbsolute/Relative in processDeferredMovesInGroup. XPS Return code: %d\n", - status); - return asynError; - } - - return asynSuccess; - -} - -/** - * Process deferred moves for a controller and groups. - * This function calculates which unique groups in the controller - * and passes the controller pointer and group name to processDeferredMovesInGroup. - * @return motor driver status code. - */ -asynStatus XPSController::setDeferredMoves(bool deferMoves) -{ - asynStatus status = asynError; - int axis = 0; - int i = 0; - int dealWith = 0; - /* Array to cache up to XPS_MAX_AXES group names. Don't initialise to null */ - char *groupNames[XPS_MAX_AXES]; - char *blankGroupName = " "; - XPSAxis *pAxis; - - // If we are not ending deferred moves then return - if (deferMoves || !movesDeferred_) { - movesDeferred_ = true; - return asynSuccess; - } - - /* Clear group name cache. */ - for (i=0; ipasynUserSelf, ASYN_TRACE_FLOW, - "Processing deferred moves on XPS: %s\n", this->portName); - - /* Call processDeferredMovesInGroup only once for each group on this controller. - Positioners in the same group may not be adjacent in list, so we have to test for this. */ - for (i=0; igroupName_, groupNames[i])) { - dealWith++; - groupNames[i] = pAxis->groupName_; - } - } - if (dealWith == XPS_MAX_AXES) { - dealWith = 0; - /* Group name was not in cache, so deal with this group. */ - status = this->processDeferredMovesInGroup(pAxis->groupName_); - } - /* Next axis, and potentially next group.*/ - } - - return status; -} - - -/** Returns a pointer to an XPSAxis object. - * Returns NULL if the axis number encoded in pasynUser is invalid. - * \param[in] pasynUser asynUser structure that encodes the axis index number. */ -XPSAxis* XPSController::getAxis(asynUser *pasynUser) -{ - int axisNo; - - getAddress(pasynUser, &axisNo); - return getAxis(axisNo); -} - - - -/** Returns a pointer to an XPSAxis object. - * Returns NULL if the axis number is invalid. - * \param[in] axisNo Axis index number. */ -XPSAxis* XPSController::getAxis(int axisNo) -{ - if ((axisNo < 0) || (axisNo >= numAxes_)) return NULL; - return pAxes_[axisNo]; -} - - -asynStatus XPSController::waitMotors() -{ - int groupStatus; - int status; - char groupName[MAX_GROUPNAME_LEN]; - - getStringParam(XPSProfileGroupName_, (int)sizeof(groupName), groupName); - - while (1) { - status = GroupStatusGet(pollSocket_, groupName, &groupStatus); - if (status) return asynError; - if (groupStatus >= 10 && groupStatus <= 18) break; - epicsThreadSleep(0.1); - } - return asynSuccess; -} - - -/* Function to initialize profile */ -asynStatus XPSController::initializeProfile(size_t maxPoints, const char* ftpUsername, const char* ftpPassword) -{ - ftpUsername_ = epicsStrDup(ftpUsername); - ftpPassword_ = epicsStrDup(ftpPassword); - asynMotorController::initializeProfile(maxPoints); - return asynSuccess; -} - - - -/* Function to build, install and verify trajectory */ -asynStatus XPSController::buildProfile() -{ - FILE *trajFile; - char *trajectoryDirectory; - int i, j; - int status; - bool buildOK=true; - bool verifyOK=true; - int numPoints; - int numElements; - double trajVel; - double D0, D1, T0, T1; - SOCKET ftpSocket; - char fileName[MAX_FILENAME_LEN]; - char groupName[MAX_GROUPNAME_LEN]; - char message[MAX_MESSAGE_LEN]; - int buildStatus; - double distance; - double maxVelocity; - double maxAcceleration; - double maxVelocityActual=0.0; - double maxAccelerationActual=0.0; - double minPositionActual=0.0, maxPositionActual=0.0; - double minProfile, maxProfile; - double lowLimit, highLimit; - double minJerkTime, maxJerkTime; - double preTimeMax, postTimeMax; - double preVelocity[XPS_MAX_AXES], postVelocity[XPS_MAX_AXES]; - bool inGroup[XPS_MAX_AXES]; - double time; - int useAxis[XPS_MAX_AXES]; - static const char *functionName = "buildProfile"; - - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: entry\n", - driverName, functionName); - - // Call the base class method which will build the time array if needed - asynMotorController::buildProfile(); - - strcpy(message, ""); - setStringParam(profileBuildMessage_, message); - setIntegerParam(profileBuildState_, PROFILE_BUILD_BUSY); - setIntegerParam(profileBuildStatus_, PROFILE_STATUS_UNDEFINED); - callParamCallbacks(); - - /* We create trajectories with an extra element at the beginning and at the end. - * The distance and time of the first element is defined so that the motors will - * accelerate from 0 to the velocity of the first "real" element at their - * maximum allowed acceleration. - * Similarly, the distance and time of last element is defined so that the - * motors will decelerate from the velocity of the last "real" element to 0 - * at the maximum allowed acceleration. */ - - preTimeMax = 0.; - postTimeMax = 0.; - getIntegerParam(profileNumPoints_, &numPoints); - getStringParam(XPSTrajectoryFile_, (int)sizeof(fileName), fileName); - getStringParam(XPSProfileGroupName_, (int)sizeof(groupName), groupName); - - /* Zero values since axes may not be used */ - for (j=0; jgroupName_, groupName) == 0); - } - - for (j=0; jpositionerName_, - &maxVelocity, &maxAcceleration, - &minJerkTime, &maxJerkTime); - if (status) { - buildOK = false; - sprintf(message, "Error calling positionerSGammaParametersSet, status=%d\n", status); - goto done; - } - - /* The calculation using maxAcceleration read from controller below - * is "correct" but subject to roundoff errors when sending ASCII commands - * to XPS. Reduce acceleration 10% to account for this. */ - maxAcceleration *= 0.9; - distance = pAxes_[j]->profilePositions_[1] - pAxes_[j]->profilePositions_[0]; - preVelocity[j] = distance/profileTimes_[0]; - time = fabs(preVelocity[j]) / maxAcceleration; - preTimeMax = MAX(preTimeMax, time); - distance = pAxes_[j]->profilePositions_[numPoints-1] - - pAxes_[j]->profilePositions_[numPoints-2]; - postVelocity[j] = distance/profileTimes_[numPoints-1]; - time = fabs(postVelocity[j]) / maxAcceleration; - postTimeMax = MAX(postTimeMax, time); - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: axis %d profilePositions[0]=%f, profilePositions[%d]=%f, maxAcceleration=%f, preTimeMax=%f, postTimeMax=%f\n", - driverName, functionName, j, pAxes_[j]->profilePositions_[0], numPoints-1, pAxes_[j]->profilePositions_[numPoints-1], - maxAcceleration, preTimeMax, postTimeMax); - } - - // preTimeMax and postTimeMax can be very small if the scan velocity is small, because it can accelerate to this velocity - // almost instantly. This leads to errors with the XPS reporting acceleration too high, due to roundoff. - // Fix this by using a minimum time for acceleration. - preTimeMax = MAX(preTimeMax, XPS_MIN_PROFILE_ACCEL_TIME); - postTimeMax = MAX(postTimeMax, XPS_MIN_PROFILE_ACCEL_TIME); - - for (j=0; jprofilePreDistance_ = 0.5 * preVelocity[j] * preTimeMax; - pAxes_[j]->profilePostDistance_ = 0.5 * postVelocity[j] * postTimeMax; - } - - /* Create the profile file */ - trajFile = fopen(fileName, "wb"); - if (trajFile == 0) { - buildOK = false; - status = -1; - sprintf(message, "Error creating trajectory file %s, error=%s\n", fileName, strerror(errno)); - goto done; - } - - /* Create the initial acceleration element */ - fprintf(trajFile,"%f", preTimeMax); - for (j=0; jprofilePreDistance_, preVelocity[j]); - } - fprintf(trajFile,"\n"); - - /* The number of profile elements in the file is numPoints-1 */ - numElements = numPoints - 1; - for (i=0; iprofilePositions_[i+1] - - pAxes_[j]->profilePositions_[i]; - if (i < numElements-1) - D1 = pAxes_[j]->profilePositions_[i+2] - - pAxes_[j]->profilePositions_[i+1]; - else - D1 = D0; - /* Average either side of the point */ - trajVel = ((D0 + D1) / (T0 + T1)); - if (!useAxis[j]) { - D0 = 0.0; /* Axis turned off*/ - trajVel = 0.0; - } - fprintf(trajFile,", %f, %f",D0,trajVel); - } - fprintf(trajFile,"\n"); - } - - /* Create the final acceleration element. Final velocity must be 0. */ - fprintf(trajFile,"%f", postTimeMax); - for (j=0; jprofilePostDistance_, 0.); - } - fprintf(trajFile,"\n"); - fclose (trajFile); - - /* FTP the trajectory file from the local directory to the XPS */ - status = ftpConnect(IPAddress_, ftpUsername_, ftpPassword_, &ftpSocket); - if (status) { - buildOK = false; - sprintf(message, "Error calling ftpConnect, status=%d\n", status); - goto done; - } - if (strstr(firmwareVersion_, "C8")) { - trajectoryDirectory = XPS_C8_TRAJECTORY_DIRECTORY; - } else if (strstr(firmwareVersion_, "Q8")) { - trajectoryDirectory = XPS_Q8_TRAJECTORY_DIRECTORY; - } else { - buildOK = false; - sprintf(message, "Firmware version does not contain C8 or Q8=%s\n", firmwareVersion_); - goto done; - } - status = ftpChangeDir(ftpSocket, trajectoryDirectory); - if (status) { - buildOK = false; - sprintf(message, "Error calling ftpChangeDir, status=%d\n", status); - goto done; - } - status = ftpStoreFile(ftpSocket, fileName); - if (status) { - buildOK = false; - sprintf(message, "Error calling ftpStoreFile, status=%d\n", status); - goto done; - } - status = ftpDisconnect(ftpSocket); - if (status) { - buildOK = false; - sprintf(message, "Error calling ftpDisconnect, status=%d\n", status); - goto done; - } - - /* Verify trajectory */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling MultipleAxesPVTVerification(%d, %s, %s)\n", - driverName, functionName, pollSocket_, groupName, fileName); - status = MultipleAxesPVTVerification(pollSocket_, groupName, fileName); - if (status) verifyOK = false; - switch (-status) { - case 0: - strcpy(message, " "); - break; - case 69: - strcpy(message, "Acceleration Too High"); - break; - case 68: - strcpy(message, "Velocity Too High"); - break; - case 70: - strcpy(message, "Final Velocity Non Zero"); - break; - case 75: - strcpy(message, "Negative or Null Delta Time"); - break; - default: - sprintf(message, "Unknown trajectory verify error=%d", status); - break; - } - if (!verifyOK) goto done; - - /* Read dynamic parameters*/ - for (j=0; jpositionerName_, fileName, - &minPositionActual, &maxPositionActual, - &maxVelocityActual, &maxAccelerationActual); - pAxes_[j]->setDoubleParam(XPSProfileMinPosition_, minPositionActual); - pAxes_[j]->setDoubleParam(XPSProfileMaxPosition_, maxPositionActual); - pAxes_[j]->setDoubleParam(XPSProfileMaxVelocity_, maxVelocityActual); - pAxes_[j]->setDoubleParam(XPSProfileMaxAcceleration_, maxAccelerationActual); - if (status) { - verifyOK = false; - sprintf(message, "MultipleAxesPVTVerificationResultGet error for axis %s, status=%d\n", - pAxes_[j]->positionerName_, status); - goto done; - } - // Don't do the rest if the axis is not being used - if (!useAxis[j]) continue; - /* Check that the trajectory won't exceed the software limits - * The XPS does not check this because the trajectory is defined in relative moves and it does - * not know where we will be in absolute coordinates when we execute the trajectory */ - status = PositionerUserTravelLimitsGet(pollSocket_, - pAxes_[j]->positionerName_, - &lowLimit, - &highLimit); - minProfile = pAxes_[j]->profilePositions_[0] + minPositionActual; - if (minProfile < lowLimit) { - verifyOK = false; - sprintf(message, "Low soft limit violation for axis %s, position=%f, limit=%f\n", - pAxes_[j]->positionerName_, minProfile, lowLimit); - goto done; - } - maxProfile = pAxes_[j]->profilePositions_[0] + maxPositionActual; - if (maxProfile > highLimit) { - verifyOK = false; - sprintf(message, "High soft limit violation for axis %s, position=%f, limit=%f\n", - pAxes_[j]->positionerName_, maxProfile, highLimit); - goto done; - } - } - done: - buildStatus = (buildOK && verifyOK) ? PROFILE_STATUS_SUCCESS : PROFILE_STATUS_FAILURE; - setIntegerParam(profileBuildStatus_, buildStatus); - setStringParam(profileBuildMessage_, message); - if (buildStatus != PROFILE_STATUS_SUCCESS) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: %s\n", - driverName, functionName, message); - } - /* Clear build command. This is a "busy" record, don't want to do this until build is complete. */ - setIntegerParam(profileBuild_, 0); - setIntegerParam(profileBuildState_, PROFILE_BUILD_DONE); - callParamCallbacks(); - return status ? asynError : asynSuccess; -} - -/* Function to execute trajectory */ -asynStatus XPSController::executeProfile() -{ - epicsEventSignal(profileExecuteEvent_); - return asynSuccess; -} - -/* C Function which runs the profile thread */ -static void XPSProfileThreadC(void *pPvt) -{ - XPSController *pC = (XPSController*)pPvt; - pC->profileThread(); -} - - -/* Function which runs in its own thread to execute profiles */ -void XPSController::profileThread() -{ - while (true) { - epicsEventWait(profileExecuteEvent_); - runProfile(); - } -} - -/* Function to run trajectory. It runs in a dedicated thread, so it's OK to block. - * It needs to lock and unlock when it accesses class data. */ -asynStatus XPSController::runProfile() -{ - int status; - bool executeOK=true; - bool aborted=false; - int j; - int startPulses, endPulses; - int lastTime; - int numPoints, numElements, numPulses; - int executeStatus; - double pulsePeriod; - double position; - double time; - int i; - int moveMode; - char message[MAX_MESSAGE_LEN]; - char buffer[MAX_GATHERING_STRING]; - char fileName[MAX_FILENAME_LEN]; - char groupName[MAX_GROUPNAME_LEN]; - int eventId; - int useAxis[XPS_MAX_AXES]; - bool inGroup[XPS_MAX_AXES]; - XPSAxis *pAxis; - static const char *functionName = "runProfile"; - - lock(); - getStringParam(XPSTrajectoryFile_, (int)sizeof(fileName), fileName); - getStringParam(XPSProfileGroupName_, (int)sizeof(groupName), groupName); - getIntegerParam(profileStartPulses_, &startPulses); - getIntegerParam(profileEndPulses_, &endPulses); - getIntegerParam(profileNumPoints_, &numPoints); - getIntegerParam(profileNumPulses_, &numPulses); - for (j=0; jgroupName_, groupName) == 0); - } - strcpy(message, " "); - setStringParam(profileExecuteMessage_, message); - setIntegerParam(profileExecuteState_, PROFILE_EXECUTE_MOVE_START); - setIntegerParam(profileExecuteStatus_, PROFILE_STATUS_UNDEFINED); - callParamCallbacks(); - unlock(); - - // Move the motors to the start position - // This depends on whether we are in absolute or relative mode - getIntegerParam(profileMoveMode_, &moveMode); - for (j=0; jprofilePositions_[0] - pAxis->profilePreDistance_; - status = GroupMoveAbsolute(pAxis->moveSocket_, - pAxis->positionerName_, - 1, - &position); - } else { - position = -pAxis->profilePreDistance_; - status = GroupMoveRelative(pAxis->moveSocket_, - pAxis->positionerName_, - 1, - &position); - } - } - - // Wait for the motors to get there - wakeupPoller(); - waitMotors(); - - lock(); - setIntegerParam(profileExecuteState_, PROFILE_EXECUTE_EXECUTING); - callParamCallbacks(); - unlock(); - - /* Configure Gathering */ - /* Reset gathering. - * This must be done because GatheringOneData just appends to in-memory list */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling GatheringReset(%d)\n", - driverName, functionName, pollSocket_); - status = GatheringReset(pollSocket_); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing GatheringReset, status=%d",status); - goto done; - } - - /* Write list of gathering parameters. - * Note that there must be NUM_GATHERING_ITEMS per axis in this list. */ - strcpy(buffer, ""); - for (j=0; jpositionerName_); - strcat (buffer, ".SetpointPosition;"); - strcat (buffer, pAxes_[j]->positionerName_); - strcat (buffer, ".CurrentPosition;"); - } - - /* Define what is to be saved in the GatheringExternal.dat. - * 3 pieces of information per axis. */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling GatheringConfigurationSet(%d, %d, %s)\n", - driverName, functionName, pollSocket_, numAxes_*NUM_GATHERING_ITEMS, buffer); - status = GatheringConfigurationSet(pollSocket_, - numAxes_*NUM_GATHERING_ITEMS, buffer); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing GatheringConfigurationSet, status=%d, buffer=%s", - status, buffer); - goto done; - } - - /* The number of trajectory elements for the user is numPoints-1 - The actual number is 2 greater because of the acceleration and decelleration */ - numElements = numPoints - 1; - - // Check valid range of start and end pulses; these start at 1, not 0. - // numElements+1 is the decelleration element - if ((startPulses < 1) || (startPulses > numElements+1) || - (endPulses < startPulses) || (endPulses > numElements+1)) { - executeOK = false; - sprintf(message, "Error: start or end pulses outside valid range"); - goto done; - } - // The XPS can only output pulses at a fixed period, not a fixed distance along the trajectory. - // The trajectory elements where pulses start and stop are defined by startPulses and endPulses. - // Compute the time between pulses as the total time over which pulses should be output divided - // by the number of pulses to be output. */ - time = 0; - lastTime = endPulses; - if (endPulses > numElements) lastTime = numElements; - for (i=startPulses; i<=lastTime; i++) { - time += profileTimes_[i-1]; - } - // We put out pulses starting at the beginning of element startPulses and ending at the end of element - // endPulses. - if (numPulses != 0) - pulsePeriod = time / numPulses; - else - pulsePeriod = 0; - - /* Define trajectory output pulses. - * startPulses and endPulses are defined as 1=first real element, need to add - * 1 to each to skip the acceleration element. - * The XPS is told the element to stop outputting pulses, and it seems to stop - * outputting at the end of that element. So we need to have that element be - * the decceleration element, which means adding another +1, or we come up 1 pulse short. - * But this means we will almost always get too many pulses */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling MultipleAxesPVTPulseOutputSet(%d, %s, %d, %d, %f)\n", - driverName, functionName, pollSocket_, groupName, - startPulses+1, endPulses+1, pulsePeriod); - status = MultipleAxesPVTPulseOutputSet(pollSocket_, groupName, - startPulses+1, - endPulses+1, - pulsePeriod); - - /* Define trigger */ - sprintf(buffer, "Always;%s.PVT.TrajectoryPulse", groupName); - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling EventExtendedConfigurationTriggerSet(%d, %d, %s, %s, %s, %s. %s)\n", - driverName, functionName, pollSocket_, 2, buffer, "", "", "", ""); - status = EventExtendedConfigurationTriggerSet(pollSocket_, 2, buffer, - "", "", "", ""); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing EventExtendedConfigurationTriggerSet, status=%d, buffer=%s, strlen(buffer)=%ld", - status, buffer, (long)strlen(buffer)); - goto done; - } - - /* Define action */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling EventExtendedConfigurationActionSet(%d, %d, %s, %s, %s, %s, %s)\n", - driverName, functionName, pollSocket_, 1, "GatheringOneData", "", "", "", ""); - status = EventExtendedConfigurationActionSet(pollSocket_, 1, - "GatheringOneData", - "", "", "", ""); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing EventExtendedConfigurationActionSet, status=%d", - status); - goto done; - } - - /* Start gathering */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling EventExtendedStart(%d, %p)\n", - driverName, functionName, pollSocket_, &eventId); - status= EventExtendedStart(pollSocket_, &eventId); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing EventExtendedStart, status=%d", - status); - goto done; - } - - wakeupPoller(); - - /* We call the command to run the trajectory on the moveSocket which does not - * wait for a reply. Thus this routine returns immediately without a meaningful - * status */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling MultipleAxesPVTExecution(%d, %s, %s, %d)\n", - driverName, functionName, moveSocket_, groupName, fileName, 1); - status = MultipleAxesPVTExecution(moveSocket_, groupName, - fileName, 1); - /* status -27 means the trajectory was aborted */ - if (status == -27) { - executeOK = false; - aborted = true; - sprintf(message, "MultipleAxesPVTExecution aborted"); - } - else if (status != 0) { - executeOK = false; - sprintf(message, "Error performing MultipleAxesPVTExecution, status=%d", - status); - } - - /* Remove the event */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling EventExtendedRemove(%d, %d)\n", - driverName, functionName, pollSocket_, eventId); - status = EventExtendedRemove(pollSocket_, eventId); - if (status != 0) { - executeOK = false; - sprintf(message, "Error performing ExtendedEventRemove, status=%d", - status); - } - - /* Stop the gathering */ - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: calling GatheringStop(%d)\n", - driverName, functionName, pollSocket_); - status = GatheringStop(pollSocket_); - /* status -30 means gathering not started i.e. aborted before the end of - 1 trajectory element */ - if ((status != 0) && (status != -30)) { - executeOK = false; - sprintf(message, "Error performing GatheringStop, status=%d", - status); - } - - done: - lock(); - setIntegerParam(profileExecuteState_, PROFILE_EXECUTE_FLYBACK); - callParamCallbacks(); - unlock(); - - // Move the motors to the end position - for (j=0; jprofilePositions_[numPoints-1]; - status = GroupMoveAbsolute(pAxis->moveSocket_, - pAxis->positionerName_, - 1, - &position); - } else { - position = -pAxis->profilePostDistance_; - status = GroupMoveRelative(pAxis->moveSocket_, - pAxis->positionerName_, - 1, - &position); - } - } - - // Wait for the motors to get there - wakeupPoller(); - waitMotors(); - - lock(); - if (executeOK) executeStatus = PROFILE_STATUS_SUCCESS; - else if (aborted) executeStatus = PROFILE_STATUS_ABORT; - else executeStatus = PROFILE_STATUS_FAILURE; - setIntegerParam(profileExecuteStatus_, executeStatus); - setStringParam(profileExecuteMessage_, message); - if (!executeOK) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: %s\n", - driverName, functionName, message); - } - /* Clear execute command. This is a "busy" record, don't want to do this until build is complete. */ - setIntegerParam(profileExecute_, 0); - setIntegerParam(profileExecuteState_, PROFILE_EXECUTE_DONE); - callParamCallbacks(); - unlock(); - return executeOK ? asynSuccess : asynError; -} - -/** Polls the controller, rather than individual axis - * Used during profile moves */ -asynStatus XPSController::poll() -{ - int executeState; - int status; - int number; - char fileName[MAX_FILENAME_LEN]; - char groupName[MAX_GROUPNAME_LEN]; - - getIntegerParam(profileExecuteState_, &executeState); - if (executeState != PROFILE_EXECUTE_EXECUTING) return asynSuccess; - - getStringParam(XPSTrajectoryFile_, (int)sizeof(fileName), fileName); - getStringParam(XPSProfileGroupName_, (int)sizeof(groupName), groupName); - status = MultipleAxesPVTParametersGet(pollSocket_, groupName, fileName, &number); - if (status) return asynError; - setIntegerParam(profileCurrentPoint_, number); - callParamCallbacks(); - return asynSuccess; -} - - - -asynStatus XPSController::abortProfile() -{ - int status; - char groupName[MAX_GROUPNAME_LEN]; - static const char *functionName = "abortProfile"; - - getStringParam(XPSProfileGroupName_, (int)sizeof(groupName), groupName); - status = GroupMoveAbort(pollSocket_, groupName); - if (status != 0) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: Error performing GroupMoveAbort, status=%d\n", - driverName, functionName, status); - return asynError; - } - return asynSuccess; -} - - - -/* Function to readback trajectory */ -asynStatus XPSController::readbackProfile() -{ - char message[MAX_MESSAGE_LEN]; - bool readbackOK=true; - int numPulses; - char* buffer=NULL; - char* bptr, *tptr; - int currentSamples, maxSamples; - double setpointPosition, actualPosition; - int readbackStatus; - int status; - int i, j; - int nitems; - int numRead=0, numInBuffer, numChars; - static const char *functionName = "readbackProfile"; - - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: entry\n", - driverName, functionName); - - strcpy(message, ""); - setStringParam(profileReadbackMessage_, message); - setIntegerParam(profileReadbackState_, PROFILE_READBACK_BUSY); - setIntegerParam(profileReadbackStatus_, PROFILE_STATUS_UNDEFINED); - callParamCallbacks(); - - status = getIntegerParam(profileNumPulses_, &numPulses); - - /* Erase the readback and error arrays */ - for (j=0; jprofileReadbacks_, 0, maxProfilePoints_*sizeof(double)); - memset(pAxes_[j]->profileFollowingErrors_, 0, maxProfilePoints_*sizeof(double)); - } - /* Read the number of lines of gathering */ - status = GatheringCurrentNumberGet(pollSocket_, ¤tSamples, &maxSamples); - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: GatheringCurrentNumberGet, status=%d, currentSamples=%d, maxSamples=%d\n", - driverName, functionName, status, currentSamples, maxSamples); - if (status != 0) { - readbackOK = false; - sprintf(message, "Error calling GatherCurrentNumberGet, status=%d", status); - goto done; - } - if (currentSamples < numPulses) { - readbackOK = false; - sprintf(message, "Error, numPulses=%d, currentSamples=%d", numPulses, currentSamples); - //goto done; - } - if (currentSamples > (int) maxProfilePoints_) { - currentSamples = maxProfilePoints_; - } - buffer = (char *)calloc(GATHERING_MAX_READ_LEN, sizeof(char)); - numInBuffer = 0; - for (numRead=0; numRead 0)) { - status = GatheringDataMultipleLinesGet(pollSocket_, numRead, numInBuffer, buffer); - asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, - "%s:%s: GatheringDataMultipleLinesGet, status=%d, numInBuffer=%d\n", - driverName, functionName, status, numInBuffer); - if (status) numInBuffer /= 2; - } - if (numInBuffer == 0) { - readbackOK = false; - sprintf(message, "Error reading gathering data, numInBuffer = 0"); - goto done; - } - bptr = buffer; - for (i=0; iprofileFollowingErrors_[numRead] = actualPosition - setpointPosition; - pAxes_[j]->profileReadbacks_[numRead] = actualPosition; - } - numRead++; - bptr = tptr + 1; - } - } - - done: - if (buffer) free(buffer); - setIntegerParam(profileActualPulses_, numRead); - setIntegerParam(profileNumReadbacks_, numRead); - /* Convert from controller to user units and post the arrays */ - for (j=0; jreadbackProfile(); - } - readbackStatus = readbackOK ? PROFILE_STATUS_SUCCESS : PROFILE_STATUS_FAILURE; - setIntegerParam(profileReadbackStatus_, readbackStatus); - setStringParam(profileReadbackMessage_, message); - if (!readbackOK) { - asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, - "%s:%s: %s\n", - driverName, functionName, message); - } - /* Clear readback command. This is a "busy" record, don't want to do this until readback is complete. */ - setIntegerParam(profileReadback_, 0); - setIntegerParam(profileReadbackState_, PROFILE_READBACK_DONE); - callParamCallbacks(); - return status ? asynError : asynSuccess; -} - -/* Function to disable the automatic enable of axes when moving */ -asynStatus XPSController::disableAutoEnable() -{ - autoEnable_ = 0; - return asynSuccess; -} - -/* Function to disable the MSTA problem bit in the event of an XPS Disable state 20 */ -asynStatus XPSController::noDisableError() -{ - noDisableError_ = 1; - return asynSuccess; -} - -/* Function to enable a mode where the XPSAxis poller will check the moveSocket response - to determine motion done. It does not rely on the axis state in this case. This prevents - axes in multipleAxis groups being in 'moving state' when another axis in the same - group is moving. This allows the motor record to move the axis when another axis in the - same group is moving. However, this has the consequence that a moving state is not - detected if the move is externally generated. So by default this mode is turned off. It - can be enabled by calling this function. */ -asynStatus XPSController::enableMovingMode() -{ - enableMovingMode_ = true; - return asynSuccess; -} - - - -/** The following functions have C linkage, and can be called directly or from iocsh */ - -extern "C" { - -asynStatus XPSCreateController(const char *portName, const char *IPAddress, int IPPort, - int numAxes, int movingPollPeriod, int idlePollPeriod, - int enableSetPosition, int setPositionSettlingTime) -{ - new XPSController(portName, IPAddress, IPPort, numAxes, - movingPollPeriod/1000., idlePollPeriod/1000., - enableSetPosition, setPositionSettlingTime/1000.); - return asynSuccess; -} - - - -asynStatus XPSCreateAxis(const char *XPSName, /* specify which controller by port name */ - int axis, /* axis number 0-7 */ - const char *positionerName, /* groupName.positionerName e.g. Diffractometer.Phi */ - const char *stepsPerUnit) /* steps per user unit */ -{ - XPSController *pC; - double stepSize; - static const char *functionName = "XPSCreateAxis"; - - pC = (XPSController*) findAsynPortDriver(XPSName); - if (!pC) { - printf("%s:%s: Error port %s not found\n", - driverName, functionName, XPSName); - return asynError; - } - errno = 0; - stepSize = strtod(stepsPerUnit, NULL); - if (errno != 0) { - printf("%s:%s: Error invalid steps per unit=%s\n", - driverName, functionName, stepsPerUnit); - return asynError; - } - - pC->lock(); - new XPSAxis(pC, axis, positionerName, 1./stepSize); - pC->unlock(); - return asynSuccess; -} - - -asynStatus XPSCreateProfile(const char *XPSName, /* specify which controller by port name */ - int maxPoints, /* maximum number of profile points */ - const char *ftpUsername, /* FTP account name */ - const char *ftpPassword) /* FTP password */ -{ - XPSController *pC; - static const char *functionName = "XPSCreateProfile"; - - pC = (XPSController*) findAsynPortDriver(XPSName); - if (!pC) { - printf("%s:%s: Error port %s not found\n", - driverName, functionName, XPSName); - return asynError; - } - pC->lock(); - pC->initializeProfile(maxPoints, ftpUsername, ftpPassword); - pC->unlock(); - return asynSuccess; -} - - -asynStatus XPSDisableAutoEnable(const char *XPSName) -{ - XPSController *pC; - static const char *functionName = "XPSDisableAutoEnable"; - - pC = (XPSController*) findAsynPortDriver(XPSName); - if (!pC) { - printf("%s:%s: Error port %s not found\n", driverName, functionName, XPSName); - return asynError; - } - - return pC->disableAutoEnable(); -} - - -asynStatus XPSNoDisableError(const char *XPSName) -{ - XPSController *pC; - static const char *functionName = "XPSNoDisableError"; - - pC = (XPSController*) findAsynPortDriver(XPSName); - if (!pC) { - printf("%s:%s: Error port %s not found\n", driverName, functionName, XPSName); - return asynError; - } - - return pC->noDisableError(); -} - -asynStatus XPSEnableMovingMode(const char *XPSName) -{ - XPSController *pC; - static const char *functionName = "XPSEnableMovingMode"; - - pC = (XPSController*) findAsynPortDriver(XPSName); - if (!pC) { - printf("%s:%s: Error port %s not found\n", driverName, functionName, XPSName); - return asynError; - } - - return pC->enableMovingMode(); -} - - - - -/* Code for iocsh registration */ - -/* XPSCreateController */ -static const iocshArg XPSCreateControllerArg0 = {"Controller port name", iocshArgString}; -static const iocshArg XPSCreateControllerArg1 = {"IP address", iocshArgString}; -static const iocshArg XPSCreateControllerArg2 = {"IP port", iocshArgInt}; -static const iocshArg XPSCreateControllerArg3 = {"Number of axes", iocshArgInt}; -static const iocshArg XPSCreateControllerArg4 = {"Moving poll rate (ms)", iocshArgInt}; -static const iocshArg XPSCreateControllerArg5 = {"Idle poll rate (ms)", iocshArgInt}; -static const iocshArg XPSCreateControllerArg6 = {"Enable set position", iocshArgInt}; -static const iocshArg XPSCreateControllerArg7 = {"Set position settling time (ms)", iocshArgInt}; -static const iocshArg * const XPSCreateControllerArgs[] = {&XPSCreateControllerArg0, - &XPSCreateControllerArg1, - &XPSCreateControllerArg2, - &XPSCreateControllerArg2, - &XPSCreateControllerArg4, - &XPSCreateControllerArg5, - &XPSCreateControllerArg6, - &XPSCreateControllerArg7}; -static const iocshFuncDef configXPS = {"XPSCreateController", 8, XPSCreateControllerArgs}; -static void configXPSCallFunc(const iocshArgBuf *args) -{ - XPSCreateController(args[0].sval, args[1].sval, args[2].ival, - args[3].ival, args[4].ival, args[5].ival, - args[6].ival, args[7].ival); -} - - - -/* XPSCreateAxis */ -static const iocshArg XPSCreateAxisArg0 = {"Controller port name", iocshArgString}; -static const iocshArg XPSCreateAxisArg1 = {"Axis number", iocshArgInt}; -static const iocshArg XPSCreateAxisArg2 = {"Axis name", iocshArgString}; -static const iocshArg XPSCreateAxisArg3 = {"Steps per unit", iocshArgString}; -static const iocshArg * const XPSCreateAxisArgs[] = {&XPSCreateAxisArg0, - &XPSCreateAxisArg1, - &XPSCreateAxisArg2, - &XPSCreateAxisArg3}; -static const iocshFuncDef configXPSAxis = {"XPSCreateAxis", 4, XPSCreateAxisArgs}; - -static void configXPSAxisCallFunc(const iocshArgBuf *args) -{ - XPSCreateAxis(args[0].sval, args[1].ival, args[2].sval, args[3].sval); -} - - - -/* XPSCreateProfile */ -static const iocshArg XPSCreateProfileArg0 = {"Controller port name", iocshArgString}; -static const iocshArg XPSCreateProfileArg1 = {"Max points", iocshArgInt}; -static const iocshArg XPSCreateProfileArg2 = {"FTP username", iocshArgString}; -static const iocshArg XPSCreateProfileArg3 = {"FTP password", iocshArgString}; -static const iocshArg * const XPSCreateProfileArgs[] = {&XPSCreateProfileArg0, - &XPSCreateProfileArg1, - &XPSCreateProfileArg2, - &XPSCreateProfileArg3}; -static const iocshFuncDef configXPSProfile = {"XPSCreateProfile", 4, XPSCreateProfileArgs}; - -static void configXPSProfileCallFunc(const iocshArgBuf *args) -{ - XPSCreateProfile(args[0].sval, args[1].ival, args[2].sval, args[3].sval); -} - - -/* XPSDisableAutoEnable */ -static const iocshArg XPSDisableAutoEnableArg0 = {"Controller port name", iocshArgString}; -static const iocshArg * const XPSDisableAutoEnableArgs[] = {&XPSDisableAutoEnableArg0}; -static const iocshFuncDef disableAutoEnable = {"XPSDisableAutoEnable", 1, XPSDisableAutoEnableArgs}; - -static void disableAutoEnableCallFunc(const iocshArgBuf *args) -{ - XPSDisableAutoEnable(args[0].sval); -} - -/* XPSNoDisableError */ -static const iocshArg XPSNoDisableErrorArg0 = {"Controller port name", iocshArgString}; -static const iocshArg * const XPSNoDisableErrorArgs[] = {&XPSNoDisableErrorArg0}; -static const iocshFuncDef noDisableError = {"XPSNoDisableError", 1, XPSNoDisableErrorArgs}; - -static void noDisableErrorCallFunc(const iocshArgBuf *args) -{ - XPSNoDisableError(args[0].sval); -} - -/* XPSEnableMovingMode */ -static const iocshArg XPSEnableMovingModeArg0 = {"Controller port name", iocshArgString}; -static const iocshArg * const XPSEnableMovingModeArgs[] = {&XPSEnableMovingModeArg0}; -static const iocshFuncDef enableMovingMode = {"XPSEnableMovingMode", 1, XPSEnableMovingModeArgs}; - -static void enableMovingModeCallFunc(const iocshArgBuf *args) -{ - XPSEnableMovingMode(args[0].sval); -} - - -static void XPSRegister3(void) -{ - iocshRegister(&configXPS, configXPSCallFunc); - iocshRegister(&configXPSAxis, configXPSAxisCallFunc); - iocshRegister(&configXPSProfile, configXPSProfileCallFunc); - iocshRegister(&disableAutoEnable, disableAutoEnableCallFunc); - iocshRegister(&noDisableError, noDisableErrorCallFunc); - iocshRegister(&enableMovingMode, enableMovingModeCallFunc); -} -epicsExportRegistrar(XPSRegister3); - -} // extern "C" diff --git a/motorApp/NewportSrc/XPSController.h b/motorApp/NewportSrc/XPSController.h deleted file mode 100644 index 94511927..00000000 --- a/motorApp/NewportSrc/XPSController.h +++ /dev/null @@ -1,141 +0,0 @@ -/* -FILENAME... XPSMotorDriver.cpp -USAGE... Newport XPS EPICS asyn motor device driver -*/ - -#ifndef XPSController_H -#define XPSController_H - -#include "asynMotorController.h" -#include "asynMotorAxis.h" -#include "XPSAxis.h" - -#define XPS_MAX_AXES 8 -#define XPS_POLL_TIMEOUT 2.0 -#define XPS_MOVE_TIMEOUT 100000.0 // "Forever" -#define XPS_MIN_PROFILE_ACCEL_TIME 0.25 - -/* Constants used for FTP to the XPS */ -#define XPS_C8_TRAJECTORY_DIRECTORY "/Admin/Public/Trajectories" -#define XPS_Q8_TRAJECTORY_DIRECTORY "/Public/Trajectories" -#define MAX_FILENAME_LEN 256 -#define MAX_MESSAGE_LEN 256 -#define MAX_GROUPNAME_LEN 64 - -#define MAX_PULSE_WIDTHS 4 -#define MAX_SETTLING_TIMES 4 -static const double positionComparePulseWidths[MAX_PULSE_WIDTHS] = {0.2, 1.0, 2.5, 10.0}; -static const double positionCompareSettlingTimes[MAX_SETTLING_TIMES] = {0.075, 1.0, 4.0, 12.0}; -typedef enum { - XPSPositionCompareModeDisable, - XPSPositionCompareModePulse, - XPSPositionCompareModeAquadBWindowed, - XPSPositionCompareModeAquadBAlways -} XPSPositionCompareMode_t; - -// drvInfo strings for extra parameters that the XPS controller supports -#define XPSMinJerkString "XPS_MIN_JERK" -#define XPSMaxJerkString "XPS_MAX_JERK" -#define XPSPositionCompareModeString "XPS_POSITION_COMPARE_MODE" -#define XPSPositionCompareMinPositionString "XPS_POSITION_COMPARE_MIN_POSITION" -#define XPSPositionCompareMaxPositionString "XPS_POSITION_COMPARE_MAX_POSITION" -#define XPSPositionCompareStepSizeString "XPS_POSITION_COMPARE_STEP_SIZE" -#define XPSPositionComparePulseWidthString "XPS_POSITION_COMPARE_PULSE_WIDTH" -#define XPSPositionCompareSettlingTimeString "XPS_POSITION_COMPARE_SETTLING_TIME" -#define XPSProfileMaxVelocityString "XPS_PROFILE_MAX_VELOCITY" -#define XPSProfileMaxAccelerationString "XPS_PROFILE_MAX_ACCELERATION" -#define XPSProfileMinPositionString "XPS_PROFILE_MIN_POSITION" -#define XPSProfileMaxPositionString "XPS_PROFILE_MAX_POSITION" -#define XPSProfileGroupNameString "XPS_PROFILE_GROUP_NAME" -#define XPSTrajectoryFileString "XPS_TRAJECTORY_FILE" -#define XPSStatusString "XPS_STATUS" -#define XPSStatusStringString "XPS_STATUS_STRING" -#define XPSTclScriptString "XPS_TCL_SCRIPT" -#define XPSTclScriptExecuteString "XPS_TCL_SCRIPT_EXECUTE" - -class epicsShareClass XPSController : public asynMotorController { - - public: - XPSController(const char *portName, const char *IPAddress, int IPPort, - int numAxes, double movingPollPeriod, double idlePollPeriod, - int enableSetPosition, double setPositionSettlingTime); - - /* These are the methods that we override from asynMotorDriver */ - asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); - asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value); - void report(FILE *fp, int level); - XPSAxis* getAxis(asynUser *pasynUser); - XPSAxis* getAxis(int axisNo); - asynStatus poll(); - asynStatus setDeferredMoves(bool deferMoves); - - /* These are the functions for profile moves */ - asynStatus initializeProfile(size_t maxPoints, const char* ftpUsername, const char* ftpPassword); - asynStatus buildProfile(); - asynStatus executeProfile(); - asynStatus abortProfile(); - asynStatus readbackProfile(); - - /* These are the methods that are new to this class */ - void profileThread(); - asynStatus runProfile(); - asynStatus waitMotors(); - - /* Deferred moves functions.*/ - asynStatus processDeferredMovesInGroup(char * groupName); - - /*Disable automatic enable of axes.*/ - asynStatus disableAutoEnable(); - /* Function to disable the MSTA problem bit in the event of an XPS Disable state 20 */ - asynStatus noDisableError(); - - /* Function to enable a mode where the XPSAxis poller will check the moveSocket response - to determine motion done. */ - asynStatus enableMovingMode(); - - - protected: - XPSAxis **pAxes_; /**< Array of pointers to axis objects */ - - #define FIRST_XPS_PARAM XPSMinJerk_ - int XPSMinJerk_; - int XPSMaxJerk_; - int XPSPositionCompareMode_; - int XPSPositionCompareMinPosition_; - int XPSPositionCompareMaxPosition_; - int XPSPositionCompareStepSize_; - int XPSPositionComparePulseWidth_; - int XPSPositionCompareSettlingTime_; - int XPSProfileMaxVelocity_; - int XPSProfileMaxAcceleration_; - int XPSProfileMinPosition_; - int XPSProfileMaxPosition_; - int XPSProfileGroupName_; - int XPSTrajectoryFile_; - int XPSStatus_; - int XPSStatusString_; - int XPSTclScript_; - int XPSTclScriptExecute_; - #define LAST_XPS_PARAM XPSTclScriptExecute_ - - private: - bool enableSetPosition_; /**< Enable/disable setting the position from EPICS */ - double setPositionSettlingTime_; /**< The settling (sleep) time used when setting position. */ - char *IPAddress_; - int IPPort_; - char *ftpUsername_; - char *ftpPassword_; - int pollSocket_; - int moveSocket_; - char firmwareVersion_[100]; - bool movesDeferred_; - epicsEventId profileExecuteEvent_; - int autoEnable_; - int noDisableError_; - bool enableMovingMode_; - - friend class XPSAxis; -}; -#define NUM_XPS_PARAMS ((int)(&LAST_XPS_PARAM - &FIRST_XPS_PARAM + 1)) -#endif /* XPSController_H */ - diff --git a/motorApp/NewportSrc/XPSGathering.c b/motorApp/NewportSrc/XPSGathering.c deleted file mode 100644 index f0822272..00000000 --- a/motorApp/NewportSrc/XPSGathering.c +++ /dev/null @@ -1,242 +0,0 @@ -/* Prog to test the XPS position gathering and trigger during a trajectory scan */ -/**/ -#include -#include -#define epicsExportSharedSymbols -#include -#include "XPS_C8_drivers.h" -#include "Socket.h" -#include "xps_ftp.h" - -#define XPS_ADDRESS "164.54.160.34" -#define NUM_ELEMENTS 10 -#define NUM_AXES 2 -#define PULSE_TIME 1.0 -#define POLL_TIMEOUT 1.0 -#define DRIVE_TIMEOUT 100.0 -#define USERNAME "Administrator" -#define PASSWORD "Administrator" -#define TRAJECTORY_DIRECTORY "/Admin/public/Trajectories" -#define TRAJECTORY_FILE "test_trajectory" -#define GATHERING_DIRECTORY "/Admin/public/" -#define GATHERING_FILE "Gathering.dat" - -epicsShareFunc void xps_gathering() -{ - int status,poll_socket,drive_socket,end=0; - SOCKET ftpSocket; - char *gatheringData = "GROUP2.POSITIONER1.SetpointPosition;" - "GROUP2.POSITIONER1.CurrentPosition;" - "GROUP2.POSITIONER1.CurrentVelocity;" - "GROUP2.POSITIONER2.SetpointPosition;" - "GROUP2.POSITIONER2.CurrentPosition;" - "GROUP2.POSITIONER2.CurrentVelocity"; - char *positioner[NUM_AXES] = {"GROUP2.POSITIONER1", "GROUP2.POSITIONER2"}; - char group[] = "GROUP2"; - char outputfilename[500]; - double maxp, minp, maxv, maxa; - char buffer[1000]; - int nitems; - double setpoint, actual, velocity; - int i,j; - int groupStatus; - FILE *gatheringFile; - int eventID; - time_t start_time, end_time; - - poll_socket = TCP_ConnectToServer(XPS_ADDRESS, 5001, POLL_TIMEOUT); - drive_socket = TCP_ConnectToServer(XPS_ADDRESS, 5001, DRIVE_TIMEOUT); - - status = GroupStatusGet(poll_socket, group, &groupStatus); - printf("Initial group status=%d\n", groupStatus); - /* If group not initialized, then initialize it */ - if (groupStatus >= 0 && groupStatus <= 9) { - printf("Calling GroupInitialize ...\n"); - status = GroupInitialize(drive_socket, group); - if (status) { - printf("Error calling GroupInitialize error=%d\n", status); - return; - } - printf("Calling GroupHomeSearch ...\n"); - status = GroupHomeSearch(drive_socket, group); - if (status) { - printf("Error calling GroupHomeSearch error=%d\n", status); - return; - } - } - - printf("FTPing trajectory file to XPS ...\n"); - /* FTP the trajectory file from the local directory to the XPS */ - status = ftpConnect(XPS_ADDRESS, USERNAME, PASSWORD, &ftpSocket); - if (status != 0) { - printf("Error calling ftpConnect, status=%d\n", status); - return; - } - status = ftpChangeDir(ftpSocket, TRAJECTORY_DIRECTORY); - if (status != 0) { - printf("Error calling ftpChangeDir, status=%d\n", status); - return; - } - status = ftpStoreFile(ftpSocket, TRAJECTORY_FILE); - if (status != 0) { - printf("Error calling ftpStoreFile, status=%d\n", status); - return; - } - - /* Define trajectory output pulses */ - printf("Defining output pulses ...\n"); - status = MultipleAxesPVTPulseOutputSet(poll_socket, group, 1, - NUM_ELEMENTS, PULSE_TIME); - - /*************************** Verify trajectory **********************/ - printf("Verifying trajectory ...\n"); - status = MultipleAxesPVTVerification(drive_socket, group, TRAJECTORY_FILE); - if (status != 0) { - printf("Error performing MultipleAxesPVTVerification, status=%d\n",status); - end = 1; - } - - printf("Reading verify results ...\n"); - printf(" MultipleAxesPVTVerificationResultGet\n"); - for (i=0; i -#include -#define epicsExportSharedSymbols -#include -#include "XPS_C8_drivers.h" -#include "Socket.h" -#include "xps_ftp.h" - -#define XPS_ADDRESS "164.54.160.124" -#define NUM_TRAJECTORY_ELEMENTS 6 -#define NUM_GATHERING_POINTS 100 -#define NUM_GATHERING_ITEMS 2 -#define NUM_AXES 6 -#define PULSE_TIME 0.01 -#define POLL_TIMEOUT 1.0 -#define DRIVE_TIMEOUT 100.0 -#define USERNAME "Administrator" -#define PASSWORD "Administrator" -#define TRAJECTORY_DIRECTORY "/Admin/public/Trajectories" -#define TRAJECTORY_FILE "TrajectoryScan.trj" -#define BUFFER_SIZE 32767 - -int main(int argc, char *argv[]) -{ - int status,poll_socket,drive_socket,end=0; - SOCKET ftpSocket; - char *gatheringData = "GROUP1.PHI.SetpointPosition;" - "GROUP1.PHI.CurrentPosition;" - "GROUP1.KAPPA.SetpointPosition;" - "GROUP1.KAPPA.CurrentPosition;" - "GROUP1.OMEGA.SetpointPosition;" - "GROUP1.OMEGA.CurrentPosition;" - "GROUP1.PSI.SetpointPosition;" - "GROUP1.PSI.CurrentPosition;" - "GROUP1.2THETA.SetpointPosition;" - "GROUP1.2THETA.CurrentPosition;" - "GROUP1.NU.SetpointPosition;" - "GROUP1.NU.CurrentPosition"; - char *positioner[NUM_AXES] = {"GROUP1.PHI", "GROUP1.KAPPA", "GROUP1.OMEGA", "GROUP1.PSI", "GROUP1.2THETA", "GROUP1.NU"}; - char group[] = "GROUP1"; - char outputfilename[500]; - double maxp, minp, maxv, maxa; - char buffer[BUFFER_SIZE]; - int currentSamples, maxSamples; - int i; - int groupStatus; - int eventID; - time_t start_time, end_time; - - poll_socket = TCP_ConnectToServer(XPS_ADDRESS, 5001, POLL_TIMEOUT); - drive_socket = TCP_ConnectToServer(XPS_ADDRESS, 5001, DRIVE_TIMEOUT); - - status = GroupStatusGet(poll_socket, group, &groupStatus); - printf("Initial group status=%d\n", groupStatus); - /* If group not initialized, then initialize it */ - if (groupStatus >= 0 && groupStatus <= 9) { - printf("Calling GroupInitialize ...\n"); - status = GroupInitialize(drive_socket, group); - if (status) { - printf("Error calling GroupInitialize error=%d\n", status); - return status; - } - printf("Calling GroupHomeSearch ...\n"); - status = GroupHomeSearch(drive_socket, group); - if (status) { - printf("Error calling GroupHomeSearch error=%d\n", status); - return status; - } - } - - printf("FTPing trajectory file to XPS ...\n"); - /* FTP the trajectory file from the local directory to the XPS */ - status = ftpConnect(XPS_ADDRESS, USERNAME, PASSWORD, &ftpSocket); - if (status != 0) { - printf("Error calling ftpConnect, status=%d\n", status); - return status; - } - status = ftpChangeDir(ftpSocket, TRAJECTORY_DIRECTORY); - if (status != 0) { - printf("Error calling ftpChangeDir, status=%d\n", status); - return status; - } - status = ftpStoreFile(ftpSocket, TRAJECTORY_FILE); - if (status != 0) { - printf("Error calling ftpStoreFile, status=%d\n", status); - return status; - } - - /* Define trajectory output pulses */ - printf("Defining output pulses ...\n"); - status = MultipleAxesPVTPulseOutputSet(poll_socket, group, 2, - NUM_TRAJECTORY_ELEMENTS-1, PULSE_TIME); - - /*************************** Verify trajectory **********************/ - printf("Verifying trajectory ...\n"); - status = MultipleAxesPVTVerification(drive_socket, group, TRAJECTORY_FILE); - if (status != 0) { - printf("Error performing MultipleAxesPVTVerification, status=%d\n",status); - end = 1; - } - - printf("Reading verify results ...\n"); - printf(" MultipleAxesPVTVerificationResultGet\n"); - for (i=0; i -#include - -void xps_gathering(); - -static const iocshArg XPSGatheringArg0 = {"Interelement period", iocshArgInt}; -static const iocshArg * const XPSGatheringArgs[1] = {&XPSGatheringArg0}; -static const iocshFuncDef XPSGathering = {"XPSGathering", 1, XPSGatheringArgs}; -static void XPSGatheringCallFunc(const iocshArgBuf *args) -{ - xps_gathering(args[0].ival); -} -static void XPSGatheringRegister(void) -{ - iocshRegister(&XPSGathering, XPSGatheringCallFunc); -} - -epicsExportRegistrar(XPSGatheringRegister); - - diff --git a/motorApp/NewportSrc/XPS_C8_drivers.cpp b/motorApp/NewportSrc/XPS_C8_drivers.cpp deleted file mode 100644 index 3f21743a..00000000 --- a/motorApp/NewportSrc/XPS_C8_drivers.cpp +++ /dev/null @@ -1,9980 +0,0 @@ -/* - * Created source file xps_c8_drivers.cpp for API description - */ - - -#include -#include -#include -#include -#include "Socket.h" - -#define epicsExportSharedSymbols -#include -#include "XPS_C8_drivers.h" -#ifdef _WIN32 -#include "strtok_r.h" -#endif - -#define SIZE_SMALL 1024 -#define SIZE_NOMINAL 1024 -#define SIZE_BIG 2048 -#define SIZE_HUGE 65536 - -#define SIZE_EXECUTE_METHOD 1024 - -#define SIZE_NAME 100 -#ifdef __cplusplus -extern "C" -{ -#else -#typedef int bool; /* C does not know bool, only C++ */ -#endif - -#define DLL_VERSION "Library version for XPS-C8 Firmware V2.6.x" - -/***********************************************************************/ -int __stdcall TCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) -{ - return (ConnectToServer(Ip_Address, Ip_Port, TimeOut)); -} -/***********************************************************************/ -void __stdcall TCP_SetTimeout(int SocketIndex, double Timeout) -{ - SetTCPTimeout(SocketIndex, Timeout); -} -/***********************************************************************/ -void __stdcall TCP_CloseSocket(int SocketIndex) -{ - CloseSocket(SocketIndex); -} -/***********************************************************************/ -char * __stdcall TCP_GetError(int SocketIndex) -{ - return (GetError(SocketIndex)); -} -/***********************************************************************/ -char * __stdcall GetLibraryVersion(void) -{ - return (DLL_VERSION); -} - -/*********************************************************************** - * ControllerMotionKernelTimeLoadGet : Get controller motion kernel time load - * - * - Parameters : - * int SocketIndex - * double *CPUTotalLoadRatio - * double *CPUCorrectorLoadRatio - * double *CPUProfilerLoadRatio - * double *CPUServitudesLoadRatio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelTimeLoadGet (double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTotalLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUCorrectorLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUProfilerLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUServitudesLoadRatio); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusGet : Read controller current status - * - * - Parameters : - * int SocketIndex - * int *ControllerStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerStatusGet (int SocketIndex, int * ControllerStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusGet (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ControllerStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusStringGet : Return the controller status string corresponding to the controller status code - * - * - Parameters : - * int SocketIndex - * int ControllerStatusCode - * char *ControllerStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusStringGet (%d,char *)", ControllerStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ControllerStatusString, pt); - ptNext = strchr (ControllerStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ElapsedTimeGet : Return elapsed time from controller power on - * - * - Parameters : - * int SocketIndex - * double *ElapsedTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ElapsedTimeGet (int SocketIndex, double * ElapsedTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ElapsedTimeGet (double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", ElapsedTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorStringGet : Return the error string corresponding to the error code - * - * - Parameters : - * int SocketIndex - * int ErrorCode - * char *ErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorStringGet (%d,char *)", ErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorString, pt); - ptNext = strchr (ErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * FirmwareVersionGet : Return firmware version - * - * - Parameters : - * int SocketIndex - * char *Version - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall FirmwareVersionGet (int SocketIndex, char * Version) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "FirmwareVersionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Version, pt); - ptNext = strchr (Version, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecute : Execute a TCL script from a TCL file - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *ParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecute (%s,%s,%s)", TCLFileName, TaskName, ParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecuteAndWait : Execute a TCL script from a TCL file and wait the end of execution to return - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *InputParametersList - * char *OutputParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecuteAndWait (%s,%s,%s,char *)", TCLFileName, TaskName, InputParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (OutputParametersList, pt); - ptNext = strchr (OutputParametersList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecuteWithPriority : Execute a TCL script with defined priority - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *TaskPriorityLevel - * char *ParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TCLScriptExecuteWithPriority (int SocketIndex, char * TCLFileName, char * TaskName, char * TaskPriorityLevel, char * ParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecuteWithPriority (%s,%s,%s,%s)", TCLFileName, TaskName, TaskPriorityLevel, ParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptKill : Kill TCL Task - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TCLScriptKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerGet : Get a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int *FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerGet (%s,int *)", TimerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", FrequencyTicks); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerSet : Set a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TimerSet (int SocketIndex, char * TimerName, int FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerSet (%s,%d)", TimerName, FrequencyTicks); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Reboot : Reboot the controller - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall Reboot (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Reboot ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Login : Log in - * - * - Parameters : - * int SocketIndex - * char *Name - * char *Password - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall Login (int SocketIndex, char * Name, char * Password) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Login (%s,%s)", Name, Password); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CloseAllOtherSockets : Close all socket beside the one used to send this command - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall CloseAllOtherSockets (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CloseAllOtherSockets ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareDateAndTimeGet : Return hardware date and time - * - * - Parameters : - * int SocketIndex - * char *DateAndTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HardwareDateAndTimeGet (int SocketIndex, char * DateAndTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareDateAndTimeGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DateAndTime, pt); - ptNext = strchr (DateAndTime, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareDateAndTimeSet : Set hardware date and time - * - * - Parameters : - * int SocketIndex - * char *DateAndTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HardwareDateAndTimeSet (int SocketIndex, char * DateAndTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareDateAndTimeSet (%s)", DateAndTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventAdd : ** OBSOLETE ** Add an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * char *ActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventAdd (%s,%s,%s,%s,%s,%s,%s)", PositionerName, EventName, EventParameter, ActionName, ActionParameter1, ActionParameter2, ActionParameter3); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventGet : ** OBSOLETE ** Read events and actions list - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventsAndActionsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventsAndActionsList, pt); - ptNext = strchr (EventsAndActionsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventRemove : ** OBSOLETE ** Delete an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventRemove (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventWait : ** OBSOLETE ** Wait an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventWait (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerSet : Configure one or several events - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedEventName - * char *EventParameter1 - * char *EventParameter2 - * char *EventParameter3 - * char *EventParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedEventNameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerGet : Read the event configuration - * - * - Parameters : - * int SocketIndex - * char *EventTriggerConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionSet : Configure one or several actions - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * char *ActionParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedActionNameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionGet : Read the action configuration - * - * - Parameters : - * int SocketIndex - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedStart : Launch the last event and action configuration and return an ID - * - * - Parameters : - * int SocketIndex - * int *ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedStart (int SocketIndex, int * ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedStart (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ID); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedAllGet : Read all event and action configurations - * - * - Parameters : - * int SocketIndex - * char *EventActionConfigurations - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedAllGet (int SocketIndex, char * EventActionConfigurations) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedAllGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventActionConfigurations, pt); - ptNext = strchr (EventActionConfigurations, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedGet : Read the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * char *EventTriggerConfiguration - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedGet (%d,char *,char *)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedRemove : Remove the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedRemove (int SocketIndex, int ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedRemove (%d)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedWait : Wait events from the last event configuration - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventExtendedWait (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedWait ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataAcquire : Acquire a configured data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringDataAcquire (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataAcquire ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataGet : Get a data line from gathering buffer - * - * - Parameters : - * int SocketIndex - * int IndexPoint - * char *DataBufferLine - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataGet (%d,char *)", IndexPoint); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DataBufferLine, pt); - ptNext = strchr (DataBufferLine, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataMultipleLinesGet : Get multiple data lines from gathering buffer - * - * - Parameters : - * int SocketIndex - * int IndexPoint - * int NumberOfLines - * char *DataBufferLine - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringDataMultipleLinesGet (int SocketIndex, int IndexPoint, int NumberOfLines, char * DataBufferLine) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataMultipleLinesGet (%d,%d,char *)", IndexPoint, NumberOfLines); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DataBufferLine, pt); - ptNext = strchr (DataBufferLine, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringReset : Empty the gathered data in memory to start new gathering from scratch - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringRun : Start a new gathering - * - * - Parameters : - * int SocketIndex - * int DataNumber - * int Divisor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringRun (int SocketIndex, int DataNumber, int Divisor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringRun (%d,%d)", DataNumber, Divisor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringRunAppend : Re-start the stopped gathering to add new data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringRunAppend (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringRunAppend ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStop : Stop the data gathering (without saving to file) - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringStop (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStop ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalDataGet : Get a data line from external gathering buffer - * - * - Parameters : - * int SocketIndex - * int IndexPoint - * char *DataBufferLine - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalDataGet (%d,char *)", IndexPoint); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DataBufferLine, pt); - ptNext = strchr (DataBufferLine, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArrayGet : Get global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GlobalArrayGet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArrayGet (%d,char *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ValueString, pt); - ptNext = strchr (ValueString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArraySet : Set global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GlobalArraySet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArraySet (%d,%s)", Number, ValueString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArrayGet : Get double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double *DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall DoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArrayGet (%d,double *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DoubleValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArraySet : Set double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall DoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArraySet (%d,%.13g)", Number, DoubleValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGet : Read analog input or analog output for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double *AnalogValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,double *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &AnalogValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogSet : Set analog output for one or few output - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double AnalogOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%.13g", stringArray0[i], AnalogOutputValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainGet : Read analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int *AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,int *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &AnalogInputGainValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainSet : Set analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%d", stringArray0[i], AnalogInputGainValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalGet : Read digital output or digital input - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short *DigitalValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalGet (%s,unsigned short *)", GPIOName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hu", DigitalValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalSet : Set Digital Output for one or few output TTL - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short Mask - * unsigned short DigitalOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalSet (%s,%hu,%hu)", GPIOName, Mask, DigitalOutputValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupAccelerationSetpointGet : Return setpoint accelerations - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *SetpointAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupAccelerationSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetpointAcceleration[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupAccelerationSetpointGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &SetpointAcceleration[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupAnalogTrackingModeEnable : Enable Analog Tracking mode on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupAnalogTrackingModeEnable (int SocketIndex, char * GroupName, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupAnalogTrackingModeEnable (%s,%s)", GroupName, Type); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupAnalogTrackingModeDisable : Disable Analog Tracking mode on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupAnalogTrackingModeDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupAnalogTrackingModeDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupCorrectorOutputGet : Return corrector outputs - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CorrectorOutput - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupCorrectorOutputGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CorrectorOutput[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupCurrentFollowingErrorGet : Return current following errors - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CurrentFollowingError - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupCurrentFollowingErrorGet (int SocketIndex, char * GroupName, int NbElements, double CurrentFollowingError[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupCurrentFollowingErrorGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CurrentFollowingError[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearch : Start home search sequence - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupHomeSearch (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearch (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearchAndRelativeMove : Start home search sequence and execute a displacement - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearchAndRelativeMove (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitialize : Start the initialization - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupInitialize (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitialize (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitializeWithEncoderCalibration : Start the initialization with encoder calibration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitializeWithEncoderCalibration (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupJogParametersSet : Modify Jog parameters on selected group and activate the continuous move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double Velocity - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupJogParametersSet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupJogParametersSet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g,%.13g", Velocity[i], Acceleration[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupJogParametersGet : Get Jog parameters on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupJogParametersGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupJogParametersGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *,double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &Velocity[i]); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &Acceleration[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupJogCurrentGet : Get Jog current on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupJogCurrentGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupJogCurrentGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *,double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &Velocity[i]); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &Acceleration[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupJogModeEnable : Enable Jog mode on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupJogModeEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupJogModeEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupJogModeDisable : Disable Jog mode on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupJogModeDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupJogModeDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupKill : Kill the group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupKill (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupKill (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbort : Abort a move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupMoveAbort (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbort (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbsolute : Do an absolute move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbsolute (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetPosition[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveRelative : Do a relative move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveRelative (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionDisable : Set Motion disable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupMotionDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionEnable : Set Motion enable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupMotionEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCorrectedProfilerGet : Return corrected profiler positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double PositionX - * double PositionY - * double *CorrectedProfilerPositionX - * double *CorrectedProfilerPositionY - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCorrectedProfilerGet (%s,%.13g,%.13g,double *,double *)", GroupName, PositionX, PositionY); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionX); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionY); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCurrentGet : Return current positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CurrentEncoderPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCurrentGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CurrentEncoderPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionPCORawEncoderGet : Return PCO raw encoder positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double PositionX - * double PositionY - * double *PCORawPositionX - * double *PCORawPositionY - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupPositionPCORawEncoderGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * PCORawPositionX, double * PCORawPositionY) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionPCORawEncoderGet (%s,%.13g,%.13g,double *,double *)", GroupName, PositionX, PositionY); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PCORawPositionX); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PCORawPositionY); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionSetpointGet : Return setpoint positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *SetPointPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionSetpointGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &SetPointPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionTargetGet : Return target positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionTargetGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &TargetPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupReferencingActionExecute : Execute an action in referencing mode - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ReferencingAction - * char *ReferencingSensor - * double ReferencingParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupReferencingActionExecute (int SocketIndex, char * PositionerName, char * ReferencingAction, char * ReferencingSensor, double ReferencingParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupReferencingActionExecute (%s,%s,%s,%.13g)", PositionerName, ReferencingAction, ReferencingSensor, ReferencingParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupReferencingStart : Enter referencing mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupReferencingStart (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupReferencingStart (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupReferencingStop : Exit referencing mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupReferencingStop (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupReferencingStop (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusGet : Return group status - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int *Status - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupStatusGet (int SocketIndex, char * GroupName, int * Status) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusGet (%s,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", Status); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusStringGet : Return the group status string corresponding to the group status code - * - * - Parameters : - * int SocketIndex - * int GroupStatusCode - * char *GroupStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusStringGet (%d,char *)", GroupStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusString, pt); - ptNext = strchr (GroupStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupVelocityCurrentGet : Return current velocities - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CurrentVelocity - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupVelocityCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentVelocity[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupVelocityCurrentGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CurrentVelocity[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * KillAll : Put all groups in 'Not initialized' state - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall KillAll (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "KillAll ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerAnalogTrackingPositionParametersGet : Read dynamic parameters for one axe of a group for a future analog tracking position - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *GPIOName - * double *Offset - * double *Scale - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerAnalogTrackingPositionParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * Velocity, double * Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerAnalogTrackingPositionParametersGet (%s,char *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GPIOName, pt); - ptNext = strchr (GPIOName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Offset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Scale); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerAnalogTrackingPositionParametersSet : Update dynamic parameters for one axe of a group for a future analog tracking position - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *GPIOName - * double Offset - * double Scale - * double Velocity - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerAnalogTrackingPositionParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double Velocity, double Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerAnalogTrackingPositionParametersSet (%s,%s,%.13g,%.13g,%.13g,%.13g)", PositionerName, GPIOName, Offset, Scale, Velocity, Acceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerAnalogTrackingVelocityParametersGet : Read dynamic parameters for one axe of a group for a future analog tracking velocity - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *GPIOName - * double *Offset - * double *Scale - * double *DeadBandThreshold - * int *Order - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerAnalogTrackingVelocityParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * DeadBandThreshold, int * Order, double * Velocity, double * Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerAnalogTrackingVelocityParametersGet (%s,char *,double *,double *,double *,int *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GPIOName, pt); - ptNext = strchr (GPIOName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Offset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Scale); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DeadBandThreshold); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", Order); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerAnalogTrackingVelocityParametersSet : Update dynamic parameters for one axe of a group for a future analog tracking velocity - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *GPIOName - * double Offset - * double Scale - * double DeadBandThreshold - * int Order - * double Velocity - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerAnalogTrackingVelocityParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double DeadBandThreshold, int Order, double Velocity, double Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerAnalogTrackingVelocityParametersSet (%s,%s,%.13g,%.13g,%.13g,%d,%.13g,%.13g)", PositionerName, GPIOName, Offset, Scale, DeadBandThreshold, Order, Velocity, Acceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashGet : Read backlash value and status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *BacklashValue - * char *BacklaskStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashGet (%s,double *,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", BacklashValue); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (BacklaskStatus, pt); - ptNext = strchr (BacklaskStatus, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashSet : Set backlash value - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double BacklashValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%.13g)", PositionerName, BacklashValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashEnable : Enable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerBacklashEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashDisable : Disable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerBacklashDisable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashDisable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersSet : Update filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double NotchFrequency1 - * double NotchBandwith1 - * double NotchGain1 - * double NotchFrequency2 - * double NotchBandwith2 - * double NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersGet : Read filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *NotchFrequency1 - * double *NotchBandwith1 - * double *NotchGain1 - * double *NotchFrequency2 - * double *NotchBandwith2 - * double *NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersGet (%s,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain2); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocitySet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainVelocity - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocityGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainVelocity - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocityGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainVelocity - * double FeedForwardGainAcceleration - * double Friction - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainVelocity - * double *FeedForwardGainAcceleration - * double *Friction - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Friction); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionGet (%s,bool *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorTypeGet : Read corrector type - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *CorrectorType - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorTypeGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (CorrectorType, pt); - ptNext = strchr (CorrectorType, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersGet : Get current velocity and acceleration cutoff frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CurrentVelocityCutOffFrequency - * double *CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentVelocityCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentAccelerationCutOffFrequency); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersSet : Set current velocity and acceleration cutoff frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double CurrentVelocityCutOffFrequency - * double CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersSet (%s,%.13g,%.13g)", PositionerName, CurrentVelocityCutOffFrequency, CurrentAccelerationCutOffFrequency); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverFiltersGet : Get driver filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *KI - * double *NotchFrequency - * double *NotchBandwidth - * double *NotchGain - * double *LowpassFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverFiltersGet (int SocketIndex, char * PositionerName, double * KI, double * NotchFrequency, double * NotchBandwidth, double * NotchGain, double * LowpassFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverFiltersGet (%s,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwidth); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", LowpassFrequency); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverFiltersSet : Set driver filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double KI - * double NotchFrequency - * double NotchBandwidth - * double NotchGain - * double LowpassFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverFiltersSet (int SocketIndex, char * PositionerName, double KI, double NotchFrequency, double NotchBandwidth, double NotchGain, double LowpassFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverFiltersSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, KI, NotchFrequency, NotchBandwidth, NotchGain, LowpassFrequency); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverPositionOffsetsGet : Get driver stage and gage position offset - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *StagePositionOffset - * double *GagePositionOffset - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverPositionOffsetsGet (int SocketIndex, char * PositionerName, double * StagePositionOffset, double * GagePositionOffset) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverPositionOffsetsGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", StagePositionOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GagePositionOffset); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusGet : Read positioner driver status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *DriverStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", DriverStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusStringGet : Return the positioner driver status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerDriverStatus - * char *PositionerDriverStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusStringGet (%d,char *)", PositionerDriverStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusString, pt); - ptNext = strchr (PositionerDriverStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderAmplitudeValuesGet : Read analog interpolated encoder amplitude values - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CalibrationSinusAmplitude - * double *CurrentSinusAmplitude - * double *CalibrationCosinusAmplitude - * double *CurrentCosinusAmplitude - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderAmplitudeValuesGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationCosinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentCosinusAmplitude); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderCalibrationParametersGet : Read analog interpolated encoder calibration parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SinusOffset - * double *CosinusOffset - * double *DifferentialGain - * double *PhaseCompensation - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderCalibrationParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CosinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DifferentialGain); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PhaseCompensation); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorGet : Read and clear positioner error code - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorRead : Read only positioner error code without clear it - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorRead (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorStringGet : Return the positioner status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerErrorCode - * char *PositionerErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorStringGet (%d,char *)", PositionerErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorString, pt); - ptNext = strchr (PositionerErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerExcitationSignalGet : Read disturbing signal parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *Mode - * double *Frequency - * double *Amplitude - * double *Time - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerExcitationSignalGet (int SocketIndex, char * PositionerName, int * Mode, double * Frequency, double * Amplitude, double * Time) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerExcitationSignalGet (%s,int *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", Mode); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Frequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Amplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Time); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerExcitationSignalSet : Update disturbing signal parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int Mode - * double Frequency - * double Amplitude - * double Time - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerExcitationSignalSet (int SocketIndex, char * PositionerName, int Mode, double Frequency, double Amplitude, double Time) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerExcitationSignalSet (%s,%d,%.13g,%.13g,%.13g)", PositionerName, Mode, Frequency, Amplitude, Time); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerExternalLatchPositionGet : Read external latch position - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *Position - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerExternalLatchPositionGet (int SocketIndex, char * PositionerName, double * Position) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerExternalLatchPositionGet (%s,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Position); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusGet : Read positioner hardware status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *HardwareStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", HardwareStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusStringGet : Return the positioner hardware status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerHardwareStatus - * char *PositionerHardwareStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusStringGet (%d,char *)", PositionerHardwareStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusString, pt); - ptNext = strchr (PositionerHardwareStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorGet : Get hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", InterpolationFactor); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorSet : Set hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorSet (%s,%d)", PositionerName, InterpolationFactor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMaximumVelocityAndAccelerationGet : Return maximum velocity and acceleration of the positioner - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMaximumVelocityAndAccelerationGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneGet : Read motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *PositionWindow - * double *VelocityWindow - * double *CheckingTime - * double *MeanPeriod - * double *TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneGet (%s,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PositionWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VelocityWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CheckingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MeanPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", TimeOut); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneSet : Update motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double PositionWindow - * double VelocityWindow - * double CheckingTime - * double MeanPeriod - * double TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareAquadBAlwaysEnable : Enable AquadB signal in always mode - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareAquadBAlwaysEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareAquadBAlwaysEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareAquadBWindowedGet : Read position compare AquadB windowed parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MinimumPosition - * double *MaximumPosition - * bool *EnableState - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareAquadBWindowedGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, bool * EnableState) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareAquadBWindowedGet (%s,double *,double *,bool *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *EnableState = (bool) boolScanTmp; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareAquadBWindowedSet : Set position compare AquadB windowed parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double MinimumPosition - * double MaximumPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareAquadBWindowedSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareAquadBWindowedSet (%s,%.13g,%.13g)", PositionerName, MinimumPosition, MaximumPosition); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareGet : Read position compare parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MinimumPosition - * double *MaximumPosition - * double *PositionStep - * bool *EnableState - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareGet (%s,double *,double *,double *,bool *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PositionStep); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *EnableState = (bool) boolScanTmp; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareSet : Set position compare parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double MinimumPosition - * double MaximumPosition - * double PositionStep - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double PositionStep) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareSet (%s,%.13g,%.13g,%.13g)", PositionerName, MinimumPosition, MaximumPosition, PositionStep); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareEnable : Enable position compare - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionCompareDisable : Disable position compare - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionCompareDisable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionCompareDisable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionComparePulseParametersGet : Get position compare PCO pulse parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *PCOPulseWidth - * double *EncoderSettlingTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionComparePulseParametersGet (int SocketIndex, char * PositionerName, double * PCOPulseWidth, double * EncoderSettlingTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionComparePulseParametersGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PCOPulseWidth); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", EncoderSettlingTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerPositionComparePulseParametersSet : Set position compare PCO pulse parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double PCOPulseWidth - * double EncoderSettlingTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerPositionComparePulseParametersSet (int SocketIndex, char * PositionerName, double PCOPulseWidth, double EncoderSettlingTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerPositionComparePulseParametersSet (%s,%.13g,%.13g)", PositionerName, PCOPulseWidth, EncoderSettlingTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerRawEncoderPositionGet : Get the raw encoder position - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double UserEncoderPosition - * double *RawEncoderPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerRawEncoderPositionGet (int SocketIndex, char * PositionerName, double UserEncoderPosition, double * RawEncoderPosition) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerRawEncoderPositionGet (%s,%.13g,double *)", PositionerName, UserEncoderPosition); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", RawEncoderPosition); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionersEncoderIndexDifferenceGet : Return the difference between index of primary axis and secondary axis (only after homesearch) - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *distance - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionersEncoderIndexDifferenceGet (int SocketIndex, char * PositionerName, double * distance) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionersEncoderIndexDifferenceGet (%s,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", distance); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaExactVelocityAjustedDisplacementGet : Return adjusted displacement to get exact velocity - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double DesiredDisplacement - * double *AdjustedDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%.13g,double *)", PositionerName, DesiredDisplacement); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", AdjustedDisplacement); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersGet : Read dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *Velocity - * double *Acceleration - * double *MinimumTjerkTime - * double *MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumTjerkTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumTjerkTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersSet : Update dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double Velocity - * double Acceleration - * double MinimumTjerkTime - * double MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%.13g,%.13g,%.13g,%.13g)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaPreviousMotionTimesGet : Read SettingTime and SettlingTime - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SettingTime - * double *SettlingTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaPreviousMotionTimesGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettlingTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterGet : Return the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterGet (%s,%s,char *)", PositionerName, ParameterName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ParameterValue, pt); - ptNext = strchr (ParameterValue, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterSet : Save the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterSet (%s,%s,%s)", PositionerName, ParameterName, ParameterValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerTimeFlasherGet : Read time flasher parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MinimumPosition - * double *MaximumPosition - * double *PositionStep - * bool *EnableState - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerTimeFlasherGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerTimeFlasherGet (%s,double *,double *,double *,bool *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PositionStep); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *EnableState = (bool) boolScanTmp; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerTimeFlasherSet : Set time flasher parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double MinimumPosition - * double MaximumPosition - * double TimeInterval - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerTimeFlasherSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double TimeInterval) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerTimeFlasherSet (%s,%.13g,%.13g,%.13g)", PositionerName, MinimumPosition, MaximumPosition, TimeInterval); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerTimeFlasherEnable : Enable time flasher - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerTimeFlasherEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerTimeFlasherEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerTimeFlasherDisable : Disable time flasher - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerTimeFlasherDisable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerTimeFlasherDisable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsGet : Read UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *UserMinimumTarget - * double *UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMinimumTarget); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMaximumTarget); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsSet : Update UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double UserMinimumTarget - * double UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%.13g,%.13g)", PositionerName, UserMinimumTarget, UserMaximumTarget); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDACOffsetGet : Get DAC offsets - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * short *DACOffset1 - * short *DACOffset2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDACOffsetGet (int SocketIndex, char * PositionerName, short * DACOffset1, short * DACOffset2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDACOffsetGet (%s,short *,short *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", DACOffset1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", DACOffset2); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDACOffsetSet : Set DAC offsets - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * short DACOffset1 - * short DACOffset2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDACOffsetSet (int SocketIndex, char * PositionerName, short DACOffset1, short DACOffset2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDACOffsetSet (%s,%d,%d)", PositionerName, DACOffset1, DACOffset2); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDACOffsetDualGet : Get dual DAC offsets - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * short *PrimaryDACOffset1 - * short *PrimaryDACOffset2 - * short *SecondaryDACOffset1 - * short *SecondaryDACOffset2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDACOffsetDualGet (int SocketIndex, char * PositionerName, short * PrimaryDACOffset1, short * PrimaryDACOffset2, short * SecondaryDACOffset1, short * SecondaryDACOffset2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDACOffsetDualGet (%s,short *,short *,short *,short *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", PrimaryDACOffset1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", PrimaryDACOffset2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", SecondaryDACOffset1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hd", SecondaryDACOffset2); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDACOffsetDualSet : Set dual DAC offsets - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * short PrimaryDACOffset1 - * short PrimaryDACOffset2 - * short SecondaryDACOffset1 - * short SecondaryDACOffset2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDACOffsetDualSet (int SocketIndex, char * PositionerName, short PrimaryDACOffset1, short PrimaryDACOffset2, short SecondaryDACOffset1, short SecondaryDACOffset2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDACOffsetDualSet (%s,%d,%d,%d,%d)", PositionerName, PrimaryDACOffset1, PrimaryDACOffset2, SecondaryDACOffset1, SecondaryDACOffset2); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorAutoTuning : Astrom&Hagglund based auto-tuning - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int TuningMode - * double *KP - * double *KI - * double *KD - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerCorrectorAutoTuning (int SocketIndex, char * PositionerName, int TuningMode, double * KP, double * KI, double * KD) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorAutoTuning (%s,%d,double *,double *,double *)", PositionerName, TuningMode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerAccelerationAutoScaling : Astrom&Hagglund based auto-scaling - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *Scaling - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerAccelerationAutoScaling (int SocketIndex, char * PositionerName, double * Scaling) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerAccelerationAutoScaling (%s,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Scaling); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTVerification : Multiple axes PVT trajectory verification - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTVerification (%s,%s)", GroupName, TrajectoryFileName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTVerificationResultGet : Multiple axes PVT trajectory verification result get - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *FileName - * double *MinimumPosition - * double *MaximumPosition - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTVerificationResultGet (%s,char *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTExecution : Multiple axes PVT trajectory execution - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * int ExecutionNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, int ExecutionNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTExecution (%s,%s,%d)", GroupName, TrajectoryFileName, ExecutionNumber); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTParametersGet : Multiple axes PVT trajectory get parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *FileName - * int *CurrentElementNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTParametersGet (int SocketIndex, char * GroupName, char * FileName, int * CurrentElementNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTParametersGet (%s,char *,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentElementNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTPulseOutputSet : Configure pulse output on trajectory - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int StartElement - * int EndElement - * double TimeInterval - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTPulseOutputSet (int SocketIndex, char * GroupName, int StartElement, int EndElement, double TimeInterval) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTPulseOutputSet (%s,%d,%d,%.13g)", GroupName, StartElement, EndElement, TimeInterval); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * MultipleAxesPVTPulseOutputGet : Get pulse output on trajectory configuration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int *StartElement - * int *EndElement - * double *TimeInterval - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall MultipleAxesPVTPulseOutputGet (int SocketIndex, char * GroupName, int * StartElement, int * EndElement, double * TimeInterval) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "MultipleAxesPVTPulseOutputGet (%s,int *,int *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", StartElement); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", EndElement); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", TimeInterval); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SingleAxisSlaveModeEnable : Enable the slave mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SingleAxisSlaveModeEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SingleAxisSlaveModeEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SingleAxisSlaveModeDisable : Disable the slave mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SingleAxisSlaveModeDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SingleAxisSlaveModeDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SingleAxisSlaveParametersSet : Set slave parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *PositionerName - * double Ratio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SingleAxisSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SingleAxisSlaveParametersSet (%s,%s,%.13g)", GroupName, PositionerName, Ratio); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SingleAxisSlaveParametersGet : Get slave parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *PositionerName - * double *Ratio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SingleAxisSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SingleAxisSlaveParametersGet (%s,char *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerName, pt); - ptNext = strchr (PositionerName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Ratio); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SpindleSlaveModeEnable : Enable the slave mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SpindleSlaveModeEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SpindleSlaveModeEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SpindleSlaveModeDisable : Disable the slave mode - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SpindleSlaveModeDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SpindleSlaveModeDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SpindleSlaveParametersSet : Set slave parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *PositionerName - * double Ratio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SpindleSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SpindleSlaveParametersSet (%s,%s,%.13g)", GroupName, PositionerName, Ratio); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SpindleSlaveParametersGet : Get slave parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *PositionerName - * double *Ratio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SpindleSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SpindleSlaveParametersGet (%s,char *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerName, pt); - ptNext = strchr (PositionerName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Ratio); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupSpinParametersSet : Modify Spin parameters on selected group and activate the continuous move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double Velocity - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupSpinParametersSet (int SocketIndex, char * GroupName, double Velocity, double Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupSpinParametersSet (%s,%.13g,%.13g)", GroupName, Velocity, Acceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupSpinParametersGet : Get Spin parameters on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupSpinParametersGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupSpinParametersGet (%s,double *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupSpinCurrentGet : Get Spin current on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double *Velocity - * double *Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupSpinCurrentGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupSpinCurrentGet (%s,double *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupSpinModeStop : Stop Spin mode on selected group with specified acceleration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupSpinModeStop (int SocketIndex, char * GroupName, double Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupSpinModeStop (%s,%.13g)", GroupName, Acceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcVerification : XY trajectory verification - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcVerification (%s,%s)", GroupName, TrajectoryFileName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcVerificationResultGet : XY trajectory verification result get - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *FileName - * double *MinimumPosition - * double *MaximumPosition - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcVerificationResultGet (%s,char *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcExecution : XY trajectory execution - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * double Velocity - * double Acceleration - * int ExecutionNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration, int ExecutionNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcExecution (%s,%s,%.13g,%.13g,%d)", GroupName, TrajectoryFileName, Velocity, Acceleration, ExecutionNumber); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcParametersGet : XY trajectory get parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *FileName - * double *Velocity - * double *Acceleration - * int *CurrentElementNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcParametersGet (%s,char *,double *,double *,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentElementNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcPulseOutputSet : Configure pulse output on trajectory - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double StartLength - * double EndLength - * double PathLengthInterval - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcPulseOutputSet (int SocketIndex, char * GroupName, double StartLength, double EndLength, double PathLengthInterval) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcPulseOutputSet (%s,%.13g,%.13g,%.13g)", GroupName, StartLength, EndLength, PathLengthInterval); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYLineArcPulseOutputGet : Get pulse output on trajectory configuration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double *StartLength - * double *EndLength - * double *PathLengthInterval - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYLineArcPulseOutputGet (int SocketIndex, char * GroupName, double * StartLength, double * EndLength, double * PathLengthInterval) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYLineArcPulseOutputGet (%s,double *,double *,double *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", StartLength); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", EndLength); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PathLengthInterval); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYZGroupPositionCorrectedProfilerGet : Return corrected profiler positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double PositionX - * double PositionY - * double PositionZ - * double *CorrectedProfilerPositionX - * double *CorrectedProfilerPositionY - * double *CorrectedProfilerPositionZ - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYZGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double PositionZ, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY, double * CorrectedProfilerPositionZ) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYZGroupPositionCorrectedProfilerGet (%s,%.13g,%.13g,%.13g,double *,double *,double *)", GroupName, PositionX, PositionY, PositionZ); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionX); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionY); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionZ); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYZSplineVerification : XYZ trajectory verifivation - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYZSplineVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYZSplineVerification (%s,%s)", GroupName, TrajectoryFileName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYZSplineVerificationResultGet : XYZ trajectory verification result get - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *FileName - * double *MinimumPosition - * double *MaximumPosition - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYZSplineVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYZSplineVerificationResultGet (%s,char *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumPosition); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYZSplineExecution : XYZ trajectory execution - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *TrajectoryFileName - * double Velocity - * double Acceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYZSplineExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYZSplineExecution (%s,%s,%.13g,%.13g)", GroupName, TrajectoryFileName, Velocity, Acceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * XYZSplineParametersGet : XYZ trajectory get parameters - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *FileName - * double *Velocity - * double *Acceleration - * int *CurrentElementNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall XYZSplineParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "XYZSplineParametersGet (%s,char *,double *,double *,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (FileName, pt); - ptNext = strchr (FileName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentElementNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleExecute : Execute an optional module - * - * - Parameters : - * int SocketIndex - * char *ModuleFileName - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall OptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleExecute (%s,%s)", ModuleFileName, TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleKill : Kill an optional module - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall OptionalModuleKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMCIESet : Set CIE EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMCIESet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDACOffsetCIESet : Set CIE DAC offsets - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * double DAC1Offset - * double DAC2Offset - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%.13g,%.13g)", PlugNumber, DAC1Offset, DAC2Offset); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDriverSet : Set Driver EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDriverSet (%d,%s)", PlugNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMINTSet : Set INT EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMINTSet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUCoreAndBoardSupplyVoltagesGet : Get power informations - * - * - Parameters : - * int SocketIndex - * double *VoltageCPUCore - * double *SupplyVoltage1P5V - * double *SupplyVoltage3P3V - * double *SupplyVoltage5V - * double *SupplyVoltage12V - * double *SupplyVoltageM12V - * double *SupplyVoltageM5V - * double *SupplyVoltage5VSB - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall CPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUCoreAndBoardSupplyVoltagesGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VoltageCPUCore); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage1P5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage3P3V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5VSB); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUTemperatureAndFanSpeedGet : Get CPU temperature and fan speed - * - * - Parameters : - * int SocketIndex - * double *CPUTemperature - * double *CPUFanSpeed - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall CPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUTemperatureAndFanSpeedGet (double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTemperature); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUFanSpeed); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionListGet : Action list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ActionListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionExtendedListGet : Action extended list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ActionExtendedListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIExtendedListGet : API method list - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall APIExtendedListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIListGet : API method list without extended API - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall APIListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusListGet : Controller status list - * - * - Parameters : - * int SocketIndex - * char *ControllerStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerStatusListGet (int SocketIndex, char * ControllerStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ControllerStatusList, pt); - ptNext = strchr (ControllerStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorListGet : Error list - * - * - Parameters : - * int SocketIndex - * char *ErrorsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ErrorListGet (int SocketIndex, char * ErrorsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorsList, pt); - ptNext = strchr (ErrorsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventListGet : General event list - * - * - Parameters : - * int SocketIndex - * char *EventList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall EventListGet (int SocketIndex, char * EventList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventList, pt); - ptNext = strchr (EventList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringListGet : Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExtendedListGet : Gathering type extended list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExtendedListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalListGet : External Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringExternalListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusListGet : Group status list - * - * - Parameters : - * int SocketIndex - * char *GroupStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GroupStatusListGet (int SocketIndex, char * GroupStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusList, pt); - ptNext = strchr (GroupStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareInternalListGet : Internal hardware list - * - * - Parameters : - * int SocketIndex - * char *InternalHardwareList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HardwareInternalListGet (int SocketIndex, char * InternalHardwareList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareInternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (InternalHardwareList, pt); - ptNext = strchr (InternalHardwareList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareDriverAndStageGet : Smart hardware - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *DriverName - * char *StageName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareDriverAndStageGet (%d,char *,char *)", PlugNumber); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DriverName, pt); - ptNext = strchr (DriverName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (StageName, pt); - ptNext = strchr (StageName, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ObjectsListGet : Group name and positioner name - * - * - Parameters : - * int SocketIndex - * char *ObjectsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ObjectsListGet (int SocketIndex, char * ObjectsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ObjectsListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ObjectsList, pt); - ptNext = strchr (ObjectsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorListGet : Positioner error list - * - * - Parameters : - * int SocketIndex - * char *PositionerErrorList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerErrorListGet (int SocketIndex, char * PositionerErrorList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorList, pt); - ptNext = strchr (PositionerErrorList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusListGet : Positioner hardware status list - * - * - Parameters : - * int SocketIndex - * char *PositionerHardwareStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusList, pt); - ptNext = strchr (PositionerHardwareStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusListGet : Positioner driver status list - * - * - Parameters : - * int SocketIndex - * char *PositionerDriverStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall PositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusList, pt); - ptNext = strchr (PositionerDriverStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingActionListGet : Get referencing action list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ReferencingActionListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingSensorListGet : Get referencing sensor list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ReferencingSensorListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingSensorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringUserDatasGet : Return user data values - * - * - Parameters : - * int SocketIndex - * double *UserData1 - * double *UserData2 - * double *UserData3 - * double *UserData4 - * double *UserData5 - * double *UserData6 - * double *UserData7 - * double *UserData8 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall GatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringUserDatasGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData3); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData4); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData5); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData6); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData7); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData8); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxGet : Get controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * double *MinimumCorrectorPeriod - * double *MaximumCorrectorPeriod - * double *MinimumProfilerPeriod - * double *MaximumProfilerPeriod - * double *MinimumServitudesPeriod - * double *MaximumServitudesPeriod - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxGet (double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumServitudesPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumServitudesPeriod); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxReset : Reset controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall ControllerMotionKernelPeriodMinMaxReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * SocketsStatusGet : Get sockets current status - * - * - Parameters : - * int SocketIndex - * char *SocketsStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall SocketsStatusGet (int SocketIndex, char * SocketsStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "SocketsStatusGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (SocketsStatus, pt); - ptNext = strchr (SocketsStatus, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TestTCP : Test TCP/IP transfert - * - * - Parameters : - * int SocketIndex - * char *InputString - * char *ReturnString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall TestTCP (int SocketIndex, char * InputString, char * ReturnString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TestTCP (%s,char *)", InputString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ReturnString, pt); - ptNext = strchr (ReturnString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - - -#ifdef __cplusplus -} -#endif diff --git a/motorApp/NewportSrc/XPS_C8_drivers.h b/motorApp/NewportSrc/XPS_C8_drivers.h deleted file mode 100644 index de5ecddd..00000000 --- a/motorApp/NewportSrc/XPS_C8_drivers.h +++ /dev/null @@ -1,254 +0,0 @@ -/************************************************* - * XPS_API.h * - * * - * Description: * - * XPS functions * - *************************************************/ - -#define DLL epicsShareFunc - -#if !defined(_WIN32) && !defined(CYGWIN32) -#define __stdcall -#endif - -#ifdef __rtems__ - #include "strtok_r.h" -#endif - -#ifdef __cplusplus -extern "C" -{ -#else -typedef int bool; /* C does not know bool, only C++ */ -#endif - - -DLL int __stdcall TCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); -DLL void __stdcall TCP_SetTimeout(int SocketIndex, double Timeout); -DLL void __stdcall TCP_CloseSocket(int SocketIndex); -DLL char * __stdcall TCP_GetError(int SocketIndex); -DLL char * __stdcall GetLibraryVersion(void); -DLL int __stdcall ControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio); /* Get controller motion kernel time load */ -DLL int __stdcall ControllerStatusGet (int SocketIndex, int * ControllerStatus); /* Read controller current status */ -DLL int __stdcall ControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString); /* Return the controller status string corresponding to the controller status code */ -DLL int __stdcall ElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ -DLL int __stdcall ErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ -DLL int __stdcall FirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ -DLL int __stdcall TCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ -DLL int __stdcall TCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList); /* Execute a TCL script from a TCL file and wait the end of execution to return */ -DLL int __stdcall TCLScriptExecuteWithPriority (int SocketIndex, char * TCLFileName, char * TaskName, char * TaskPriorityLevel, char * ParametersList); /* Execute a TCL script with defined priority */ -DLL int __stdcall TCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ -DLL int __stdcall TimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ -DLL int __stdcall TimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ -DLL int __stdcall Reboot (int SocketIndex); /* Reboot the controller */ -DLL int __stdcall Login (int SocketIndex, char * Name, char * Password); /* Log in */ -DLL int __stdcall CloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ -DLL int __stdcall HardwareDateAndTimeGet (int SocketIndex, char * DateAndTime); /* Return hardware date and time */ -DLL int __stdcall HardwareDateAndTimeSet (int SocketIndex, char * DateAndTime); /* Set hardware date and time */ -DLL int __stdcall EventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ -DLL int __stdcall EventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ -DLL int __stdcall EventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ -DLL int __stdcall EventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ -DLL int __stdcall EventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ -DLL int __stdcall EventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ -DLL int __stdcall EventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ -DLL int __stdcall EventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ -DLL int __stdcall EventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ -DLL int __stdcall EventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ -DLL int __stdcall EventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ -DLL int __stdcall EventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ -DLL int __stdcall EventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ -DLL int __stdcall GatheringConfigurationGet (int SocketIndex, char * Type); /*Read different mnemonique type */ -DLL int __stdcall GatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall GatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall GatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall GatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ -DLL int __stdcall GatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ -DLL int __stdcall GatheringDataMultipleLinesGet (int SocketIndex, int IndexPoint, int NumberOfLines, char * DataBufferLine); /* Get multiple data lines from gathering buffer */ -DLL int __stdcall GatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ -DLL int __stdcall GatheringRun (int SocketIndex, int DataNumber, int Divisor); /* Start a new gathering */ -DLL int __stdcall GatheringRunAppend (int SocketIndex); /* Re-start the stopped gathering to add new data */ -DLL int __stdcall GatheringStop (int SocketIndex); /* Stop the data gathering (without saving to file) */ -DLL int __stdcall GatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall GatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall GatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall GatheringExternalDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from external gathering buffer */ -DLL int __stdcall GatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall GlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ -DLL int __stdcall GlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ -DLL int __stdcall DoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue); /* Get double global array value */ -DLL int __stdcall DoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue); /* Set double global array value */ -DLL int __stdcall GPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ -DLL int __stdcall GPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ -DLL int __stdcall GPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Read analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall GPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Set analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall GPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ -DLL int __stdcall GPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ -DLL int __stdcall GroupAccelerationSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetpointAcceleration[]); /* Return setpoint accelerations */ -DLL int __stdcall GroupAnalogTrackingModeEnable (int SocketIndex, char * GroupName, char * Type); /* Enable Analog Tracking mode on selected group */ -DLL int __stdcall GroupAnalogTrackingModeDisable (int SocketIndex, char * GroupName); /* Disable Analog Tracking mode on selected group */ -DLL int __stdcall GroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ -DLL int __stdcall GroupCurrentFollowingErrorGet (int SocketIndex, char * GroupName, int NbElements, double CurrentFollowingError[]); /* Return current following errors */ -DLL int __stdcall GroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ -DLL int __stdcall GroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ -DLL int __stdcall GroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ -DLL int __stdcall GroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ -DLL int __stdcall GroupJogParametersSet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Modify Jog parameters on selected group and activate the continuous move */ -DLL int __stdcall GroupJogParametersGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog parameters on selected group */ -DLL int __stdcall GroupJogCurrentGet (int SocketIndex, char * GroupName, int NbElements, double Velocity[], double Acceleration[]); /* Get Jog current on selected group */ -DLL int __stdcall GroupJogModeEnable (int SocketIndex, char * GroupName); /* Enable Jog mode on selected group */ -DLL int __stdcall GroupJogModeDisable (int SocketIndex, char * GroupName); /* Disable Jog mode on selected group */ -DLL int __stdcall GroupKill (int SocketIndex, char * GroupName); /* Kill the group */ -DLL int __stdcall GroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ -DLL int __stdcall GroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ -DLL int __stdcall GroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ -DLL int __stdcall GroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ -DLL int __stdcall GroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ -DLL int __stdcall GroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY); /* Return corrected profiler positions */ -DLL int __stdcall GroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ -DLL int __stdcall GroupPositionPCORawEncoderGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * PCORawPositionX, double * PCORawPositionY); /* Return PCO raw encoder positions */ -DLL int __stdcall GroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ -DLL int __stdcall GroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ -DLL int __stdcall GroupReferencingActionExecute (int SocketIndex, char * PositionerName, char * ReferencingAction, char * ReferencingSensor, double ReferencingParameter); /* Execute an action in referencing mode */ -DLL int __stdcall GroupReferencingStart (int SocketIndex, char * GroupName); /* Enter referencing mode */ -DLL int __stdcall GroupReferencingStop (int SocketIndex, char * GroupName); /* Exit referencing mode */ -DLL int __stdcall GroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ -DLL int __stdcall GroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ -DLL int __stdcall GroupVelocityCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentVelocity[]); /* Return current velocities */ -DLL int __stdcall KillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ -DLL int __stdcall PositionerAnalogTrackingPositionParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking position */ -DLL int __stdcall PositionerAnalogTrackingPositionParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking position */ -DLL int __stdcall PositionerAnalogTrackingVelocityParametersGet (int SocketIndex, char * PositionerName, char * GPIOName, double * Offset, double * Scale, double * DeadBandThreshold, int * Order, double * Velocity, double * Acceleration); /* Read dynamic parameters for one axe of a group for a future analog tracking velocity */ -DLL int __stdcall PositionerAnalogTrackingVelocityParametersSet (int SocketIndex, char * PositionerName, char * GPIOName, double Offset, double Scale, double DeadBandThreshold, int Order, double Velocity, double Acceleration); /* Update dynamic parameters for one axe of a group for a future analog tracking velocity */ -DLL int __stdcall PositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ -DLL int __stdcall PositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ -DLL int __stdcall PositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ -DLL int __stdcall PositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ -DLL int __stdcall PositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ -DLL int __stdcall PositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ -DLL int __stdcall PositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ -DLL int __stdcall PositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ -DLL int __stdcall PositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ -DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cutoff frequencies */ -DLL int __stdcall PositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cutoff frequencies */ -DLL int __stdcall PositionerDriverFiltersGet (int SocketIndex, char * PositionerName, double * KI, double * NotchFrequency, double * NotchBandwidth, double * NotchGain, double * LowpassFrequency); /* Get driver filters parameters */ -DLL int __stdcall PositionerDriverFiltersSet (int SocketIndex, char * PositionerName, double KI, double NotchFrequency, double NotchBandwidth, double NotchGain, double LowpassFrequency); /* Set driver filters parameters */ -DLL int __stdcall PositionerDriverPositionOffsetsGet (int SocketIndex, char * PositionerName, double * StagePositionOffset, double * GagePositionOffset); /* Get driver stage and gage position offset */ -DLL int __stdcall PositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ -DLL int __stdcall PositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ -DLL int __stdcall PositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ -DLL int __stdcall PositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ -DLL int __stdcall PositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ -DLL int __stdcall PositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ -DLL int __stdcall PositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ -DLL int __stdcall PositionerExcitationSignalGet (int SocketIndex, char * PositionerName, int * Mode, double * Frequency, double * Amplitude, double * Time); /* Read disturbing signal parameters */ -DLL int __stdcall PositionerExcitationSignalSet (int SocketIndex, char * PositionerName, int Mode, double Frequency, double Amplitude, double Time); /* Update disturbing signal parameters */ -DLL int __stdcall PositionerExternalLatchPositionGet (int SocketIndex, char * PositionerName, double * Position); /* Read external latch position */ -DLL int __stdcall PositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ -DLL int __stdcall PositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ -DLL int __stdcall PositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ -DLL int __stdcall PositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ -DLL int __stdcall PositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ -DLL int __stdcall PositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ -DLL int __stdcall PositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ -DLL int __stdcall PositionerPositionCompareAquadBAlwaysEnable (int SocketIndex, char * PositionerName); /* Enable AquadB signal in always mode */ -DLL int __stdcall PositionerPositionCompareAquadBWindowedGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, bool * EnableState); /* Read position compare AquadB windowed parameters */ -DLL int __stdcall PositionerPositionCompareAquadBWindowedSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition); /* Set position compare AquadB windowed parameters */ -DLL int __stdcall PositionerPositionCompareGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read position compare parameters */ -DLL int __stdcall PositionerPositionCompareSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double PositionStep); /* Set position compare parameters */ -DLL int __stdcall PositionerPositionCompareEnable (int SocketIndex, char * PositionerName); /* Enable position compare */ -DLL int __stdcall PositionerPositionCompareDisable (int SocketIndex, char * PositionerName); /* Disable position compare */ -DLL int __stdcall PositionerPositionComparePulseParametersGet (int SocketIndex, char * PositionerName, double * PCOPulseWidth, double * EncoderSettlingTime); /* Get position compare PCO pulse parameters */ -DLL int __stdcall PositionerPositionComparePulseParametersSet (int SocketIndex, char * PositionerName, double PCOPulseWidth, double EncoderSettlingTime); /* Set position compare PCO pulse parameters */ -DLL int __stdcall PositionerRawEncoderPositionGet (int SocketIndex, char * PositionerName, double UserEncoderPosition, double * RawEncoderPosition); /* Get the raw encoder position */ -DLL int __stdcall PositionersEncoderIndexDifferenceGet (int SocketIndex, char * PositionerName, double * distance); /* Return the difference between index of primary axis and secondary axis (only after homesearch) */ -DLL int __stdcall PositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ -DLL int __stdcall PositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime); /* Read dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall PositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime); /* Update dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall PositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ -DLL int __stdcall PositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ -DLL int __stdcall PositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ -DLL int __stdcall PositionerTimeFlasherGet (int SocketIndex, char * PositionerName, double * MinimumPosition, double * MaximumPosition, double * PositionStep, bool * EnableState); /* Read time flasher parameters */ -DLL int __stdcall PositionerTimeFlasherSet (int SocketIndex, char * PositionerName, double MinimumPosition, double MaximumPosition, double TimeInterval); /* Set time flasher parameters */ -DLL int __stdcall PositionerTimeFlasherEnable (int SocketIndex, char * PositionerName); /* Enable time flasher */ -DLL int __stdcall PositionerTimeFlasherDisable (int SocketIndex, char * PositionerName); /* Disable time flasher */ -DLL int __stdcall PositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall PositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall PositionerDACOffsetGet (int SocketIndex, char * PositionerName, short * DACOffset1, short * DACOffset2); /* Get DAC offsets */ -DLL int __stdcall PositionerDACOffsetSet (int SocketIndex, char * PositionerName, short DACOffset1, short DACOffset2); /* Set DAC offsets */ -DLL int __stdcall PositionerDACOffsetDualGet (int SocketIndex, char * PositionerName, short * PrimaryDACOffset1, short * PrimaryDACOffset2, short * SecondaryDACOffset1, short * SecondaryDACOffset2); /* Get dual DAC offsets */ -DLL int __stdcall PositionerDACOffsetDualSet (int SocketIndex, char * PositionerName, short PrimaryDACOffset1, short PrimaryDACOffset2, short SecondaryDACOffset1, short SecondaryDACOffset2); /* Set dual DAC offsets */ -DLL int __stdcall PositionerCorrectorAutoTuning (int SocketIndex, char * PositionerName, int TuningMode, double * KP, double * KI, double * KD); /* Astrom&Hagglund based auto-tuning */ -DLL int __stdcall PositionerAccelerationAutoScaling (int SocketIndex, char * PositionerName, double * Scaling); /* Astrom&Hagglund based auto-scaling */ -DLL int __stdcall MultipleAxesPVTVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* Multiple axes PVT trajectory verification */ -DLL int __stdcall MultipleAxesPVTVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* Multiple axes PVT trajectory verification result get */ -DLL int __stdcall MultipleAxesPVTExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, int ExecutionNumber); /* Multiple axes PVT trajectory execution */ -DLL int __stdcall MultipleAxesPVTParametersGet (int SocketIndex, char * GroupName, char * FileName, int * CurrentElementNumber); /* Multiple axes PVT trajectory get parameters */ -DLL int __stdcall MultipleAxesPVTPulseOutputSet (int SocketIndex, char * GroupName, int StartElement, int EndElement, double TimeInterval); /* Configure pulse output on trajectory */ -DLL int __stdcall MultipleAxesPVTPulseOutputGet (int SocketIndex, char * GroupName, int * StartElement, int * EndElement, double * TimeInterval); /* Get pulse output on trajectory configuration */ -DLL int __stdcall SingleAxisSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ -DLL int __stdcall SingleAxisSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ -DLL int __stdcall SingleAxisSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ -DLL int __stdcall SingleAxisSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ -DLL int __stdcall SpindleSlaveModeEnable (int SocketIndex, char * GroupName); /* Enable the slave mode */ -DLL int __stdcall SpindleSlaveModeDisable (int SocketIndex, char * GroupName); /* Disable the slave mode */ -DLL int __stdcall SpindleSlaveParametersSet (int SocketIndex, char * GroupName, char * PositionerName, double Ratio); /* Set slave parameters */ -DLL int __stdcall SpindleSlaveParametersGet (int SocketIndex, char * GroupName, char * PositionerName, double * Ratio); /* Get slave parameters */ -DLL int __stdcall GroupSpinParametersSet (int SocketIndex, char * GroupName, double Velocity, double Acceleration); /* Modify Spin parameters on selected group and activate the continuous move */ -DLL int __stdcall GroupSpinParametersGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin parameters on selected group */ -DLL int __stdcall GroupSpinCurrentGet (int SocketIndex, char * GroupName, double * Velocity, double * Acceleration); /* Get Spin current on selected group */ -DLL int __stdcall GroupSpinModeStop (int SocketIndex, char * GroupName, double Acceleration); /* Stop Spin mode on selected group with specified acceleration */ -DLL int __stdcall XYLineArcVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XY trajectory verification */ -DLL int __stdcall XYLineArcVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XY trajectory verification result get */ -DLL int __stdcall XYLineArcExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration, int ExecutionNumber); /* XY trajectory execution */ -DLL int __stdcall XYLineArcParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XY trajectory get parameters */ -DLL int __stdcall XYLineArcPulseOutputSet (int SocketIndex, char * GroupName, double StartLength, double EndLength, double PathLengthInterval); /* Configure pulse output on trajectory */ -DLL int __stdcall XYLineArcPulseOutputGet (int SocketIndex, char * GroupName, double * StartLength, double * EndLength, double * PathLengthInterval); /* Get pulse output on trajectory configuration */ -DLL int __stdcall XYZGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double PositionZ, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY, double * CorrectedProfilerPositionZ); /* Return corrected profiler positions */ -DLL int __stdcall XYZSplineVerification (int SocketIndex, char * GroupName, char * TrajectoryFileName); /* XYZ trajectory verifivation */ -DLL int __stdcall XYZSplineVerificationResultGet (int SocketIndex, char * PositionerName, char * FileName, double * MinimumPosition, double * MaximumPosition, double * MaximumVelocity, double * MaximumAcceleration); /* XYZ trajectory verification result get */ -DLL int __stdcall XYZSplineExecution (int SocketIndex, char * GroupName, char * TrajectoryFileName, double Velocity, double Acceleration); /* XYZ trajectory execution */ -DLL int __stdcall XYZSplineParametersGet (int SocketIndex, char * GroupName, char * FileName, double * Velocity, double * Acceleration, int * CurrentElementNumber); /* XYZ trajectory get parameters */ -DLL int __stdcall OptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName); /* Execute an optional module */ -DLL int __stdcall OptionalModuleKill (int SocketIndex, char * TaskName); /* Kill an optional module */ -DLL int __stdcall EEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set CIE EEPROM reference string */ -DLL int __stdcall EEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* Set CIE DAC offsets */ -DLL int __stdcall EEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* Set Driver EEPROM reference string */ -DLL int __stdcall EEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set INT EEPROM reference string */ -DLL int __stdcall CPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* Get power informations */ -DLL int __stdcall CPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* Get CPU temperature and fan speed */ -DLL int __stdcall ActionListGet (int SocketIndex, char * ActionList); /* Action list */ -DLL int __stdcall ActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ -DLL int __stdcall APIExtendedListGet (int SocketIndex, char * Method); /* API method list */ -DLL int __stdcall APIListGet (int SocketIndex, char * Method); /* API method list without extended API */ -DLL int __stdcall ControllerStatusListGet (int SocketIndex, char * ControllerStatusList); /* Controller status list */ -DLL int __stdcall ErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ -DLL int __stdcall EventListGet (int SocketIndex, char * EventList); /* General event list */ -DLL int __stdcall GatheringListGet (int SocketIndex, char * list); /* Gathering type list */ -DLL int __stdcall GatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ -DLL int __stdcall GatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ -DLL int __stdcall GroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ -DLL int __stdcall HardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ -DLL int __stdcall HardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ -DLL int __stdcall ObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ -DLL int __stdcall PositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ -DLL int __stdcall PositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ -DLL int __stdcall PositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ -DLL int __stdcall ReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ -DLL int __stdcall ReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ -DLL int __stdcall GatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return user data values */ -DLL int __stdcall ControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod); /* Get controller motion kernel min/max periods */ -DLL int __stdcall ControllerMotionKernelPeriodMinMaxReset (int SocketIndex); /* Reset controller motion kernel min/max periods */ -DLL int __stdcall SocketsStatusGet (int SocketIndex, char * SocketsStatus); /* Get sockets current status */ -DLL int __stdcall TestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ - - -#ifdef __cplusplus -} -#endif diff --git a/motorApp/NewportSrc/XPS_C8_errors.h b/motorApp/NewportSrc/XPS_C8_errors.h deleted file mode 100644 index 2098187d..00000000 --- a/motorApp/NewportSrc/XPS_C8_errors.h +++ /dev/null @@ -1,107 +0,0 @@ -/*/////////////////////////////////////////////////////////////////// - * Created header file XPS_C8_errors.h for XPS function errors - */ - -/* TCL interpretor error */ -#define ERR_TCL_INTERPRETOR_ERROR 1 - -/* No error */ -#define SUCCESS 0 - -/* XPS errors */ -#define ERR_BUSY_SOCKET -1 -#define ERR_TCP_TIMEOUT -2 -#define ERR_STRING_TOO_LONG -3 -#define ERR_UNKNOWN_COMMAND -4 -#define ERR_POSITIONER_ERROR -5 -#define ERR_WRONG_FORMAT -7 -#define ERR_WRONG_OBJECT_TYPE -8 -#define ERR_WRONG_PARAMETERS_NUMBER -9 -#define ERR_WRONG_TYPE -10 -#define ERR_WRONG_TYPE_BIT_WORD -11 -#define ERR_WRONG_TYPE_BOOL -12 -#define ERR_WRONG_TYPE_CHAR -13 -#define ERR_WRONG_TYPE_DOUBLE -14 -#define ERR_WRONG_TYPE_INT -15 -#define ERR_WRONG_TYPE_UNSIGNEDINT -16 -#define ERR_PARAMETER_OUT_OF_RANGE -17 -#define ERR_POSITIONER_NAME -18 -#define ERR_GROUP_NAME -19 -#define ERR_FATAL_INIT -20 -#define ERR_IN_INITIALIZATION -21 -#define ERR_NOT_ALLOWED_ACTION -22 -#define ERR_POSITION_COMPARE_NOT_SET -23 -#define ERR_UNCOMPATIBLE -24 -#define ERR_FOLLOWING_ERROR -25 -#define ERR_EMERGENCY_SIGNAL -26 -#define ERR_GROUP_ABORT_MOTION -27 -#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 -#define ERR_MNEMOTYPEGATHERING -29 -#define ERR_GATHERING_NOT_STARTED -30 -#define ERR_HOME_OUT_RANGE -31 -#define ERR_GATHERING_NOT_CONFIGURED -32 -#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 -#define ERR_TRAVEL_LIMITS -35 -#define ERR_UNKNOWN_TCL_FILE -36 -#define ERR_TCL_SCRIPT_KILL -38 -#define ERR_TCL_INTERPRETOR -37 -#define ERR_MNEMO_ACTION -39 -#define ERR_MNEMO_EVENT -40 -#define ERR_SLAVE_CONFIGURATION -41 -#define ERR_JOG_OUT_OF_RANGE -42 -#define ERR_GATHERING_RUNNING -43 -#define ERR_SLAVE -44 -#define ERR_END_OF_RUN -45 -#define ERR_NOT_ALLOWED_BACKLASH -46 -#define ERR_WRONG_TCL_TASKNAME -47 -#define ERR_BASE_VELOCITY -48 -#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 -#define ERR_MOTOR_INITIALIZATION_ERROR -50 -#define ERR_SPIN_OUT_OF_RANGE -51 -#define ERR_WRITE_FILE -60 -#define ERR_READ_FILE -61 -#define ERR_TRAJ_ELEM_TYPE -62 -#define ERR_TRAJ_ELEM_RADIUS -63 -#define ERR_TRAJ_ELEM_SWEEP -64 -#define ERR_TRAJ_ELEM_LINE -65 -#define ERR_TRAJ_EMPTY -66 -#define ERR_TRAJ_VEL_LIMIT -68 -#define ERR_TRAJ_ACC_LIMIT -69 -#define ERR_TRAJ_FINAL_VELOCITY -70 -#define ERR_MSG_QUEUE -71 -#define ERR_TRAJ_INITIALIZATION -72 -#define ERR_END_OF_FILE -73 -#define ERR_READ_FILE_PARAMETER_KEY -74 -#define ERR_TRAJ_TIME -75 -#define ERR_EVENTS_NOT_CONFIGURED -80 -#define ERR_ACTIONS_NOT_CONFIGURED -81 -#define ERR_EVENT_BUFFER_FULL -82 -#define ERR_EVENT_ID_UNDEFINED -83 -#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 -#define ERR_FOCUS_RESERVED_SOCKET -90 -#define ERR_FOCUS_BUSY_EVENT_SCHEDULER -91 -#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 -#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 -#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 -#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 -#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 -#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 -#define ERR_INTERNAL_ERROR -100 -#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 -#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 -#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 -#define ERR_PID_TUNING_INITIALIZATION -104 -#define ERR_SCALING_CALIBRATION -105 -#define ERR_WRONG_USERNAME_OR_PASSWORD -106 -#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 -#define ERR_SOCKET_CLOSED_BY_ADMIN -108 -#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 -#define ERR_NOT_ALLOWED_FOR_GANTRY -110 -#define ERR_GATHERING_BUFFER_FULL -111 -#define ERR_EXCITATION_SIGNAL_INITIALIZATION -112 -#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 -#define ERR_GROUP_CLAMPING_TIMEOUT -114 -#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 -#define ERR_EXTERNAL_DRIVER_INIT -116 -#define ERR_FUNCTION_ONLY_ALLOWED_IN_DISABLED_STATE -117 -#define ERR_NOT_ALLOWED_DRIVER_NOT_INITIALIZED -118 diff --git a/motorApp/NewportSrc/XPS_trajectoryScan.st b/motorApp/NewportSrc/XPS_trajectoryScan.st deleted file mode 100644 index 2c8a8717..00000000 --- a/motorApp/NewportSrc/XPS_trajectoryScan.st +++ /dev/null @@ -1,1280 +0,0 @@ -program XPS_trajectoryScan("P=13BMC:,R=traj1,IPADDR=164.54.160.34,PORT=5001," - "USERNAME=Administrator,PASSWORD=Administrator," - "M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8," - "GROUP=g1," - "P1=p1,P2=p2,P3=p3,P4=p4,P5=p5,P6=p6,P7=p7,P8=p8") - -/* - * This sequencer program works with trajectoryScan.db. It implements - * coordinated trajectory motion with the Newport XPS-C8 motor controller. - * It can be used with the Newport General Purpose Diffractometer or with any - * other set of motors connected to that controller. - * - * Original author: Jon Kelly, based on Mark Rivers' version for the MM4000. - * Current author: Mark Rivers - * - * Modifications: -*/ - -%% #include -%% #include -%% #include -%% #include -%% #define epicsExportSharedSymbols -%% #include -%% #include "XPS_C8_drivers.h" -%% #include "XPS_C8_errors.h" -%% #include "Socket.h" -%% #include "xps_ftp.h" - -#include /* definition of MAGIC */ -#define VERSION_INT(MAJ,MIN) ((MAJ)*1000000+(MIN)*1000) -#define LT_SEQ_VERSION(MAJ,MIN) ((MAGIC) < VERSION_INT(MAJ,MIN)) - -/* This program must be compiled with the recursive option */ -option +r; - -/* Maximum # of trajectory elements. The number of points XPS can accept - * is almost unlimited because the data is stored in a file but the channel - * access limit with a double data type is 2000 on R3.13 clients. - */ -#define MAX_ELEMENTS 2000 - -/* Maximum # of output pulses. At the moment the pulses are defined by a - * timer which is synchronised with the trajectory points so the max number - * of pulses equals the max number of elements. - */ -#define MAX_PULSES 2000 - -/* Note that MAX_ELEMENTS, and MAX_PULSES must be defined before - * including the trajectoryScan.h */ -#include "trajectoryScan.h" - -/* Buffer sizes */ -#define NAME_LEN 100 - -/* Polling interval for waiting for motors to reach their targets */ -#define POLL_INTERVAL 0.1 - -/* Socket timeouts */ -#define POLL_TIMEOUT 1.0 -#define DRIVE_TIMEOUT 100000. /* Forever */ -#define ABORT_TIMEOUT 10. - -/* Used within the exec state as a timeout within the while loops which wait for - * the ss xpsTrajectoryRun to catch up. The delays are 0.1 second, so 100 loops - * is 10 seconds. */ -#define COUNT_TIMEOUT 100 - -/* The maximum size of the item names in gathering, e.g. "GROUP2.POSITIONER1.CurrentPosition" */ -#define MAX_GATHERING_AXIS_STRING 60 -/* Number of items per axis */ -#define NUM_GATHERING_ITEMS 2 -/* Total length of gathering configuration string */ -#define MAX_GATHERING_STRING MAX_GATHERING_AXIS_STRING * NUM_GATHERING_ITEMS * MAX_AXES -#define GATHERING_MAX_READ_LEN 65536 - -/* Constants used for FTP to the XPS */ -#define TRAJECTORY_DIRECTORY "/Admin/public/Trajectories" - -int status; -int i; -int j; -int k; -int anyMoving; -int ncomplete; -int nextra; -int npoints; -int dir; -int pollSocket; -int driveSocket; -int abortSocket; -int positionSocket; -int xpsStatus; -int count; -double dtime; -double posActual; -double posTheory; -double expectedTime; -double initialPos[MAX_AXES]; -double trajVel; -double preDistance[MAX_AXES]; -double postDistance[MAX_AXES]; -double motorLowLimit[MAX_AXES]; -double motorHighLimit[MAX_AXES]; -double motorMinPos[MAX_AXES]; -double motorMaxPos[MAX_AXES]; -double pulseTime; -double pulsePeriod; -char groupName[NAME_LEN]; -char xpsAddress[NAME_LEN]; -char *axisName[MAX_AXES]; -char macroBuf[NAME_LEN]; -char motorName[NAME_LEN]; -char userName[NAME_LEN]; -char password[NAME_LEN]; -int xpsPort; - -/* Define PVs */ - -/* All PVs which will be accessed in local C functions need to have their index - * extracted with pvIndex() */ -int motorCurrentIndex[MAX_AXES]; -int epicsMotorDoneIndex[MAX_AXES]; - -/* Note, this should be time_t, but SNL doesn't understand that. This is - * the defininition in vxWorks. */ -unsigned long startTime; - -/* Define escaped C functions at end of file */ -%% static int getMotorPositions(SS_ID ssId, struct UserVar *pVar, double *pos); -%% static int getMotorMoving(SS_ID ssId, struct UserVar *pVar); -%% static int waitMotors(SS_ID ssId, struct UserVar *pVar); -%% static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar); -%% static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar); - -%% static int getSocket(SS_ID ssId, struct UserVar *pVar, double timeout); -%% static void trajectoryExecute(SS_ID ssId, struct UserVar *pVar); -%% static void buildAndVerify(SS_ID ssId, struct UserVar *pVar); -%% static int currentElement(SS_ID ssId, struct UserVar *pVar); -%% static int getGroupStatus(SS_ID ssId, struct UserVar *pVar); -%% static void readGathering(SS_ID ssId, struct UserVar *pVar); -%% static int trajectoryAbort(SS_ID ssId, struct UserVar *pVar); -%% static void printMessage(const char *pformat, ...); - - -ss xpsTrajectoryScan { - - /* Initialize things when first starting */ - state init { - when() { - /* Get the values from the macro parameteters */ - strcpy(groupName, macValueGet("GROUP")); - strcpy(xpsAddress, macValueGet("IPADDR")); - strcpy(userName, macValueGet("USERNAME")); - strcpy(password, macValueGet("PASSWORD")); - xpsPort = atoi(macValueGet("PORT")); - if (debugLevel > 0) { - printf("XPS_trajectoryScan: ss xpsTrajectoryScan: state init:" - " xpsAddress=%s groupName=%s\n", - xpsAddress, groupName); - } - for (i=0; i MAX_AXES) numAxes = MAX_AXES; - - /* Get sockets for communicating with XPS */ - %%pVar->pollSocket = getSocket(ssId, pVar, POLL_TIMEOUT); - %%pVar->driveSocket = getSocket(ssId, pVar, DRIVE_TIMEOUT); - %%pVar->abortSocket = getSocket(ssId, pVar, ABORT_TIMEOUT); - - for (j=0; j 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state monitor_inputs:" - " entry\n"); - } - } - when(efTestAndClear(buildMon) && (build==1)) { - } state build - - when(efTestAndClear(executeMon) && (execute==1) - && (buildStatus == STATUS_SUCCESS)){ - } state execute - - when(efTestAndClear(readbackMon) && (readback==1) - && (execStatus == STATUS_SUCCESS)) { - } state readback - - when(efTestAndClear(nelementsMon) && (nelements>=1)) { - /* If nelements changes, then change endPulses to this value, - * since this is what the user normally wants. endPulses can be - * changed again after changing nelements if this is desired. */ - if (moveMode == MOVE_MODE_RELATIVE) - endPulses = nelements; - else - endPulses = nelements-1; - pvPut(endPulses); - } state monitor_inputs - - } - - - /* Build and verify trajectory */ - state build { - entry { - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state build:" - " entry\n"); - } - } - when() { - /* Set busy flag while building */ - buildState = BUILD_STATE_BUSY; - pvPut(buildState); - buildStatus=STATUS_UNDEFINED; - pvPut(buildStatus); - - if (moveMode == MOVE_MODE_RELATIVE) - npoints = nelements; - else - npoints = nelements-1; - /* If total time mode, calc time per element and write, - else use the array timeTraj */ - if (timeMode == TIME_MODE_TOTAL) { - dtime = time_PV/npoints; - for (i=0; i 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state execute:" - " entry\n"); - } - %%waitMotors(ssId, pVar); - - /* Get the initial positions of the motors */ - for (j=0; j 0) { - /* Check validity, modify values if necessary */ - if (startPulses < 1) startPulses = 1; - if (startPulses > nelements) startPulses = nelements; - pvPut(startPulses); - if (endPulses < startPulses) endPulses = startPulses; - if (endPulses > nelements) endPulses = nelements; - pvPut(endPulses); - - /* The XPS can only output pulses at a fixed period, not a fixed - * distance along the trajectory. - * The trajectory elements where pulses start and stop are - * defined with the PVs startPulses and endPulses. - * Compute the time between pulses as the total time over which pulses - * should be output divided by the number of pulses to be output. */ - pulseTime=0; - for (i=startPulses; i<=endPulses; i++) { - pulseTime += timeTrajectory[i-1]; - } - pulsePeriod = pulseTime/npulses; - } else { - pulsePeriod = 0.; - } - - /* Check that the trajectory won't exceed the software limits */ - for (j=0; j motorHighLimit[j]) { - execStatus = STATUS_FAILURE; - pvPut(execStatus); - sprintf(execMessage, "High soft limit violation on motor %d", j); - printMessage("High soft limit violation on motor %d, epicsMotorPos=%f, motorMaxPos=%f, motorHighLimit=%f\n", - j, epicsMotorPos[j], motorMaxPos[j], motorHighLimit[j]); - pvPut(execMessage); - } - } - } - } - - - when (execStatus == STATUS_FAILURE) { - /* Clear execute command, post. This is a "busy" record, don't - * want to do this until execution is complete. */ - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state execute:" - " execStatus = STATUS_FAILURE\n"); - } - execute=0; - pvPut(execute); - } state monitor_inputs - - - when (execStatus != STATUS_FAILURE) { - %%pVar->xpsStatus = getGroupStatus(ssId, pVar); - /* Setting execState here will cause the xpsTrajectoryRun SS to wake up */ - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state execute:" - " setting execState = EXECUTE_STATE_MOVE_START\n"); - } - execState = EXECUTE_STATE_MOVE_START; - pvPut(execState); - count = 0; - while (execState != EXECUTE_STATE_EXECUTING && - count < COUNT_TIMEOUT ) { - epicsThreadSleep(0.1); - count++; - } - if (count == COUNT_TIMEOUT) { - strcpy(execMessage, "Exec Timeout!"); - pvPut(execMessage); - execStatus = STATUS_ABORT; - pvPut(execStatus); - } - count = 0; - /* Wait until ss xpsTrajectoryRun has started the traj scan */ - while (xpsStatus != 45 && - count < COUNT_TIMEOUT && - execStatus != STATUS_FAILURE ) { - epicsThreadSleep(0.1); - count++; - %%pVar->xpsStatus = getGroupStatus(ssId, pVar); - } - if (count == COUNT_TIMEOUT) { - strcpy(execMessage, "Exec Timeout!"); - pvPut(execMessage); - execStatus = STATUS_ABORT; - pvPut(execStatus); - } - readStatus=STATUS_UNDEFINED; - pvPut(readStatus); - } state wait_execute - } - - - /* Wait for trajectory to complete */ - state wait_execute { - entry { - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state wait_execute:" - " entry\n"); - } - } - when (execStatus == STATUS_ABORT) { - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state wait_execute:" - " execStatus = STATUS_ABORT\n"); - } - /* The trajectory_abort state set has detected an abort. It has - * already posted the status and message. Don't execute flyback - * return to top */ - execState = EXECUTE_STATE_DONE; - pvPut(execState); - /* Clear execute command, post. This is a "busy" record, don't - * want to do this until execution is complete. */ - execute=0; - pvPut(execute); - } state monitor_inputs - - when (delay(0.1) && execState==EXECUTE_STATE_EXECUTING) { - /* Get the current motor positions, post them */ - %%getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jxpsStatus = getGroupStatus(ssId, pVar); - if (xpsStatus == 45) { - %%pVar->ncomplete = currentElement(ssId, pVar); - sprintf(execMessage, "Executing element %d/%d", - ncomplete, nelements); - pvPut(execMessage); - } - else if (xpsStatus == 12) { - /* 12 = ready from move */ - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_SUCCESS; - strcpy(execMessage, " "); - } - else if (xpsStatus < 10) { - /* The xps group status reflects an error. */ - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_FAILURE; - sprintf(execMessage,"XPS Status Error=%d", xpsStatus); - } - /* See if the elapsed time is more than expected, time out */ - if (difftime(time(0), startTime) > (expectedTime+10)) { - execState = EXECUTE_STATE_FLYBACK; - execStatus = STATUS_TIMEOUT; - strcpy(execMessage, "Timeout"); - } - } state wait_execute - - when (execState==EXECUTE_STATE_FLYBACK) { - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state wait_execute:" - " execStatus = EXECUTE_STATE_FLYBACK\n"); - } - pvPut(execState); - pvPut(execStatus); - pvPut(execMessage); - - /* Only do the following if the trajectory executed OK */ - if (execStatus == STATUS_SUCCESS) { - /* Make sure the motors have stopped */ - %%waitMotors(ssId, pVar); - %%waitEpicsMotors(ssId, pVar); - - /* Get the current motor positions, post them */ - %%getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; j 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryScan: state readback:" - " entry\n"); - } - } - when() { - /* Set busy flag */ - readState = READ_STATE_BUSY; - pvPut(readState); - readStatus=STATUS_UNDEFINED; - pvPut(readStatus); - /* Erase the readback and error arrays */ - for (j=0; j 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryAbort: state monitorAbort:" - " setting execStatus = STATUS_ABORT\n"); - } - pvPut(execStatus); - strcpy(execMessage, "Motion aborted"); - pvPut(execMessage); - - %%trajectoryAbort(ssId, pVar); - - /* Clear abort command, post. This is a "busy" record, don't - * want to do this until abort command has been sent. */ - abort=0; - pvPut(abort); - } state monitorAbort - } -} - -/* This state was required because the trajectory execute call does not return - * until the end of the trajectory. So to poll during the scan we call the - * scan from a separate state set. */ -ss xpsTrajectoryRun { - state asyncExecute { - when (efTestAndClear(execStateMon) && (execState == EXECUTE_STATE_MOVE_START)) { - /*%%pVar->xpsStatus = getGroupStatus(ssId, pVar);*/ - if (debugLevel > 0) { - printMessage("XPS_trajectoryScan: ss xpsTrajectoryRun: state asyncExecute:" - " setting execState = EXECUTE_STATE_EXECUTING\n"); - } - execState = EXECUTE_STATE_EXECUTING; - pvPut(execState); - - /* If ready to move */ - if (xpsStatus > 9 && xpsStatus < 20) { - /* Get start time of execute */ - startTime = time(0); - /* Call the C function from here so that the main state set can poll */ - %%trajectoryExecute(ssId, pVar); - } else { - execStatus = STATUS_FAILURE; - pvPut(execStatus); - } - } state asyncExecute - } -} - -/* This state set polls every second to keep the motor current position medm - * screen up to date when a scan is not running */ -ss xpsTrajectoryPosition { - state positionUpdate { - when (delay (1) && (execState == EXECUTE_STATE_DONE)) { - %%getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jpositionSocket, - pVar->groupName,pVar->numAxes,pos); - if (status != 0) - printMessage("Error performing GroupPositionCurrentGet%i\n", status); - /* Convert from XPS units (which are EPICS motor dial units) to user units */ - for (j=0; jnumAxes; j++) { - if (pVar->epicsMotorDir[j] == 0) dir=1; else dir=-1; - pos[j] = pos[j]*dir + pVar->epicsMotorOff[j]; - } - - return(status); -} - - -/* Returns 0 when no motors are moving */ -static int getMotorMoving(SS_ID ssId, struct UserVar *pVar) -{ - int status; - int moving=0; - int groupStatus; - - /* Read the current status of the group */ - - status = GroupStatusGet(pVar->pollSocket,pVar->groupName,&groupStatus); - if (status != 0) - printMessage("Error performing GroupStatusGet %i\n",status); - - if (groupStatus > 42) - moving = 1; - - return(moving); -} - -/* getEpicsMotorMoving returns the EPICS moving status of each motor, packed into - * a single int. Bit 0 = motor 1, bit 1 = motor 2, etc. 0=not moving, 1=moving. - * If the entire int is 0 then no motors are moving */ -static int getEpicsMotorMoving(SS_ID ssId, struct UserVar *pVar) -{ - int j; - int result=0, mask=0x01; - - for (j=0; jnumAxes; j++) { - seq_pvGet(ssId, pVar->epicsMotorDoneIndex[j], 0); - if (pVar->epicsMotorDone[j] == 0) result |= mask; - mask = mask << 1; - } - return(result); -} - -/* waitMotors waits for all motors to stop moving. It reads and posts the - * motor positions during each loop. */ -static int waitMotors(SS_ID ssId, struct UserVar *pVar) -{ - int j; - - /* Logic is that we always want to post position motor positions - * after the end of move is detected. */ - while(getMotorMoving(ssId, pVar)) { - /* Get the current motor positions, post them */ - getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jnumAxes; j++) { - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - epicsThreadSleep(POLL_INTERVAL); - } - getMotorPositions(ssId, pVar, pVar->motorCurrent); - for (j=0; jnumAxes; j++) { - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - return(0); -} - -/* waitEpicsMotors waits for all motors to stop moving using the EPICS motor - * records.. It reads and posts the motor positions during each loop. */ -static int waitEpicsMotors(SS_ID ssId, struct UserVar *pVar) -{ - int j; - - /* Logic is that we always want to post position motor positions - * after the end of move is detected. */ - while(getEpicsMotorMoving(ssId, pVar)) { - /* Get the current motor positions, post them */ - for (j=0; jnumAxes; j++) { - pVar->motorCurrent[j] = pVar->epicsMotorPos[j]; - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - epicsThreadSleep(POLL_INTERVAL); - } - for (j=0; jnumAxes; j++) { - pVar->motorCurrent[j] = pVar->epicsMotorPos[j]; - seq_pvPut(ssId, pVar->motorCurrentIndex[j], 0); - } - return(0); -} - -/* Function to ask the XPS for a socket this requires Socket.h */ -static int getSocket(SS_ID ssId, struct UserVar *pVar, double timeout) -{ - int sock = 0; - - sock = TCP_ConnectToServer(pVar->xpsAddress, pVar->xpsPort, timeout); - if (sock < 0) - printMessage("Error TCP_ConnectToServer, status=%d\n",sock); - return (sock); -} - - -/* Function to setup the gathering, events and start the trajectory */ -static void trajectoryExecute(SS_ID ssId, struct UserVar *pVar) -{ - int status; - int j; - char buffer[MAX_GATHERING_STRING]; - int eventId; - - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " entry\n"); - } - /* Configure Gathering */ - /* Reset gathering. - * This must be done because GatheringOneData just appends to in-memory list */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling GatheringReset(%d)\n", pVar->pollSocket); - } - status = GatheringReset(pVar->pollSocket); - if (status != 0) { - printMessage("Error performing GatheringReset, status=%d\n",status); - return; - } - - /* Write list of gathering parameters. - * Note that there must be NUM_GATHERING_ITEMS per axis in this list. */ - strcpy(buffer, ""); - for (j=0; jnumAxes; j++) { - strcat (buffer, pVar->axisName[j]); - strcat (buffer, ".SetpointPosition;"); - strcat (buffer, pVar->axisName[j]); - strcat (buffer, ".CurrentPosition;"); - } - - /* Define what is to be saved in the GatheringExternal.dat. - * 3 pieces of information per axis. */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling GatheringConfigurationSet(%d, %d, %s)\n", - pVar->pollSocket, pVar->numAxes*NUM_GATHERING_ITEMS, buffer); - } - status = GatheringConfigurationSet(pVar->pollSocket, - pVar->numAxes*NUM_GATHERING_ITEMS, buffer); - if (status != 0) - printMessage("Error performing GatheringConfigurationSet, status=%d, buffer=%p\n", - status, buffer); - - /* Define trajectory output pulses. - * startPulses and endPulses are defined as 1=first real element, need to add - * 1 to each to skip the acceleration element. - * The XPS is told the element to stop outputting pulses, and it seems to stop - * outputting at the start of that element. So we need to have that element be - * the decceleration endPulses is the element, which means adding another +1. */ - - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling MultipleAxesPVTPulseOutputSet(%d, %s, %d, %d, %f)\n", - pVar->pollSocket, pVar->groupName, - pVar->startPulses+1, - pVar->endPulses+1, - pVar->pulsePeriod); - } - status = MultipleAxesPVTPulseOutputSet(pVar->pollSocket, pVar->groupName, - pVar->startPulses+1, - pVar->endPulses+1, - pVar->pulsePeriod); - - /* Define trigger */ - sprintf(buffer, "Always;%s.PVT.TrajectoryPulse", pVar->groupName); - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling EventExtendedConfigurationTriggerSet(%d, %d, %s, %s, %s, %s, %s)\n", - pVar->pollSocket, 2, buffer, - "", "", "", ""); - } - status = EventExtendedConfigurationTriggerSet(pVar->pollSocket, 2, buffer, - "", "", "", ""); - if (status != 0) { - printMessage("Error performing EventExtendedConfigurationTriggerSet, status=%d, buffer=%s\n", - status, buffer); - return; - } - - /* Define action */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling EventExtendedConfigurationActionSet(%d, %d, %s, %s, %s, %s, %s)\n", - pVar->pollSocket, 1, - "GatheringOneData", - "", "", "", ""); - } - status = EventExtendedConfigurationActionSet(pVar->pollSocket, 1, - "GatheringOneData", - "", "", "", ""); - if (status != 0) { - printMessage("Error performing EventExtendedConfigurationActionSet, status=%d\n", - status); - return; - } - - /* Start gathering */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling EventExtendedStart(%d, %p)\n", - pVar->pollSocket, &eventId); - } - status= EventExtendedStart(pVar->pollSocket, &eventId); - if (status != 0) { - printMessage("Error performing EventExtendedStart, status=%d\n",status); - return; - } - - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling MultipleAxesPVTExecution(%d, %s, %s, %d)\n", - pVar->driveSocket, pVar->groupName, - pVar->trajectoryFile, 1); - } - status = MultipleAxesPVTExecution(pVar->driveSocket, pVar->groupName, - pVar->trajectoryFile, 1); - /* status -27 means the trajectory was aborted */ - if ((status != 0) && (status != -27)) - printMessage("Error performing MultipleAxesPVTExecution, status=%d\n", status); - - /* Remove the event */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling EventExtendedRemove(%d, %d)\n", pVar->pollSocket, eventId); - } - status = EventExtendedRemove(pVar->pollSocket, eventId); - if (status != 0) { - printMessage("Error performing ExtendedEventRemove, status=%d\n",status); - return; - } - - /* Stop the gathering */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: trajectoryExecute:" - " calling GatheringStop(%d)\n", pVar->pollSocket); - } - status = GatheringStop(pVar->pollSocket); - - /* status -30 means gathering not started i.e. aborted before the end of - 1 trajectory element */ - if ((status != 0) && (status != -30)) - printMessage("Error performing GatheringStop, status=%d\n", status); - - return; -} - - -/* Function to build, install and verify trajectory */ -static void buildAndVerify(SS_ID ssId, struct UserVar *pVar) -{ - FILE *trajFile; - int i, j, status; - int npoints; - double trajVel; - double D0, D1, T0, T1; - SOCKET ftpSocket; - char fileName[NAME_LEN]; - double distance; - double maxVelocity[MAX_AXES], maxAcceleration[MAX_AXES]; - double minJerkTime[MAX_AXES], maxJerkTime[MAX_AXES]; - double preTimeMax, postTimeMax; - double preVelocity[MAX_AXES], postVelocity[MAX_AXES]; - double time; - int dir[MAX_AXES]; - - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: buildAndVerify:" - " entry\n"); - } - /* We create trajectories with an extra element at the beginning and at the end. - * The distance and time of the first element is defined so that the motors will - * accelerate from 0 to the velocity of the first "real" element at their - * maximum allowed acceleration. - * Similarly, the distance and time of last element is defined so that the - * motors will decelerate from the velocity of the last "real" element to 0 - * at the maximum allowed acceleration. - - /* Compute the velocity of each motor during the first real trajectory element, - * and the time required to reach this velocity. */ - preTimeMax = 0.; - postTimeMax = 0.; - /* Zero values since axes may not be used */ - for (j=0; jnumAxes; j++) { - preVelocity[j] = 0.; - postVelocity[j] = 0.; - } - for (j=0; jnumAxes; j++) { - if (!pVar->moveAxis[j]) continue; - status = PositionerSGammaParametersGet(pVar->pollSocket, pVar->axisName[j], - &maxVelocity[j], &maxAcceleration[j], - &minJerkTime[j], &maxJerkTime[j]); - if (status != 0) { - printMessage("Error calling positionerSGammaParametersSet, status=%d\n", - status); - } - /* The calculation using maxAcceleration read from controller below - * is "correct" but subject to roundoff errors when sending ASCII commands - * to XPS. Reduce acceleration 10% to account for this. */ - maxAcceleration[j] = 0.9 * maxAcceleration[j]; - /* Note: the preDistance and postDistance numbers computed here are - * in user coordinates, not XPS coordinates, because they are used for - * EPICS moves at the start and end of the scan */ - if (pVar->moveMode == MOVE_MODE_RELATIVE) { - distance = pVar->motorTrajectory[j][0]; - } else { - distance = pVar->motorTrajectory[j][1] - pVar->motorTrajectory[j][0]; - } - preVelocity[j] = distance/pVar->timeTrajectory[0]; - time = fabs(preVelocity[j]) / maxAcceleration[j]; - if (time > preTimeMax) preTimeMax = time; - if (pVar->moveMode == MOVE_MODE_RELATIVE) { - distance = pVar->motorTrajectory[j][pVar->nelements-1]; - } else { - distance = pVar->motorTrajectory[j][pVar->nelements-1] - - pVar->motorTrajectory[j][pVar->nelements-2]; - } - postVelocity[j] = distance/pVar->timeTrajectory[pVar->nelements-1]; - time = fabs(postVelocity[j]) / maxAcceleration[j]; - if (time > postTimeMax) postTimeMax = time; - } - - /* Compute the distance that each motor moves during its acceleration phase. - * Only move it this far. */ - for (j=0; jnumAxes; j++) { - pVar->preDistance[j] = 0.5 * preVelocity[j] * preTimeMax; - pVar->postDistance[j] = 0.5 * postVelocity[j] * postTimeMax; - } - - /* Create the trajectory file */ - trajFile = fopen (pVar->trajectoryFile, "w"); - - /* Compute the sign relationship of user coordinates to XPS coordinates for - * each axis */ - for (j=0; jnumAxes; j++) { - if (pVar->epicsMotorDir[j] == 0) dir[j]=1; else dir[j]=-1; - } - /* Create the initial acceleration element */ - fprintf(trajFile,"%f", preTimeMax); - for (j=0; jnumAxes; j++) - fprintf(trajFile,", %f, %f", pVar->preDistance[j]*dir[j], preVelocity[j]*dir[j]); - fprintf(trajFile,"\n"); - - /* The number of points in the file is nelements for MOVE_MODE_RELATIVE and - * nelements-1 for other modes */ - if (pVar->moveMode == MOVE_MODE_RELATIVE) - npoints = pVar->nelements; - else - npoints = pVar->nelements-1; - for (i=0; itimeTrajectory[i]; - if (i < npoints-1) - T1 = pVar->timeTrajectory[i+1]; - else - T1 = T0; - for (j=0; jnumAxes; j++) { - if (pVar->moveMode == MOVE_MODE_RELATIVE) { - D0 = pVar->motorTrajectory[j][i] * dir[j]; - if (i < npoints-1) - D1 = pVar->motorTrajectory[j][i+1] * dir[j]; - else - D1 = D0; - } else { - D0 = pVar->motorTrajectory[j][i+1] *dir[j] - - pVar->motorTrajectory[j][i] * dir[j]; - if (i < npoints-1) - D1 = pVar->motorTrajectory[j][i+2] * dir[j] - - pVar->motorTrajectory[j][i+1] * dir[j]; - else - D1 = D0; - } - - /* Average either side of the point? */ - trajVel = ((D0 + D1) / (T0 + T1)); - if (!(pVar->moveAxis[j])) { - D0 = 0.0; /* Axis turned off*/ - trajVel = 0.0; - } - - if (j == 0) fprintf(trajFile,"%f", pVar->timeTrajectory[i]); - fprintf(trajFile,", %f, %f",D0,trajVel); - if (j == (pVar->numAxes-1)) fprintf(trajFile,"\n"); - } - } - - /* Create the final acceleration element. Final velocity must be 0. */ - fprintf(trajFile,"%f", postTimeMax); - for (j=0; jnumAxes; j++) - fprintf(trajFile,", %f, %f", pVar->postDistance[j]*dir[j], 0.); - fprintf(trajFile,"\n"); - fclose (trajFile); - - /* FTP the trajectory file from the local directory to the XPS */ - status = ftpConnect(pVar->xpsAddress, pVar->userName, pVar->password, &ftpSocket); - if (status != 0) { - printMessage("Error calling ftpConnect, status=%d\n", status); - return; - } - status = ftpChangeDir(ftpSocket, TRAJECTORY_DIRECTORY); - if (status != 0) { - printMessage("Error calling ftpChangeDir, status=%d\n", status); - return; - } - status = ftpStoreFile(ftpSocket, pVar->trajectoryFile); - if (status != 0) { - printMessage("Error calling ftpStoreFile, status=%d\n", status); - return; - } - status = ftpDisconnect(ftpSocket); - if (status != 0) { - printMessage("Error calling ftpDisconnect, status=%d\n", status); - return; - } - - /* Verify trajectory */ - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: buildAndVerify:" - " calling MultipleAxesPVTVerification(%d, %s, %s)\n", - pVar->pollSocket, pVar->groupName, pVar->trajectoryFile); - } - status = MultipleAxesPVTVerification(pVar->pollSocket, pVar->groupName, - pVar->trajectoryFile); - - pVar->buildStatus = STATUS_FAILURE; - if (status == 0) { - strcpy(pVar->buildMessage, " "); - pVar->buildStatus = STATUS_SUCCESS; - } - else if (status == -69) - strcpy(pVar->buildMessage, "Acceleration Too High"); - else if (status == -68) - strcpy(pVar->buildMessage, "Velocity Too High"); - else if (status == -70) - strcpy(pVar->buildMessage, "Final Velocity Non Zero"); - else if (status == -75) - strcpy(pVar->buildMessage, "Negative or Null Delta Time"); - else - sprintf(pVar->buildMessage, "Unknown trajectory verify error=%d", status); - - /* Read dynamic parameters*/ - - if (status == 0){ - pVar->buildStatus = STATUS_SUCCESS; - } - if (1) { /* We may need to test for status here */ - for (j=0; jnumAxes; j++) { - status = MultipleAxesPVTVerificationResultGet(pVar->pollSocket, - pVar->axisName[j], fileName, &pVar->motorMinPos[j], &pVar->motorMaxPos[j], - &pVar->motorMVA[j], &pVar->motorMAA[j]); - if (status != 0) { - printMessage("Error performing MultipleAxesPVTVerificationResultGet for axis %s, status=%d\n", - pVar->axisName[j], status); - } - } - } else { - for (j=0; jnumAxes; j++) { - pVar->motorMVA[j] = 0; - pVar->motorMAA[j] = 0; - } - } - - return; -} - - -/* Function returns the current trajectory element*/ -static int currentElement(SS_ID ssId, struct UserVar *pVar) -{ - int status; - int number; - char fileName[100]; - - status = MultipleAxesPVTParametersGet(pVar->pollSocket, - pVar->groupName, fileName, &number); - if (status != 0) - printMessage("Error performing MultipleAxesPVTParametersGet, status=%d\n", - status); - return (number); -} - -static int getGroupStatus(SS_ID ssId, struct UserVar *pVar) -{ - int status; - int groupStatus; - - /* Read the current status of the group */ - - status = GroupStatusGet(pVar->pollSocket,pVar->groupName,&groupStatus); - if (status != 0) - printMessage("Error performing GroupStatusGet, status=%d\n", status); - return(groupStatus); -} - - -/* Function to read the gathering data that was collected - * by the XPS as the trajectory was performed and read back the - * actual motor positions and calculate the position errors */ -static void readGathering(SS_ID ssId, struct UserVar *pVar) -{ - char *buffer, *bptr, *tptr; - int currentSamples, maxSamples; - double setpointPosition, actualPosition; - int status; - int dir; - int i, j; - int nitems; - int numRead, numInBuffer, numChars; - - - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: readGathering:" - " entry\n"); - } - /* Read the number of lines of gathering */ - status = GatheringCurrentNumberGet(pVar->pollSocket, ¤tSamples, &maxSamples); - if (status != 0) { - printMessage("Error calling GatherCurrentNumberGet, status=%d\n", status); - return; - } - if (currentSamples != pVar->npulses) { - printMessage("readGathering: error, npulses=%d, currentSamples=%d\n", - pVar->npulses, currentSamples); - return; - } - buffer = (char *)calloc(GATHERING_MAX_READ_LEN, sizeof(char)); - numInBuffer = 0; - for (numRead=0; numRead 0)) { - status = GatheringDataMultipleLinesGet(pVar->pollSocket, numRead, numInBuffer, buffer); - if (pVar->debugLevel > 0) { - printMessage("readGathering: GatheringDataMultipleLinesGet, status=%d, numInBuffer=%d\n", status, numInBuffer); - } - if (status) numInBuffer /= 2; - } - if (numInBuffer == 0) { - printMessage("Error reading gathering data, numInBuffer = 0\n"); - goto done; - } - bptr = buffer; - for (i=0; inumAxes; j++) { - nitems = sscanf(bptr, "%lf;%lf%n", - &setpointPosition, &actualPosition, &numChars); - bptr += numChars+1; - if (nitems != NUM_GATHERING_ITEMS) { - printMessage("Error reading Gathering.dat file, nitems=%d, should be %d\n", - nitems, NUM_GATHERING_ITEMS); - goto done; - } - pVar->motorError[j][numRead] = actualPosition - setpointPosition; - /* Convert from XPS units to EPICS motor user units */ - if (pVar->epicsMotorDir[j] == 0) dir=1; else dir=-1; - pVar->motorReadbacks[j][numRead] = actualPosition * dir + pVar->epicsMotorOff[j]; - } - numRead++; - pVar->nactual = numRead; - bptr = tptr + 1; - } - } - - done: - free(buffer); - if (pVar->debugLevel > 0) { - printMessage("XPS_trajectoryScan: readGathering:" - " exit\n"); - } - - return; -} - -/* Function aborts the trajectory/motion */ -static int trajectoryAbort(SS_ID ssId, struct UserVar *pVar) -{ - int status; - - status = GroupMoveAbort(pVar->abortSocket,pVar->groupName); - if (status != 0) - printMessage("Error performing GroupMoveAbort, status=%d\n", status); - - return (0); -} - -static void printMessage(const char *pformat, ...) -{ - va_list pvar; - FILE *fp = stdout; - epicsTimeStamp now; - char nowText[40]; - - epicsTimeGetCurrent(&now); - nowText[0] = 0; - epicsTimeToStrftime(nowText,sizeof(nowText), - "%Y/%m/%d %H:%M:%S.%03f",&now); - fprintf(fp,"%s ",nowText); - va_start(pvar, pformat); - vfprintf(fp,pformat,pvar); - va_end(pvar); - fflush(fp); -} - -}% diff --git a/motorApp/NewportSrc/asynOctetSocket.cpp b/motorApp/NewportSrc/asynOctetSocket.cpp deleted file mode 100644 index 0336935c..00000000 --- a/motorApp/NewportSrc/asynOctetSocket.cpp +++ /dev/null @@ -1,327 +0,0 @@ -/* This script was adapted from the Newport Socket.cpp code - to provide TCP/IP sockets for the XPSC8 motion controller - using EPICS asynOctetSyncIO.cc - - By Jon Kelly July 2005 - Re-written by Mark Rivers March 2006 -*/ - -/* includes */ - -#ifdef vxWorks -#else -#define TRUE 1 -#define FALSE 0 -typedef int BOOL; -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* The maximum number of sockets to XPS controllers. The driver uses - * one socket per motor plus one per controller, so a maximum of 9 per controller. - * This number is used to create an array because the Newport code uses integers for - * the socket ID. */ -#define MAX_SOCKETS 1000 -#define PORT_NAME_SIZE 100 -#define ERROR_STRING_SIZE 100 -#define DEFAULT_TIMEOUT 0.2 -#define XPS_TERMINATOR ",EndOfAPI" - -#define MAX_RETRIES 2 - -static int nextSocket = 0; - -/* Pointer to the connection info for each socket - the asynUser structure is defined in asynDriver.h */ -typedef struct { - asynUser *pasynUser; - asynUser *pasynUserCommon; - double timeout; - char errorString[ERROR_STRING_SIZE]; - int connected; - epicsMutexId mutexId; -} socketStruct; -static socketStruct socketStructs[MAX_SOCKETS]; - - -/***************************************************************************************/ -int ConnectToServer(char *IpAddress, int IpPort, double timeout) -{ - - char portName[PORT_NAME_SIZE]; - char ipString[PORT_NAME_SIZE]; - asynUser *pasynUser, *pasynUserCommon; - socketStruct *psock; - int status; - - if (nextSocket >= MAX_SOCKETS) { - printf("ConnectToServer: too many open sockets, max=%d\n", MAX_SOCKETS); - return -1; - } - /* Create a new asyn port */ - epicsSnprintf(ipString, PORT_NAME_SIZE, "%s:%d TCP", IpAddress, IpPort); - epicsSnprintf(portName, PORT_NAME_SIZE, "%s:%d:%d", IpAddress, IpPort, nextSocket); - /* Create port with autoConnect and noProcessEos options */ - drvAsynIPPortConfigure(portName, ipString, 0, 0, 1); - - /* Connect to driver with asynOctet interface */ - status = pasynOctetSyncIO->connect(portName, 0, &pasynUser, NULL); - if (status != asynSuccess) { - printf("ConnectToServer, error calling pasynOctetSyncIO->connect %s\n", pasynUser->errorMessage); - return -1; - } - psock = &socketStructs[nextSocket]; - psock->pasynUser = pasynUser; - - /* Connect to driver with asynCommon interface */ - status = pasynCommonSyncIO->connect(portName, 0, &pasynUserCommon, NULL); - if (status != asynSuccess) { - printf("ConnectToServer, error calling pasynCommonSyncIO->connect %s\n", - pasynUserCommon->errorMessage); - return -1; - } - psock->pasynUserCommon = pasynUserCommon; - - /* Create a mutex to prevent more than 1 thread using socket at once - * Normally the SyncIO-.writeRead function takes care of this, but for long responses - * we can't use a single write/read operation */ - psock->mutexId = epicsMutexMustCreate(); - - psock->timeout = timeout; - psock->connected = 1; - strcpy(psock->errorString, ""); - - nextSocket++; - return nextSocket-1; -} - -/***************************************************************************************/ -void SetTCPTimeout(int SocketIndex, double TimeOut) -{ - if ((SocketIndex < 0) || (SocketIndex >= nextSocket)) { - printf("SetTCPTimeout, SocketIndex=%d, must be >=0 and < %d\n", SocketIndex, nextSocket); - return; - } - socketStructs[SocketIndex].timeout = TimeOut; -} - - -/***************************************************************************************/ -void SendAndReceive (int SocketIndex, char buffer[], char valueRtrn[], int returnSize) -{ - size_t nbytesOut; - size_t nbytesIn; - int eomReason; - int bufferLength; - socketStruct *psock; - int status; - int retries; - int errStat; - size_t nread; - - /* Check to see if the Socket is valid! */ - - bufferLength = (int)strlen(buffer); - if ((SocketIndex < 0) || (SocketIndex >= nextSocket)) { - printf("SendAndReceive: invalid SocketIndex %d\n", SocketIndex); - strcpy(valueRtrn,"-22"); - return; - } - psock = &socketStructs[SocketIndex]; - if (!psock->connected) { - printf("SendAndReceive: socket not connected %d\n", SocketIndex); - strcpy(valueRtrn,"-22"); - return; - } - - epicsMutexMustLock(psock->mutexId); - /* If timeout > 0. then we do a write read. If < 0. then write. */ - - if (psock->timeout > 0.0) { - status = pasynOctetSyncIO->writeRead(psock->pasynUser, - (char const *)buffer, - bufferLength, - valueRtrn, - returnSize, - psock->timeout, - &nbytesOut, - &nbytesIn, - &eomReason); - if ( status != asynSuccess ) { - asynPrint(psock->pasynUser, ASYN_TRACE_ERROR, - "SendAndReceive error calling writeRead, output=%s status=%d, error=%s\n", - buffer, status, psock->pasynUser->errorMessage); - } - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "SendAndReceive, sent: '%s', received: '%s'\n", - buffer, valueRtrn); - nread = nbytesIn; - /* Loop until we the response contains ",EndOfAPI" or we get an error */ - while ((status==asynSuccess) && - (strcmp(valueRtrn + nread - strlen(XPS_TERMINATOR), XPS_TERMINATOR) != 0)) { - status = pasynOctetSyncIO->read(psock->pasynUser, - &valueRtrn[nread], - returnSize-nread, - psock->timeout, - &nbytesIn, - &eomReason); - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "SendAndReceive, received: nread=%d, returnSize-nread=%d, nbytesIn=%d\n", - (int)nread, returnSize-nread, (int)nbytesIn); - nread += nbytesIn; - } - } else { - /* This is typically used for the "Move" commands, and we don't want to wait for the response */ - /* Fake the response by putting "-1" (for error) or "0" (for success) in the return string */ - for (retries=0; retrieswriteRead(psock->pasynUser, - (char const *)buffer, - bufferLength, - valueRtrn, - returnSize, - -psock->timeout, - &nbytesOut, - &nbytesIn, - &eomReason); - if (status == asynError) { - asynPrint(psock->pasynUser, ASYN_TRACE_ERROR, - "SendAndReceive error calling write, output=%s status=%d, error=%s\n", - buffer, status, psock->pasynUser->errorMessage); - strcpy(valueRtrn, "-1"); - break; - } - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "SendAndReceive, sent: '%s'\n", buffer); - /* A timeout is OK */ - if (status == asynTimeout) { - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "SendAndReceive, timeout on read\n"); - strcpy(valueRtrn, "0"); - break; - } else { - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "SendAndReceive, read: '%s'\n", valueRtrn); - errStat = atoi(valueRtrn); - if (errStat == 0) break; /* All done */ - if (errStat == -1) continue; /* Error that previous command not complete */ - asynPrint(psock->pasynUser, ASYN_TRACE_ERROR, - "SendAndReceive unexpected response =%s\n", - valueRtrn); - break; - } - } - if (retries == MAX_RETRIES) strcpy(valueRtrn, "0"); - } - epicsMutexUnlock(psock->mutexId); -} - - -/***************************************************************************************/ -int ReadXPSSocket (int SocketIndex, char valueRtrn[], int returnSize, double timeout) -{ - size_t nbytesIn; - int eomReason; - socketStruct *psock; - int status; - size_t nread=0; - - /* Check to see if the Socket is valid! */ - if ((SocketIndex < 0) || (SocketIndex >= nextSocket)) { - printf("ReadXPSSocket: invalid SocketIndex %d\n", SocketIndex); - strcpy(valueRtrn,"-22"); - return -1; - } - psock = &socketStructs[SocketIndex]; - if (!psock->connected) { - printf("ReadXPSSocket: socket not connected %d\n", SocketIndex); - strcpy(valueRtrn,"-22"); - return -1; - } - - /* Loop until we the response contains ",EndOfAPI" or we get an error */ - do { - status = pasynOctetSyncIO->read(psock->pasynUser, - &valueRtrn[nread], - returnSize-nread, - timeout, - &nbytesIn, - &eomReason); - asynPrint(psock->pasynUser, ASYN_TRACEIO_DRIVER, - "ReadXPSSocket, received: nread=%d, returnSize-nread=%d, nbytesIn=%d\n", - (int)nread, returnSize-nread, (int)nbytesIn); - nread += nbytesIn; - } while ((status==asynSuccess) && - (strcmp(valueRtrn + nread - strlen(XPS_TERMINATOR), XPS_TERMINATOR) != 0)); - return (int)nread; -} - - -/***************************************************************************************/ -void CloseSocket(int SocketIndex) -{ - socketStruct *psock; - asynUser *pasynUser; - int status; - - if ((SocketIndex < 0) || (SocketIndex >= nextSocket)) { - printf("CloseSocket: invalid SocketIndex %d\n", SocketIndex); - return; - } - psock = &socketStructs[SocketIndex]; - pasynUser = psock->pasynUserCommon; - status = pasynCommonSyncIO->disconnectDevice(pasynUser); - if (status != asynSuccess ) { - asynPrint(pasynUser, ASYN_TRACE_ERROR, - "CloseSocket: error calling pasynCommonSyncIO->disconnect, status=%d, %s\n", - status, pasynUser->errorMessage); - return; - } - psock->connected = 0; -} - -/***************************************************************************************/ -void closeXPSSockets(void) -{ - int i; - - for (i=0; i= nextSocket)) { - printf("GetError: invalid SocketIndex %d\n", SocketIndex); - return (char *)"Invalid socket"; - } - return socketStructs[SocketIndex].errorString; -} - -/***************************************************************************************/ -void strncpyWithEOS(char * szStringOut, const char * szStringIn, int nNumberOfCharToCopy, int nStringOutSize) -{ - if (nNumberOfCharToCopy < nStringOutSize) - { - strncpy (szStringOut, szStringIn, nNumberOfCharToCopy); - szStringOut[nNumberOfCharToCopy] = '\0'; - } - else - { - strncpy (szStringOut, szStringIn, nStringOutSize - 1); - szStringOut[nStringOutSize - 1] = '\0'; - } -} diff --git a/motorApp/NewportSrc/asynOctetSocket.h b/motorApp/NewportSrc/asynOctetSocket.h deleted file mode 100644 index 88f36e29..00000000 --- a/motorApp/NewportSrc/asynOctetSocket.h +++ /dev/null @@ -1 +0,0 @@ -int ReadXPSSocket (int SocketIndex, char valueRtrn[], int returnSize, double timeout); diff --git a/motorApp/NewportSrc/devESP300.cc b/motorApp/NewportSrc/devESP300.cc deleted file mode 100644 index ec26a08c..00000000 --- a/motorApp/NewportSrc/devESP300.cc +++ /dev/null @@ -1,299 +0,0 @@ -/* -FILENAME... devESP300.cc -USAGE... Motor record device level support for Newport ESP300. - -*/ - -/* - * Original Author: Ron Sluiter - * Date: 02/19/03 - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 05-23-03 rls Converted to R3.14.x. - * .02 10-28-03 rls User must set MRES to drive resolution. - */ - -#include -#include -#include -#include "motorRecord.h" -#include "motor.h" -#include "motordevCom.h" -#include "drvMMCom.h" -#include "epicsExport.h" - -extern struct driver_table ESP300_access; - -/* ----------------Create the dsets for devESP300----------------- */ -/* static long report(); */ -static struct driver_table *drvtabptr; -static long ESP300_init(int); -static long ESP300_init_record(void *); -static long ESP300_start_trans(struct motorRecord *); -static RTN_STATUS ESP300_build_trans(motor_cmnd, double *, struct motorRecord *); -static RTN_STATUS ESP300_end_trans(struct motorRecord *); - -struct motor_dset devESP300 = -{ - {8, NULL, (DEVSUPFUN) ESP300_init, (DEVSUPFUN) ESP300_init_record, NULL}, - motor_update_values, - ESP300_start_trans, - ESP300_build_trans, - ESP300_end_trans -}; - -extern "C" {epicsExportAddress(dset,devESP300);} - -/* --------------------------- program data --------------------- */ - -/* This table is used to define the command types */ -/* WARNING! this must match "motor_cmnd" in motor.h */ - -static msg_types ESP300_table[] = { - MOTION, /* MOVE_ABS */ - MOTION, /* MOVE_REL */ - MOTION, /* HOME_FOR */ - MOTION, /* HOME_REV */ - IMMEDIATE, /* LOAD_POS */ - IMMEDIATE, /* SET_VEL_BASE */ - IMMEDIATE, /* SET_VELOCITY */ - IMMEDIATE, /* SET_ACCEL */ - IMMEDIATE, /* GO */ - IMMEDIATE, /* SET_ENC_RATIO */ - INFO, /* GET_INFO */ - MOVE_TERM, /* STOP_AXIS */ - VELOCITY, /* JOG */ - IMMEDIATE, /* SET_PGAIN */ - IMMEDIATE, /* SET_IGAIN */ - IMMEDIATE, /* SET_DGAIN */ - IMMEDIATE, /* ENABLE_TORQUE */ - IMMEDIATE, /* DISABL_TORQUE */ - IMMEDIATE, /* PRIMITIVE */ - IMMEDIATE, /* SET_HIGH_LIMIT */ - IMMEDIATE, /* SET_LOW_LIMIT */ - VELOCITY /* JOG_VELOCITY */ -}; - - -static struct board_stat **ESP300_cards; - -/* --------------------------- program data --------------------- */ - - -/* initialize device support for ESP300 stepper motor */ -static long ESP300_init(int after) -{ - long rtnval; - - if (!after) - { - drvtabptr = &ESP300_access; - (drvtabptr->init)(); - } - - rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &ESP300_cards); - return(rtnval); -} - - -/* initialize a record instance */ -static long ESP300_init_record(void *arg) -{ - struct motorRecord *mr = (struct motorRecord *) arg; - long rtnval; - - rtnval = motor_init_record_com(mr, *drvtabptr->cardcnt_ptr, drvtabptr, ESP300_cards); - - return(rtnval); -} - - -/* start building a transaction */ -static long ESP300_start_trans(struct motorRecord *mr) -{ - return(motor_start_trans_com(mr, ESP300_cards)); -} - - -/* end building a transaction */ -static RTN_STATUS ESP300_end_trans(struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - char *msgptr; - size_t last; - - /* Remove trailing ';'s from message. */ - motor_call = &(trans->motor_call); - msgptr = motor_call->message; - last = strlen(msgptr) - 1; - if (msgptr[last] == ';') - msgptr[last] = (char) NULL; - - return(motor_end_trans_com(mr, drvtabptr)); -} - - -/* add a part to the transaction */ -static RTN_STATUS ESP300_build_trans(motor_cmnd command, double *parms, struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - struct controller *brdptr; - struct MMcontroller *cntrl; - char buff[80]; - int axis, card; - size_t size; - double dval, cntrl_units; - RTN_STATUS rtnval; - - rtnval = OK; - buff[0] = '\0'; - - /* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */ - dval = (parms == NULL) ? 0.0 : *parms; - - motor_call = &(trans->motor_call); - card = motor_call->card; - axis = motor_call->signal + 1; - brdptr = (*trans->tabptr->card_array)[card]; - if (brdptr == NULL) - return(rtnval = ERROR); - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - cntrl_units = dval * cntrl->drive_resolution[axis - 1]; - - if (ESP300_table[command] > motor_call->type) - motor_call->type = ESP300_table[command]; - - if (trans->state != BUILD_STATE) - return(rtnval = ERROR); - - if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0) - { - strcat(motor_call->message, mr->init); - strcat(motor_call->message, "\r"); - } - - switch (command) - { - case MOVE_ABS: - case MOVE_REL: - case HOME_FOR: - case HOME_REV: - case JOG: - if (strlen(mr->prem) != 0) - { - strcat(motor_call->message, mr->prem); - strcat(motor_call->message, ";"); - } - if (strlen(mr->post) != 0) - motor_call->postmsgptr = (char *) &mr->post; - default: - break; - } - - - switch (command) - { - case MOVE_ABS: - sprintf(buff, "%.2dPA%f;", axis, cntrl_units); - break; - case MOVE_REL: - sprintf(buff, "%.2dPR%f;", axis, cntrl_units); - break; - case HOME_FOR: - case HOME_REV: - sprintf(buff, "%.2dOR;", axis); - break; - case LOAD_POS: - sprintf(buff, "%.2dDH%f", axis, cntrl_units); - break; - case SET_VEL_BASE: - sprintf(buff, "%.2dVB%f;", axis, cntrl_units); - break; - case SET_VELOCITY: - sprintf(buff, "%.2dVA%f;", axis, cntrl_units); - break; - case SET_ACCEL: - sprintf(buff, "%.2dAC%f;%.2dAG%f;", axis, cntrl_units, axis, cntrl_units); - break; - case GO: - /* - * The ESP300 starts moving immediately on move commands, GO command - * does nothing - */ - break; - case SET_ENC_RATIO: - case GET_INFO: - /* These commands are not actually done by sending a message, but - rather they will indirectly cause the driver to read the status - of all motors */ - break; - case STOP_AXIS: - sprintf(buff, "%.2dST;", axis); - break; - case JOG: - sprintf(buff, "%.2dVA%f;", axis, fabs(cntrl_units)); - strcat(motor_call->message, buff); - if (cntrl_units > 0) - sprintf(buff, "%.2dMV+;", axis); - else - sprintf(buff, "%.2dMV-;", axis); - break; - case SET_PGAIN: - sprintf(buff, "%dKP%f;%dUF;", axis, cntrl_units, axis); - break; - case SET_IGAIN: - sprintf(buff, "%dKI%f;%dUF;", axis, cntrl_units, axis); - break; - case SET_DGAIN: - sprintf(buff, "%dKD%f;%dUF;", axis, cntrl_units, axis); - break; - case ENABLE_TORQUE: - sprintf(buff, "%.2dMO;", axis); - break; - case DISABL_TORQUE: - sprintf(buff, "%.2dMF;", axis); - break; - case SET_HIGH_LIMIT: - sprintf(buff, "%.2dSR%f;", axis, cntrl_units); - break; - case SET_LOW_LIMIT: - sprintf(buff, "%.2dSL%f;", axis, cntrl_units); - break; - default: - rtnval = ERROR; - } - - size = strlen(buff); - if (size > sizeof(buff) || (strlen(motor_call->message) + size) > MAX_MSG_SIZE) - errlogMessage("ESP300_build_trans(): buffer overflow.\n"); - else - strcat(motor_call->message, buff); - - return(rtnval); -} diff --git a/motorApp/NewportSrc/devMM3000.cc b/motorApp/NewportSrc/devMM3000.cc deleted file mode 100644 index 1f9cd993..00000000 --- a/motorApp/NewportSrc/devMM3000.cc +++ /dev/null @@ -1,344 +0,0 @@ -/* -FILENAME... devMM3000.cc -USAGE... Motor record device level support for Newport MM3000. - -*/ - -/* - * Original Author: Mark Rivers - * Date: 10/16/97 - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .00 10-16-97 mlr initialized from devOms58 - * .01 07-19-99 rls initialized from drvMM4000 - * .02 04-21-01 rls Added jog velocity motor command. - * .03 05-22-03 rls Converted to R3.14.x. - */ - - -#include -#include -#include -#include -#include "motorRecord.h" -#include "motor.h" -#include "motordevCom.h" -#include "drvMMCom.h" -#include "epicsExport.h" - -#define STATIC static - -extern struct driver_table MM3000_access; - -/* ----------------Create the dsets for devMM3000----------------- */ -/* static long report(); */ -STATIC struct driver_table *drvtabptr; -STATIC long MM3000_init(int); -STATIC long MM3000_init_record(void *); -STATIC long MM3000_start_trans(struct motorRecord *); -STATIC RTN_STATUS MM3000_build_trans(motor_cmnd, double *, struct motorRecord *); -STATIC RTN_STATUS MM3000_end_trans(struct motorRecord *); - -struct motor_dset devMM3000 = -{ - {8, NULL, (DEVSUPFUN) MM3000_init, (DEVSUPFUN) MM3000_init_record, NULL}, - motor_update_values, - MM3000_start_trans, - MM3000_build_trans, - MM3000_end_trans -}; - -extern "C" {epicsExportAddress(dset,devMM3000);} - -/* --------------------------- program data --------------------- */ - -/* This table is used to define the command types */ -/* WARNING! this must match "motor_cmnd" in motor.h */ - -static msg_types MM3000_table[] = { - MOTION, /* MOVE_ABS */ - MOTION, /* MOVE_REL */ - MOTION, /* HOME_FOR */ - MOTION, /* HOME_REV */ - IMMEDIATE, /* LOAD_POS */ - IMMEDIATE, /* SET_VEL_BASE */ - IMMEDIATE, /* SET_VELOCITY */ - IMMEDIATE, /* SET_ACCEL */ - IMMEDIATE, /* GO */ - IMMEDIATE, /* SET_ENC_RATIO */ - INFO, /* GET_INFO */ - MOVE_TERM, /* STOP_AXIS */ - VELOCITY, /* JOG */ - IMMEDIATE, /* SET_PGAIN */ - IMMEDIATE, /* SET_IGAIN */ - IMMEDIATE, /* SET_DGAIN */ - IMMEDIATE, /* ENABLE_TORQUE */ - IMMEDIATE, /* DISABL_TORQUE */ - IMMEDIATE, /* PRIMITIVE */ - IMMEDIATE, /* SET_HIGH_LIMIT */ - IMMEDIATE, /* SET_LOW_LIMIT */ - VELOCITY /* JOG_VELOCITY */ -}; - - -static struct board_stat **MM3000_cards; - -/* --------------------------- program data --------------------- */ - - -/* initialize device support for MM3000 stepper motor */ -STATIC long MM3000_init(int after) -{ - long rtnval; - - if (!after) - { - drvtabptr = &MM3000_access; - (drvtabptr->init)(); - } - - rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &MM3000_cards); - return(rtnval); -} - - -/* initialize a record instance */ -STATIC long MM3000_init_record(void *arg) -{ - struct motorRecord *mr = (struct motorRecord *) arg; - return(motor_init_record_com(mr, *drvtabptr->cardcnt_ptr, drvtabptr, MM3000_cards)); -} - - -/* start building a transaction */ -STATIC long MM3000_start_trans(struct motorRecord *mr) -{ - return(motor_start_trans_com(mr, MM3000_cards)); -} - - -/* end building a transaction */ -STATIC RTN_STATUS MM3000_end_trans(struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - char *msgptr; - size_t last; - - /* Remove trailing ';'s from message. */ - motor_call = &(trans->motor_call); - msgptr = motor_call->message; - last = strlen(msgptr) - 1; - if (msgptr[last] == ';') - msgptr[last] = (char) NULL; - - return(motor_end_trans_com(mr, drvtabptr)); -} - - -/* add a part to the transaction */ -STATIC RTN_STATUS MM3000_build_trans(motor_cmnd command, double *parms, struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - struct controller *brdptr; - struct MMcontroller *cntrl; - char buff[30]; - int axis, card; - size_t size; - int intval; - RTN_STATUS rtnval; - - rtnval = OK; - buff[0] = '\0'; - - motor_call = &(trans->motor_call); - card = motor_call->card; - axis = motor_call->signal + 1; - brdptr = (*trans->tabptr->card_array)[card]; - if (brdptr == NULL) - return(rtnval = ERROR); - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - - if (MM3000_table[command] > motor_call->type) - motor_call->type = MM3000_table[command]; - - if (trans->state != BUILD_STATE) - return(rtnval = ERROR); - - if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0) - { - strcat(motor_call->message, mr->init); - strcat(motor_call->message, "\r"); - } - - switch (command) - { - case SET_PGAIN: - case SET_IGAIN: - case SET_DGAIN: - { - double temp_dbl; - - temp_dbl = parms[0] * 32767.0; - intval = NINT(temp_dbl); - break; - } - - case MOVE_ABS: - case MOVE_REL: - case HOME_FOR: - case HOME_REV: - case JOG: - if (strlen(mr->prem) != 0) - { - strcat(motor_call->message, mr->prem); - strcat(motor_call->message, ";"); - } - if (strlen(mr->post) != 0) - motor_call->postmsgptr = (char *) &mr->post; - default: - /* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */ - intval = (parms == NULL) ? 0 : NINT(parms[0]); - break; - } - - - switch (command) - { - case MOVE_ABS: - sprintf(buff, "%dPA%d;", axis, intval); - break; - case MOVE_REL: - sprintf(buff, "%dPR%d;", axis, intval); - break; - case HOME_FOR: - case HOME_REV: - sprintf(buff, "%dOR1;", axis); - break; - case LOAD_POS: - if (*parms == 0.0) - sprintf(buff, "%dDH", axis); - else - rtnval = ERROR; - break; - case SET_VEL_BASE: - if (cntrl->type[axis - 1] == STEPPER) - { - if (intval < 100) - intval = 100; - sprintf(buff, "%dVB%d;", axis, intval); - } - break; - case SET_VELOCITY: - if (cntrl->type[axis - 1] == STEPPER && intval < 100) - intval = 100; - sprintf(buff, "%dVA%d;", axis, intval); - break; - case SET_ACCEL: - /* - * The value passed is in steps/sec/sec. - * Convert to user units/sec/sec - */ - if (cntrl->type[axis - 1] == STEPPER && intval < 15000) - intval = 15000; - if (cntrl->type[axis - 1] == DC && intval < 250) - intval = 250; - sprintf(buff, "%dAC%d;", axis, intval); - break; - case GO: - /* - * The MM3000 starts moving immediately on move commands, GO command - * does nothing - */ - break; - case SET_ENC_RATIO: - /* The motor record no longer passes unsigned values */ - parms[0] = fabs(parms[0]); - parms[1] = fabs(parms[1]); - - /* MM3000 valid encoder ratio values < 10,000. */ - while (parms[0] > 10000.0 || parms[1] > 10000.0) - { - parms[0] /= 10; - parms[1] /= 10; - } - if (cntrl->type[axis - 1] == STEPPER) - sprintf(buff, "%dER%d:%d", axis, (int) parms[0], (int) parms[1]); - break; - case GET_INFO: - /* These commands are not actually done by sending a message, but - rather they will indirectly cause the driver to read the status - of all motors */ - break; - case STOP_AXIS: - sprintf(buff, "%dST;", axis); - break; - case JOG: - /* - * MM3000 does not have a jog command. Simulate with move absolute - * to the appropriate software limit. We can move to MM3000 soft limits. - * If the record soft limits are set tighter than the MM3000 limits - * the record will prevent JOG motion beyond its soft limits - */ - sprintf(buff, "%dVA%d;", axis, abs(intval)); - strcat(motor_call->message, buff); - if (intval > 0) - sprintf(buff, "%dPA%d;", axis, (int) (mr->dhlm / mr->mres)); - else - sprintf(buff, "%dPA%d;", axis, (int) (mr->dllm / mr->mres)); - break; - case SET_PGAIN: - sprintf(buff, "%dKP%d;%dUF;", axis, intval, axis); - break; - case SET_IGAIN: - sprintf(buff, "%dKI%d;%dUF;", axis, intval, axis); - break; - case SET_DGAIN: - sprintf(buff, "%dKD%d;%dUF;", axis, intval, axis); - break; - case ENABLE_TORQUE: - sprintf(buff, "MO;"); - break; - case DISABL_TORQUE: - sprintf(buff, "MF;"); - break; - case SET_HIGH_LIMIT: - case SET_LOW_LIMIT: - sprintf(buff, "%dSL%d;", axis, intval); - break; - default: - rtnval = ERROR; - } - - size = strlen(buff); - if (size > sizeof(buff) || (strlen(motor_call->message) + size) > MAX_MSG_SIZE) - errlogMessage("MM3000_build_trans(): buffer overflow.\n"); - else - strcat(motor_call->message, buff); - - return(rtnval); -} diff --git a/motorApp/NewportSrc/devMM4000.cc b/motorApp/NewportSrc/devMM4000.cc deleted file mode 100644 index f84acf33..00000000 --- a/motorApp/NewportSrc/devMM4000.cc +++ /dev/null @@ -1,349 +0,0 @@ -/* -FILENAME... devMM4000.cc -USAGE... Motor record device level support for Newport MM4000. - -*/ - -/* - * Original Author: Mark Rivers - * Date: 10/20/97 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 10-20-97 mlr initialized from drvOms58 - * .02 10-30-97 mlr Replaced driver calls with gpipIO functions - * .03 10-30-98 mlr Minor code cleanup, improved formatting - * .04 02-01-99 mlr Added temporary fix to delay reading motor - * positions at the end of a move. - * .05 04-21-01 rls Added jog velocity motor command. - * .06 05-19-03 rls Converted to R3.14.x. - * .07 07-07-08 rls Support individual axis power on/off for MM4005/6. - */ - - -#include -#include -#include -#include "motorRecord.h" -#include "motor.h" -#include "motordevCom.h" -#include "drvMMCom.h" -#include "epicsExport.h" - -#define STATIC static - -extern struct driver_table MM4000_access; - -/* ----------------Create the dsets for devMM4000----------------- */ -STATIC struct driver_table *drvtabptr; -STATIC long MM4000_init(int); -STATIC long MM4000_init_record(void *); -STATIC long MM4000_start_trans(struct motorRecord *); -STATIC RTN_STATUS MM4000_build_trans(motor_cmnd, double *, struct motorRecord *); -STATIC RTN_STATUS MM4000_end_trans(struct motorRecord *); - -struct motor_dset devMM4000 = -{ - {8, NULL, (DEVSUPFUN) MM4000_init, (DEVSUPFUN) MM4000_init_record, NULL}, - motor_update_values, - MM4000_start_trans, - MM4000_build_trans, - MM4000_end_trans -}; - -extern "C" {epicsExportAddress(dset,devMM4000);} - -/* --------------------------- program data --------------------- */ - -/* This table is used to define the command types */ -/* WARNING! this must match "motor_cmnd" in motor.h */ - -static msg_types MM4000_table[] = { - MOTION, /* MOVE_ABS */ - MOTION, /* MOVE_REL */ - MOTION, /* HOME_FOR */ - MOTION, /* HOME_REV */ - IMMEDIATE, /* LOAD_POS */ - IMMEDIATE, /* SET_VEL_BASE */ - IMMEDIATE, /* SET_VELOCITY */ - IMMEDIATE, /* SET_ACCEL */ - IMMEDIATE, /* GO */ - IMMEDIATE, /* SET_ENC_RATIO */ - INFO, /* GET_INFO */ - MOVE_TERM, /* STOP_AXIS */ - VELOCITY, /* JOG */ - IMMEDIATE, /* SET_PGAIN */ - IMMEDIATE, /* SET_IGAIN */ - IMMEDIATE, /* SET_DGAIN */ - IMMEDIATE, /* ENABLE_TORQUE */ - IMMEDIATE, /* DISABL_TORQUE */ - IMMEDIATE, /* PRIMITIVE */ - IMMEDIATE, /* SET_HIGH_LIMIT */ - IMMEDIATE, /* SET_LOW_LIMIT */ - VELOCITY /* JOG_VELOCITY */ -}; - - -static struct board_stat **MM4000_cards; - -/* --------------------------- program data --------------------- */ - - -/* initialize device support for MM4000 stepper motor */ -STATIC long MM4000_init(int after) -{ - long rtnval; - - if (!after) - { - drvtabptr = &MM4000_access; - (drvtabptr->init)(); - } - - rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &MM4000_cards); - return(rtnval); -} - - -/* initialize a record instance */ -STATIC long MM4000_init_record(void *arg) -{ - struct motorRecord *mr = (struct motorRecord *) arg; - return(motor_init_record_com(mr, *drvtabptr->cardcnt_ptr, drvtabptr, MM4000_cards)); -} - - -/* start building a transaction */ -STATIC long MM4000_start_trans(struct motorRecord *mr) -{ - return(motor_start_trans_com(mr, MM4000_cards)); -} - - -/* end building a transaction */ -STATIC RTN_STATUS MM4000_end_trans(struct motorRecord *mr) -{ - return(motor_end_trans_com(mr, drvtabptr)); -} - - -/* add a part to the transaction */ -STATIC RTN_STATUS MM4000_build_trans(motor_cmnd command, double *parms, struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - struct controller *brdptr; - struct mess_info *motor_info; - struct MMcontroller *cntrl; - char buff[110]; - int axis, card, maxdigits; - size_t size; - double dval, cntrl_units; - RTN_STATUS rtnval; - - rtnval = OK; - buff[0] = '\0'; - - /* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */ - dval = (parms == NULL) ? 0.0 : *parms; - - motor_call = &(trans->motor_call); - card = motor_call->card; - axis = motor_call->signal + 1; - brdptr = (*trans->tabptr->card_array)[card]; - if (brdptr == NULL) - return(rtnval = ERROR); - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - cntrl_units = dval * cntrl->drive_resolution[axis - 1]; - maxdigits = cntrl->res_decpts[axis - 1]; - - if (MM4000_table[command] > motor_call->type) - motor_call->type = MM4000_table[command]; - - if (trans->state != BUILD_STATE) - return(rtnval = ERROR); - - if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0) - { - strcat(motor_call->message, mr->init); - strcat(motor_call->message, "\r"); - } - - switch (command) - { - case MOVE_ABS: - case MOVE_REL: - case HOME_FOR: - case HOME_REV: - case JOG: - if (strlen(mr->prem) != 0) - { - strcat(motor_call->message, mr->prem); - strcat(motor_call->message, ";"); - } - if (strlen(mr->post) != 0) - motor_call->postmsgptr = (char *) &mr->post; - break; - - default: - break; - } - - - switch (command) - { - case MOVE_ABS: - sprintf(buff, "%dPA%.*f;", axis, maxdigits, cntrl_units); - break; - - case MOVE_REL: - sprintf(buff, "%dPR%.*f;", axis, maxdigits, cntrl_units); - break; - - case HOME_FOR: - case HOME_REV: - sprintf(buff, "%dOR;", axis); - break; - - case LOAD_POS: - if (cntrl->model == MM4000) - sprintf(buff, "%dSH%.*f;%dDH;%dSH%.*f", axis, maxdigits, cntrl_units, - axis, axis, maxdigits, cntrl->home_preset[axis - 1]); - break; - - case SET_VEL_BASE: - break; /* MM4000 does not use base velocity */ - - case SET_VELOCITY: - sprintf(buff, "%dVA%.*f;", axis, maxdigits, cntrl_units); - break; - - case SET_ACCEL: - /* - * The value passed is in steps/sec/sec. - * Convert to user units/sec/sec - */ - sprintf(buff, "%dAC%.*f;", axis, maxdigits, cntrl_units); - break; - - case GO: - /* - * The MM4000 starts moving immediately on move commands, GO command - * does nothing - */ - break; - - case SET_ENC_RATIO: - /* - * The MM4000 does not have the concept of encoder ratio, ignore this - * command - */ - break; - - case GET_INFO: - /* These commands are not actually done by sending a message, but - rather they will indirectly cause the driver to read the status - of all motors */ - break; - - case STOP_AXIS: - sprintf(buff, "%dST;", axis); - break; - - case JOG: - /* - * MM4000 does not have a jog command. Simulate with move absolute - * to the appropriate software limit. We can move to MM4000 soft limits. - * If the record soft limits are set tighter than the MM4000 limits - * the record will prevent JOG motion beyond its soft limits - */ - sprintf(buff, "%dVA%.*f;", axis, maxdigits, fabs(cntrl_units)); - strcat(motor_call->message, buff); - if (dval > 0.) - sprintf(buff, "%dPA%.*f;", axis, maxdigits, mr->dhlm); - else - sprintf(buff, "%dPA%.*f;", axis, maxdigits, mr->dllm); - break; - - case SET_PGAIN: - sprintf(buff, "%dKP%f;%dUF;", axis, dval, axis); - break; - - case SET_IGAIN: - sprintf(buff, "%dKI%f;%dUF;", axis, dval, axis); - break; - - case SET_DGAIN: - sprintf(buff, "%dKD%f;%dUF;", axis, dval, axis); - break; - - case ENABLE_TORQUE: - if (cntrl->model == MM4000) - sprintf(buff, "MO;"); - else - sprintf(buff, "%dMO;", axis); - break; - - case DISABL_TORQUE: - if (cntrl->model == MM4000) - sprintf(buff, "MF;"); - else - sprintf(buff, "%dMF;", axis); - break; - - case SET_HIGH_LIMIT: - motor_info = &(*trans->tabptr->card_array)[card]->motor_info[axis - 1]; - trans->state = IDLE_STATE; /* No command sent to the controller. */ - - if (cntrl_units > motor_info->high_limit) - { - mr->dhlm = motor_info->high_limit; - rtnval = ERROR; - } - break; - - case SET_LOW_LIMIT: - motor_info = &(*trans->tabptr->card_array)[card]->motor_info[axis - 1]; - trans->state = IDLE_STATE; /* No command sent to the controller. */ - - if (cntrl_units < motor_info->low_limit) - { - mr->dllm = motor_info->low_limit; - rtnval = ERROR; - } - break; - - default: - rtnval = ERROR; - } - - size = strlen(buff); - if (size > sizeof(buff) || (strlen(motor_call->message) + size) > MAX_MSG_SIZE) - errlogMessage("MM4000_build_trans(): buffer overflow.\n"); - else - strcat(motor_call->message, buff); - - return(rtnval); -} diff --git a/motorApp/NewportSrc/devNewport.dbd b/motorApp/NewportSrc/devNewport.dbd deleted file mode 100644 index 73ebaee6..00000000 --- a/motorApp/NewportSrc/devNewport.dbd +++ /dev/null @@ -1,28 +0,0 @@ -# Newport MM3000, MM4000/5, PM500 and ESP300 Device Driver support. -device(motor,VME_IO,devMM3000,"MM3000") -device(motor,VME_IO,devMM4000,"MM4000") -device(motor,VME_IO,devPM500, "PM500") -device(motor,VME_IO,devESP300,"ESP300") -driver(drvMM3000) -driver(drvMM4000) -driver(drvPM500) -driver(drvESP300) -driver(motorXPS) -driver(motorMM4000) -registrar(NewportRegister) -registrar(XPSGatheringRegister) -registrar(XPSRegister) -registrar(XPSRegister3) -registrar(HXPRegister) -registrar(XPSInterposeRegister) -registrar(drvXPSAsynAuxRegister) -registrar(AG_UCRegister) -registrar(AG_CONEXRegister) -registrar(SMC100Register) -#variable(devXPSC8Debug) -#variable(drvXPSC8Debug) -#variable(drvESP300debug) -#variable(drvMM3000debug) -#variable(drvMM4000debug) -#variable(drvPM500debug) - diff --git a/motorApp/NewportSrc/devNewportSeq.dbd b/motorApp/NewportSrc/devNewportSeq.dbd deleted file mode 100644 index 48aa8427..00000000 --- a/motorApp/NewportSrc/devNewportSeq.dbd +++ /dev/null @@ -1,4 +0,0 @@ -# Newport SNL programs -registrar(MM4005_trajectoryScanRegistrar) -registrar(XPS_trajectoryScanRegistrar) -registrar(xpsSlaveRegistrar) diff --git a/motorApp/NewportSrc/devPM500.cc b/motorApp/NewportSrc/devPM500.cc deleted file mode 100644 index ca052c86..00000000 --- a/motorApp/NewportSrc/devPM500.cc +++ /dev/null @@ -1,316 +0,0 @@ -/* -FILENAME... devPM500.cc -USAGE... Motor record device level support for the Newport PM500 motor - controller. - -*/ - -/* - * Original Author: Mark Rivers - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .00 10-25-98 mlr initialized from devPM500 - * .01 06-02-00 rls integrated into standard motor record - * .02 04-21-01 rls Added jog velocity motor command. - * .03 05-23-03 rls Converted to R3.14.x. - * .04 08-24-09 rls Queries added to some commands to prevent comm. response - * timeouts. - */ - -#include -#include -#include -#include "motorRecord.h" -#include "motor.h" -#include "motordevCom.h" -#include "drvMMCom.h" -#include "epicsExport.h" - -#define STATIC static - -extern struct driver_table PM500_access; - -/* ----------------Create the dsets for devPM500----------------- */ -STATIC struct driver_table *drvtabptr; -STATIC long PM500_init(int); -STATIC long PM500_init_record(void *); -STATIC long PM500_start_trans(struct motorRecord *); -STATIC RTN_STATUS PM500_build_trans(motor_cmnd, double *, struct motorRecord *); -STATIC RTN_STATUS PM500_end_trans(struct motorRecord *); - -static char PM500_axis_names[] = {'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E', 'F', - 'G', 'H', 'I'}; - -struct motor_dset devPM500 = -{ - {8, NULL, (DEVSUPFUN) PM500_init, (DEVSUPFUN) PM500_init_record, NULL}, - motor_update_values, - PM500_start_trans, - PM500_build_trans, - PM500_end_trans -}; - -extern "C" {epicsExportAddress(dset,devPM500);} - -/* --------------------------- program data --------------------- */ - -/* This table is used to define the command types */ - -static msg_types PM500_table[] = { - MOTION, /* MOVE_ABS */ - MOTION, /* MOVE_REL */ - MOTION, /* HOME_FOR */ - MOTION, /* HOME_REV */ - IMMEDIATE, /* LOAD_POS */ - IMMEDIATE, /* SET_VEL_BASE */ - IMMEDIATE, /* SET_VELOCITY */ - IMMEDIATE, /* SET_ACCEL */ - IMMEDIATE, /* GO */ - IMMEDIATE, /* SET_ENC_RATIO */ - INFO, /* GET_INFO */ - MOVE_TERM, /* STOP_AXIS */ - VELOCITY, /* JOG */ - IMMEDIATE, /* SET_PGAIN */ - IMMEDIATE, /* SET_IGAIN */ - IMMEDIATE, /* SET_DGAIN */ - IMMEDIATE, /* ENABLE_TORQUE */ - IMMEDIATE, /* DISABL_TORQUE */ - IMMEDIATE, /* PRIMITIVE */ - IMMEDIATE, /* SET_HIGH_LIMIT */ - IMMEDIATE, /* SET_LOW_LIMIT */ - VELOCITY /* JOG_VELOCITY */ -}; - - -static struct board_stat **PM500_cards; - -/* --------------------------- program data --------------------- */ - - -/* Initialize device support for PM500 controller. */ -STATIC long PM500_init(int after) -{ - long rtnval; - - if (!after) - { - drvtabptr = &PM500_access; - (drvtabptr->init)(); - } - - rtnval = motor_init_com(after, *drvtabptr->cardcnt_ptr, drvtabptr, &PM500_cards); - return(rtnval); -} - - -/* initialize a record instance */ -STATIC long PM500_init_record(void *arg) -{ - struct motorRecord *mr = (struct motorRecord *) arg; - return(motor_init_record_com(mr, *drvtabptr->cardcnt_ptr, drvtabptr, PM500_cards)); -} - - -/* start building a transaction */ -STATIC long PM500_start_trans(struct motorRecord *mr) -{ - return(motor_start_trans_com(mr, PM500_cards)); -} - - -/* end building a transaction */ -STATIC RTN_STATUS PM500_end_trans(struct motorRecord *mr) -{ - return(motor_end_trans_com(mr, drvtabptr)); -} - - -/* add a part to the transaction */ -STATIC RTN_STATUS PM500_build_trans(motor_cmnd command, double *parms, struct motorRecord *mr) -{ - struct motor_trans *trans = (struct motor_trans *) mr->dpvt; - struct mess_node *motor_call; - struct controller *brdptr; - struct MMcontroller *cntrl; - char axis_name; - char buff[110]; - int axis, card, maxdigits; - size_t size; - double dval, cntrl_units; - RTN_STATUS rtnval; - - rtnval = OK; - buff[0] = '\0'; - - /* Protect against NULL pointer with WRTITE_MSG(GO/STOP_AXIS/GET_INFO, NULL). */ - dval = (parms == NULL) ? 0.0 : *parms; - - motor_call = &(trans->motor_call); - card = motor_call->card; - axis = motor_call->signal + 1; - brdptr = (*trans->tabptr->card_array)[card]; - if (brdptr == NULL) - return(rtnval = ERROR); - - axis_name = PM500_axis_names[axis - 1]; - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - cntrl_units = dval * cntrl->drive_resolution[axis - 1]; - maxdigits = cntrl->res_decpts[axis - 1]; - - if (PM500_table[command] > motor_call->type) - motor_call->type = PM500_table[command]; - - if (trans->state != BUILD_STATE) - return(rtnval = ERROR); - - if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0) - { - strcat(motor_call->message, mr->init); - strcat(motor_call->message, "\r"); - } - - switch (command) - { - case MOVE_ABS: - case MOVE_REL: - case HOME_FOR: - case HOME_REV: - case JOG: - if (strlen(mr->prem) != 0) - { - strcat(motor_call->message, mr->prem); - strcat(motor_call->message, ";"); - } - if (strlen(mr->post) != 0) - motor_call->postmsgptr = (char *) &mr->post; - break; - - default: - break; - } - - - switch (command) - { - case MOVE_ABS: - sprintf(buff, "%cG%.*f;", axis_name, maxdigits, cntrl_units); - break; - - case MOVE_REL: - sprintf(buff, "%cR%.*f;", axis_name, maxdigits, cntrl_units); - break; - - case HOME_FOR: - case HOME_REV: - sprintf(buff, "%cF0;", axis_name); - break; - - case LOAD_POS: - break; - - case SET_VEL_BASE: - break; /* PM500 does not use base velocity */ - - case SET_VELOCITY: - /* PM500 uses mm/sec and karc-sec/sec for velocity, but microns and - * arc-sec for position. Divide by 1000 here. - */ - cntrl_units /= 1000.0; - sprintf(buff, "%cV%.*f;", axis_name, maxdigits, cntrl_units); - break; - - case SET_ACCEL: - /* PM500 uses mm/sec^2 and karc-sec/sec^2 for acceleration, but - * microns and arc-sec for position. Divide by 1000 here. - */ - cntrl_units /= 1000.0; - sprintf(buff, "%cACCEL%.*f;", axis_name, maxdigits, cntrl_units); - break; - - case GO: - /* - * The PM500 starts moving immediately on move commands, GO command - * does nothing - */ - break; - - case SET_ENC_RATIO: - /* - * The PM500 does not have the concept of encoder ratio, ignore this - * command - */ - break; - - case GET_INFO: - sprintf(buff, "%cR;", axis_name); - break; - - case STOP_AXIS: - sprintf(buff, "%cT;%cR", axis_name, axis_name); - break; - - case JOG: - /* PM500 uses mm/sec and karc-sec/sec for velocity, but microns and - * arc-sec for position. Divide by 1000 here. - */ - cntrl_units /= 1000.0; - sprintf(buff, "%cS%f;", axis_name, cntrl_units); - break; - - case SET_PGAIN: - case SET_IGAIN: - case SET_DGAIN: - break; - - case ENABLE_TORQUE: - sprintf(buff, "%cT;%cM?", axis_name, axis_name); - break; - - case DISABL_TORQUE: - sprintf(buff, "%cM;%cM?", axis_name, axis_name); - break; - - case SET_HIGH_LIMIT: - sprintf(buff, "%cPSLIM%.*f;", axis_name, maxdigits, cntrl_units); - break; - - case SET_LOW_LIMIT: - sprintf(buff, "%cNSLIM%.*f;", axis_name, maxdigits, cntrl_units); - break; - - default: - rtnval = ERROR; - } - - size = strlen(buff); - if (size > sizeof(buff) || (strlen(motor_call->message) + size) > MAX_MSG_SIZE) - errlogMessage("PM500_build_trans(): buffer overflow.\n"); - else - strcat(motor_call->message, buff); - - return(rtnval); -} diff --git a/motorApp/NewportSrc/drvESP300.cc b/motorApp/NewportSrc/drvESP300.cc deleted file mode 100644 index ef899e83..00000000 --- a/motorApp/NewportSrc/drvESP300.cc +++ /dev/null @@ -1,746 +0,0 @@ -/* -FILENAME... drvESP300.cc -USAGE... Motor record driver level support for Newport ESP300/100. - -*/ - -/* - * Original Author: Ron Sluiter - * Date: 02/19/03 - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * NOTES - * ----- - * - This driver works with the following models: ESP100, ESP300 and ESP301. - * - * Modification Log: - * ----------------- - * .01 02-19-03 rls copied from drvMM3000 - * .02 05-23-03 rls Converted to R3.14.x. - * .03 10-28-03 rls initialize "drive_resolution". - * .04 02-03-04 rls Eliminate erroneous "Motor motion timeout ERROR". - * .05 07/09/04 rls removed unused Setup() argument. - * .06 07/28/04 rls "epicsExport" debug variable. - * .07 09/21/04 rls support for 32axes/controller. - * .08 12/21/04 rls - retry on initial communication. - * - using asyn's set[Out/In]putEos(). - * - make debug variables always available. - * - MS Visual C compatibility; make all epicsExportAddress - * extern "C" linkage. - * .09 08/07/06 rls - GPIB under ASYN only allows 1 input EOS character. - * No output EOS. Adjustments accordingly. - * .10 05/19/14 rls - Print controller's error code and set RA_PROBLEM. - */ - - -#include -#include -#include -#include -#include -#include "motor.h" -#include "NewportRegister.h" -#include "drvMMCom.h" -#include "asynOctetSyncIO.h" -#include "epicsExport.h" - -#define READ_POSITION "%.2dTP" -#define STOP_AXIS "%.2dST" -#define GET_IDENT "VE?" - -#define ESP300_NUM_CARDS 4 -#define BUFF_SIZE 100 /* Maximum length of string to/from ESP300 */ - -/* The ESP300 does not respond for 2 to 5 seconds after hitting a travel limit. */ -#define SERIAL_TIMEOUT 5.0 /* Command timeout in sec. */ - -/*----------------debugging-----------------*/ - -volatile int drvESP300debug = 0; -extern "C" {epicsExportAddress(int, drvESP300debug);} -static inline void Debug(int level, const char *format, ...) { - #ifdef DEBUG - if (level < drvESP300debug) { - va_list pVar; - va_start(pVar, format); - vprintf(format, pVar); - va_end(pVar); - } - #endif -} - -int ESP300_num_cards = 0; - -/* Local data required for every driver; see "motordrvComCode.h" */ -#include "motordrvComCode.h" - - -/*----------------functions-----------------*/ -static int recv_mess(int, char *, int); -static RTN_STATUS send_mess(int, char const *, char *); -static int set_status(int, int); -static long report(int); -static long init(); -static int motor_init(); -static void query_done(int, int, struct mess_node *); - -/*----------------functions-----------------*/ - -struct driver_table ESP300_access = -{ - motor_init, - motor_send, - motor_free, - motor_card_info, - motor_axis_info, - &mess_queue, - &queue_lock, - &free_list, - &freelist_lock, - &motor_sem, - &motor_state, - &total_cards, - &any_motor_in_motion, - send_mess, - recv_mess, - set_status, - query_done, - NULL, - &initialized, - NULL -}; - -struct drvESP300_drvet -{ - long number; -#ifdef __cplusplus - long (*report) (int); - long (*init) (void); -#else - DRVSUPFUN report; - DRVSUPFUN init; -#endif -} drvESP300 = {2, report, init}; - -extern "C" {epicsExportAddress(drvet, drvESP300);} - -static struct thread_args targs = {SCAN_RATE, &ESP300_access, 0.0}; - -/********************************************************* - * Print out driver status report - *********************************************************/ -static long report(int level) -{ - int card; - - if (ESP300_num_cards <=0) - printf(" No ESP300 controllers configured.\n"); - else - { - for (card = 0; card < ESP300_num_cards; card++) - { - struct controller *brdptr = motor_state[card]; - - if (brdptr == NULL) - printf(" ESP300 controller %d connection failed.\n", card); - else - { - struct MMcontroller *cntrl; - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - printf(" ESP300 controller %d port=%s, address=%d, id: %s \n", - card, cntrl->asyn_port, cntrl->asyn_address, - brdptr->ident); - } - } - } - return(OK); -} - - -static long init() -{ - /* - * We cannot call motor_init() here, because that function can do GPIB I/O, - * and hence requires that the drvGPIB have already been initialized. - * That cannot be guaranteed, so we need to call motor_init from device - * support - */ - /* Check for setup */ - if (ESP300_num_cards <= 0) - { - Debug(1, "init(): ESP300 driver disabled. ESP300Setup() missing from startup script.\n"); - } - return((long) 0); -} - - -static void query_done(int card, int axis, struct mess_node *nodeptr) -{ -} - - -/************************************************************** - * Parse status and position strings for a card and signal - * set_status() - ************************************************************/ - -static int set_status(int card, int signal) -{ - struct MMcontroller *cntrl; - struct mess_node *nodeptr; - register struct mess_info *motor_info; - /* Message parsing variables */ - char *cptr, *tok_save; - char inbuff[BUFF_SIZE], outbuff[BUFF_SIZE]; - int rtn_state, charcnt, errcode; - long mstatus; - double motorData; - bool power, plusdir, ls_active = false; - msta_field status; - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - motor_info = &(motor_state[card]->motor_info[signal]); - nodeptr = motor_info->motor_motion; - status.All = motor_info->status.All; - - sprintf(outbuff, "%.2dMD", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - - if (charcnt == 1 && (inbuff[0] == '0' || inbuff[0] == '1')) - { - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - } - else - { - if (cntrl->status == NORMAL) - { - cntrl->status = RETRY; - rtn_state = 0; - goto exit; - } - else - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - } - - status.Bits.RA_DONE = (inbuff[0] == '1') ? 1 : 0; - - /* Get motor position. */ - sprintf(outbuff, READ_POSITION, signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - - motorData = atof(inbuff) / cntrl->drive_resolution[signal]; - - if (motorData == motor_info->position) - { - if (nodeptr != 0) /* Increment counter only if motor is moving. */ - motor_info->no_motion_count++; - } - else - { - epicsInt32 newposition; - - newposition = NINT(motorData); - status.Bits.RA_DIRECTION = (newposition >= motor_info->position) ? 1 : 0; - motor_info->position = newposition; - motor_info->no_motion_count = 0; - } - - plusdir = (status.Bits.RA_DIRECTION) ? true : false; - - /* Get travel limit switch status. */ - sprintf(outbuff, "%.2dPH", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - cptr = strchr(inbuff, 'H'); - if (cptr == NULL) - { - Debug(2, "set_status(): PH error = %s\n", inbuff); - rtn_state = 1; - goto exit; - } - mstatus = strtol(inbuff, &cptr, 16); - - /* Set Travel limit switch status bits. */ - if (((mstatus >> signal) & 0x01) == false) - status.Bits.RA_PLUS_LS = 0; - else - { - status.Bits.RA_PLUS_LS = 1; - if (plusdir == true) - ls_active = true; - } - - if (((mstatus >> (signal + 8)) & 0x01) == false) - status.Bits.RA_MINUS_LS = 0; - else - { - status.Bits.RA_MINUS_LS = 1; - if (plusdir == false) - ls_active = true; - } - - /* Set home switch status. */ - cptr += 2; - tok_save = strchr(inbuff, 'H'); - mstatus = strtol(cptr, &tok_save, 16); - - status.Bits.RA_HOME = ((mstatus >> signal) & 0x01) ? 1 : 0; - - /* Get motor power on/off status. */ - sprintf(outbuff, "%.2dMO?", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - power = atoi(inbuff) ? true : false; - - status.Bits.EA_POSITION = (power == true) ? 1 : 0; - - /* encoder status */ - status.Bits.EA_SLIP = 0; - status.Bits.EA_SLIP_STALL = 0; - status.Bits.EA_HOME = 0; - - /* Get error code. */ - sprintf(outbuff, "%.2dTE?", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - errcode = atoi(inbuff); - if (errcode != 0) - { - status.Bits.RA_PROBLEM = 1; - printf("ESP300 controller error = %d.\n", errcode); - } - else - status.Bits.RA_PROBLEM = 0; - - /* Parse motor velocity? */ - /* NEEDS WORK */ - - motor_info->velocity = 0; - - if (!status.Bits.RA_DIRECTION) - motor_info->velocity *= -1; - - rtn_state = (!motor_info->no_motion_count || ls_active == true || - status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; - - /* Test for post-move string. */ - if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && - nodeptr->postmsgptr != 0) - { - strcpy(outbuff, nodeptr->postmsgptr); - send_mess(card, outbuff, (char*) NULL); - nodeptr->postmsgptr = NULL; - } - -exit: - motor_info->status.All = status.All; - return(rtn_state); -} - - -/*****************************************************/ -/* send a message to the ESP300 board */ -/* send_mess() */ -/*****************************************************/ -static RTN_STATUS send_mess(int card, char const *com, char *name) -{ - struct MMcontroller *cntrl; - size_t size; - size_t nwrite; - - size = strlen(com); - - if (size > MAX_MSG_SIZE) - { - errlogMessage("drvESP300:send_mess(); message size violation.\n"); - return(ERROR); - } - else if (size == 0) /* Normal exit on empty input message. */ - return(OK); - - if (!motor_state[card]) - { - errlogPrintf("drvESP300:send_mess() - invalid card #%d\n", card); - return(ERROR); - } - - if (name != NULL) - { - errlogPrintf("drvESP300:send_mess() - invalid argument = %s\n", name); - return(ERROR); - } - - Debug(2, "send_mess(): message = %s\n", com); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - pasynOctetSyncIO->write(cntrl->pasynUser, com, strlen(com), SERIAL_TIMEOUT, &nwrite); - - return(OK); -} - - -/* - * FUNCTION... recv_mess(int card, char *com, int flag) - * - * INPUT ARGUMENTS... - * card - controller card # (0,1,...). - * *com - caller's response buffer. - * flag | FLUSH = flush controller's output buffer; set timeout = 0. - * | !FLUSH = retrieve response into caller's buffer; set timeout. - * - * LOGIC... - * Initialize: - * - receive timeout to zero - * - received string length to zero. - * - * IF controller card does not exist. - * ERROR RETURN. - * ENDIF - * - * SWITCH on port type. - * CASE port type is GPIB. - * BREAK. - * CASE port type is RS232. - * IF input "flag" indicates NOT flushing the input buffer. - * Set receive timeout nonzero. - * ENDIF - * Call pasynOctetSyncIO->read(). - * - * NOTE: The ESP300 sometimes responds to an MS command with an error - * message (see ESP300 User's Manual Appendix A). This is an - * unconfirmed ESP300 bug. Retry read if this is a Hard Travel - * limit switch error. This effectively flushes the error message. - * - * IF input "com" buffer length is > 3 characters, AND, the 1st - * character is an "E" (Maybe this an unsolicited error - * message response?). - * Call pasynOctetSyncIO->read(). - * ENDIF - * BREAK - * ENDSWITCH - * - * NORMAL RETURN. - */ - -static int recv_mess(int card, char *com, int flag) -{ - struct MMcontroller *cntrl; - double timeout = 0.; - int flush = 1; - size_t nread = 0; - asynStatus status; - int eomReason; - - /* Check that card exists */ - if (!motor_state[card]) - return(ERROR); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - if (flag != FLUSH) - { - flush = 0; - timeout = SERIAL_TIMEOUT; - } - if (flush) - status = pasynOctetSyncIO->flush(cntrl->pasynUser); - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - if (nread > 3 && com[0] == 'E') - { - long error; - - error = strtol(&com[1], NULL, 0); - if (error >= 35 && error <= 42) - { - if (flush) - status = pasynOctetSyncIO->flush(cntrl->pasynUser); - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - } - } - - if ((status != asynSuccess) || (nread <= 0) || (com[nread - 1] != '\r')) - { - com[0] = '\0'; - nread = 0; - } - else - { - /* ESP300 responses are always terminated with CR/LF combination (see - * ESP300 User' Manual Sec. 3.4 NOTE). ASYN strips LF; this code strips - * CR from buffer before returning to caller. - */ - nread--; - com[nread] = '\0'; /* Strip trailing CR. */ - } - - Debug(2, "recv_mess(): message = \"%s\"\n", com); - return((int)nread); -} - - -/*****************************************************/ -/* Setup system configuration */ -/* ESP300Setup() */ -/*****************************************************/ -RTN_STATUS -ESP300Setup(int num_cards, /* maximum number of controllers in system. */ - int scan_rate) /* polling rate - 1/60 sec units. */ -{ - int itera; - - if (num_cards < 1 || num_cards > ESP300_NUM_CARDS) - ESP300_num_cards = ESP300_NUM_CARDS; - else - ESP300_num_cards = num_cards; - - /* Set motor polling task rate */ - if (scan_rate >= 1 && scan_rate <= 60) - targs.motor_scan_rate = scan_rate; - else - targs.motor_scan_rate = SCAN_RATE; - - /* - * Allocate space for motor_state structures. Note this must be done - * before ESP300Config is called, so it cannot be done in motor_init() - * This means that we must allocate space for a card without knowing - * if it really exists, which is not a serious problem - */ - motor_state = (struct controller **) malloc(ESP300_num_cards * - sizeof(struct controller *)); - - for (itera = 0; itera < ESP300_num_cards; itera++) - motor_state[itera] = (struct controller *) NULL; - - return(OK); -} - - -/*****************************************************/ -/* Configure a controller */ -/* ESP300Config() */ -/*****************************************************/ -RTN_STATUS -ESP300Config(int card, /* card being configured */ - const char *name, /* asyn port name */ - int address) /* asyn address (GPIB) */ -{ - struct MMcontroller *cntrl; - - if (card < 0 || card >= ESP300_num_cards) - return(ERROR); - - motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); - motor_state[card]->DevicePrivate = malloc(sizeof(struct MMcontroller)); - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - strcpy(cntrl->asyn_port, name); - cntrl->asyn_address = address; - return(OK); -} - - - -/*****************************************************/ -/* initialize all software and hardware */ -/* This is called from the initialization routine in */ -/* device support. */ -/* motor_init() */ -/*****************************************************/ -static int motor_init() -{ - struct controller *brdptr; - struct MMcontroller *cntrl; - int card_index, motor_index; - char buff[BUFF_SIZE]; - int total_axis = 0; - int status=0; - asynStatus success_rtn; - static const char output_terminator[] = "\r"; - static const char input_terminator[] = "\n"; - static const char errmsg[] = "drvESP300.c:motor_init: ASYN"; - - initialized = true; /* Indicate that driver is initialized. */ - - /* Check for setup */ - if (ESP300_num_cards <= 0) - return(ERROR); - - for (card_index = 0; card_index < ESP300_num_cards; card_index++) - { - if (!motor_state[card_index]) - continue; - - brdptr = motor_state[card_index]; - brdptr->cmnd_response = false; - total_cards = card_index + 1; - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - - /* Initialize communications channel */ - success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, - cntrl->asyn_address, &cntrl->pasynUser, NULL); - if (success_rtn != asynSuccess) - { - errlogPrintf("%s connect error = %d\n", errmsg, (int) success_rtn); - goto errexit; - } - - success_rtn = pasynOctetSyncIO->setOutputEos(cntrl->pasynUser, - output_terminator, (int)strlen(output_terminator)); - /* Ignore output EOS error in case this is a GPIB port. */ - - success_rtn = pasynOctetSyncIO->setInputEos(cntrl->pasynUser, - input_terminator, (int)strlen(input_terminator)); - if (success_rtn != asynSuccess) - { - errlogPrintf("%s setInputEos error = %d\n", errmsg, (int) success_rtn); - goto errexit; - } - else - { - int retry = 0; - - /* Send a message to the board, see if it exists */ - /* flush any junk at input port - should not be any data available */ - pasynOctetSyncIO->flush(cntrl->pasynUser); - - do - { - send_mess(card_index, GET_IDENT, (char*) NULL); - status = recv_mess(card_index, buff, 1); - retry++; - /* Return value is length of response string */ - } while (status == 0 && retry < 3); - } - -errexit: - if (success_rtn == asynSuccess && status > 0) - { - brdptr->localaddr = (char *) NULL; - brdptr->motor_in_motion = 0; - strcpy(brdptr->ident, &buff[1]); /* Skip "\n" */ - - send_mess(card_index, "ZU", (char*) NULL); - recv_mess(card_index, buff, 1); - total_axis = buff[0] >> 4; - if (total_axis > 4) - { - Debug(2, "motor_init(): ZU = %s\n", buff); - total_axis = 4; - } - - for (motor_index = 0; motor_index < total_axis; motor_index++) - { - sprintf(buff, STOP_AXIS, motor_index + 1); /* Stop motor */ - send_mess(card_index, buff, (char*) NULL); - /* Initialize. */ - brdptr->motor_info[motor_index].motor_motion = NULL; - } - - brdptr->total_axis = total_axis; - - for (motor_index = 0; motor_index < total_axis; motor_index++) - { - struct mess_info *motor_info = &brdptr->motor_info[motor_index]; - int feedback; - double fullStep; - int microStep; - - /* Get controller's EGU for the user (see README). */ - sprintf(buff, "%.2dSN?", motor_index + 1); - send_mess(card_index, buff, 0); - recv_mess(card_index, buff, 1); - - /* Set axis resolution. */ - /* Read the feedback status */ - sprintf(buff, "%.2dZB?", motor_index + 1); - send_mess(card_index, buff, 0); - recv_mess(card_index, buff, 1); - feedback = strtol(buff,0,16); - /* If stepper closed loop positioning is enabled (bit 9=1) and encoder feedback is disabled (bit 8=0) - * then use the full-step resolution (FR) and microstepping (QS) to determine drive_resolution. - * If not then use SU (encoder resolution) for drive_resolution. */ - if ((feedback & 0x300) == 0x200) { - sprintf(buff, "%.2dFR?", motor_index + 1); - send_mess(card_index, buff, 0); - recv_mess(card_index, buff, 1); - fullStep = atof(buff); - sprintf(buff, "%.2dQS?", motor_index + 1); - send_mess(card_index, buff, 0); - recv_mess(card_index, buff, 1); - microStep = strtol(buff, 0, 10); - cntrl->drive_resolution[motor_index] = fullStep / microStep; - } else { - sprintf(buff, "%.2dSU?", motor_index + 1); - send_mess(card_index, buff, 0); - recv_mess(card_index, buff, 1); - cntrl->drive_resolution[motor_index] = atof(&buff[0]); - } - motor_info->status.All = 0; - motor_info->no_motion_count = 0; - motor_info->encoder_position = 0; - motor_info->position = 0; - motor_info->encoder_present = YES; - - if (motor_info->encoder_present == YES) - { - motor_info->status.Bits.EA_PRESENT = 1; - motor_info->pid_present = YES; - motor_info->status.Bits.GAIN_SUPPORT = 1; - } - - set_status(card_index, motor_index); /* Read status of each motor */ - } - } - else - motor_state[card_index] = (struct controller *) NULL; - } - - any_motor_in_motion = 0; - - mess_queue.head = (struct mess_node *) NULL; - mess_queue.tail = (struct mess_node *) NULL; - - free_list.head = (struct mess_node *) NULL; - free_list.tail = (struct mess_node *) NULL; - - epicsThreadCreate((char *) "ESP300_motor", epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) motor_task, (void *) &targs); - - return(OK); -} - -/*---------------------------------------------------------------------*/ diff --git a/motorApp/NewportSrc/drvMM3000.cc b/motorApp/NewportSrc/drvMM3000.cc deleted file mode 100644 index 7131ed04..00000000 --- a/motorApp/NewportSrc/drvMM3000.cc +++ /dev/null @@ -1,733 +0,0 @@ -/* -FILENAME... drvMM3000.cc -USAGE... Motor record driver level support for Newport MM3000. - -*/ - -/* - * Original Author: Mark Rivers - * Date: 10/20/97 - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 10-20-97 mlr initialized from drvOms58 - * .02 10-30-97 mlr Replaced driver calls with gpipIO functions - * .03 10-30-98 mlr Minor code cleanup, improved formatting - * .04 02-01-99 mlr Added temporary fix to delay reading motor positions at - * the end of a move. - * .05 04-18-00 rls MM3000 takes 2 to 5 seconds to respond to queries after - * hitting a hard travel limit. Adjusted GPIB and SERIAL - * timeouts accordingly. Deleted communication retries. - * Reworked travel limit processing so that direction - * status bit matches limit switch. Copied recv_mess() - * logic from drvMM4000.c. Use TPE command to determine - * if motor has an encoder. - * .06 10/02/01 rls - allow one retry after a communication error. - * - use motor status response bit-field. - * .07 05-22-03 rls - Converted to R3.14.2. - * .08 10/23/03 rls - recv_mess() eats the controller error response, outputs - * an error message and retries. - * .09 02/03/04 rls - Eliminate erroneous "Motor motion timeout ERROR". - * .10 07/09/04 rls - removed unused Setup() argument. - * .11 07/28/04 rls - "epicsExport" debug variable. - * .12 09/21/04 rls - support for 32axes/controller. - * .13 12/21/04 rls - MS Visual C compatibility; make all epicsExportAddress - * extern "C" linkage. - * - make debug variables always available. - * .14 01/13/10 rls - Bug fix for this error message; "drvMM3000:motor_init() - * - invalid RC response = dc" on the last axis. - * - Bug fix for report() breaking out of "for loop" after 1st - * report printed. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "motor.h" -#include "NewportRegister.h" -#include "drvMMCom.h" -#include "asynOctetSyncIO.h" -#include "epicsExport.h" - -#define STATIC static - -#define READ_RESOLUTION "TU;" -#define READ_STATUS "MS;" -#define READ_POSITION "TP;" -#define STOP_ALL "ST" -#define MOTOR_ON "MO;" -#define REMOTE_MODE "MR;" -#define GET_IDENT "VE" - -/* Status byte bits */ -#define M_AXIS_MOVING 0x01 -#define M_MOTOR_POWER 0x02 -#define M_MOTOR_DIRECTION 0x04 -#define M_PLUS_LIMIT 0x08 -#define M_MINUS_LIMIT 0x10 -#define M_HOME_SIGNAL 0x20 - -#define MM3000_NUM_CARDS 4 -#define BUFF_SIZE 100 /* Maximum length of string to/from MM3000 */ - -/* The MM3000 does not respond for 2 to 5 seconds after hitting a travel limit. */ -#define SERIAL_TIMEOUT 5.0 /* Command timeout in sec. */ - -/*----------------debugging-----------------*/ -volatile int drvMM3000debug = 0; -extern "C" {epicsExportAddress(int, drvMM3000debug);} -static inline void Debug(int level, const char *format, ...) { - #ifdef DEBUG - if (level < drvMM3000debug) { - va_list pVar; - va_start(pVar, format); - vprintf(format, pVar); - va_end(pVar); - } - #endif -} - -/* --- Local data. --- */ -int MM3000_num_cards = 0; - -/* Local data required for every driver; see "motordrvComCode.h" */ -#include "motordrvComCode.h" - - -/*----------------functions-----------------*/ -STATIC int recv_mess(int, char *, int); -STATIC RTN_STATUS send_mess(int, char const *, char *); -STATIC int set_status(int, int); -static long report(int); -static long init(); -STATIC int motor_init(); -STATIC void query_done(int, int, struct mess_node *); - -/*----------------functions-----------------*/ - -struct driver_table MM3000_access = -{ - motor_init, - motor_send, - motor_free, - motor_card_info, - motor_axis_info, - &mess_queue, - &queue_lock, - &free_list, - &freelist_lock, - &motor_sem, - &motor_state, - &total_cards, - &any_motor_in_motion, - send_mess, - recv_mess, - set_status, - query_done, - NULL, - &initialized, - NULL -}; - -struct drvMM3000_drvet -{ - long number; - long (*report) (int); - long (*init) (void); -} drvMM3000 = {2, report, init}; - -extern "C" {epicsExportAddress(drvet, drvMM3000);} - -STATIC struct thread_args targs = {SCAN_RATE, &MM3000_access, 0.0}; - -/********************************************************* - * Print out driver status report - *********************************************************/ -static long report(int level) -{ - int card; - - if (MM3000_num_cards <=0) - printf(" No MM3000 controllers configured.\n"); - else - { - for (card = 0; card < MM3000_num_cards; card++) - { - struct controller *brdptr = motor_state[card]; - - if (brdptr == NULL) - printf(" MM3000 controller %d connection failed.\n", card); - else - { - struct MMcontroller *cntrl; - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - printf(" MM3000 controller %d asyn port= %s, address=%d, id: %s \n", - card, cntrl->asyn_port, cntrl->asyn_address, - brdptr->ident); - } - } - } - return(OK); -} - - -static long init() -{ - /* - * We cannot call motor_init() here, because that function can do GPIB I/O, - * and hence requires that the drvGPIB have already been initialized. - * That cannot be guaranteed, so we need to call motor_init from device - * support - */ - /* Check for setup */ - if (MM3000_num_cards <= 0) - { - Debug(1, "init(): MM3000 driver disabled. MM3000Setup() missing from startup script.\n"); - } - return((long) 0); -} - - -STATIC void query_done(int card, int axis, struct mess_node *nodeptr) -{ -} - - -/************************************************************** - * Parse status and position strings for a card and signal - * set_status() - ************************************************************/ - -STATIC int set_status(int card, int signal) -{ - struct MMcontroller *cntrl; - struct mess_node *nodeptr; - register struct mess_info *motor_info; - /* Message parsing variables */ - char *cptr, *tok_save; - char inbuff[BUFF_SIZE], outbuff[BUFF_SIZE]; - MOTOR_STATUS mstat; - int rtn_state, charcnt; - double motorData; - bool plusdir, ls_active = false; - msta_field status; - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - motor_info = &(motor_state[card]->motor_info[signal]); - status.All = motor_info->status.All; - - sprintf(outbuff, "%dMS", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - if (charcnt > 0) - { - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - } - else - { - if (cntrl->status == NORMAL) - { - cntrl->status = RETRY; - rtn_state = 0; - goto exit; - } - else - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - } - - mstat.All = inbuff[0]; - Debug(5, "set_status(): status byte = %x\n", mstat.All); - - nodeptr = motor_info->motor_motion; - - status.Bits.RA_DIRECTION = (mstat.Bits.direction == false) ? 0 : 1; - - plusdir = (status.Bits.RA_DIRECTION) ? true : false; - - status.Bits.RA_DONE = (mstat.Bits.inmotion == false) ? 1 : 0; - - /* Set Travel limit switch status bits. */ - if (mstat.Bits.plustTL == false) - status.Bits.RA_PLUS_LS = 0; - else - { - status.Bits.RA_PLUS_LS = 1; - if (plusdir == true) - ls_active = true; - } - - if (mstat.Bits.minusTL == false) - status.Bits.RA_MINUS_LS = 0; - else - { - status.Bits.RA_MINUS_LS = 1; - if (plusdir == false) - ls_active = true; - } - - status.Bits.RA_HOME = (mstat.Bits.homels == false) ? 0 : 1; - - status.Bits.EA_POSITION = (mstat.Bits.NOT_power == false) ? 1 : 0; - - /* encoder status */ - status.Bits.EA_SLIP = 0; - status.Bits.EA_SLIP_STALL = 0; - status.Bits.EA_HOME = 0; - - sprintf(outbuff, "%dTP", signal + 1); - send_mess(card, outbuff, (char*) NULL); - charcnt = recv_mess(card, inbuff, 1); - if (charcnt > 0) - { - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - } - else - { - if (cntrl->status == NORMAL) - { - cntrl->status = RETRY; - rtn_state = 0; - goto exit; - } - else - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - } - - tok_save = NULL; - cptr = epicsStrtok_r(inbuff, " ", &tok_save); - motorData = atof(cptr); - - if (motorData == motor_info->position) - { - if (nodeptr != 0) /* Increment counter only if motor is moving. */ - motor_info->no_motion_count++; - } - else - { - motor_info->position = (epicsInt32) motorData; - if (motor_state[card]->motor_info[signal].encoder_present == YES) - motor_info->encoder_position = (epicsInt32) motorData; - else - motor_info->encoder_position = 0; - - motor_info->no_motion_count = 0; - } - - status.Bits.RA_PROBLEM = 0; - - /* Parse motor velocity? */ - /* NEEDS WORK */ - - motor_info->velocity = 0; - - if (!status.Bits.RA_DIRECTION) - motor_info->velocity *= -1; - - rtn_state = (!motor_info->no_motion_count || ls_active == true || - status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; - - /* Test for post-move string. */ - if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && - nodeptr->postmsgptr != 0) - { - strcpy(outbuff, nodeptr->postmsgptr); - send_mess(card, outbuff, (char*) NULL); - nodeptr->postmsgptr = NULL; - } - -exit: - motor_info->status.All = status.All; - return(rtn_state); -} - - -/*****************************************************/ -/* send a message to the MM3000 board */ -/* send_mess() */ -/*****************************************************/ -STATIC RTN_STATUS send_mess(int card, char const *com, char *name) -{ - struct MMcontroller *cntrl; - size_t size; - size_t nwrite; - - size = strlen(com); - - if (size > MAX_MSG_SIZE) - { - errlogMessage("drvMM3000:send_mess(); message size violation.\n"); - return(ERROR); - } - else if (size == 0) /* Normal exit on empty input message. */ - return(OK); - - if (!motor_state[card]) - { - errlogPrintf("drvMM3000:send_mess() - invalid card #%d\n", card); - return(ERROR); - } - - if (name != NULL) - { - errlogPrintf("drvMM3000:send_mess() - invalid argument = %s\n", name); - return(ERROR); - } - - Debug(2, "send_mess(): message = %s\n", com); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - pasynOctetSyncIO->write(cntrl->pasynUser, com, strlen(com), SERIAL_TIMEOUT, &nwrite); - - return(OK); -} - - -/* - * FUNCTION... recv_mess(int card, char *com, int flag) - * - * INPUT ARGUMENTS... - * card - controller card # (0,1,...). - * *com - caller's response buffer. - * flag | FLUSH = flush controller's output buffer; set timeout = 0. - * | !FLUSH = retrieve response into caller's buffer; set timeout. - * - * LOGIC... - * Initialize: - * - receive timeout to zero - * - received string length to zero. - * - * IF controller card does not exist. - * ERROR RETURN. - * ENDIF - * - * SWITCH on port type. - * CASE port type is GPIB. - * BREAK. - * CASE port type is RS232. - * IF input "flag" indicates NOT flushing the input buffer. - * Set receive timeout nonzero. - * ENDIF - * Call pasynOctetSyncIO->read(). - * - * NOTE: The MM3000 sometimes responds to an MS command with an error - * message (see MM3000 User's Manual Appendix A). This is an - * unconfirmed MM3000 bug. Retry read if this is a Hard Travel - * limit switch error. This effectively flushes the error message. - * - * IF input "com" buffer length is > 3 characters, AND, the 1st - * character is an "E" (Maybe this an unsolicited error - * message response?). - * Call pasynOctetSyncIO->read(). - * ENDIF - * BREAK - * ENDSWITCH - * - * NORMAL RETURN. - */ - -STATIC int recv_mess(int card, char *com, int flag) -{ - struct MMcontroller *cntrl; - double timeout = 0.; - int flush = 1; - size_t nread = 0; - int eomReason; - asynStatus status; - - /* Check that card exists */ - if (!motor_state[card]) - return(ERROR); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - if (flag != FLUSH) - { - flush = 0; - timeout = SERIAL_TIMEOUT; - } - if (flush) status = pasynOctetSyncIO->flush(cntrl->pasynUser); - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - if (nread > 3 && com[0] == 'E') - { - long error; - - error = strtol(&com[1], NULL, 0); - if (error >= 35 && error <= 42) - { - if (flush) status = pasynOctetSyncIO->flush(cntrl->pasynUser); - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - } - } - - if ((status != asynSuccess) || (nread <= 0)) - { - com[0] = '\0'; - nread = 0; - } - else - { - /* Test for "system error" response. */ - if (com[0] == 'E') - { - errPrintf( -1, __FILE__, __LINE__, "%s\n", com); - return(recv_mess(card, com, flag)); - } - } - - Debug(2, "recv_mess(): message = \"%s\"\n", com); - return((int)nread); -} - - -/*****************************************************/ -/* Setup system configuration */ -/* MM3000Setup() */ -/*****************************************************/ -RTN_STATUS -MM3000Setup(int num_cards, /* maximum number of controllers in system. */ - int scan_rate) /* polling rate - 1/60 sec units. */ -{ - int itera; - - if (num_cards < 1 || num_cards > MM3000_NUM_CARDS) - MM3000_num_cards = MM3000_NUM_CARDS; - else - MM3000_num_cards = num_cards; - - /* Set motor polling task rate */ - if (scan_rate >= 1 && scan_rate <= 60) - targs.motor_scan_rate = scan_rate; - else - targs.motor_scan_rate = SCAN_RATE; - - /* - * Allocate space for motor_state structures. Note this must be done - * before MM3000Config is called, so it cannot be done in motor_init() - * This means that we must allocate space for a card without knowing - * if it really exists, which is not a serious problem - */ - motor_state = (struct controller **) malloc(MM3000_num_cards * - sizeof(struct controller *)); - - for (itera = 0; itera < MM3000_num_cards; itera++) - motor_state[itera] = (struct controller *) NULL; - - return(OK); -} - - -/*****************************************************/ -/* Configure a controller */ -/* MM3000Config() */ -/*****************************************************/ -RTN_STATUS -MM3000Config(int card, /* card being configured */ - const char *port, /* asyn port name */ - int address) /* asyn address (GPIB) */ -{ - struct MMcontroller *cntrl; - - if (card < 0 || card >= MM3000_num_cards) - return(ERROR); - - motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); - motor_state[card]->DevicePrivate = malloc(sizeof(struct MMcontroller)); - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - strcpy(cntrl->asyn_port, port); - cntrl->asyn_address = address; - return(OK); -} - - - -/*****************************************************/ -/* initialize all software and hardware */ -/* This is called from the initialization routine in */ -/* device support. */ -/* motor_init() */ -/*****************************************************/ -STATIC int motor_init() -{ - struct controller *brdptr; - struct MMcontroller *cntrl; - int card_index, motor_index; - char axis_pos[BUFF_SIZE]; - char buff[BUFF_SIZE]; - char *tok_save, *bufptr; - int total_axis = 0; - int status=0; - asynStatus success_rtn; - - initialized = true; /* Indicate that driver is initialized. */ - - /* Check for setup */ - if (MM3000_num_cards <= 0) - return(ERROR); - - tok_save = NULL; - - for (card_index = 0; card_index < MM3000_num_cards; card_index++) - { - if (!motor_state[card_index]) - continue; - - brdptr = motor_state[card_index]; - brdptr->cmnd_response = false; - total_cards = card_index + 1; - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - - /* Initialize communications channel */ - success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, - cntrl->asyn_address, &cntrl->pasynUser, NULL); - if (success_rtn == asynSuccess) - { - /* Send a message to the board, see if it exists */ - /* flush any junk at input port - should not be any data available */ - pasynOctetSyncIO->flush(cntrl->pasynUser); - - send_mess(card_index, GET_IDENT, (char*) NULL); - status = recv_mess(card_index, axis_pos, 1); - /* Return value is length of response string */ - } - - if (success_rtn == asynSuccess && status > 0) - { - brdptr->localaddr = (char *) NULL; - brdptr->motor_in_motion = 0; - send_mess(card_index, STOP_ALL, (char*) NULL); /* Stop all motors */ - send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ - recv_mess(card_index, buff, 1); - strncpy(brdptr->ident, &buff[0], MAX_IDENT_LEN); /* Skip "VE" */ - - send_mess(card_index, "RC", (char*) NULL); - recv_mess(card_index, buff, 1); - bufptr = epicsStrtok_r(buff, "=", &tok_save); - bufptr = epicsStrtok_r(NULL, " ", &tok_save); - - /* The return string will tell us how many axes this controller has */ - for (total_axis = 0; bufptr != NULL; total_axis++) - { - if (strncmp(bufptr, "unused", 6) == 0) - { - cntrl->type[total_axis] = UNUSED; - bufptr = NULL; - } - else - { - if (strncmp(bufptr, "stepper1.5M",11) == 0) - cntrl->type[total_axis] = STEPPER; - else if (strncmp(bufptr, "dc", 2) == 0) - cntrl->type[total_axis] = DC; - else - errlogPrintf("drvMM3000:motor_init() - invalid RC response = %s\n", - bufptr); - - bufptr = epicsStrtok_r(NULL, "=", &tok_save); - bufptr = epicsStrtok_r(NULL, " ", &tok_save); - } - - /* Initialize. */ - brdptr->motor_info[total_axis].motor_motion = NULL; - } - - brdptr->total_axis = total_axis; - - for (motor_index = 0; motor_index < total_axis; motor_index++) - { - struct mess_info *motor_info = &brdptr->motor_info[motor_index]; - - motor_info->status.All = 0; - motor_info->no_motion_count = 0; - motor_info->encoder_position = 0; - motor_info->position = 0; - - if (cntrl->type[total_axis] == DC) - motor_info->encoder_present = YES; - else - { - sprintf(buff, "%dTPE", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - - if (strcmp(buff, "E01") == 0) - motor_info->encoder_present = NO; - else - motor_info->encoder_present = YES; - } - - if (motor_info->encoder_present == YES) - { - motor_info->status.Bits.EA_PRESENT = 1; - motor_info->pid_present = YES; - motor_info->status.Bits.GAIN_SUPPORT = 1; - } - - set_status(card_index, motor_index); /* Read status of each motor */ - } - } - else - motor_state[card_index] = (struct controller *) NULL; - } - - any_motor_in_motion = 0; - - mess_queue.head = (struct mess_node *) NULL; - mess_queue.tail = (struct mess_node *) NULL; - - free_list.head = (struct mess_node *) NULL; - free_list.tail = (struct mess_node *) NULL; - - epicsThreadCreate((char *) "MM3000_motor", epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) motor_task, (void *) &targs); - - return(OK); -} - -/*---------------------------------------------------------------------*/ diff --git a/motorApp/NewportSrc/drvMM4000.cc b/motorApp/NewportSrc/drvMM4000.cc deleted file mode 100644 index 66a9badd..00000000 --- a/motorApp/NewportSrc/drvMM4000.cc +++ /dev/null @@ -1,833 +0,0 @@ -/* -FILENAME... drvMM4000.cc -USAGE... Motor record driver level support for Newport MM4000. - -*/ - -/* - * Original Author: Mark Rivers - * Date: 10/20/97 - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * - * NOTES - * ----- - * Verified with firmware: - * - * - MM4000 2.04 - * - MM4005 2.40 - * - MM4005 2.42 - * - MM4005 3.14b - * - MM4006 7.01c date 04-02-2004 - * - * - * Modification Log: - * ----------------- - * .01 10-20-97 mlr initialized from drvOms58 - * .02 10-30-97 mlr Replaced driver calls with gpipIO functions - * .03 10-30-98 mlr Minor code cleanup, improved formatting - * .04 02-01-99 mlr Added temporary fix to delay reading motor positions at - * the end of a move. - * .05 10-13-99 rls modified for standardized motor record. - * .06 09-17-01 rls - * - created a bit-field for motor status response. - * - start_status() allows one retry after a communication error. - * - set_status() sets RA_PROBLEM along with CNTRL_COMM_ERR to terminate node. - * .07 05-19-03 rls Converted to R3.14.x. - * .08 11-04-03 mlr Added a final poll of motor status if drvMM4000ReadbackDelay is - * non-zero. This is required to work around a bug in the firmware - * (versions 2.40 and 2.44) that the motor is reported as done moving - * on the first poll after a move is begun with the motor power off. - * .09 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". - * .10 07/09/04 rls removed unused Setup() argument. - * .11 07/28/04 rls "epicsExport" debug variable. - * .12 09/21/04 rls support for 32axes/controller. - * .13 12/21/04 rls - * - support for MM4006. - * - MS Visual C compatibility; make all epicsExportAddress extern "C" linkage. - * - make debug variables always available. - * .14 02/18/09 rls Check for controller error. - * .15 02/17/10 rls Bug fix controller error check overwriting position buffer. - * .16 08/25/11 kmp Bug fix for drvMM4000Readback delay. The first call after the - * readback delay now gets and sets the status properly. Also, the delay - * was changed from a double (seconds) to an int (milliseconds) because - * of problems passing floating-point values from the VxWorks shell. - * .17 08/25/11 rls - Added feedback position. - * - Increased max. # of cards to 10 and buffer size to 160 bytes. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include "motor.h" -#include "NewportRegister.h" -#include "drvMMCom.h" -#include "asynOctetSyncIO.h" -#include "epicsExport.h" - -#define READ_RESOLUTION "TU;" -#define READ_STATUS "MS;" -#define READ_POSITION "TH;" -#define READ_FEEDBACK "TP;" -#define STOP_ALL "ST;" -#define MOTOR_ON "MO;" -#define GET_IDENT "VE;" - -/* Status byte bits */ -#define M_AXIS_MOVING 0x01 -#define M_MOTOR_POWER 0x02 -#define M_MOTOR_DIRECTION 0x04 -#define M_PLUS_LIMIT 0x08 -#define M_MINUS_LIMIT 0x10 -#define M_HOME_SIGNAL 0x20 - -#define MM4000_NUM_CARDS 10 -#define BUFF_SIZE 160 /* Maximum length of string to/from MM4000 */ - -#define TIMEOUT 2.0 /* Command timeout in sec. */ - -/*----------------debugging-----------------*/ -volatile int drvMM4000debug = 0; -extern "C" {epicsExportAddress(int, drvMM4000debug);} -static inline void Debug(int level, const char *format, ...) { - #ifdef DEBUG - if (level < drvMM4000debug) { - va_list pVar; - va_start(pVar, format); - vprintf(format, pVar); - va_end(pVar); - } - #endif -} - -/* --- Local data. --- */ -int MM4000_num_cards = 0; - -/* Local data required for every driver; see "motordrvComCode.h" */ -#include "motordrvComCode.h" - - -/* This is a temporary fix to introduce a delayed reading of the motor - * position after a move completes. drvMM4000ReadbackDelay is in milliseconds - */ -volatile int drvMM4000ReadbackDelay = 0; - - -/*----------------functions-----------------*/ -static int recv_mess(int, char *, int); -static RTN_STATUS send_mess(int, char const *, char *name); -static void start_status(int card); -static int set_status(int card, int signal); -static long report(int level); -static long init(); -static int motor_init(); -static void query_done(int, int, struct mess_node *); - -/*----------------functions-----------------*/ - -struct driver_table MM4000_access = -{ - motor_init, - motor_send, - motor_free, - motor_card_info, - motor_axis_info, - &mess_queue, - &queue_lock, - &free_list, - &freelist_lock, - &motor_sem, - &motor_state, - &total_cards, - &any_motor_in_motion, - send_mess, - recv_mess, - set_status, - query_done, - start_status, - &initialized, - NULL -}; - -struct drvMM4000_drvet -{ - long number; -#ifdef __cplusplus - long (*report) (int); - long (*init) (void); -#else - DRVSUPFUN report; - DRVSUPFUN init; -#endif -} drvMM4000 = {2, report, init}; - -extern "C" {epicsExportAddress(drvet, drvMM4000);} - -static struct thread_args targs = {SCAN_RATE, &MM4000_access, 0.0}; - -/********************************************************* - * Print out driver status report - *********************************************************/ -static long report(int level) -{ - int card; - - if (MM4000_num_cards <=0) - printf(" No MM4000 controllers configured.\n"); - else - { - for (card = 0; card < MM4000_num_cards; card++) - { - struct controller *brdptr = motor_state[card]; - - if (brdptr == NULL) - printf(" MM4000 controller %d connection failed.\n", card); - else - { - struct MMcontroller *cntrl; - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - printf(" MM4000 controller %d, port=%s, address=%d, id: %s \n", - card, cntrl->asyn_port, cntrl->asyn_address, - brdptr->ident); - } - } - } - return(OK); -} - - -static long init() -{ - /* - * We cannot call motor_init() here, because that function can do GPIB I/O, - * and hence requires that the drvGPIB have already been initialized. - * That cannot be guaranteed, so we need to call motor_init from device - * support - */ - /* Check for setup */ - if (MM4000_num_cards <= 0) - { - Debug(1, "init(): MM4000 driver disabled. MM4000Setup() missing from startup script.\n"); - } - return((long) 0); -} - - -static void query_done(int card, int axis, struct mess_node *nodeptr) -{ -} - - -/********************************************************* - * Read the status and position of all motors on a card - * start_status(int card) - * if card == -1 then start all cards - *********************************************************/ -static void start_status(int card) -{ - struct MMcontroller *cntrl; - int itera, status; - - if (card >= 0) - { - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - send_mess(card, READ_STATUS, (char*) NULL); - status = recv_mess(card, cntrl->status_string, 1); - if (status > 0) - { - cntrl->status = NORMAL; - send_mess(card, READ_POSITION, (char*) NULL); - recv_mess(card, cntrl->position_string, 1); - send_mess(card, READ_FEEDBACK, (char*) NULL); - recv_mess(card, cntrl->feedback_string, 1); - } - else - { - if (cntrl->status == NORMAL) - cntrl->status = RETRY; - else - cntrl->status = COMM_ERR; - } - } - else - { - /* - * For efficiency we send messages to all cards, then read all - * responses. This minimizes the latency due to processing on each card - */ - for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - send_mess(itera, READ_STATUS, (char*) NULL); - for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - { - cntrl = (struct MMcontroller *) motor_state[itera]->DevicePrivate; - status = recv_mess(itera, cntrl->status_string, 1); - if (status > 0) - { - cntrl->status = NORMAL; - send_mess(itera, READ_FEEDBACK, (char*) NULL); - recv_mess(itera, cntrl->feedback_string, 1); - } - else - { - if (cntrl->status == NORMAL) - cntrl->status = RETRY; - else - cntrl->status = COMM_ERR; - } - } - for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - send_mess(itera, READ_POSITION, (char*) NULL); - for (itera = 0; (itera < total_cards) && motor_state[itera]; itera++) - { - cntrl = (struct MMcontroller *) motor_state[itera]->DevicePrivate; - recv_mess(itera, cntrl->position_string, 1); - } - } -} - - -/************************************************************** - * Parse status and position strings for a card and signal - * set_status() - ************************************************************/ - -static int set_status(int card, int signal) -{ - struct MMcontroller *cntrl; - struct mess_node *nodeptr; - register struct mess_info *motor_info; - /* Message parsing variables */ - char *p, *tok_save; - char buff[BUFF_SIZE]; - int itera, pos; - MOTOR_STATUS mstat; - int rtn_state; - double motorData; - bool plusdir, ls_active = false; - msta_field status; - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - motor_info = &(motor_state[card]->motor_info[signal]); - status.All = motor_info->status.All; - - if (cntrl->status != NORMAL) - { - if (cntrl->status == COMM_ERR) - { - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - else - { - rtn_state = 0; - goto exit; - } - } - else - status.Bits.CNTRL_COMM_ERR = 0; - - nodeptr = motor_info->motor_motion; - - /* - * Parse the status string - * Status string format: 1MSx,2MSy,3MSz,... where x, y and z are the status - * bytes for the motors - */ - pos = signal*5 + 3; /* Offset in status string */ - mstat.All = cntrl->status_string[pos]; - Debug(5, "set_status(): status byte = %x on card #%d\n", mstat.All, card); - - status.Bits.RA_DIRECTION = (mstat.Bits.direction == false) ? 0 : 1; - - plusdir = (status.Bits.RA_DIRECTION) ? true : false; - - if (mstat.Bits.inmotion == false) - { - status.Bits.RA_DONE = 1; -/* TEMPORARY FIX, Mark Rivers, 2/1/99. The MM4000 has reported that the - * motor is done moving, which means that the "jerk time" is done. However, - * the axis can still be settling. For now we put in a delay and poll the - * motor position again. This is not a good long-term solution. - * - * Another TEMPORARY FIX, Mark Rivers, 4/13/03. The MM4000 has reported that - * the motor is done moving. However, if the motor power was off, and the firmware - * version is 2.43 or 2.44 then the controller "lies" and says the motor is done - * on the first poll, when it is really moving. We work around this by reading - * the status again after the delay, in case it is really still moving. - */ - if (motor_info->pid_present == YES && drvMM4000ReadbackDelay != 0) - { - epicsThreadSleep((double) drvMM4000ReadbackDelay/1000.0); - send_mess(card, READ_STATUS, (char*) NULL); - recv_mess(card, cntrl->status_string, 1); - pos = signal*5 + 3; /* Offset in status string */ - mstat.All = cntrl->status_string[pos]; - if (mstat.Bits.inmotion == true) - status.Bits.RA_DONE = 0; - send_mess(card, READ_POSITION, 0); - recv_mess(card, cntrl->position_string, 1); - } - } - else - status.Bits.RA_DONE = 0; - - /* Set Travel limit switch status bits. */ - if (mstat.Bits.plustTL == false) - status.Bits.RA_PLUS_LS = 0; - else - { - status.Bits.RA_PLUS_LS = 1; - if (plusdir == true) - ls_active = true; - } - - if (mstat.Bits.minusTL == false) - status.Bits.RA_MINUS_LS = 0; - else - { - status.Bits.RA_MINUS_LS = 1; - if (plusdir == false) - ls_active = true; - } - - status.Bits.RA_HOME = (mstat.Bits.homels == false) ? 0 : 1; - status.Bits.EA_POSITION = (mstat.Bits.NOT_power == false) ? 1 : 0; - - /* encoder status */ - status.Bits.EA_SLIP = 0; - status.Bits.EA_SLIP_STALL = 0; - status.Bits.EA_HOME = 0; - - /* - * Parse motor position - * Position string format: 1TP5.012,2TP1.123,3TP-100.567,... - * Skip to substring for this motor, convert to double - */ - - strcpy(buff, cntrl->position_string); - tok_save = NULL; - p = epicsStrtok_r(buff, ",", &tok_save); - for (itera = 0; itera < signal; itera++) - p = epicsStrtok_r(NULL, ",", &tok_save); - Debug(6, "set_status(): position substring = %s on card #%d\n", p, card); - motorData = atof(p+3) / cntrl->drive_resolution[signal]; - - if (motorData == motor_info->position) - { - if (nodeptr != 0) /* Increment counter only if motor is moving. */ - motor_info->no_motion_count++; - } - else - { - motor_info->position = NINT(motorData); - motor_info->no_motion_count = 0; - } - - if (motor_state[card]->motor_info[signal].encoder_present == YES) - { - strcpy(buff, cntrl->feedback_string); - tok_save = NULL; - p = epicsStrtok_r(buff, ",", &tok_save); - for (itera = 0; itera < signal; itera++) - p = epicsStrtok_r(NULL, ",", &tok_save); - Debug(6, "set_status(): feedback substring = %s on card #%d\n", p, card); - motorData = atof(p+3) / cntrl->drive_resolution[signal]; - motor_info->encoder_position = (epicsInt32) motorData; - } - else - motor_info->encoder_position = 0; - - - /* Check for controller error. */ - send_mess(card, "TE;", (char*) NULL); - recv_mess(card, buff, 1); - if (buff[2] == '@') - status.Bits.RA_PROBLEM = 0; - else - { - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - - /* Parse motor velocity? */ - /* NEEDS WORK */ - - motor_info->velocity = 0; - - if (!status.Bits.RA_DIRECTION) - motor_info->velocity *= -1; - - rtn_state = (!motor_info->no_motion_count || ls_active == true || - status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; - - /* Test for post-move string. */ - if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && - nodeptr->postmsgptr != 0) - { - strcpy(buff, nodeptr->postmsgptr); - send_mess(card, buff, (char*) NULL); - nodeptr->postmsgptr = NULL; - } - -exit: - motor_info->status.All = status.All; - return(rtn_state); -} - - -/*****************************************************/ -/* send a message to the MM4000 board */ -/* send_mess() */ -/*****************************************************/ -static RTN_STATUS send_mess(int card, char const *com, char *name) -{ - struct MMcontroller *cntrl; - size_t size; - size_t nwrite; - - size = strlen(com); - - if (size > MAX_MSG_SIZE) - { - errlogMessage("drvMM4000.c:send_mess(); message size violation.\n"); - return(ERROR); - } - else if (size == 0) /* Normal exit on empty input message. */ - return(OK); - - if (!motor_state[card]) - { - errlogPrintf("drvMM4000.c:send_mess() - invalid card #%d\n", card); - return(ERROR); - } - - if (name != NULL) - { - errlogPrintf("drvMM4000.c:send_mess() - invalid argument = %s\n", name); - return(ERROR); - } - - Debug(2, "send_mess(): message = %s on card #%d\n", com, card); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - pasynOctetSyncIO->write(cntrl->pasynUser, com, strlen(com), TIMEOUT, &nwrite); - - return(OK); -} - - -/* - * FUNCTION... recv_mess(int card, char *com, int flag) - * - * INPUT ARGUMENTS... - * card - controller card # (0,1,...). - * *com - caller's response buffer. - * flag | FLUSH = flush controller's output buffer; set timeout = 0. - * | !FLUSH = retrieve response into caller's buffer; set timeout. - * - * LOGIC... - * IF controller card does not exist. - * ERROR RETURN. - * ENDIF - * NORMAL RETURN. - */ - -static int recv_mess(int card, char *com, int flag) -{ - struct MMcontroller *cntrl; - double timeout = 0.; - size_t nread = 0; - asynStatus status; - int eomReason; - - /* Check that card exists */ - if (!motor_state[card]) - return(ERROR); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - timeout = TIMEOUT; - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - - if ((status != asynSuccess) || (nread <= 0)) - { - com[0] = '\0'; - nread = 0; - } - - Debug(2, "recv_mess(): message = \"%s\" on card #%d\n", com, card); - return((int)nread); -} - - -/*****************************************************/ -/* Setup system configuration */ -/* MM4000Setup() */ -/*****************************************************/ -RTN_STATUS -MM4000Setup(int num_cards, /* maximum number of controllers in system. */ - int scan_rate) /* polling rate - 1/60 sec units. */ -{ - int itera; - - if (num_cards < 1 || num_cards > MM4000_NUM_CARDS) - { - epicsThreadSleep(5.0); - errlogPrintf("\n*** ERROR *** Number specified (%d) exceeds maximum allowed (%d).\n\n", num_cards, MM4000_NUM_CARDS); - epicsThreadSleep(5.0); - MM4000_num_cards = MM4000_NUM_CARDS; - } - else - MM4000_num_cards = num_cards; - - /* Set motor polling task rate */ - if (scan_rate >= 1 && scan_rate <= 60) - targs.motor_scan_rate = scan_rate; - else - targs.motor_scan_rate = SCAN_RATE; - - /* - * Allocate space for motor_state structures. Note this must be done - * before MM4000Config is called, so it cannot be done in motor_init() - * This means that we must allocate space for a card without knowing - * if it really exists, which is not a serious problem - */ - motor_state = (struct controller **) malloc(MM4000_num_cards * - sizeof(struct controller *)); - - for (itera = 0; itera < MM4000_num_cards; itera++) - motor_state[itera] = (struct controller *) NULL; - - return(OK); -} - - -/*****************************************************/ -/* Configure a controller */ -/* MM4000Config() */ -/*****************************************************/ -RTN_STATUS -MM4000Config(int card, /* card being configured */ - const char *name, /* asyn port name */ - int addr) /* asyn address (GPIB) */ -{ - struct MMcontroller *cntrl; - - if (card < 0 || card >= MM4000_num_cards) - return(ERROR); - - motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); - motor_state[card]->DevicePrivate = malloc(sizeof(struct MMcontroller)); - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - strcpy(cntrl->asyn_port, name); - cntrl->asyn_address = addr; - return(OK); -} - - - -/*****************************************************/ -/* initialize all software and hardware */ -/* This is called from the initialization routine in */ -/* device support. */ -/* motor_init() */ -/*****************************************************/ -static int motor_init() -{ - struct controller *brdptr; - struct MMcontroller *cntrl; - int card_index, motor_index; - char axis_pos[BUFF_SIZE]; - char buff[BUFF_SIZE]; - char *tok_save, *pos_ptr; - int total_axis = 0; - int status=0, model_num, digits; - asynStatus success_rtn; - - initialized = true; /* Indicate that driver is initialized. */ - - /* Check for setup */ - if (MM4000_num_cards <= 0) - return(ERROR); - - for (card_index = 0; card_index < MM4000_num_cards; card_index++) - { - if (!motor_state[card_index]) - continue; - - brdptr = motor_state[card_index]; - brdptr->cmnd_response = false; - total_cards = card_index + 1; - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - - /* Initialize communications channel */ - success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, - cntrl->asyn_address, &cntrl->pasynUser, NULL); - - if (success_rtn == asynSuccess) - { - int retry = 0; - - /* Send a message to the board, see if it exists */ - /* flush any junk at input port - should not be any data available */ - pasynOctetSyncIO->flush(cntrl->pasynUser); - - do - { - send_mess(card_index, READ_POSITION, (char*) NULL); - status = recv_mess(card_index, axis_pos, 1); - retry++; - /* Return value is length of response string */ - } while (status == 0 && retry < 3); - } - - if (success_rtn == asynSuccess && status > 0) - { - brdptr->localaddr = (char *) NULL; - brdptr->motor_in_motion = 0; - send_mess(card_index, STOP_ALL, (char*) NULL); /* Stop all motors */ - send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ - recv_mess(card_index, buff, 1); - strcpy(brdptr->ident, &buff[2]); /* Skip "VE" */ - - /* Set Motion Master model indicator. */ - pos_ptr = strstr(brdptr->ident, "MM"); - if (pos_ptr == NULL) - { - errlogPrintf("drvMM4000.c:motor_init() - invalid model = %s\n", brdptr->ident); - motor_state[card_index] = (struct controller *) NULL; - continue; - } - model_num = atoi(pos_ptr + 2); - if (model_num == 4000) - cntrl->model = MM4000; - else if (model_num == 4005 || model_num == 4006) - cntrl->model = MM4005; - else - { - errlogPrintf("drvMM4000.c:motor_init() - invalid model = %s\n", brdptr->ident); - motor_state[card_index] = (struct controller *) NULL; - continue; - } - - send_mess(card_index, READ_POSITION, (char*) NULL); - recv_mess(card_index, axis_pos, 1); - - /* The return string will tell us how many axes this controller has */ - for (total_axis = 0, tok_save = NULL, pos_ptr = epicsStrtok_r(axis_pos, ",", &tok_save); - pos_ptr != 0; pos_ptr = epicsStrtok_r(NULL, ",", &tok_save), total_axis++) - brdptr->motor_info[total_axis].motor_motion = NULL; - - brdptr->total_axis = total_axis; - - start_status(card_index); - for (motor_index = 0; motor_index < total_axis; motor_index++) - { - struct mess_info *motor_info = &brdptr->motor_info[motor_index]; - int loop_state; - - motor_info->status.All = 0; - motor_info->no_motion_count = 0; - motor_info->encoder_position = 0; - motor_info->position = 0; - - motor_info->status.Bits.GAIN_SUPPORT = 1; - - /* Determine if encoder present based on open/closed loop mode. */ - sprintf(buff, "%dTC", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - loop_state = atoi(&buff[3]); /* Skip first 3 characters */ - if (loop_state != 0) - { - motor_info->encoder_present = YES; - motor_info->status.Bits.EA_PRESENT = 1; - motor_info->pid_present = YES; - } - - /* Determine drive resolution. */ - sprintf(buff, "%dTU", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - cntrl->drive_resolution[motor_index] = atof(&buff[3]); - - digits = (int) -log10(cntrl->drive_resolution[motor_index]) + 2; - if (digits < 1) - digits = 1; - cntrl->res_decpts[motor_index] = digits; - - /* Save home preset position. */ - sprintf(buff, "%dXH", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - cntrl->home_preset[motor_index] = atof(&buff[3]); - - /* Determine low limit */ - sprintf(buff, "%dTL", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - motor_info->low_limit = atof(&buff[3]); - - /* Determine high limit */ - sprintf(buff, "%dTR", motor_index + 1); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - motor_info->high_limit = atof(&buff[3]); - - set_status(card_index, motor_index); /* Read status of each motor */ - } - } - else - motor_state[card_index] = (struct controller *) NULL; - } - - any_motor_in_motion = 0; - - mess_queue.head = (struct mess_node *) NULL; - mess_queue.tail = (struct mess_node *) NULL; - - free_list.head = (struct mess_node *) NULL; - free_list.tail = (struct mess_node *) NULL; - - epicsThreadCreate((char *) "MM4000_motor", - epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) motor_task, (void *) &targs); - - return(OK); -} - diff --git a/motorApp/NewportSrc/drvMM4000Asyn.c b/motorApp/NewportSrc/drvMM4000Asyn.c deleted file mode 100644 index 16b39c84..00000000 --- a/motorApp/NewportSrc/drvMM4000Asyn.c +++ /dev/null @@ -1,959 +0,0 @@ -/* -FILENAME... drvMM4000Asyn.cc -USAGE... Motor record asyn driver level support for Newport MM4000. - -*/ - -/* - * Original Author: Mark Rivers - * Date: 05/03/06 - * Current Author: Mark Rivers - * - ----------------------------------------------------------------------------- - COPYRIGHT NOTICE - ----------------------------------------------------------------------------- - Copyright (c) 2002 The University of Chicago, as Operator of Argonne - National Laboratory. - Copyright (c) 2002 The Regents of the University of California, as - Operator of Los Alamos National Laboratory. - Synapps Versions 4-5 - and higher are distributed subject to a Software License Agreement found - in file LICENSE that is included with this distribution. - ----------------------------------------------------------------------------- - * - * NOTES - * ----- - * Verified with firmware: - * - * - MM4000 2.04 - * - MM4005 2.40 - * - MM4005 2.42 - * - MM4005 3.14b - * - MM4006 7.01c date 04-02-2004 - * - * Modification Log: - * ----------------- - * - * .01 09-09-08 rls Default to motorAxisHasClosedLoop on from motorAxisInit(), - * so that CNEN functions. - * .02 01-29-09 rls Copied Matthew Pearson's (Diamond) fix on XPS for; - * - idle polling interfering with setting position. - * - auto save/restore not working. - * .03 02-18-09 rls - Intermittent "set position" problem; set position cmnd. - * sometimes occurred during polling causing motor record - * to get old position value. Lock/Unlock all controller's - * axis during status update. - * - Check for controller error. - * .04 06-11-09 rls - Matthew Pearson's fix for record seeing motorAxisDone True - * on 1st status update after a move; set motorAxisDone False - * in motorAxisDrvSET_t functions that start motion - * (motorAxisHome, motorAxisMove, motorAxisVelocityMove) and - * force a status update with a call to callCallback(). - * - bug fix; limit commands reversed. - * - set motorAxisDirection. - * .05 11-19-09 rls - bug fix for sendOnly() passing null pointer - * (pController->pasynUser) if any communication error occurs - * at bootup. - * .06 04-15-10 rls - Apply Matthew Pearson's fix to motorAxisSetInteger(). - * - Allow MM4005 models to enable/disable torque. - * - Reformat some 'if' statements. - * .07 11-29-11 rls - 8 axis with max. precision can overflow comm. buffers. - * increased from 100 to 160 bytes. - * - Wait for power on status response. - * - */ - - -#include -#include "epicsThread.h" -#include -#include -#include -#include -#include - -#include "drvMM4000Asyn.h" -#include "paramLib.h" - -#include "epicsFindSymbol.h" -#include "epicsTime.h" -#include "epicsThread.h" -#include "epicsEvent.h" -#include "epicsString.h" -#include "epicsMutex.h" -#include "ellLib.h" -#include "asynDriver.h" -#include "asynOctetSyncIO.h" -#include "errlog.h" - -#include "drvSup.h" -#include "epicsExport.h" -#define DEFINE_MOTOR_PROTOTYPES 1 -#include "motor_interface.h" - -motorAxisDrvSET_t motorMM4000 = -{ - 14, - motorAxisReport, /**< Standard EPICS driver report function (optional) */ - motorAxisInit, /**< Standard EPICS dirver initialisation function (optional) */ - motorAxisSetLog, /**< Defines an external logging function (optional) */ - motorAxisOpen, /**< Driver open function */ - motorAxisClose, /**< Driver close function */ - motorAxisSetCallback, /**< Provides a callback function the driver can call when the status updates */ - motorAxisSetDouble, /**< Pointer to function to set a double value */ - motorAxisSetInteger, /**< Pointer to function to set an integer value */ - motorAxisGetDouble, /**< Pointer to function to get a double value */ - motorAxisGetInteger, /**< Pointer to function to get an integer value */ - motorAxisHome, /**< Pointer to function to execute a more to reference or home */ - motorAxisMove, /**< Pointer to function to execute a position move */ - motorAxisVelocityMove, /**< Pointer to function to execute a velocity mode move */ - motorAxisStop, /**< Pointer to function to stop motion */ - motorAxisforceCallback, /**< Pointer to function to request a poller status update */ - motorAxisProfileMove, /**< Pointer to function to execute a profile move */ - motorAxisTriggerProfile /**< Pointer to function to trigger a profile move */ -}; - -epicsExportAddress(drvet, motorMM4000); - -typedef enum { - MM4000, - MM4005 -} MM_model; - -typedef struct { - epicsMutexId MM4000Lock; - asynUser *pasynUser; - int numAxes; - char firmwareVersion[100]; - MM_model model; - double movingPollPeriod; - double idlePollPeriod; - epicsEventId pollEventId; - AXIS_HDL pAxis; /* array of axes */ -} MM4000Controller; - -typedef struct motorAxisHandle -{ - MM4000Controller *pController; - PARAMS params; - double currentPosition; - double stepSize; - double highLimit; - double lowLimit; - double homePreset; - int closedLoop; - int axisStatus; - int card; - int axis; - int maxDigits; - motorAxisLogFunc print; - void *logParam; - epicsMutexId mutexId; -} motorAxis; - -typedef struct -{ - AXIS_HDL pFirst; - epicsThreadId motorThread; - motorAxisLogFunc print; - void *logParam; - epicsTimeStamp now; -} motorMM4000_t; - - -static int motorMM4000LogMsg(void * param, const motorAxisLogMask_t logMask, const char *pFormat, ...); -static int sendOnly(MM4000Controller *pController, char *outputString); -static asynStatus sendAndReceive(MM4000Controller *pController, char *outputString, char *inputString, int inputSize); - -#define PRINT (drv.print) -#define FLOW motorAxisTraceFlow -#define MOTOR_ERROR motorAxisTraceError -#define IODRIVER motorAxisTraceIODriver - -#define MM4000_MAX_AXES 8 -#define BUFFER_SIZE 160 /* Size of input and output buffers */ -#define TIMEOUT 2.0 /* Timeout for I/O in seconds */ - -#define MM4000_HOME 0x20 /* Home LS. */ -#define MM4000_LOW_LIMIT 0x10 /* Minus Travel Limit. */ -#define MM4000_HIGH_LIMIT 0x08 /* Plus Travel Limit. */ -#define MM4000_DIRECTION 0x04 /* Motor direction: 0 - minus; 1 - plus. */ -#define MM4000_POWER_OFF 0x02 /* Motor power 0 - ON; 1 - OFF. */ -#define MM4000_MOVING 0x01 /* In-motion indicator. */ - - -#define TCP_TIMEOUT 2.0 -static motorMM4000_t drv={ NULL, NULL, motorMM4000LogMsg, 0, { 0, 0 } }; -static int numMM4000Controllers; -/* Pointer to array of controller strutures */ -static MM4000Controller *pMM4000Controller=NULL; - -#define MAX(a,b) ((a)>(b)? (a): (b)) -#define MIN(a,b) ((a)<(b)? (a): (b)) - -static void motorAxisReportAxis(AXIS_HDL pAxis, int level) -{ - if (level > 0) - { - printf("Axis %d\n", pAxis->axis); - printf(" axisStatus: 0x%x\n", pAxis->axisStatus); - printf(" high limit: %f\n", pAxis->highLimit); - printf(" low limit: %f\n", pAxis->lowLimit); - printf(" home preset: %f\n", pAxis->homePreset); - printf(" step size: %f\n", pAxis->stepSize); - printf(" max digits: %d\n", pAxis->maxDigits); - } -} - -static void motorAxisReport(int level) -{ - int i, j; - - for(i=0; imutexId) - break; - epicsMutexLock(pAxis->mutexId); - - /*Set GAIN_SUPPORT on so that at least, CNEN functions. */ - motorParam->setInteger(pAxis->params, motorAxisHasClosedLoop, 1); - - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - } - return(MOTOR_AXIS_OK); -} - -static int motorAxisSetLog( AXIS_HDL pAxis, motorAxisLogFunc logFunc, void * param ) -{ - if (pAxis == NULL) - { - if (logFunc == NULL) - { - drv.print=motorMM4000LogMsg; - drv.logParam = NULL; - } - else - { - drv.print=logFunc; - drv.logParam = param; - } - } - else - { - if (logFunc == NULL) - { - pAxis->print=motorMM4000LogMsg; - pAxis->logParam = NULL; - } - else - { - pAxis->print=logFunc; - pAxis->logParam = param; - } - } - return MOTOR_AXIS_OK; -} - -static AXIS_HDL motorAxisOpen(int card, int axis, char * param) -{ - AXIS_HDL pAxis; - - if (card > numMM4000Controllers) - return(NULL); - if (axis > pMM4000Controller[card].numAxes) - return(NULL); - pAxis = &pMM4000Controller[card].pAxis[axis]; - return pAxis; -} - -static int motorAxisClose(AXIS_HDL pAxis) -{ - return MOTOR_AXIS_OK; -} - -static int motorAxisGetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int * value) -{ - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->getInteger(pAxis->params, (paramIndex) function, value); -} - -static int motorAxisGetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double * value) -{ - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->getDouble(pAxis->params, (paramIndex) function, value); -} - -static int motorAxisSetCallback(AXIS_HDL pAxis, motorAxisCallbackFunc callback, void * param) -{ - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - else - return motorParam->setCallback(pAxis->params, callback, param); -} - -static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double value) -{ - int ret_status = MOTOR_AXIS_ERROR; - double deviceValue; - char buff[100]; - - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - else - { - epicsMutexLock(pAxis->mutexId); - switch (function) - { - case motorAxisPosition: - { - deviceValue = value*pAxis->stepSize; - sprintf(buff, "%dSH%.*f;%dDH;%dSH%.*f", pAxis->axis+1, pAxis->maxDigits, deviceValue, - pAxis->axis+1, pAxis->axis+1, pAxis->maxDigits, pAxis->homePreset); - ret_status = sendOnly(pAxis->pController, buff); - break; - } - case motorAxisEncoderRatio: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble: MM4000 does not support setting encoder ratio\n"); - break; - } - case motorAxisResolution: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble: MM4000 does not support setting resolution\n"); - break; - } - case motorAxisLowLimit: - { - deviceValue = value*pAxis->stepSize; - sprintf(buff, "%dSL%.*f", pAxis->axis+1, pAxis->maxDigits, deviceValue); - ret_status = sendOnly(pAxis->pController, buff); - break; - } - case motorAxisHighLimit: - { - deviceValue = value*pAxis->stepSize; - sprintf(buff, "%dSR%.*f", pAxis->axis+1, pAxis->maxDigits, deviceValue); - ret_status = sendOnly(pAxis->pController, buff); - break; - } - case motorAxisPGain: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "MM4000 does not support setting proportional gain\n"); - break; - } - case motorAxisIGain: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "MM4000 does not support setting integral gain\n"); - break; - } - case motorAxisDGain: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "MM4000 does not support setting derivative gain\n"); - break; - } - default: - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble: unknown function %d\n", function); - break; - } - if (ret_status == MOTOR_AXIS_OK ) - { - motorParam->setDouble(pAxis->params, function, value); - motorParam->callCallback(pAxis->params); - } - epicsMutexUnlock(pAxis->mutexId); - } - return ret_status; -} - -static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int value) -{ - int ret_status = MOTOR_AXIS_ERROR; - char buff[100]; - - if (pAxis == NULL) - return(MOTOR_AXIS_ERROR); - - epicsMutexLock(pAxis->mutexId); - - switch (function) - { - case motorAxisClosedLoop: - /* The MM4000 only allows turning on and off ALL motors (MO and MF commands), */ - /* not individual axes. Don't implement */ - if (pAxis->pController->model == MM4000) - ret_status = MOTOR_AXIS_OK; - else - { - if (value == 0) - { - int axisStatus, powerOn = 0; - int offset = (pAxis->axis * 5) + 3; /* Offset in status string */ - - sprintf(buff, "%dMF", pAxis->axis + 1); - ret_status = sendOnly(pAxis->pController, buff); - - /* Wait for Power to come on. */ - while (powerOn == 0) - { - ret_status = sendAndReceive(pAxis->pController, "MS;", buff, sizeof(buff)); - axisStatus = buff[offset]; - if (!(axisStatus & MM4000_POWER_OFF)) - powerOn = 1; - else - epicsThreadSleep(0.1); - } - } - else - { - sprintf(buff, "%dMO", pAxis->axis+1); - ret_status = sendOnly(pAxis->pController, buff); - } - } - break; - default: - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetInteger: unknown function %d\n", function); - break; - } - if (ret_status != MOTOR_AXIS_ERROR) - { - motorParam->setInteger(pAxis->params, function, value); - motorParam->callCallback(pAxis->params); - } - epicsMutexUnlock(pAxis->mutexId); - return(ret_status); -} - - -static int motorAxisMove(AXIS_HDL pAxis, double position, int relative, - double min_velocity, double max_velocity, double acceleration) -{ - int status; - char buff[100]; - char *moveCommand; - - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f\n", - pAxis->card, pAxis->axis, position, min_velocity, max_velocity, acceleration); - - if (relative) { - moveCommand = "PR"; - } else { - moveCommand = "PA"; - } - sprintf(buff, "%dAC%.*f;%dVA%.*f;%d%s%.*f;", - pAxis->axis+1, pAxis->maxDigits, acceleration * pAxis->stepSize, - pAxis->axis+1, pAxis->maxDigits, max_velocity * pAxis->stepSize, - pAxis->axis+1, moveCommand, pAxis->maxDigits, position * pAxis->stepSize); - status = sendOnly(pAxis->pController, buff); - if (status) - return MOTOR_AXIS_ERROR; - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - /* Insure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return MOTOR_AXIS_OK; -} - -static int motorAxisHome(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards) -{ - int status; - char buff[100]; - - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - - PRINT(pAxis->logParam, FLOW, "motorAxisHome: set card %d, axis %d to home\n", - pAxis->card, pAxis->axis); - - sprintf(buff, "%dAC%.*f; %dVA%.*f;%dOR;", - pAxis->axis+1, pAxis->maxDigits, acceleration * pAxis->stepSize, - pAxis->axis+1, pAxis->maxDigits, max_velocity * pAxis->stepSize, - pAxis->axis+1); - status = sendOnly(pAxis->pController, buff); - if (status) - return(MOTOR_AXIS_ERROR); - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - /* Insure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - return MOTOR_AXIS_OK; -} - - -static int motorAxisVelocityMove(AXIS_HDL pAxis, double min_velocity, double velocity, double acceleration) -{ - int status; - - if (pAxis == NULL) - return(MOTOR_AXIS_ERROR); - - /* MM4000 does not have a jog command. Simulate with move absolute - * to the appropriate software limit. We can move to MM4000 soft limits. - * If the record soft limits are set tighter than the MM4000 limits - * the record will prevent JOG motion beyond its soft limits - */ - if (velocity > 0.) - status = motorAxisMove(pAxis, pAxis->highLimit/pAxis->stepSize, 0, min_velocity, velocity, acceleration); - else - status = motorAxisMove(pAxis, pAxis->lowLimit/pAxis->stepSize, 0, min_velocity, -velocity, acceleration); - - return status; -} - -static int motorAxisProfileMove(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger) -{ - return MOTOR_AXIS_ERROR; -} - -static int motorAxisTriggerProfile(AXIS_HDL pAxis) -{ - return MOTOR_AXIS_ERROR; -} - -static int motorAxisStop(AXIS_HDL pAxis, double acceleration) -{ - int status; - char buff[100]; - - if (pAxis == NULL) - return MOTOR_AXIS_ERROR; - - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d to stop with accel=%f\n", - pAxis->card, pAxis->axis, acceleration); - - sprintf(buff, "%dAC%.*f;%dST;", - pAxis->axis+1, pAxis->maxDigits, acceleration * pAxis->stepSize, - pAxis->axis+1); - status = sendOnly(pAxis->pController, buff); - if (status) - return MOTOR_AXIS_ERROR; - return MOTOR_AXIS_OK; -} - -static int motorAxisforceCallback(AXIS_HDL pAxis) -{ - if (pAxis == NULL) - return (MOTOR_AXIS_ERROR); - - PRINT(pAxis->logParam, FLOW, "motorAxisforceCallback: request card %d, axis %d status update\n", - pAxis->card, pAxis->axis); - - /* Force a status update. */ - motorParam->forceCallback(pAxis->params); - - /* Send a signal to the poller task which will make it do a status update */ - epicsEventSignal(pAxis->pController->pollEventId); - return (MOTOR_AXIS_OK); -} - - -static void MM4000Poller(MM4000Controller *pController) -{ - /* This is the task that polls the MM4000 */ - double timeout; - AXIS_HDL pAxis; - int status; - int itera, j; - int axisDone; - int offset; - int anyMoving; - int comStatus; - int forcedFastPolls=0; - char *p, *tokSave; - char statusAllString[BUFFER_SIZE]; - char positionAllString[BUFFER_SIZE]; - char buff[BUFFER_SIZE]; - - timeout = pController->idlePollPeriod; - epicsEventSignal(pController->pollEventId); /* Force on poll at startup */ - - while (1) - { - if (timeout != 0.) - status = epicsEventWaitWithTimeout(pController->pollEventId, timeout); - else - status = epicsEventWait(pController->pollEventId); - - if (status == epicsEventWaitOK) - { - /* We got an event, rather than a timeout. This is because other software - * knows that an axis should have changed state (started moving, etc.). - * Force a minimum number of fast polls, because the controller status - * might not have changed the first few polls - */ - forcedFastPolls = 10; - } - - anyMoving = 0; - - /* Lock all the controller's axis. */ - for (itera = 0; itera < pController->numAxes; itera++) - { - pAxis = &pController->pAxis[itera]; - if (!pAxis->mutexId) - break; - epicsMutexLock(pAxis->mutexId); - } - - comStatus = sendAndReceive(pController, "MS;", statusAllString, sizeof(statusAllString)); - if (comStatus == 0) - comStatus = sendAndReceive(pController, "TP;", positionAllString, sizeof(positionAllString)); - - for (itera=0; itera < pController->numAxes; itera++) - { - pAxis = &pController->pAxis[itera]; - if (!pAxis->mutexId) - break; - if (comStatus != 0) - { - PRINT(pAxis->logParam, MOTOR_ERROR, "MM4000Poller: error reading status=%d\n", comStatus); - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - } - else - { - PARAMS params = pAxis->params; - int intval, axisStatus; - - motorParam->setInteger(params, motorAxisCommError, 0); - /* - * Parse the status string - * Status string format: 1MSx,2MSy,3MSz,... where x, y and z are the status - * bytes for the motors - */ - offset = pAxis->axis*5 + 3; /* Offset in status string */ - axisStatus = pAxis->axisStatus = statusAllString[offset]; - if (axisStatus & MM4000_MOVING) - { - axisDone = 0; - anyMoving = 1; - } - else - axisDone = 1; - motorParam->setInteger(params, motorAxisDone, axisDone); - - motorParam->setInteger(params, motorAxisHomeSignal, (axisStatus & MM4000_HOME)); - motorParam->setInteger(params, motorAxisHighHardLimit, (axisStatus & MM4000_HIGH_LIMIT)); - motorParam->setInteger(params, motorAxisLowHardLimit, (axisStatus & MM4000_LOW_LIMIT)); - motorParam->setInteger(params, motorAxisDirection, (axisStatus & MM4000_DIRECTION)); - motorParam->setInteger(params, motorAxisPowerOn, !(axisStatus & MM4000_POWER_OFF)); - - /* - * Parse motor position - * Position string format: 1TP5.012,2TP1.123,3TP-100.567,... - * Skip to substring for this motor, convert to double - */ - - strcpy(buff, positionAllString); - tokSave = NULL; - p = epicsStrtok_r(buff, ",", &tokSave); - for (j=0; j < pAxis->axis; j++) - p = epicsStrtok_r(NULL, ",", &tokSave); - pAxis->currentPosition = atof(p+3); - motorParam->setDouble(params, motorAxisPosition, (pAxis->currentPosition/pAxis->stepSize)); - motorParam->setDouble(params, motorAxisEncoderPosn, (pAxis->currentPosition/pAxis->stepSize)); - PRINT(pAxis->logParam, IODRIVER, "MM4000Poller: axis %d axisStatus=%x, position=%f\n", - pAxis->axis, pAxis->axisStatus, pAxis->currentPosition); - - /* We would like a way to query the actual velocity, but this is not possible. If we could we could - * set the direction, and Moving flags */ - - /* Check for controller error. */ - comStatus = sendAndReceive(pController, "TE;", buff, sizeof(statusAllString)); - if (buff[2] == '@') - intval = 0; - else - { - intval = 1; - PRINT(pAxis->logParam, MOTOR_ERROR, "MM4000Poller: controller error %s\n", buff); - } - motorParam->setInteger(params, motorAxisProblem, intval); - } - - motorParam->callCallback(pAxis->params); - } /* Next axis */ - - /* UnLock all the controller's axis. */ - for (itera = 0; itera < pController->numAxes; itera++) - { - pAxis = &pController->pAxis[itera]; - if (!pAxis->mutexId) - break; - epicsMutexUnlock(pAxis->mutexId); - } - - if (forcedFastPolls > 0) - { - timeout = pController->movingPollPeriod; - forcedFastPolls--; - } - else if (anyMoving) - timeout = pController->movingPollPeriod; - else - timeout = pController->idlePollPeriod; - } /* End while */ -} - -static int motorMM4000LogMsg(void * param, const motorAxisLogMask_t mask, const char *pFormat, ...) -{ - - va_list pvar; - int nchar; - - va_start(pvar, pFormat); - nchar = vfprintf(stdout,pFormat,pvar); - va_end (pvar); - printf("\n"); - return(nchar); -} - - -int MM4000AsynSetup(int num_controllers) /* number of MM4000 controllers in system. */ -{ - - if (num_controllers < 1) { - printf("MM4000Setup, num_controllers must be > 0\n"); - return MOTOR_AXIS_ERROR; - } - numMM4000Controllers = num_controllers; - pMM4000Controller = (MM4000Controller *)calloc(numMM4000Controllers, sizeof(MM4000Controller)); - return MOTOR_AXIS_OK; -} - - -int MM4000AsynConfig(int card, /* Controller number */ - const char *portName, /* asyn port name of serial or GPIB port */ - int asynAddress, /* asyn subaddress for GPIB */ - int numAxes, /* Number of axes this controller supports */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod) /* Time to poll (msec) when an axis is idle. 0 for no polling */ - -{ - AXIS_HDL pAxis; - int axis; - MM4000Controller *pController; - char threadName[20]; - int status; - int totalAxes; - int loopState; - int digits; - int modelNum; - int retry = 0; - char *p, *tokSave; - char inputBuff[BUFFER_SIZE]; - char outputBuff[BUFFER_SIZE]; - - if (numMM4000Controllers < 1) { - printf("MM4000Config: no MM4000 controllers allocated, call MM4000Setup first\n"); - return MOTOR_AXIS_ERROR; - } - if ((card < 0) || (card >= numMM4000Controllers)) { - printf("MM4000Config: card must in range 0 to %d\n", numMM4000Controllers-1); - return MOTOR_AXIS_ERROR; - } - if ((numAxes < 1) || (numAxes > MM4000_MAX_AXES)) { - printf("MM4000Config: numAxes must in range 1 to %d\n", MM4000_MAX_AXES); - return MOTOR_AXIS_ERROR; - } - - pController = &pMM4000Controller[card]; - pController->pAxis = (AXIS_HDL) calloc(numAxes, sizeof(motorAxis)); - pController->numAxes = numAxes; - pController->movingPollPeriod = movingPollPeriod/1000.; - pController->idlePollPeriod = idlePollPeriod/1000.; - - status = pasynOctetSyncIO->connect(portName, asynAddress, &pController->pasynUser, NULL); - - if (status != asynSuccess) { - printf("MM4000AsynConfig: cannot connect to asyn port %s\n", portName); - return MOTOR_AXIS_ERROR; - } - - do - { - status = sendAndReceive(pController, "VE;", inputBuff, sizeof(inputBuff)); - retry++; - /* Return value is length of response string */ - } while (status != asynSuccess && retry < 3); - - if (status != asynSuccess) - return (MOTOR_AXIS_ERROR); - - strcpy(pController->firmwareVersion, &inputBuff[2]); /* Skip "VE" */ - - /* Set Motion Master model indicator. */ - p = strstr(pController->firmwareVersion, "MM"); - if (p == NULL) { - printf("MM4000AsynConfig: invalid model = %s\n", pController->firmwareVersion); - return MOTOR_AXIS_ERROR; - } - modelNum = atoi(p+2); - if (modelNum == 4000) - pController->model = MM4000; - else if (modelNum == 4005 || modelNum == 4006) - pController->model = MM4005; - else - { - printf("MM4000AsynConfig: invalid model = %s\n", pController->firmwareVersion); - return MOTOR_AXIS_ERROR; - } - - sendAndReceive(pController, "TP;", inputBuff, sizeof(inputBuff)); - - /* The return string will tell us how many axes this controller has */ - for (totalAxes = 0, tokSave = NULL, p = epicsStrtok_r(inputBuff, ",", &tokSave); - p != 0; p = epicsStrtok_r(NULL, ",", &tokSave), totalAxes++) - ; - - if (totalAxes < numAxes) - { - printf("MM4000AsynConfig: actual number of axes=%d < numAxes=%d\n", totalAxes, numAxes); - return MOTOR_AXIS_ERROR; - } - - for (axis=0; axispAxis[axis]; - pAxis->pController = pController; - pAxis->card = card; - pAxis->axis = axis; - pAxis->mutexId = epicsMutexMustCreate(); - pAxis->params = motorParam->create(0, MOTOR_AXIS_NUM_PARAMS); - - /* Determine if encoder present based on open/closed loop mode. */ - sprintf(outputBuff, "%dTC", axis+1); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - loopState = atoi(&inputBuff[3]); /* Skip first 3 characters */ - if (loopState != 0) - pAxis->closedLoop = 1; - - /* Determine drive resolution. */ - sprintf(outputBuff, "%dTU", axis+1); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - pAxis->stepSize = atof(&inputBuff[3]); - digits = (int) -log10(pAxis->stepSize) + 2; - if (digits < 1) - digits = 1; - pAxis->maxDigits = digits; - - /* Save home preset position. */ - sprintf(outputBuff, "%dXH", axis+1); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - pAxis->homePreset = atof(&inputBuff[3]); - - /* Determine low limit */ - sprintf(outputBuff, "%dTL", axis+1); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - pAxis->lowLimit = atof(&inputBuff[3]); - - /* Determine high limit */ - sprintf(outputBuff, "%dTR", axis+1); - sendAndReceive(pController, outputBuff, inputBuff, sizeof(inputBuff)); - pAxis->highLimit = atof(&inputBuff[3]); - } - - pController->pollEventId = epicsEventMustCreate(epicsEventEmpty); - - /* Create the poller thread for this controller */ - epicsSnprintf(threadName, sizeof(threadName), "MM4000:%d", card); - epicsThreadCreate(threadName, - epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) MM4000Poller, (void *) pController); - - return MOTOR_AXIS_OK; -} - -static int sendOnly(MM4000Controller *pController, char *outputBuff) -{ - size_t nRequested=strlen(outputBuff); - size_t nActual; - asynStatus status; - - if (pController->pasynUser == NULL) - { - status = asynError; - errPrintf(-1, __FILE__, __LINE__, "*** Configuration error ***: pasynUser=NULL\n"); - epicsThreadSleep(5.0); - } - else - { - status = pasynOctetSyncIO->write(pController->pasynUser, outputBuff, - nRequested, TIMEOUT, &nActual); - if (nActual != nRequested) - status = asynError; - if (status != asynSuccess) - { - asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, - "drvMM4000Asyn:sendOnly: error sending command %s, sent=%d, status=%d\n", - outputBuff, nActual, status); - } - } - return(status); -} - - -static asynStatus sendAndReceive(MM4000Controller *pController, char *outputBuff, char *inputBuff, int inputSize) -{ - size_t nWriteRequested=strlen(outputBuff); - size_t nWrite, nRead; - int eomReason; - asynStatus status; - - status = pasynOctetSyncIO->writeRead(pController->pasynUser, - outputBuff, nWriteRequested, - inputBuff, inputSize, - TIMEOUT, &nWrite, &nRead, &eomReason); - if (nWrite != nWriteRequested) status = asynError; - if (status != asynSuccess) { - asynPrint(pController->pasynUser, ASYN_TRACE_ERROR, - "drvMM4000Asyn:sendAndReceive error calling writeRead, output=%s status=%d, error=%s\n", - outputBuff, status, pController->pasynUser->errorMessage); - } - return(status); -} - diff --git a/motorApp/NewportSrc/drvMM4000Asyn.h b/motorApp/NewportSrc/drvMM4000Asyn.h deleted file mode 100644 index d2086024..00000000 --- a/motorApp/NewportSrc/drvMM4000Asyn.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef DRV_MOTOR_MM4000_ASYN_H -#define DRV_MOTOR_MM4000_ASYN_H - -#ifdef __cplusplus -extern "C" { -#endif - -int MM4000AsynSetup(int numControllers); /* number of XPS controllers in system. */ - -int MM4000AsynConfig(int card, /* Controller number */ - const char *portName, /* asyn port name of serial or GPIB port */ - int asynAddress, /* asyn subaddress for GPIB */ - int numAxes, /* Number of axes this controller supports */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod); /* Time to poll (msec) when an axis is idle. 0 for no polling */ - -#ifdef __cplusplus -} -#endif -#endif diff --git a/motorApp/NewportSrc/drvMMCom.h b/motorApp/NewportSrc/drvMMCom.h deleted file mode 100644 index 44949ea9..00000000 --- a/motorApp/NewportSrc/drvMMCom.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -FILENAME... drvMMCom.h -USAGE... This file contains Newport Motion Master (MM) driver "include" - information that is specific to Motion Master models 3000/4000. - -*/ - -/* - * Original Author: Mark Rivers - * Current Author: Mark Rivers - * Date: 10/16/97 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 01-18-93 mlr initialized from drvOms58 - * .02 06-16-03 rls Converted to R3.14.x. - */ - -#ifndef INCdrvMMComh -#define INCdrvMMComh 1 - -#include "motor.h" -#include "motordrvCom.h" -#include "asynDriver.h" -#include "asynOctetSyncIO.h" - -enum MM_model -{ - MM4000, - MM4005 -}; - -enum MM_motor_type -{ - UNUSED, - STEPPER, - DC -}; - -#ifndef __cplusplus -typedef enum MM_model MM_model; -typedef enum MM_motor_type MM_motor_type; -#endif - -/* Motion Master specific data is stored in this structure. */ -struct MMcontroller -{ - asynUser *pasynUser; /* For RS-232 */ - int asyn_address; /* Use for GPIB or other address with asyn */ - char asyn_port[80]; /* asyn port name */ - char status_string[80]; /* String containing status of motors */ - char position_string[160]; /* String containing commanded/theorectical position of motors */ - char feedback_string[160]; /* String containing encoder position of motors */ - MM_model model; /* Motion Master Model. */ - MM_motor_type type[4]; /* For MM3000 only; Motor type array. */ - /* For MM4000/5 only; controller resolution array (from TU command). - * Units are in [Controller EGU's / Record RAW units]. - */ - double drive_resolution[MAX_AXIS]; - int res_decpts[MAX_AXIS]; /* Drive resolution significant dec. pts. */ - double home_preset[MAX_AXIS]; /* Controller's home preset position (XF command). */ - CommStatus status; /* Controller communication status. */ -}; - - -/* Motor status response for MM[3000/4000/4005]. */ -typedef union -{ - epicsUInt8 All; - struct - { -#ifdef MSB_First - bool bit7 :1; /* Bit #7 N/A. */ - bool bit6 :1; /* Bit #6 N/A. */ - bool homels :1; /* Home LS. */ - bool minusTL :1; /* Minus Travel Limit. */ - bool plustTL :1; /* Plus Travel Limit. */ - bool direction :1; /* Motor direction: 0 - minus; 1 - plus. */ - bool NOT_power :1; /* Motor power 0 - ON; 1 - OFF. */ - bool inmotion :1; /* In-motion indicator. */ -#else - bool inmotion :1; /* In-motion indicator. */ - bool NOT_power :1; /* Motor power 0 - ON; 1 - OFF. */ - bool direction :1; /* Motor direction: 0 - minus; 1 - plus. */ - bool plustTL :1; /* Plus Travel Limit. */ - bool minusTL :1; /* Minus Travel Limit. */ - bool homels :1; /* Home LS. */ - bool bit6 :1; /* Bit #6 N/A. */ - bool bit7 :1; /* Bit #7 N/A. */ -#endif - } Bits; -} MOTOR_STATUS; - - -#endif /* INCdrvMMComh */ - diff --git a/motorApp/NewportSrc/drvPM500.cc b/motorApp/NewportSrc/drvPM500.cc deleted file mode 100644 index 8dc213a4..00000000 --- a/motorApp/NewportSrc/drvPM500.cc +++ /dev/null @@ -1,687 +0,0 @@ -/* -FILENAME... drvPM500.cc -USAGE... Motor record driver level support for Newport PM500. - -*/ - -/* Device Driver Support routines for PM500 motor controller */ -/* - * Original Author: Mark Rivers - * Current Author: Ron Sluiter - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 11-19-98 mlr Initial development, based on drvMM4000.c - * .02 06-02-00 rls integrated into standard motor record - * .03 10/02/01 rls allow one retry after a communication error. - * .04 05-23-03 rls Converted to R3.14.x. - * .05 02/03/04 rls Eliminate erroneous "Motor motion timeout ERROR". - * .06 07/09/04 rls removed unused Setup() argument. - * .07 07/28/04 rls "epicsExport" debug variable. - * .08 09/21/04 rls support for 32axes/controller. - * .09 12/21/04 rls - MS Visual C compatibility; make all epicsExportAddress - * extern "C" linkage. - * - make debug variables always available. - * .10 01/17/07 rls Bug fix for driver not issuing the correct command when it - * queried for the number of axes at boot up. - * .11 08/20/09 rls - Bad motor_init() initialization; EA_PRESENT and - * GAIN_SUPPORT cleared. - * - Added MSTA.EA_POSITION support query to set_status(). - */ - - -#include -#include -#include -#include -#include -#include -#include "motor.h" -#include "NewportRegister.h" -#include "drvMMCom.h" -#include "asynOctetSyncIO.h" -#include "epicsExport.h" - -#define READ_RESOLUTION "" -#define READ_STATUS "" -#define READ_POSITION "" -#define MOTOR_ON "" -#define GET_IDENT "SVN?" - -/* Status byte bits */ -#define M_AXIS_MOVING 0x01 -#define M_MOTOR_POWER 0x02 -#define M_MOTOR_DIRECTION 0x04 -#define M_PLUS_LIMIT 0x08 -#define M_MINUS_LIMIT 0x10 -#define M_HOME_SIGNAL 0x20 - -#define PM500_NUM_CARDS 4 -#define PM500_NUM_CHANNELS 12 -#define BUFF_SIZE 100 /* Maximum length of string to/from PM500 */ - -#define SERIAL_TIMEOUT 2.0 /* Command timeout in sec. */ - -/*----------------debugging-----------------*/ -volatile int drvPM500debug = 0; -extern "C" {epicsExportAddress(int, drvPM500debug);} -static inline void Debug(int level, const char *format, ...) { - #ifdef DEBUG - if (level < drvPM500debug) { - va_list pVar; - va_start(pVar, format); - vprintf(format, pVar); - va_end(pVar); - } - #endif -} - -/* --- Local data. --- */ -int PM500_num_cards = 0; -static char *PM500_axis_names[] = {"X", "Y", "Z", "A", "B", "C", "D", "E", "F", - "G", "H", "I"}; - -/* Local data required for every driver; see "motordrvComCode.h" */ -#include "motordrvComCode.h" - - -/*----------------functions-----------------*/ -static int recv_mess(int, char *, int); -static RTN_STATUS send_mess(int, char const *, char *); -static int set_status(int, int); -static long report(int); -static long init(); -static int motor_init(); -static void query_done(int, int, struct mess_node *); - -/*----------------functions-----------------*/ - -struct driver_table PM500_access = -{ - motor_init, - motor_send, - motor_free, - motor_card_info, - motor_axis_info, - &mess_queue, - &queue_lock, - &free_list, - &freelist_lock, - &motor_sem, - &motor_state, - &total_cards, - &any_motor_in_motion, - send_mess, - recv_mess, - set_status, - query_done, - NULL, - &initialized, - PM500_axis_names -}; - -struct drvP500_drvet -{ - long number; -#ifdef __cplusplus - long (*report) (int); - long (*init) (void); -#else - DRVSUPFUN report; - DRVSUPFUN init; -#endif -} drvPM500 = {2, report, init}; - -extern "C" {epicsExportAddress(drvet, drvPM500);} - -static struct thread_args targs = {SCAN_RATE, &PM500_access, 0.0}; - -/********************************************************* - * Print out driver status report - *********************************************************/ -static long report(int level) -{ - int card; - - if (PM500_num_cards <=0) - printf(" No PM500 controllers configured.\n"); - else - { - for (card = 0; card < PM500_num_cards; card++) - { - struct controller *brdptr = motor_state[card]; - - if (brdptr == NULL) - printf(" PM500 controller #%d connection failed.\n", card); - else - { - struct MMcontroller *cntrl; - - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - printf(" PM500 controller %d port=%s, address=%d, id: %s \n", - card, cntrl->asyn_port, cntrl->asyn_address, - brdptr->ident); - } - } - } - return(OK); -} - - -static long init() -{ - /* - * We cannot call motor_init() here, because that function can do GPIB I/O, - * and hence requires that the drvGPIB have already been initialized. - * That cannot be guaranteed, so we need to call motor_init from device - * support - */ - /* Check for setup */ - if (PM500_num_cards <= 0) - { - Debug(1, "init(): PM500 driver disabled. PM500Setup() missing from startup script.\n"); - } - return((long) 0); -} - - -static void query_done(int card, int axis, struct mess_node *nodeptr) -{ -} - - -/************************************************************** - * Parse status and position strings for a card and signal - * set_status() - ************************************************************/ - -static int set_status(int card, int signal) -{ - struct MMcontroller *cntrl; - struct mess_node *nodeptr; - struct mess_info *motor_info; - /* Message parsing variables */ - char *axis_name, status_char, dir_char, buff[BUFF_SIZE], response[BUFF_SIZE]; - int rtnval, rtn_state = 0; - double motorData; - bool ls_active; - msta_field status; - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - motor_info = &(motor_state[card]->motor_info[signal]); - nodeptr = motor_info->motor_motion; - axis_name = PM500_axis_names[signal]; - status.All = motor_info->status.All; - - /* Request the status and position of this motor */ - sprintf(buff, "%sR", axis_name); - send_mess(card, buff, (char*) NULL); - rtnval = recv_mess(card, response, 1); - if (rtnval > 0) - { - cntrl->status = NORMAL; - status.Bits.CNTRL_COMM_ERR = 0; - } - else - { - if (cntrl->status == NORMAL) - { - cntrl->status = RETRY; - rtn_state = 0; - goto exit; - } - else - { - cntrl->status = COMM_ERR; - status.Bits.CNTRL_COMM_ERR = 1; - status.Bits.RA_PROBLEM = 1; - rtn_state = 1; - goto exit; - } - } - - status_char = response[1]; - dir_char = response[2]; - motorData = atof(&response[2]) / cntrl->drive_resolution[signal]; - - status.Bits.RA_DONE = (status_char == 'B') ? 0 : 1; - status.Bits.RA_PROBLEM = (status_char == 'E') ? 1 : 0; - status.Bits.RA_DIRECTION = (dir_char == '+') ? 1 : 0; - - if (status_char == 'L') - { - ls_active = true; - if (dir_char == '+') - status.Bits.RA_PLUS_LS = 1; - else - status.Bits.RA_MINUS_LS = 1; - } - else - { - ls_active = false; - status.Bits.RA_PLUS_LS = 0; - status.Bits.RA_MINUS_LS = 0; - } - - /* Set Motor On/Off status */ - sprintf(buff, "%sM?", axis_name); - send_mess(card, buff, (char*) NULL); - rtnval = recv_mess(card, response, 1); - status.Bits.EA_POSITION = (int) atof(&response[2]); - - status.Bits.RA_HOME = 0; - status.Bits.EA_SLIP = 0; - status.Bits.EA_SLIP_STALL = 0; - status.Bits.EA_HOME = 0; - - /* - * Parse motor position - * Position string format: 1TP5.012,2TP1.123,3TP-100.567,... - * Skip to substring for this motor, convert to double - */ - - if (motorData == motor_info->position) - { - if (nodeptr != 0) /* Increment counter only if motor is moving. */ - motor_info->no_motion_count++; - } - else - { - motor_info->position = NINT(motorData); - if (motor_state[card]->motor_info[signal].encoder_present == YES) - motor_info->encoder_position = (epicsInt32) motorData; - else - motor_info->encoder_position = 0; - - motor_info->no_motion_count = 0; - } - - status.Bits.RA_PROBLEM = 0; - - /* Parse motor velocity? */ - /* NEEDS WORK */ - - motor_info->velocity = 0; - - if (!status.Bits.RA_DIRECTION) - motor_info->velocity *= -1; - - rtn_state = (!motor_info->no_motion_count || ls_active == true || - status.Bits.RA_DONE | status.Bits.RA_PROBLEM) ? 1 : 0; - - /* Test for post-move string. */ - if ((status.Bits.RA_DONE || ls_active == true) && nodeptr != 0 && - nodeptr->postmsgptr != 0) - { - strcpy(buff, nodeptr->postmsgptr); - strcat(buff, "\r"); - send_mess(card, buff, (char*) NULL); - nodeptr->postmsgptr = NULL; - } - -exit: - motor_info->status.All = status.All; - return(rtn_state); -} - - -/*****************************************************/ -/* send a message to the PM500 board */ -/* send_mess() */ -/*****************************************************/ -static RTN_STATUS send_mess(int card, char const *com, char *name) -{ - struct MMcontroller *cntrl; - size_t size; - size_t nwrite; - - size = strlen(com); - - if (size > MAX_MSG_SIZE) - { - errlogMessage("drvPM500.c:send_mess(); message size violation.\n"); - return(ERROR); - } - else if (size == 0) /* Normal exit on empty input message. */ - return(OK); - - if (!motor_state[card]) - { - errlogPrintf("drvPM500.c:send_mess() - invalid card #%d\n", card); - return(ERROR); - } - - Debug(2, "send_mess(): message = %s\n", com); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - pasynOctetSyncIO->write(cntrl->pasynUser, com, strlen(com), SERIAL_TIMEOUT, &nwrite); - - return(OK); -} - - -/* - * FUNCTION... recv_mess(int card, char *com, int flag) - * - * INPUT ARGUMENTS... - * card - controller card # (0,1,...). - * *com - caller's response buffer. - * flag | FLUSH = flush controller's output buffer; set timeout = 0. - * | !FLUSH = retrieve response into caller's buffer; set timeout. - * - * LOGIC... - * IF controller card does not exist. - * ERROR RETURN. - * ENDIF - * NORMAL RETURN. - */ - -static int recv_mess(int card, char *com, int flag) -{ - struct MMcontroller *cntrl; - double timeout = 0.; - int flush=1; - size_t nread = 0; - asynStatus status; - int eomReason; - - /* Check that card exists */ - if (!motor_state[card]) - return(ERROR); - - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - if (flag != FLUSH) - { - flush=0; - timeout = SERIAL_TIMEOUT; - } - if (flush) status = pasynOctetSyncIO->flush(cntrl->pasynUser); - status = pasynOctetSyncIO->read(cntrl->pasynUser, com, BUFF_SIZE, - timeout, &nread, &eomReason); - - if ((status != asynSuccess) || (nread <= 0)) - { - com[0] = '\0'; - nread = 0; - } - else - { - /* Test for "system error" response. */ - if (strncmp(com, "SE", 2) == 0) - errlogMessage("recv_mess(): PM500 system error.\n"); - } - - Debug(2, "recv_mess(): message = \"%s\"\n", com); - return((int)nread); -} - - -/*****************************************************/ -/* Setup system configuration */ -/* PM500Setup() */ -/*****************************************************/ -RTN_STATUS -PM500Setup(int num_cards, /* maximum number of controllers in system. */ - int scan_rate) /* polling rate - 1/60 sec units. */ -{ - int itera; - - if (num_cards < 1 || num_cards > PM500_NUM_CARDS) - PM500_num_cards = PM500_NUM_CARDS; - else - PM500_num_cards = num_cards; - - /* Set motor polling task rate */ - if (scan_rate >= 1 && scan_rate <= 60) - targs.motor_scan_rate = scan_rate; - else - targs.motor_scan_rate = SCAN_RATE; - - /* - * Allocate space for motor_state structures. Note this must be done - * before PM500Config is called, so it cannot be done in motor_init() - * This means that we must allocate space for a card without knowing - * if it really exists, which is not a serious problem - */ - motor_state = (struct controller **) malloc(PM500_num_cards * - sizeof(struct controller *)); - - for (itera = 0; itera < PM500_num_cards; itera++) - motor_state[itera] = (struct controller *) NULL; - - return(OK); -} - - -/*****************************************************/ -/* Configure a controller */ -/* PM500Config() */ -/*****************************************************/ -RTN_STATUS -PM500Config(int card, /* card being configured */ - const char *name, /*asyn port name */ - int address) /*asyn address (GPIB) */ -{ - struct MMcontroller *cntrl; - - if (card < 0 || card >= PM500_num_cards) - return(ERROR); - - motor_state[card] = (struct controller *) malloc(sizeof(struct controller)); - motor_state[card]->DevicePrivate = malloc(sizeof(struct MMcontroller)); - cntrl = (struct MMcontroller *) motor_state[card]->DevicePrivate; - - strcpy(cntrl->asyn_port, name); - cntrl->asyn_address = address; - return(OK); -} - - - -/*****************************************************/ -/* initialize all software and hardware */ -/* This is called from the initialization routine in */ -/* device support. */ -/* motor_init() */ -/*****************************************************/ -static int motor_init() -{ - struct controller *brdptr; - struct MMcontroller *cntrl; - int card_index, motor_index; - char buff[BUFF_SIZE]; - int total_axis = 0; - int status=0, digits; - asynStatus success_rtn; - - initialized = true; /* Indicate that driver is initialized. */ - - /* Check for setup */ - if (PM500_num_cards <= 0) - return(ERROR); - - for (card_index = 0; card_index < PM500_num_cards; card_index++) - { - if (!motor_state[card_index]) - continue; - - brdptr = motor_state[card_index]; - brdptr->cmnd_response = true; - total_cards = card_index + 1; - cntrl = (struct MMcontroller *) brdptr->DevicePrivate; - - /* Initialize communications channel */ - success_rtn = pasynOctetSyncIO->connect(cntrl->asyn_port, - cntrl->asyn_address, &cntrl->pasynUser, NULL); - - if (success_rtn == asynSuccess) - { - /* flush any junk at input port - should not be any data available */ - pasynOctetSyncIO->flush(cntrl->pasynUser); - - /* Send a SCUM 1 command to put device in this mode. */ - send_mess(card_index, "SCUM 1", (char*) NULL); - recv_mess(card_index, buff, 1); - - /* Set up basic controller parameters - * "ENAINT $AF" means the following: - * Bit 0=1, only affected axis halts on limit - * Bit 1=1, No message when moving axis beyond limit - * Bit 2=1, No query echo, prepends status character to axis. - * Bit 3=1, NO status character inserted in responses. - * Bit 4=0, No acknowledgement when command is received - * Bit 5=1, Disable sign-on message at power-up - * Bit 6=0, No echo - * Bit 7=1, CR terminator only on commands and responses - * Bit 8=0, CR terminator only on commands and responses - * Bit 9=0, No EOI sent - * Bit 10=0, CR terminator only on commands and responses - * Bit 11=0, CR terminator only on commands and responses - * Bit 12=0, Decimal number format - * Bit 13=0, Eearly serial poll mapping - * Bit 14=0, No SRQ assertion - */ - send_mess(card_index, "SENAINT $AF", (char*) NULL); - recv_mess(card_index, buff, 1); - - /* Send a message and read response from controller to see if - * it exists */ - send_mess(card_index, GET_IDENT, (char*) NULL); - status = recv_mess(card_index, buff, 1); - /* Return value is length of response string */ - } - - if (success_rtn == asynSuccess && status > 0) - { - brdptr->localaddr = (char *) NULL; - brdptr->motor_in_motion = 0; - send_mess(card_index, GET_IDENT, (char*) NULL); /* Read controller ID string */ - recv_mess(card_index, buff, 1); - strncpy(brdptr->ident, &buff[2], 50); /* Skip "XD" */ - - /* Figure out how many axes this controller has. - * Do this by querying status of each axis in order */ - for (total_axis = 0; total_axis < PM500_NUM_CHANNELS; total_axis++) - { - int axis_name = (int) *PM500_axis_names[total_axis]; - brdptr->motor_info[total_axis].motor_motion = NULL; - sprintf(buff, "%cSTAT?", axis_name); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - if (buff[1] == 'E') - break; - /* Determine axis type and resolution. - * This is a real pain, since the only way to get this - * information is to ask for the axis firmware and use a - * lookup table. We only have translators, so I don't - * really know how to tell them apart. Our translators - * return 302 (50nm stages) or 309 (25nm stages) at the end of - * the configuration string. - * I assume rotators return something different, but I don't - * know what it is. - */ - } - - brdptr->total_axis = total_axis; - - for (motor_index = 0; motor_index < total_axis; motor_index++) - { - struct mess_info *motor_info = &brdptr->motor_info[motor_index]; - char *firmware, *axis_name = PM500_axis_names[motor_index]; - double res = 0.0; - - sprintf(buff, "%sCONFIG?", axis_name); - send_mess(card_index, buff, (char*) NULL); - recv_mess(card_index, buff, 1); - firmware = &buff[8]; - Debug(3, "motor_init: firmware = %s\n", firmware); - if (!strcmp(firmware, "302")) - { - /* 50 nm translator */ - res = .01; - Debug(3, "motor_init: axis %d is a 50 nm translator\n", motor_index); - } - else if (!strcmp(firmware, "309")) - { - /* 25 nm translator */ - res = .01; - Debug(3, "motor_init: axis %d is a 25 nm translator\n", motor_index); - } - else if (!strcmp(firmware, "300")) - { - /* ????? translator ?????? */ - res = .01; - Debug(3, "motor_init: axis %d is a ?????? translator\n", motor_index); - } - else if (!strcmp(firmware, "XXX")) - { - /* Rotator */ - res = .01; - } - - /* Set drive resolution. */ - cntrl->drive_resolution[motor_index] = res; - - digits = (int) -log10(cntrl->drive_resolution[motor_index]) + 2; - if (digits < 1) - digits = 1; - cntrl->res_decpts[motor_index] = digits; - - motor_info->status.All = 0; - motor_info->no_motion_count = 0; - motor_info->encoder_position = 0; - motor_info->position = 0; - - /* PM500 only supports DC motors. */ - motor_info->encoder_present = YES; - motor_info->status.Bits.EA_PRESENT = 1; - motor_info->pid_present = YES; - motor_info->status.Bits.GAIN_SUPPORT = 1; - - cntrl->home_preset[motor_index] = 0; - - set_status(card_index, motor_index); /* Read status of each motor */ - } - } - else - motor_state[card_index] = (struct controller *) NULL; - } - - any_motor_in_motion = 0; - - mess_queue.head = (struct mess_node *) NULL; - mess_queue.tail = (struct mess_node *) NULL; - - free_list.head = (struct mess_node *) NULL; - free_list.tail = (struct mess_node *) NULL; - - epicsThreadCreate((char *) "PM500_motor", epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) motor_task, (void *) &targs); - - return(OK); -} - diff --git a/motorApp/NewportSrc/drvXPSAsyn.c b/motorApp/NewportSrc/drvXPSAsyn.c deleted file mode 100644 index eb1e8654..00000000 --- a/motorApp/NewportSrc/drvXPSAsyn.c +++ /dev/null @@ -1,2406 +0,0 @@ -/* -FILENAME... drvXPSasyn.c -USAGE... Newport XPS EPICS asyn motor device driver - -*/ - -/* -Original Author: Mark Rivers -*/ - -/* -Copyright (c) 2005 University of Chicago and the Regents of the University of -California. All rights reserved. - -synApps is distributed subject to the following license conditions: -SOFTWARE LICENSE AGREEMENT -Software: synApps -Versions: Release 4-5 and higher. - - 1. The "Software", below, refers to synApps (in either source code, or - binary form and accompanying documentation). Each licensee is addressed - as "you" or "Licensee." - - 2. The copyright holders shown above and their third-party licensors hereby - grant Licensee a royalty-free nonexclusive license, subject to the - limitations stated herein and U.S. Government license rights. - - 3. You may modify and make a copy or copies of the Software for use within - your organization, if you meet the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement. - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy. - - 4. You may modify a copy or copies of the Software or any portion of it, thus - forming a work based on the Software, and distribute copies of such work - outside your organization, if you meet all of the following conditions: - 1. Copies in source code must include the copyright notice and this - Software License Agreement; - 2. Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other - materials provided with the copy; - 3. Modified copies and works based on the Software must carry - prominent notices stating that you changed specified portions of - the Software. - - 5. Portions of the Software resulted from work developed under a - U.S. Government contract and are subject to the following license: - the Government is granted for itself and others acting on its behalf a - paid-up, nonexclusive, irrevocable worldwide license in this computer - software to reproduce, prepare derivative works, and perform publicly and - display publicly. - - 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF - ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED - STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) - DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY - OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE - SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT - INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL - FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE - CORRECTED. - - 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR - THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF - ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, - CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, - INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY - REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF - CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, - EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH - LOSS OR DAMAGES. -*/ - -/* -Modification Log: ------------------ -01 11-17-2009 rls Added file header. -*/ - - -#include -#include -#include -#include -#include -#include - -#include "drvXPSAsyn.h" -#include "paramLib.h" - -#include "epicsFindSymbol.h" -#include "epicsTime.h" -#include "epicsThread.h" -#include "epicsEvent.h" -#include "epicsString.h" -#include "epicsStdio.h" -#include "epicsMutex.h" -#include "ellLib.h" -#include "iocsh.h" - -#include "drvSup.h" -#include "epicsExport.h" -#define DEFINE_MOTOR_PROTOTYPES 1 -#include "motor_interface.h" -#include "XPS_C8_drivers.h" -#include "XPSAsynInterpose.h" -#include "tclCall.h" - -extern int xps_gathering(int); - -motorAxisDrvSET_t motorXPS = - { - 15, - motorAxisReport, /**< Standard EPICS driver report function (optional) */ - motorAxisInit, /**< Standard EPICS dirver initialisation function (optional) */ - motorAxisSetLog, /**< Defines an external logging function (optional) */ - motorAxisOpen, /**< Driver open function */ - motorAxisClose, /**< Driver close function */ - motorAxisSetCallback, /**< Provides a callback function the driver can call when the status updates */ - motorAxisSetDouble, /**< Pointer to function to set a double value */ - motorAxisSetInteger, /**< Pointer to function to set an integer value */ - motorAxisGetDouble, /**< Pointer to function to get a double value */ - motorAxisGetInteger, /**< Pointer to function to get an integer value */ - motorAxisHome, /**< Pointer to function to execute a more to reference or home */ - motorAxisMove, /**< Pointer to function to execute a position move */ - motorAxisVelocityMove, /**< Pointer to function to execute a velocity mode move */ - motorAxisStop, /**< Pointer to function to stop motion */ - motorAxisforceCallback, /**< Pointer to function to request a poller status update */ - motorAxisProfileMove, /**< Pointer to function to execute a profile move */ - motorAxisTriggerProfile /**< Pointer to function to trigger a profile move */ - }; - -epicsExportAddress(drvet, motorXPS); - -typedef enum { none, positionMove, velocityMove, homeReverseMove, homeForwardsMove } moveType; - -/* typedef struct motorAxis * AXIS_ID; */ - -typedef struct { - epicsMutexId XPSC8Lock; - int numAxes; - char firmwareVersion[100]; - double movingPollPeriod; - double idlePollPeriod; - epicsEventId pollEventId; - epicsEventId homeEventId; - int moveToHomeAxis; - AXIS_HDL pAxis; /* array of axes */ - int movesDeferred; -} XPSController; - -/** Struct that contains information about the XPS corrector loop.*/ -typedef struct -{ - bool ClosedLoopStatus; - double KP; /**< Main proportional term from PID loop.*/ - double KI; /**< Main integral term from PID loop.*/ - double KD; /**< Main differential term from PID loop.*/ - double KS; - double IntegrationTime; - double DerivativeFilterCutOffFrequency; - double GKP; - double GKI; - double GKD; - double KForm; - double FeedForwardGainVelocity; - double FeedForwardGainAcceleration; - double Friction; -} xpsCorrectorInfo_t; - -typedef struct motorAxisHandle -{ - XPSController *pController; - int moveSocket; - int pollSocket; - int noDisabledError; - PARAMS params; - double currentPosition; - double currentVelocity; - double theoryPosition; - double velocity; - double accel; - double minJerkTime; /* for the SGamma function */ - double maxJerkTime; - double highLimit; - double lowLimit; - double stepSize; - char *ip; - char *positionerName; /* read in using NameConfig*/ - char *groupName; - int axisStatus; - int positionerError; - int card; - int axis; - motorAxisLogFunc print; - void *logParam; - epicsMutexId mutexId; - xpsCorrectorInfo_t xpsCorrectorInfo; - double deferred_position; - int deferred_move; - int deferred_relative; - int referencing_mode; - int referencing_mode_move; -} motorAxis; - -typedef struct -{ - AXIS_HDL pFirst; - epicsThreadId motorThread; - motorAxisLogFunc print; - void *logParam; - epicsTimeStamp now; -} motorXPS_t; - -/** Struct for a list of strings describing the different corrector types possible on the XPS.*/ -typedef struct { - char *PIPosition; - char *PIDFFVelocity; - char *PIDFFAcceleration; - char *PIDDualFFVoltage; - char *NoCorrector; -} CorrectorTypes_t; - -const static CorrectorTypes_t CorrectorTypes={ - "PositionerCorrectorPIPosition", - "PositionerCorrectorPIDFFVelocity", - "PositionerCorrectorPIDFFAcceleration", - "PositionerCorrectorPIDDualFFVoltage", - "NoCorrector" -}; - -/** This is controlled via the XPSEnableSetPosition function (available via the IOC shell). */ -static int doSetPosition = 1; - -/** - * Parameter to control the sleep time used when setting position. - * A function called XPSSetPosSleepTime(int) (millisec parameter) - * is available in the IOC shell to control this. - */ -static double setPosSleepTime = 0.5; -/** - * Parameter to control the enable and disable of the poller - * A function called XPSDisablePoll(int) - * is available in the IOC shell to control this. - */ -static int disablePoll = 0; - -/** Deadband to use for the velocity comparison with zero. */ -#define XPS_VELOCITY_DEADBAND 0.0000001 - -static int motorXPSLogMsg(void * param, const motorAxisLogMask_t logMask, const char *pFormat, ...); -#define PRINT (pAxis->print) -#define FLOW motorAxisTraceFlow -#define MOTOR_ERROR motorAxisTraceError -#define IODRIVER motorAxisTraceIODriver - -#define XPS_MAX_AXES 8 -#define XPSC8_END_OF_RUN_MINUS 0x80000100 -#define XPSC8_END_OF_RUN_PLUS 0x80000200 -#define XPSC8_ZM_HIGH_LEVEL 0x00000004 - -#define TCP_TIMEOUT 2.0 -static motorXPS_t drv={ NULL, NULL, motorXPSLogMsg, 0, { 0, 0 } }; -static int numXPSControllers; -/* Pointer to array of controller strutures */ -static XPSController *pXPSController=NULL; - -#define MAX(a,b) ((a)>(b)? (a): (b)) -#define MIN(a,b) ((a)<(b)? (a): (b)) - -static char* getXPSError(AXIS_HDL pAxis, int status, char *buffer); - -/*Utility functions for dealing with XPS groups and setting corrector information.*/ -static int isAxisInGroup(const AXIS_HDL pAxis); -static int setXPSAxisPID(AXIS_HDL pAxis, const double * value, int pidoption); -static int getXPSAxisPID(AXIS_HDL pAxis); -static void setXPSPIDValue(xpsCorrectorInfo_t *xpsCorrectorInfo, const double * value, int pidoption); - -/*Wrapper functions for the verbose PositionerCorrector functions.*/ -static int PositionerCorrectorPIPositionGetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDFFVelocityGetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDFFAccelerationGetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDDualFFVoltageGetWrapper(AXIS_HDL pAxis); - -static int PositionerCorrectorPIPositionSetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDFFVelocitySetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDFFAccelerationSetWrapper(AXIS_HDL pAxis); -static int PositionerCorrectorPIDDualFFVoltageSetWrapper(AXIS_HDL pAxis); - -/*Deferred moves functions.*/ -static int processDeferredMoves(const XPSController * pController); -static int processDeferredMovesInGroup(const XPSController * pController, char * groupName); - -/*Move to home functions*/ -static int movePositionerToHome(AXIS_HDL pAxis); - -static void motorAxisReportAxis(AXIS_HDL pAxis, int level) -{ - if (level > 0) - { - printf("Axis %d name:%s\n", pAxis->axis, pAxis->positionerName); - printf(" pollSocket:%d, moveSocket:%d\n", pAxis->pollSocket, pAxis->moveSocket); - printf(" axisStatus:%d\n", pAxis->axisStatus); - printf(" stepSize:%g\n", pAxis->stepSize); - } -} - -static void motorAxisReport(int level) -{ - int i, j; - - for(i=0; imutexId) break; - epicsMutexLock(pAxis->mutexId); - - /*Set GAIN_SUPPORT.*/ - motorParam->setInteger(pAxis->params, motorAxisHasClosedLoop, 1); - /*Readback PID and set in motor record.*/ - /*NOTE: this will require PID to be allowed to be set greater than 1 in motor record.*/ - /*And we need to implement this in Asyn layer.*/ - getXPSAxisPID(pAxis); - motorParam->setDouble(pAxis->params, motorAxisPGain, (pAxis->xpsCorrectorInfo).KP); - motorParam->setDouble(pAxis->params, motorAxisIGain, (pAxis->xpsCorrectorInfo).KI); - motorParam->setDouble(pAxis->params, motorAxisDGain, (pAxis->xpsCorrectorInfo).KD); - - /*Set motorAxisHasEncoder so that we can use UEIP field.*/ - motorParam->setDouble(pAxis->params, motorAxisHasEncoder, 1); - - /*Initialise deferred move flags.*/ - pAxis->deferred_relative = 0; - pAxis->deferred_position = 0; - /*Disable deferred move for the axis. Should not cause move of this axis - if other axes in same group do deferred move.*/ - pAxis->deferred_move = 0; - - /*Initialise referencing mode flag. If this is set, ignore the home state reported by the controller.*/ - pAxis->referencing_mode = 0; - - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - - } - } - - return MOTOR_AXIS_OK; -} - -static int motorAxisSetLog( AXIS_HDL pAxis, motorAxisLogFunc logFunc, void * param ) -{ - if (pAxis == NULL) - { - if (logFunc == NULL) - { - drv.print=motorXPSLogMsg; - drv.logParam = NULL; - } - else - { - drv.print=logFunc; - drv.logParam = param; - } - } - else - { - if (logFunc == NULL) - { - pAxis->print=motorXPSLogMsg; - pAxis->logParam = NULL; - } - else - { - pAxis->print=logFunc; - pAxis->logParam = param; - } - } - return MOTOR_AXIS_OK; -} - -static AXIS_HDL motorAxisOpen(int card, int axis, char * param) -{ - AXIS_HDL pAxis; - - if (card >= numXPSControllers) return(NULL); - if (axis >= pXPSController[card].numAxes) return(NULL); - pAxis = &pXPSController[card].pAxis[axis]; - return pAxis; -} - -static int motorAxisClose(AXIS_HDL pAxis) -{ - return MOTOR_AXIS_OK; -} - -static int motorAxisGetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int * value) -{ - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - else - { - switch (function) { - case motorAxisDeferMoves: - *value = pAxis->pController->movesDeferred; - return MOTOR_AXIS_OK; - break; - default: - return motorParam->getInteger(pAxis->params, (paramIndex) function, value); - } - } -} - -static int motorAxisGetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double * value) -{ - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - else - { - switch (function) { - case motorAxisDeferMoves: - *value = pAxis->pController->movesDeferred; - return MOTOR_AXIS_OK; - break; - default: - return motorParam->getDouble(pAxis->params, (paramIndex) function, value); - } - } -} - -static int motorAxisSetCallback(AXIS_HDL pAxis, motorAxisCallbackFunc callback, void * param) -{ - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - else - { - return motorParam->setCallback(pAxis->params, callback, param); - } -} - -/** - * Perform a deferred move (a coordinated group move) on all the axes in a group. - * @param pController Pointer to XPSController structure. - * @param groupName Pointer to string naming the group on which to perform the group move. - * @return motor driver status code. - */ -static int processDeferredMovesInGroup(const XPSController * pController, char * groupName) -{ - double *positions = NULL; - int positions_index = 0; - int first_loop = 1; - int axis = 0; - int NbPositioners = 0; - int relativeMove = 0; - int status = 0; - - AXIS_HDL pAxis = NULL; - - /*Loop over all axes in this controller.*/ - for (axis=0; axisnumAxes; axis++) { - pAxis = &pController->pAxis[axis]; - - PRINT(pAxis->logParam, FLOW, "Executing deferred move on XPS: %d, Group: %s\n", pAxis->card, groupName); - - /*Ignore axes in other groups.*/ - if (!strcmp(pAxis->groupName, groupName)) { - if (first_loop) { - /*Get the number of axes in this group, and allocate buffer for positions.*/ - NbPositioners = isAxisInGroup(pAxis); - if ((positions = (double *)calloc(NbPositioners, sizeof(double))) == NULL) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Cannot allocate memory for positions array in processDeferredMovesInGroup.\n" ); - return MOTOR_AXIS_ERROR; - } - first_loop = 0; - } - - /*Set relative flag for the actual move at the end of the funtion.*/ - if (pAxis->deferred_relative) { - relativeMove = 1; - } - - /*Build position buffer.*/ - if (pAxis->deferred_move) { - positions[positions_index] = - pAxis->deferred_relative ? (pAxis->currentPosition + pAxis->deferred_position) : pAxis->deferred_position; - } else { - positions[positions_index] = - pAxis->deferred_relative ? 0 : pAxis->theoryPosition; - } - - /*Next axis in this group.*/ - positions_index++; - } - } - - PRINT(pAxis->logParam, FLOW, "Executing deferred move on XPS: %d, Group: %s\n", pAxis->card, groupName); - - /*Send the group move command.*/ - if (relativeMove) { - status = GroupMoveRelative(pAxis->moveSocket, - groupName, - NbPositioners, - positions); - } else { - status = GroupMoveAbsolute(pAxis->moveSocket, - groupName, - NbPositioners, - positions); - } - - /*Clear the defer flag for all the axes in this group.*/ - /*We need to do this for the XPS, because we cannot do partial group moves. Every axis - in the group will be included the next time we do a group move.*/ - for (axis=0; axisnumAxes; axis++) { - pAxis = &pController->pAxis[axis]; - /*Ignore axes in other groups.*/ - if (!strcmp(pAxis->groupName, groupName)) { - pAxis->deferred_move = 0; - } - } - - if (status!=0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error peforming GroupMoveAbsolute/Relative in processDeferredMovesInGroup. XPS Return code: %d\n", status); - if (positions != NULL) { - free(positions); - } - return MOTOR_AXIS_ERROR; - } - - if (positions != NULL) { - free(positions); - } - - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return MOTOR_AXIS_OK; - -} - -/** - * Process deferred moves for a controller and groups. - * This function calculates which unique groups in the controller - * and passes the controller pointer and group name to processDeferredMovesInGroup. - * @return motor driver status code. - */ -static int processDeferredMoves(const XPSController * pController) -{ - int status = MOTOR_AXIS_ERROR; - int axis = 0; - int i = 0; - int dealWith = 0; - /*Array to cache up to XPS_MAX_AXES group names. Don't initialise to null*/ - char *groupNames[XPS_MAX_AXES]; - char *blankGroupName = " "; - AXIS_HDL pAxis = NULL; - - /*Clear group name cache.*/ - for (i=0; inumAxes; axis++) { - pAxis = &pController->pAxis[axis]; - - PRINT(pAxis->logParam, FLOW, "Processing deferred moves on XPS: %d\n", pAxis->card); - - /*Call processDeferredMovesInGroup only once for each group on this controller. - Positioners in the same group may not be adjacent in list, so we have to test for this.*/ - for (i=0; igroupName, groupNames[i])) { - dealWith++; - groupNames[i] = pAxis->groupName; - } - } - if (dealWith == XPS_MAX_AXES) { - dealWith = 0; - /*Group name was not in cache, so deal with this group.*/ - status = processDeferredMovesInGroup(pController, pAxis->groupName); - } - /*Next axis, and potentially next group.*/ - } - - return status; -} - -static int motorAxisSetDouble(AXIS_HDL pAxis, motorAxisParam_t function, double value) -{ - int ret_status = MOTOR_AXIS_ERROR; - int status = 0; - int axisIndex = 0; - int axisIndexInGrp = 0; - int axesInGroup = 0; - double deviceValue; - double positions[XPS_MAX_AXES] = {0.0}; - - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - if (!pAxis->mutexId) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: invalid mutex ID. Call XPSConfigAxis first for initialization.\n", pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - else - { - if (epicsMutexLock( pAxis->mutexId ) == epicsMutexLockOK) - { - switch ((int)function) - { - case motorAxisPosition: - { - /*If the user has disabled setting the controller position, skip this.*/ - if (!doSetPosition) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPS set position is disabled. Enable it using XPSEnableSetPosition(1).\n"); - } else { - /*Test if this axis is in a XPS group.*/ - axesInGroup = isAxisInGroup(pAxis); - - if (axesInGroup>1) { - /*We are in a group, so we need to read the positions of all the axes in the group, - kill the group, and set all the positions in the group using referencing mode. - We read the positions seperately, rather than in one command, because we can't assume - that the ordering is the same in the XPS as in the driver.*/ - for (axisIndex=0; axisIndexpController->numAxes; axisIndex++) { - status = GroupPositionCurrentGet(pAxis->pollSocket, - pAxis->pController->pAxis[axisIndex].positionerName, - 1, - &positions[axisIndex]); - } - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupPositionCurrentGet(%d,%d). Aborting set position. XPS API Error: %d.\n", - pAxis->card, pAxis->axis, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - status = GroupKill(pAxis->pollSocket, - pAxis->groupName); - status = GroupInitialize(pAxis->pollSocket, - pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupKill/GroupInitialize(%d,%d). Aborting set position. XPS API Error: %d.\n", - pAxis->card, pAxis->axis, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - - /*Wait after axis initialisation (we don't want to set position immediately after - initialisation because the stage can oscillate slightly).*/ - epicsThreadSleep(setPosSleepTime); - - status = GroupReferencingStart(pAxis->pollSocket, - pAxis->groupName); - axisIndexInGrp = 0; - /*Set positions for all axes in the group using the cached values.*/ - for (axisIndex=0; axisIndexpController->numAxes; axisIndex++) { - if (!strcmp(pAxis->groupName, pAxis->pController->pAxis[axisIndex].groupName)) { - /*But skip the current axis, because we do this just after the loop.*/ - if (strcmp(pAxis->positionerName, pAxis->pController->pAxis[axisIndex].positionerName)) { - status = GroupReferencingActionExecute(pAxis->pollSocket, - pAxis->pController->pAxis[axisIndex].positionerName, - "SetPosition", - "None", - positions[axisIndexInGrp]); - } - ++axisIndexInGrp; - } - } - /*Now reset the position of the axis we are interested in, using the argument passed into this function.*/ - status = GroupReferencingActionExecute(pAxis->pollSocket, - pAxis->positionerName, - "SetPosition", - "None", - value*(pAxis->stepSize)); - /*Stop referencing, then we are homed on all axes in group.*/ - /*Some types of XPS axes (eg. spindle) need a sleep here, otherwise - the axis can be left in referencing mode.*/ - epicsThreadSleep(0.05); - status = GroupReferencingStop(pAxis->pollSocket, - pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing referencing set position (%d,%d). XPS API Error: %d.", - pAxis->card, pAxis->axis, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - ret_status = MOTOR_AXIS_OK; - } - } - } - } else { - /*We are not in a group, so we just need to use the XPS - referencing mode to set the position.*/ - status = GroupKill(pAxis->pollSocket, - pAxis->groupName); - status = GroupInitialize(pAxis->pollSocket, - pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupKill/GroupInitialize(%d,%d). XPS API Error: %d. Aborting set position.\n", - pAxis->card, pAxis->axis, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - /*Wait after axis initialisation (we don't want to set position immediately after - initialisation because the stage can oscillate slightly).*/ - epicsThreadSleep(setPosSleepTime); - - status = GroupReferencingStart(pAxis->pollSocket, - pAxis->groupName); - status = GroupReferencingActionExecute(pAxis->pollSocket, - pAxis->positionerName, - "SetPosition", - "None", - value*(pAxis->stepSize)); - /*Some types of XPS axes (eg. spindle) need a sleep here, otherwise - the axis can be left in referencing mode.*/ - epicsThreadSleep(0.05); - status = GroupReferencingStop(pAxis->pollSocket, - pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing referencing set position (%d,%d). XPS API Error: %d.", - pAxis->card, pAxis->axis, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - ret_status = MOTOR_AXIS_OK; - } - } - } - } - break; - } - case motorAxisEncoderRatio: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble: XPS does not support setting encoder ratio\n"); - break; - } - case motorAxisResolution: - { - pAxis->stepSize = value; - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d stepSize to %f\n", pAxis->card, pAxis->axis, value); - break; - } - case motorAxisLowLimit: - { - deviceValue = value*pAxis->stepSize; - /* We need to read the current highLimit because otherwise we could be setting it to an invalid value */ - status = PositionerUserTravelLimitsGet(pAxis->pollSocket, - pAxis->positionerName, - &pAxis->lowLimit, &pAxis->highLimit); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: error performing PositionerUserTravelLimitsGet " - "for high limit=%f, status=%d\n", pAxis->card, pAxis->axis, deviceValue, status); - } - status = PositionerUserTravelLimitsSet(pAxis->pollSocket, - pAxis->positionerName, - deviceValue, pAxis->highLimit); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: error performing PositionerUserTravelLimitsSet " - "for low limit=%f, status=%d\n", pAxis->card, pAxis->axis, deviceValue, status); - } else { - pAxis->lowLimit = deviceValue; - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d low limit to %f\n", pAxis->card, pAxis->axis, deviceValue); - ret_status = MOTOR_AXIS_OK; - } - break; - } - case motorAxisHighLimit: - { - deviceValue = value*pAxis->stepSize; - /* We need to read the current highLimit because otherwise we could be setting it to an invalid value */ - status = PositionerUserTravelLimitsGet(pAxis->pollSocket, - pAxis->positionerName, - &pAxis->lowLimit, &pAxis->highLimit); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: error performing PositionerUserTravelLimitsGet " - "for high limit=%f, status=%d\n", pAxis->card, pAxis->axis, deviceValue, status); - } - status = PositionerUserTravelLimitsSet(pAxis->pollSocket, - pAxis->positionerName, - pAxis->lowLimit, deviceValue); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: error performing PositionerUserTravelLimitsSet " - "for high limit=%f, status=%d\n", pAxis->card, pAxis->axis, deviceValue, status); - } else { - pAxis->highLimit = deviceValue; - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d high limit to %f\n", pAxis->card, pAxis->axis, deviceValue); - ret_status = MOTOR_AXIS_OK; - } - break; - } - case motorAxisPGain: - { - status = setXPSAxisPID(pAxis, &value, 0); - break; - } - case motorAxisIGain: - { - status = setXPSAxisPID(pAxis, &value, 1); - break; - } - case motorAxisDGain: - { - status = setXPSAxisPID(pAxis, &value, 2); - break; - } - case motorAxisClosedLoop: - { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPS does not support changing closed loop or torque\n"); - break; - } - case minJerkTime: - { - pAxis->minJerkTime = value; - ret_status = MOTOR_AXIS_OK; - break; - } - case maxJerkTime: - { - pAxis->maxJerkTime = value; - ret_status = MOTOR_AXIS_OK; - break; - } - case motorAxisDeferMoves: - { - PRINT(pAxis->logParam, FLOW, "Setting deferred move mode on XPS %d to %d\n", pAxis->card, value); - if (value == 0.0 && pAxis->pController->movesDeferred != 0) { - status = processDeferredMoves(pAxis->pController); - } - pAxis->pController->movesDeferred = (int)value; - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Deferred moved failed on XPS %d, status=%d\n", pAxis->card, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - ret_status = MOTOR_AXIS_OK; - } - break; - } - default: - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetDouble[%d,%d]: unknown function %d\n", pAxis->card, pAxis->axis, function); - break; - } - - if (status == MOTOR_AXIS_OK ) - { - motorParam->setDouble( pAxis->params, function, value ); - motorParam->callCallback( pAxis->params ); - } - epicsMutexUnlock( pAxis->mutexId ); - } - } - - return ret_status; -} - - -static int motorAxisSetInteger(AXIS_HDL pAxis, motorAxisParam_t function, int value) -{ - int ret_status = MOTOR_AXIS_ERROR; - int status = 0; - - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - - switch (function) { - case motorAxisClosedLoop: - if (value) { - status = GroupMotionEnable(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetInteger[%d,%d]: error calling GroupMotionEnable status=%d\n", - pAxis->card, pAxis->axis, status); - } else { - PRINT(pAxis->logParam, FLOW, "motorAxisSetInteger set card %d, axis %d closed loop enable\n", - pAxis->card, pAxis->axis); - } - ret_status = MOTOR_AXIS_OK; - } else { - status = GroupMotionDisable(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetInteger[%d,%d]: error calling GroupMotionDisable status=%d\n", - pAxis->card, pAxis->axis, status); - } else { - PRINT(pAxis->logParam, FLOW, "motorAxisSetInteger set card %d, axis %d closed loop disable\n", - pAxis->card, pAxis->axis); - } - ret_status = MOTOR_AXIS_OK; - } - break; - case motorAxisDeferMoves: - { - PRINT(pAxis->logParam, FLOW, "Setting deferred move mode on XPS %d to %d\n", pAxis->card, value); - if (value == 0 && pAxis->pController->movesDeferred != 0) { - status = processDeferredMoves(pAxis->pController); - } - pAxis->pController->movesDeferred = value; - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Deferred moved failed on XPS %d, status=%d\n", pAxis->card, status); - ret_status = MOTOR_AXIS_ERROR; - } else { - ret_status = MOTOR_AXIS_OK; - } - break; - } - case motorAxisMoveToHome: - { - if (value == 1) { - PRINT(pAxis->logParam, FLOW, "Starting move to home for axis %s %s\n", pAxis->groupName, pAxis->positionerName); - pAxis->pController->moveToHomeAxis = pAxis->axis; - epicsEventSignal(pAxis->pController->homeEventId); - ret_status = MOTOR_AXIS_OK; - } else { - ret_status = MOTOR_AXIS_OK; - } - break; - } - default: - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisSetInteger[%d,%d]: unknown function %d\n", pAxis->card, pAxis->axis, function); - break; - } - if (ret_status != MOTOR_AXIS_ERROR) { - status = motorParam->setInteger(pAxis->params, function, value); - } - return ret_status; -} - - -static int motorAxisMove(AXIS_HDL pAxis, double position, int relative, - double min_velocity, double max_velocity, double acceleration) -{ - int status = 0; - char errorString[100]; - double deviceUnits; - - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - - if (!pAxis->mutexId) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisMove[%d,%d]: invalid mutex ID. Call XPSConfigAxis first for initialization.\n", pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d move to %f, min vel=%f, max_vel=%f, accel=%f\n", - pAxis->card, pAxis->axis, position, min_velocity, max_velocity, acceleration); - - /* Look at the last poll value of the positioner status. If it is disabled, then enable it */ - if (pAxis->axisStatus >= 20 && pAxis->axisStatus <= 36) { - status = GroupMotionEnable(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisMove[%d,%d]: error performing GroupMotionEnable %d\n",pAxis->card, pAxis->axis, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move!*/ - return MOTOR_AXIS_ERROR; - } - } - - status = PositionerSGammaParametersSet(pAxis->pollSocket, - pAxis->positionerName, - max_velocity*pAxis->stepSize, - ((acceleration!=0) ? acceleration*pAxis->stepSize : pAxis->accel), - pAxis->minJerkTime, - pAxis->maxJerkTime); - if (status != 0) { - ErrorStringGet(pAxis->pollSocket, status, errorString); - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing PositionerSGammaParametersSet[%d,%d] %d: %s\n", - pAxis->card, pAxis->axis, status, errorString); - return MOTOR_AXIS_ERROR; - } - - deviceUnits = position * pAxis->stepSize; - if (relative) { - if (pAxis->pController->movesDeferred == 0) { - status = GroupMoveRelative(pAxis->moveSocket, - pAxis->positionerName, - 1, - &deviceUnits); - } else { - pAxis->deferred_position = deviceUnits; - pAxis->deferred_move = 1; - pAxis->deferred_relative = relative; - } - if (status != 0 && status != -27) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveRelative[%d,%d] %d\n", pAxis->card, pAxis->axis, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move!*/ - return MOTOR_AXIS_ERROR; - } - } else { - if (pAxis->pController->movesDeferred == 0) { - status = GroupMoveAbsolute(pAxis->moveSocket, - pAxis->positionerName, - 1, - &deviceUnits); - } else { - pAxis->deferred_position = deviceUnits; - pAxis->deferred_move = 1; - pAxis->deferred_relative = relative; - } - if (status != 0 && status != -27) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveAbsolute[%d,%d] %d\n",pAxis->card, pAxis->axis, status); - /* Error -27 is caused when the motor record changes dir i.e. when it aborts a move!*/ - return MOTOR_AXIS_ERROR; - } - } - /* Tell paramLib that the motor is moving. - * This will force a callback on the next poll, even if the poll says the motor is already done. */ - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - /* Insure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - motorParam->callCallback( pAxis->params ); - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - - return MOTOR_AXIS_OK; -} - -static int motorAxisHome(AXIS_HDL pAxis, double min_velocity, double max_velocity, double acceleration, int forwards) -{ - int status; - int groupStatus; - char errorBuffer[100]; - int axis = 0; - XPSController *pController = NULL; - AXIS_HDL pTempAxis = NULL; - - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - - pController = pAxis->pController; - - /* Find out if any axes are in the same group, and clear the referencing mode for them.*/ - for (axis=0; axisnumAxes; axis++) { - pTempAxis = &pController->pAxis[axis]; - if (strcmp(pAxis->groupName, pTempAxis->groupName) == 0) { - pTempAxis->referencing_mode = 0; - } - } - - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - /* The XPS won't allow a home command if the group is in the Ready state - * If the group is Ready, then make it not Ready */ - if (groupStatus >= 10 && groupStatus <= 18) { - status = GroupKill(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisHome[%d,%d]: error calling GroupKill error=%s\n", - pAxis->card, pAxis->axis, getXPSError(pAxis, status, errorBuffer)); - return MOTOR_AXIS_ERROR; - } - } - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - /* If axis not initialized, then initialize it */ - if ((groupStatus >= 0 && groupStatus <= 9) || (groupStatus == 50) || (groupStatus == 63)) { - status = GroupInitialize(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisHome[%d,%d]: error calling GroupInitialize error=%s\n", - pAxis->card, pAxis->axis, getXPSError(pAxis, status, errorBuffer)); - return MOTOR_AXIS_ERROR; - } - } - status = GroupHomeSearch(pAxis->moveSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisHome[%d,%d]: error calling GroupHomeSearch error=%s\n", - pAxis->card, pAxis->axis, getXPSError(pAxis, status, errorBuffer)); - return MOTOR_AXIS_ERROR; - } - - /* Tell paramLib that the motor is moving. - * This will force a callback on the next poll, even if the poll says the motor is already done. */ - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - /* Insure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - motorParam->callCallback( pAxis->params ); - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - PRINT(pAxis->logParam, FLOW, "motorAxisHome: set card %d, axis %d to home\n", - pAxis->card, pAxis->axis); - return MOTOR_AXIS_OK; -} - - -static int motorAxisVelocityMove(AXIS_HDL pAxis, double min_velocity, double velocity, double acceleration) -{ - int status = MOTOR_AXIS_ERROR; - double deviceVelocity, deviceAcceleration; - - if (pAxis == NULL) return(status); - status = GroupJogModeEnable(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisVelocityMove[%d,%d]: error calling GroupJogModeEnable=%d\n", - pAxis->card, pAxis->axis, status); - return MOTOR_AXIS_ERROR; - } - deviceVelocity = velocity * pAxis->stepSize; - deviceAcceleration = acceleration * pAxis->stepSize; - status = GroupJogParametersSet(pAxis->moveSocket, pAxis->positionerName, 1, &deviceVelocity, &deviceAcceleration); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "motorAxisVelocityMove[%d,%d]: error calling GroupJogParametersSet=%d\n", - pAxis->card, pAxis->axis, status); - return MOTOR_AXIS_ERROR; - } - /* Tell paramLib that the motor is moving. - * This will force a callback on the next poll, even if the poll says the motor is already done. */ - - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) - { - /* Insure that the motor record's next status update sees motorAxisDone = False. */ - motorParam->setInteger(pAxis->params, motorAxisDone, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - motorParam->callCallback( pAxis->params ); - /* Send a signal to the poller task which will make it do a poll, and switch to the moving poll rate */ - epicsEventSignal(pAxis->pController->pollEventId); - PRINT(pAxis->logParam, FLOW, "motorAxisVelocityMove card %d, axis %d move velocity=%f, accel=%f\n", - pAxis->card, pAxis->axis, velocity, acceleration); - return status; -} - -static int motorAxisProfileMove(AXIS_HDL pAxis, int npoints, double positions[], double times[], int relative, int trigger) -{ - return MOTOR_AXIS_ERROR; -} - -static int motorAxisTriggerProfile(AXIS_HDL pAxis) -{ - return MOTOR_AXIS_ERROR; -} - -static int motorAxisStop(AXIS_HDL pAxis, double acceleration) -{ - int status; - double deviceVelocity=0.; - double deviceAcceleration; - - if (pAxis == NULL) return MOTOR_AXIS_ERROR; - - /* We need to read the status, because a jog is stopped differently from a move */ - - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &pAxis->axisStatus); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupStatusGet[%d,%d] status=%d%\n",\ - pAxis->card, pAxis->axis, status); - return MOTOR_AXIS_ERROR; - } - if (pAxis->axisStatus == 47) { - deviceAcceleration = acceleration * pAxis->stepSize; - status = GroupJogParametersSet(pAxis->moveSocket, pAxis->positionerName, 1, &deviceVelocity, &deviceAcceleration); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupJogParametersSet[%d,%d] status=%d\n",\ - pAxis->card, pAxis->axis, status); - return MOTOR_AXIS_ERROR; - } - } - - if ((pAxis->axisStatus == 44) || (pAxis->axisStatus == 45)) { - status = GroupMoveAbort(pAxis->moveSocket, pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveAbort axis=%s status=%d. Trying again.\n",\ - pAxis->positionerName, status); - GroupMoveAbort(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - } - - if (pAxis->axisStatus == 43) { - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupKill axis=%s status=%d\n",\ - pAxis->positionerName, status); - return MOTOR_AXIS_ERROR; - } - } - - - /*Clear defer move flag for this axis.*/ - pAxis->deferred_move = 0; - - - PRINT(pAxis->logParam, FLOW, "Set card %d, axis %d to stop with accel=%f\n", - pAxis->card, pAxis->axis, acceleration); - return MOTOR_AXIS_OK; -} - - -/*Commented out for now, in case we don't need this.*/ -static int motorAxisforceCallback(AXIS_HDL pAxis) -{ - if (pAxis == NULL) - return (MOTOR_AXIS_ERROR); - - PRINT(pAxis->logParam, FLOW, "motorAxisforceCallback: request card %d, axis %d status update\n", - pAxis->card, pAxis->axis); - - motorParam->forceCallback(pAxis->params); - - epicsEventSignal(pAxis->pController->pollEventId); - return (MOTOR_AXIS_OK); -} - - - -static void XPSPoller(XPSController *pController) -{ - /* This is the task that polls the XPS */ - double timeout; - AXIS_HDL pAxis; - int status; - int i; - int axisDone; - int anyMoving; - int forcedFastPolls=0; - double actualVelocity, theoryVelocity, acceleration; - double theoryPosition=0; - - timeout = pController->idlePollPeriod; - epicsEventSignal(pController->pollEventId); /* Force on poll at startup */ - - while(1) { - while(disablePoll==1) - { - epicsThreadSleep(0.1); - } - if (timeout != 0.) status = epicsEventWaitWithTimeout(pController->pollEventId, timeout); - else status = epicsEventWait(pController->pollEventId); - if (status == epicsEventWaitOK) { - /* We got an event, rather than a timeout. This is because other software - * knows that an axis should have changed state (started moving, etc.). - * Force a minimum number of fast polls, because the controller status - * might not have changed the first few polls - */ - forcedFastPolls = 10; - } - - anyMoving = 0; - for (i=0; inumAxes; i++) { - pAxis = &pController->pAxis[i]; - if (!pAxis->mutexId) break; - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) { - status = GroupStatusGet(pAxis->pollSocket, - pAxis->groupName, - &pAxis->axisStatus); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling GroupStatusGet[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - } else { - PRINT(pAxis->logParam, IODRIVER, "XPSPoller: %s axisStatus=%d\n", pAxis->positionerName, pAxis->axisStatus); - motorParam->setInteger(pAxis->params, motorAxisCommError, 0); - /* Set done flag by default */ - axisDone = 1; - if (pAxis->axisStatus >= 10 && pAxis->axisStatus <= 18) { - /* These states mean ready from move/home/jog etc */ - } - if (pAxis->axisStatus >= 43 && pAxis->axisStatus <= 48) { - /* These states mean it is moving/homeing/jogging etc*/ - axisDone = 0; - anyMoving = 1; - if (pAxis->axisStatus == 47) { - /* We are jogging. When the velocity gets back to 0 disable jogging */ - status = GroupJogParametersGet(pAxis->pollSocket, pAxis->positionerName, 1, &theoryVelocity, &acceleration); - status = GroupJogCurrentGet(pAxis->pollSocket, pAxis->positionerName, 1, &actualVelocity, &acceleration); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling GroupJogCurrentGet[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - } else { - if (actualVelocity == 0. && theoryVelocity == 0.) { - status = GroupJogModeDisable(pAxis->pollSocket, pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling GroupJogModeDisable[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - /* In this mode must do a group kill? */ - status = GroupKill(pAxis->pollSocket, pAxis->groupName); - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: called GroupKill!\n"); - } - } - } - } - } - /* Set the status */ - motorParam->setInteger(pAxis->params, XPSStatus, pAxis->axisStatus); - /* Set the axis done parameter */ - /* AND the done flag with the inverse of deferred_move.*/ - axisDone &= !pAxis->deferred_move; - motorParam->setInteger(pAxis->params, motorAxisDone, axisDone); - - /*Read the controller software limits in case these have been changed by a TCL script.*/ - status = PositionerUserTravelLimitsGet(pAxis->pollSocket, pAxis->positionerName, &pAxis->lowLimit, &pAxis->highLimit); - if (status == 0) { - motorParam->setDouble(pAxis->params, motorAxisLowLimit, (pAxis->lowLimit/pAxis->stepSize)); - motorParam->setDouble(pAxis->params, motorAxisHighLimit, (pAxis->highLimit/pAxis->stepSize)); - } - - /*Set the ATHM signal.*/ - if (pAxis->axisStatus == 11) { - if (pAxis->referencing_mode == 0) { - motorParam->setInteger(pAxis->params, motorAxisHomeSignal, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisHomeSignal, 0); - } - } else { - motorParam->setInteger(pAxis->params, motorAxisHomeSignal, 0); - } - - /*Set the HOMED signal.*/ - if ((pAxis->axisStatus >= 10 && pAxis->axisStatus <= 21) || - (pAxis->axisStatus == 44)) { - if (pAxis->referencing_mode == 0) { - motorParam->setInteger(pAxis->params, motorAxisHomed, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisHomed, 0); - } - } else { - motorParam->setInteger(pAxis->params, motorAxisHomed, 0); - } - - /*Test for following error, and set appropriate param.*/ - if ((pAxis->axisStatus == 21 || pAxis->axisStatus == 22) || - (pAxis->axisStatus >= 24 && pAxis->axisStatus <= 26) || - (pAxis->axisStatus == 28 || pAxis->axisStatus == 35)) { - PRINT(pAxis->logParam, FLOW, "XPS Axis %d in following error. XPS State Code: %d\n", - pAxis->axis, pAxis->axisStatus); - motorParam->setInteger(pAxis->params, motorAxisFollowingError, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisFollowingError, 0); - } - - /*Test for states that mean we cannot move an axis (disabled, uninitialised, etc.) - and set motorAxisPowerOn (CNEN).*/ - if ((pAxis->axisStatus < 10) || ((pAxis->axisStatus >= 20) && (pAxis->axisStatus <= 42)) || - (pAxis->axisStatus == 50) || (pAxis->axisStatus == 63) || (pAxis->axisStatus == 64)) { - if ( (pAxis->noDisabledError > 0) && (pAxis->axisStatus==20) ) { - motorParam->setInteger(pAxis->params, motorAxisPowerOn, 1); - } else { - PRINT(pAxis->logParam, FLOW, "XPS Axis %d is uninitialised/disabled/not referenced. XPS State Code: %d\n", - pAxis->axis, pAxis->axisStatus); - motorParam->setInteger(pAxis->params, motorAxisPowerOn, 0); - } - } else { - motorParam->setInteger(pAxis->params, motorAxisPowerOn, 1); - } - - /*Test for uninitialized states.*/ - if ((pAxis->axisStatus < 10) || (pAxis->axisStatus == 42) || (pAxis->axisStatus == 50) || (pAxis->axisStatus == 63)) { - PRINT(pAxis->logParam, FLOW, "XPS Axis %d is uninitialised. XPS State Code: %d\n", - pAxis->axis, pAxis->axisStatus); - motorParam->setInteger(pAxis->params, motorAxisProblem, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisProblem, 0); - } - - } - - status = GroupPositionSetpointGet(pAxis->pollSocket, - pAxis->positionerName, - 1, - &theoryPosition); - - pAxis->theoryPosition = theoryPosition; - - status = GroupPositionCurrentGet(pAxis->pollSocket, - pAxis->positionerName, - 1, - &pAxis->currentPosition); - - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling GroupPositionCurrentGet[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisCommError, 0); - motorParam->setDouble(pAxis->params, motorAxisPosition, (theoryPosition/pAxis->stepSize)); - motorParam->setDouble(pAxis->params, motorAxisEncoderPosn, (pAxis->currentPosition/pAxis->stepSize)); - } - - status = PositionerErrorGet(pAxis->pollSocket, - pAxis->positionerName, - &pAxis->positionerError); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling PositionerErrorGet[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisCommError, 0); - /* These are hard limits */ - if (pAxis->positionerError & XPSC8_END_OF_RUN_PLUS) { - motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisHighHardLimit, 0); - } - if (pAxis->positionerError & XPSC8_END_OF_RUN_MINUS) { - motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisLowHardLimit, 0); - } - } - - /*Read the current velocity and use it set motor direction and moving flag.*/ - status = GroupVelocityCurrentGet(pAxis->pollSocket, - pAxis->positionerName, - 1, - &pAxis->currentVelocity); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "XPSPoller: error calling GroupPositionVelocityGet[%d,%d], status=%d\n", pAxis->card, pAxis->axis, status); - motorParam->setInteger(pAxis->params, motorAxisCommError, 1); - } else { - motorParam->setInteger(pAxis->params, motorAxisCommError, 0); - motorParam->setInteger(pAxis->params, motorAxisDirection, (pAxis->currentVelocity > XPS_VELOCITY_DEADBAND)); - motorParam->setInteger(pAxis->params, motorAxisMoving, (fabs(pAxis->currentVelocity) > XPS_VELOCITY_DEADBAND)); - } - - motorParam->callCallback(pAxis->params); - - epicsMutexUnlock(pAxis->mutexId); - } - - } /* Next axis */ - - if (forcedFastPolls > 0) { - timeout = pController->movingPollPeriod; - forcedFastPolls--; - } else if (anyMoving) { - timeout = pController->movingPollPeriod; - } else { - timeout = pController->idlePollPeriod; - } - - } /* End while */ - -} - -/** - * This is the task that deals with the special move to home switch function - */ -static void XPSMoveToHome(XPSController *pController) -{ - - AXIS_HDL pAxis; - int status = 0; - - while(1) { - - status = epicsEventWait(pController->homeEventId); - if (status == epicsEventWaitOK) { - pAxis = &(pController->pAxis[pController->moveToHomeAxis]); - status = movePositionerToHome(pAxis); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Move to home failed on XPS %d, status=%d\n", pAxis->card, status); - PRINT(pAxis->logParam, MOTOR_ERROR, "Axis %s %s\n\n", pAxis->groupName, pAxis->positionerName); - } - } - - } - -} - - -static char *getXPSError(AXIS_HDL pAxis, int status, char *buffer) -{ - status = ErrorStringGet(pAxis->pollSocket, status, buffer); - return buffer; -} - -static int motorXPSLogMsg(void * param, const motorAxisLogMask_t mask, const char *pFormat, ...) -{ - - va_list pvar; - int nchar; - - va_start(pvar, pFormat); - nchar = vfprintf(stdout,pFormat,pvar); - va_end (pvar); - printf("\n"); - return(nchar); -} - - -int XPSSetup(int num_controllers) /* number of XPS controllers in system. */ -{ - - if (num_controllers < 1) { - printf("XPSSetup, num_controllers must be > 0\n"); - return MOTOR_AXIS_ERROR; - } - numXPSControllers = num_controllers; - pXPSController = (XPSController *)calloc(numXPSControllers, sizeof(XPSController)); - return MOTOR_AXIS_OK; -} - - -int XPSConfig(int card, /* Controller number */ - const char *ip, /* XPS IP address or IP name */ - int port, /* IP port number that XPS is listening on */ - int numAxes, /* Number of axes this controller supports */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod) /* Time to poll (msec) when an axis is idle. 0 for no polling */ - -{ - AXIS_HDL pAxis; - int axis; - int pollSocket; - XPSController *pController; - char threadName[20]; - - if (numXPSControllers < 1) { - printf("XPSConfig: no XPS controllers allocated, call XPSSetup first\n"); - return MOTOR_AXIS_ERROR; - } - if ((card < 0) || (card >= numXPSControllers)) { - printf("XPSConfig: card must in range 0 to %d\n", numXPSControllers-1); - return MOTOR_AXIS_ERROR; - } - if ((numAxes < 1) || (numAxes > XPS_MAX_AXES)) { - printf("XPSConfig: numAxes must in range 1 to %d\n", XPS_MAX_AXES); - return MOTOR_AXIS_ERROR; - } - - pController = &pXPSController[card]; - pController->pAxis = (AXIS_HDL) calloc(numAxes, sizeof(motorAxis)); - pController->numAxes = numAxes; - pController->movingPollPeriod = movingPollPeriod/1000.; - pController->idlePollPeriod = idlePollPeriod/1000.; - - pollSocket = TCP_ConnectToServer((char *)ip, port, TCP_TIMEOUT); - - if (pollSocket < 0) { - printf("XPSConfig: error calling TCP_ConnectToServer for pollSocket\n"); - return MOTOR_AXIS_ERROR; - } - - for (axis=0; axispAxis[axis]; - pAxis->pController = pController; - pAxis->card = card; - pAxis->axis = axis; - pAxis->pollSocket = pollSocket; - pAxis->ip = epicsStrDup(ip); - pAxis->moveSocket = TCP_ConnectToServer((char *)ip, port, TCP_TIMEOUT); - if (pAxis->moveSocket < 0) { - printf("XPSConfig: error calling TCP_ConnectToServer for move socket\n"); - return MOTOR_AXIS_ERROR; - } - /* Set the poll rate on the moveSocket to a negative number, which means that SendAndReceive should do only a write, no read */ - TCP_SetTimeout(pAxis->moveSocket, -0.1); - /* printf("XPSConfig: pollSocket=%d, moveSocket=%d, ip=%s, port=%d," - * " axis=%d controller=%d\n", - * pAxis->pollSocket, pAxis->moveSocket, ip, port, axis, card); - */ - pAxis->params = motorParam->create(0, MOTOR_AXIS_NUM_PARAMS + XPS_NUM_PARAMS); - } - - FirmwareVersionGet(pollSocket, pController->firmwareVersion); - - pController->pollEventId = epicsEventMustCreate(epicsEventEmpty); - pController->homeEventId = epicsEventMustCreate(epicsEventEmpty); - - /* Create the poller thread for this controller */ - epicsSnprintf(threadName, sizeof(threadName), "XPS:%d", card); - epicsThreadCreate(threadName, - epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) XPSPoller, (void *) pController); - - /* Create the thread for this controller to deal with move to home functions*/ - epicsSnprintf(threadName, sizeof(threadName), "XPS home:%d", card); - epicsThreadCreate(threadName, - epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC) XPSMoveToHome, (void *) pController); - - - return MOTOR_AXIS_OK; - -} - - -int XPSConfigAxis(int card, /* specify which controller 0-up*/ - int axis, /* axis number 0-7 */ - const char *positionerName, /* groupName.positionerName e.g. Diffractometer.Phi */ - const char *stepsPerUnit, /* steps per user unit */ - int noDisabledError) /* If 1 then don't report disabled state as error */ -{ - XPSController *pController; - AXIS_HDL pAxis; - char *index; - int status; - double stepSize; - - if (numXPSControllers < 1) { - printf("XPSConfigAxis: no XPS controllers allocated, call XPSSetup first\n"); - return MOTOR_AXIS_ERROR; - } - if ((card < 0) || (card >= numXPSControllers)) { - printf("XPSConfigAxis: card must in range 0 to %d\n", numXPSControllers-1); - return MOTOR_AXIS_ERROR; - } - pController = &pXPSController[card]; - if ((axis < 0) || (axis >= pController->numAxes)) { - printf("XPSConfigAxis: axis must in range 0 to %d\n", pController->numAxes-1); - return MOTOR_AXIS_ERROR; - } - pAxis = &pController->pAxis[axis]; - index = strchr(positionerName, '.'); - if (index == NULL) { - printf("XPSConfigAxis: positionerName must be of form group.positioner\n"); - return MOTOR_AXIS_ERROR; - } - pAxis->positionerName = epicsStrDup(positionerName); - pAxis->groupName = epicsStrDup(positionerName); - pAxis->noDisabledError = noDisabledError; - index = strchr(pAxis->groupName, '.'); - if (index != NULL) *index = '\0'; /* Terminate group name at place of '.' */ - - stepSize = strtod(stepsPerUnit, NULL); - pAxis->stepSize = 1./stepSize; - /* Read some information from the controller for this axis */ - status = PositionerSGammaParametersGet(pAxis->pollSocket, - pAxis->positionerName, - &pAxis->velocity, - &pAxis->accel, - &pAxis->minJerkTime, - &pAxis->maxJerkTime); - pAxis->mutexId = epicsMutexMustCreate(); - - /* Send a signal to the poller task which will make it do a poll, - * updating values for this axis to use the new resolution (stepSize) */ - epicsEventSignal(pAxis->pController->pollEventId); - - /*Initialise this to zero, to disable the movePositionerToHome function by default.*/ - pAxis->referencing_mode_move = 0; - - return MOTOR_AXIS_OK; -} - -/** - * Function to enable/disable the write down of position to the - * XPS controller. Call this function at IOC shell. - * @param setPos 0=disable, 1=enable - */ -void XPSEnableSetPosition(int setPos) -{ - doSetPosition = setPos; -} - -/** - * Function to set the threadSleep time used when setting the XPS position. - * The sleep is performed after the axes are initialised, to take account of any - * post initialisation wobble. - * @param posSleep The time in miliseconds to sleep. - */ -void XPSSetPosSleepTime(int posSleep) -{ - setPosSleepTime = (double)posSleep / 1000.0; -} - -void XPSDisablePoll(int disablePollVal) -{ - disablePoll = disablePollVal; -} - - -/* Utility functions.*/ - -/** - * Test if axis is configured as an XPS single axis or a group. - * This is done by comparing cached group names. - * @param pAxis Axis struct AXIS_HDL - * @return 1 if in group single group, or return the number of axes in the group. - */ -static int isAxisInGroup(const AXIS_HDL pAxis) -{ - int axisIndex=0; - int group=0; - - for(axisIndex=0; axisIndexpController->numAxes; ++axisIndex) { - if (!strcmp(pAxis->groupName, pAxis->pController->pAxis[axisIndex].groupName)) { - ++group; - } - } - - return group; -} - - -/** - * Function to set the XPS controller PID parameters. - * @param pAxis Axis struct AXIS_HDL - * @param value The desired value of the parameter. - * @param pidoption Set to 0 for P, 1 for I and 2 for D. - * - * @return Zero if success, non-zero if error (and equal to XPS API error if error is from XPS). - */ -static int setXPSAxisPID(AXIS_HDL pAxis, const double * value, int pidoption) -{ - int status = 0; - char correctorType[250] = {'\0'}; - - /*The XPS function that we use to set the PID parameters is dependant on the - type of corrector in use for that axis.*/ - status = PositionerCorrectorTypeGet(pAxis->pollSocket, - pAxis->positionerName, - correctorType); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorTypeGet. Card: %d, Axis: %d, XPS API Error: %d\n", - pAxis->card, pAxis->axis, status); - } else { - - if (!strcmp(correctorType, CorrectorTypes.PIPosition)) { - /*Read the PID parameters first.*/ - status = PositionerCorrectorPIPositionGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIPositionGet. Aborting setting PID. XPS API Error: %d\n", status); - return status; - } - - /*Set the P, I or D parameter in the xpsCorrectorInfo struct.*/ - setXPSPIDValue(&pAxis->xpsCorrectorInfo, value, pidoption); - - /*Now set the parameters in the XPS.*/ - status = PositionerCorrectorPIPositionSetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIPositionSet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFVelocity)) { - status = PositionerCorrectorPIDFFVelocityGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFVelocityGet. Aborting setting PID. XPS API Error: %d\n", status); - return status; - } - - setXPSPIDValue(&pAxis->xpsCorrectorInfo, value, pidoption); - - status = PositionerCorrectorPIDFFVelocitySetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFVelocitySet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFAcceleration)) { - status = PositionerCorrectorPIDFFAccelerationGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFAccelerationGet. Aborting setting PID. XPS API Error: %d\n", status); - return status; - } - - setXPSPIDValue(&pAxis->xpsCorrectorInfo, value, pidoption); - - status = PositionerCorrectorPIDFFAccelerationSetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFAccelerationSet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDDualFFVoltage)) { - status = PositionerCorrectorPIDDualFFVoltageGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDDualFFVoltageGet. Aborting setting PID. XPS API Error: %d\n", status); - return status; - } - - setXPSPIDValue(&pAxis->xpsCorrectorInfo, value, pidoption); - - status = PositionerCorrectorPIDDualFFVoltageSetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDDualFFVoltageSet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.NoCorrector)) { - printf("drvXPSAsyn::setXPSAxisPID. XPS corrector type is %s. Cannot set PID.\n", correctorType); - - } else { - printf("ERROR: drvXPSAsyn::setXPSAxisPID. %s is not a valid corrector type. PID not set.\n", correctorType); - } - } - - return status; -} - -/** - * Function to read the PID values from the XPS (and any other XPS corrector info that is valid for the axis). - * The read values are set in the AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Zero if success, non-zero if error (and equal to XPS API error if error is from XPS). - */ -static int getXPSAxisPID(AXIS_HDL pAxis) -{ - int status = 0; - char correctorType[250] = {'\0'}; - - /*The XPS function that we use to set the PID parameters is dependant on the - type of corrector in use for that axis.*/ - status = PositionerCorrectorTypeGet(pAxis->pollSocket, - pAxis->positionerName, - correctorType); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorTypeGet. Card: %d, Axis: %d, XPS API Error: %d\n", - pAxis->card, pAxis->axis, status); - } else { - - if (!strcmp(correctorType, CorrectorTypes.PIPosition)) { - /*Read the PID parameters and set in pAxis.*/ - status = PositionerCorrectorPIPositionGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIPositionGet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFVelocity)) { - status = PositionerCorrectorPIDFFVelocityGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFVelocityGet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDFFAcceleration)) { - status = PositionerCorrectorPIDFFAccelerationGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDFFAccelerationGet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.PIDDualFFVoltage)) { - status = PositionerCorrectorPIDDualFFVoltageGetWrapper(pAxis); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "Error with PositionerCorrectorPIDDualFFVoltageGet. XPS API Error: %d\n", status); - return status; - } - - } else if (!strcmp(correctorType, CorrectorTypes.NoCorrector)) { - printf("drvXPSAsyn::setXPSAxisPID. XPS corrector type is %s.\n", correctorType); - - } else { - printf("ERROR: drvXPSAsyn::setXPSAxisPID. %s is not a valid corrector type.\n", correctorType); - } - } - - return 0; -} - - -/** - * Set the P, I or D parameter in a xpsCorrectorInfo_t struct. - * @param xpsCorrectorInfo Pointer to a xpsCorrectorInfo_t struct. - * @param value The value to set. - * @param pidoption Set to 0 for P, 1 for I and 2 for D. - */ -static void setXPSPIDValue(xpsCorrectorInfo_t *xpsCorrectorInfo, const double * value, int pidoption) -{ - if ((pidoption < 0) || (pidoption > 2)) { - printf("ERROR: drvXPSAsyn::setXPSPIDValue. pidoption out of range\n"); - } else { - switch (pidoption) { - case 0: - xpsCorrectorInfo->KP = *value; - break; - case 1: - xpsCorrectorInfo->KI = *value; - break; - case 2: - xpsCorrectorInfo->KD = *value; - break; - default: - /*Do nothing.*/ - break; - } - } -} - -/** - * Wrapper function for PositionerCorrectorPIPositionGet. - * It will set parameters in a AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIPositionGetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIPositionGet(pAxis->pollSocket, - pAxis->positionerName, - &xpsCorrectorInfo->ClosedLoopStatus, - &xpsCorrectorInfo->KP, - &xpsCorrectorInfo->KI, - &xpsCorrectorInfo->IntegrationTime); -} - -/** - * Wrapper function for PositionerCorrectorPIDFFVelocityGet. - * It will set parameters in a AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDFFVelocityGetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDFFVelocityGet(pAxis->pollSocket, - pAxis->positionerName, - &xpsCorrectorInfo->ClosedLoopStatus, - &xpsCorrectorInfo->KP, - &xpsCorrectorInfo->KI, - &xpsCorrectorInfo->KD, - &xpsCorrectorInfo->KS, - &xpsCorrectorInfo->IntegrationTime, - &xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo->GKP, - &xpsCorrectorInfo->GKI, - &xpsCorrectorInfo->GKD, - &xpsCorrectorInfo->KForm, - &xpsCorrectorInfo->FeedForwardGainVelocity); -} - - -/** - * Wrapper function for PositionerCorrectorPIDFFAccelerationGet. - * It will set parameters in a AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDFFAccelerationGetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDFFAccelerationGet(pAxis->pollSocket, - pAxis->positionerName, - &xpsCorrectorInfo->ClosedLoopStatus, - &xpsCorrectorInfo->KP, - &xpsCorrectorInfo->KI, - &xpsCorrectorInfo->KD, - &xpsCorrectorInfo->KS, - &xpsCorrectorInfo->IntegrationTime, - &xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo->GKP, - &xpsCorrectorInfo->GKI, - &xpsCorrectorInfo->GKD, - &xpsCorrectorInfo->KForm, - &xpsCorrectorInfo->FeedForwardGainAcceleration); -} - - -/** - * Wrapper function for PositionerCorrectorPIDDualFFVoltageGet. - * It will set parameters in a AXIS_HDL struct. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDDualFFVoltageGetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDDualFFVoltageGet(pAxis->pollSocket, - pAxis->positionerName, - &xpsCorrectorInfo->ClosedLoopStatus, - &xpsCorrectorInfo->KP, - &xpsCorrectorInfo->KI, - &xpsCorrectorInfo->KD, - &xpsCorrectorInfo->KS, - &xpsCorrectorInfo->IntegrationTime, - &xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - &xpsCorrectorInfo->GKP, - &xpsCorrectorInfo->GKI, - &xpsCorrectorInfo->GKD, - &xpsCorrectorInfo->KForm, - &xpsCorrectorInfo->FeedForwardGainVelocity, - &xpsCorrectorInfo->FeedForwardGainAcceleration, - &xpsCorrectorInfo->Friction); -} - - -/** - * Wrapper function for PositionerCorrectorPIPositionSet. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIPositionSetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIPositionSet(pAxis->pollSocket, - pAxis->positionerName, - xpsCorrectorInfo->ClosedLoopStatus, - xpsCorrectorInfo->KP, - xpsCorrectorInfo->KI, - xpsCorrectorInfo->IntegrationTime); -} - - -/** - * Wrapper function for PositionerCorrectorPIDFFVelocitySet. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDFFVelocitySetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDFFVelocitySet(pAxis->pollSocket, - pAxis->positionerName, - xpsCorrectorInfo->ClosedLoopStatus, - xpsCorrectorInfo->KP, - xpsCorrectorInfo->KI, - xpsCorrectorInfo->KD, - xpsCorrectorInfo->KS, - xpsCorrectorInfo->IntegrationTime, - xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - xpsCorrectorInfo->GKP, - xpsCorrectorInfo->GKI, - xpsCorrectorInfo->GKD, - xpsCorrectorInfo->KForm, - xpsCorrectorInfo->FeedForwardGainVelocity); -} - -/** - * Wrapper function for PositionerCorrectorPIDFFAccelerationSet. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDFFAccelerationSetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDFFAccelerationSet(pAxis->pollSocket, - pAxis->positionerName, - xpsCorrectorInfo->ClosedLoopStatus, - xpsCorrectorInfo->KP, - xpsCorrectorInfo->KI, - xpsCorrectorInfo->KD, - xpsCorrectorInfo->KS, - xpsCorrectorInfo->IntegrationTime, - xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - xpsCorrectorInfo->GKP, - xpsCorrectorInfo->GKI, - xpsCorrectorInfo->GKD, - xpsCorrectorInfo->KForm, - xpsCorrectorInfo->FeedForwardGainAcceleration); -} - -/** - * Wrapper function for PositionerCorrectorPIDDualFFVoltageSet. - * @param pAxis Axis struct AXIS_HDL. - * @return Return value from XPS function. - */ -static int PositionerCorrectorPIDDualFFVoltageSetWrapper(AXIS_HDL pAxis) -{ - xpsCorrectorInfo_t *xpsCorrectorInfo = &pAxis->xpsCorrectorInfo; - return PositionerCorrectorPIDDualFFVoltageSet(pAxis->pollSocket, - pAxis->positionerName, - xpsCorrectorInfo->ClosedLoopStatus, - xpsCorrectorInfo->KP, - xpsCorrectorInfo->KI, - xpsCorrectorInfo->KD, - xpsCorrectorInfo->KS, - xpsCorrectorInfo->IntegrationTime, - xpsCorrectorInfo->DerivativeFilterCutOffFrequency, - xpsCorrectorInfo->GKP, - xpsCorrectorInfo->GKI, - xpsCorrectorInfo->GKD, - xpsCorrectorInfo->KForm, - xpsCorrectorInfo->FeedForwardGainVelocity, - xpsCorrectorInfo->FeedForwardGainAcceleration, - xpsCorrectorInfo->Friction); -} - - -/** - * Function to move an axis to roughly the home position. - * It first does a kill, followed by a referencing start/stop - * sequence on an group. Then uses the hardware status to - * determine which direction to move. - * The distance to move is set when enabling this functionality - * (it is disabled by default, because it only applies to - * stages with home switches in the middle of travel). - * - */ -static int movePositionerToHome(AXIS_HDL pAxis) -{ - int status = 0; - int axis = 0; - int groupStatus = 0; - int initialHardwareStatus = 0; - int hardwareStatus = 0; - double defaultDistance = 0; - double vel=0; - double accel=0; - double minJerk=0; - double maxJerk=0; - - XPSController *pController = NULL; - AXIS_HDL pTempAxis = NULL; - pController = pAxis->pController; - - if (pAxis->referencing_mode_move == 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, "[%d,%d]: This function has not been enabled.\n", - pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - - defaultDistance = (double) pAxis->referencing_mode_move; - - /*NOTE: the XPS has some race conditions in its firmware. That's why I placed some - epicsThreadSleep calls between the XPS functions below.*/ - - /* The XPS won't allow a home command if the group is in the Ready state - * If the group is Ready, then make it not Ready */ - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - if (groupStatus >= 10 && groupStatus <= 18) { - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - } - epicsThreadSleep(0.05); - status = GroupInitialize(pAxis->pollSocket, pAxis->groupName); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "movePositionerToHome[%d,%d]: error calling GroupInitialize\n", - pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - epicsThreadSleep(0.05); - status = GroupReferencingStart(pAxis->moveSocket, pAxis->groupName); - epicsThreadSleep(0.05); - status = GroupReferencingStop(pAxis->moveSocket, pAxis->groupName); - epicsThreadSleep(0.05); - - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - if (groupStatus != 11) { - PRINT(pAxis->logParam, MOTOR_ERROR, "movePositionerToHome[%d,%d]: error putting axis into referencing mode\n", - pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - - /* Find out if any axes are in the same group, and set referencing mode for them all.*/ - for (axis=0; axisnumAxes; axis++) { - pTempAxis = &pController->pAxis[axis]; - if (strcmp(pAxis->groupName, pTempAxis->groupName) == 0) { - pTempAxis->referencing_mode = 1; - } - } - - /*Set status bits correctly*/ - if (epicsMutexLock(pAxis->mutexId) == epicsMutexLockOK) { - motorParam->setInteger(pAxis->params, motorAxisHomed, 0); - motorParam->setInteger(pAxis->params, motorAxisHomeSignal, 0); - motorParam->callCallback(pAxis->params); - epicsMutexUnlock(pAxis->mutexId); - } - - - /*Read which side of the home switch we are on.*/ - status = PositionerHardwareStatusGet(pAxis->pollSocket, pAxis->positionerName, &initialHardwareStatus); - if (status) { - PRINT(pAxis->logParam, MOTOR_ERROR, "movePositionerToHome[%d,%d]: error calling PositionerHardwareStatusGet\n", - pAxis->card, pAxis->axis); - return MOTOR_AXIS_ERROR; - } - - if (!(XPSC8_ZM_HIGH_LEVEL & initialHardwareStatus)) { - defaultDistance = defaultDistance * -1.0; - } - - /*I want to set a slow speed here, so as not to move at default (max) speed. The user must have chance to - stop things if it looks like it has past the home switch and is not stopping. First I need to read what is currently - set for velocity, and then I divide it by 2.*/ - status = PositionerSGammaParametersGet(pAxis->pollSocket, - pAxis->positionerName, - &vel, &accel, &minJerk, &maxJerk); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing PositionerSGammaParametersGet[%d,%d].\n", - pAxis->card, pAxis->axis); - GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - status = PositionerSGammaParametersSet(pAxis->pollSocket, - pAxis->positionerName, - (vel/2), accel, minJerk, maxJerk); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing PositionerSGammaParametersSet[%d,%d].\n", - pAxis->card, pAxis->axis); - GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - epicsThreadSleep(0.05); - - /*Move in direction of home switch.*/ - status = GroupMoveRelative(pAxis->moveSocket, pAxis->positionerName, 1, - &defaultDistance); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveRelative axis=%s status=%d\n", \ - pAxis->positionerName, status); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - - epicsThreadSleep(0.1); - - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - - if (groupStatus == 44) { - while (1) { - epicsThreadSleep(0.2); - status = PositionerHardwareStatusGet(pAxis->pollSocket, pAxis->positionerName, &hardwareStatus); - if (hardwareStatus != initialHardwareStatus) { - break; - } - status = GroupStatusGet(pAxis->pollSocket, pAxis->groupName, &groupStatus); - if (groupStatus != 44) { - /* move finished for some other reason.*/ - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveRelative axis=%s status=%d\n", \ - pAxis->positionerName, status); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - } - } else { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveRelative axis=%s status=%d\n", \ - pAxis->positionerName, status); - /*Issue a kill here if we have failed to move.*/ - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - - status = GroupMoveAbort(pAxis->pollSocket, pAxis->groupName); - if (status != 0) { - PRINT(pAxis->logParam, MOTOR_ERROR, " Error performing GroupMoveAbort axis=%s status=%d\n", \ - pAxis->positionerName, status); - /*This should really have worked. Do a kill instead.*/ - status = GroupKill(pAxis->moveSocket, pAxis->groupName); - return MOTOR_AXIS_ERROR; - } - - return status; -} - - -/** - * Function to enable the movePositionerToHome function on a per axis. - * It also sets the distance to try to move by for an axis. - */ -void XPSEnableMoveToHome(int card, const char * positionerName, int distance) -{ - - XPSController *pController = NULL; - AXIS_HDL pAxis = NULL; - int axisIndex = 0; - - if (distance<=0) { - printf("Error in XPSEnableMoveToHome. distance must be positive.\n"); - - } else { - - /*Get the axis referenence.*/ - pController = &pXPSController[card]; - - for (axisIndex=0; axisIndexnumAxes; ++axisIndex) { - pAxis = &(pController->pAxis[axisIndex]); - if (!strcmp(positionerName, pAxis->positionerName)) { - pAxis->referencing_mode_move = distance; - break; - } - } - - } - -} - - - - - - -/* Code for iocsh registration */ - -/* Newport XPS Gathering Test */ -static const iocshArg XPSGatheringArg0 = {"Element Period*10^4", iocshArgInt}; -static const iocshArg * const XPSGatheringArgs[1] = {&XPSGatheringArg0}; -static const iocshFuncDef XPSC8GatheringTest = {"xps_gathering", 1, XPSGatheringArgs}; -static void XPSC8GatheringTestCallFunc(const iocshArgBuf *args) -{ - xps_gathering(args[0].ival); -} - -/* XPS tcl execute function */ -static const iocshArg tclcallArg0 = {"tcl name", iocshArgString}; -static const iocshArg tclcallArg1 = {"Task name", iocshArgString}; -static const iocshArg tclcallArg2 = {"Function args", iocshArgString}; -static const iocshArg * const tclcallArgs[3] = {&tclcallArg0, - &tclcallArg1, - &tclcallArg2}; -static const iocshFuncDef TCLRun = {"tclcall", 3, tclcallArgs}; -static void TCLRunCallFunc(const iocshArgBuf *args) -{ - tclcall(args[0].sval, args[1].sval, args[2].sval); -} - - -/* XPSSetup */ -static const iocshArg XPSSetupArg0 = {"Number of XPS controllers", iocshArgInt}; -static const iocshArg * const XPSSetupArgs[1] = {&XPSSetupArg0}; -static const iocshFuncDef setupXPS = {"XPSSetup", 1, XPSSetupArgs}; -static void setupXPSCallFunc(const iocshArgBuf *args) -{ - XPSSetup(args[0].ival); -} - - -/* XPSConfig */ -static const iocshArg XPSConfigArg0 = {"Card being configured", iocshArgInt}; -static const iocshArg XPSConfigArg1 = {"IP", iocshArgString}; -static const iocshArg XPSConfigArg2 = {"Port", iocshArgInt}; -static const iocshArg XPSConfigArg3 = {"Number of Axes", iocshArgInt}; -static const iocshArg XPSConfigArg4 = {"Moving poll rate", iocshArgInt}; -static const iocshArg XPSConfigArg5 = {"Idle poll rate", iocshArgInt}; -static const iocshArg * const XPSConfigArgs[6] = {&XPSConfigArg0, - &XPSConfigArg1, - &XPSConfigArg2, - &XPSConfigArg2, - &XPSConfigArg4, - &XPSConfigArg5}; -static const iocshFuncDef configXPS = {"XPSConfig", 6, XPSConfigArgs}; -static void configXPSCallFunc(const iocshArgBuf *args) -{ - XPSConfig(args[0].ival, args[1].sval, args[2].ival, args[3].ival, - args[4].ival, args[5].ival); -} - - -/* XPSConfigAxis */ -static const iocshArg XPSConfigAxisArg0 = {"Card number", iocshArgInt}; -static const iocshArg XPSConfigAxisArg1 = {"Axis number", iocshArgInt}; -static const iocshArg XPSConfigAxisArg2 = {"Axis name", iocshArgString}; -static const iocshArg XPSConfigAxisArg3 = {"Steps per unit", iocshArgString}; -static const iocshArg XPSConfigAxisArg4 = {"No Disabled Error", iocshArgInt}; -static const iocshArg * const XPSConfigAxisArgs[5] = {&XPSConfigAxisArg0, - &XPSConfigAxisArg1, - &XPSConfigAxisArg2, - &XPSConfigAxisArg3, - &XPSConfigAxisArg4}; - -static const iocshFuncDef configXPSAxis = {"XPSConfigAxis", 5, XPSConfigAxisArgs}; - -static void configXPSAxisCallFunc(const iocshArgBuf *args) -{ - XPSConfigAxis(args[0].ival, args[1].ival, args[2].sval, args[3].sval, args[4].ival); -} - - -/* void XPSEnableSetPosition(int setPos) */ -static const iocshArg XPSEnableSetPositionArg0 = {"Set Position Flag", iocshArgInt}; -static const iocshArg * const XPSEnableSetPositionArgs[1] = {&XPSEnableSetPositionArg0}; -static const iocshFuncDef xpsEnableSetPosition = {"XPSEnableSetPosition", 1, XPSEnableSetPositionArgs}; -static void xpsEnableSetPositionCallFunc(const iocshArgBuf *args) -{ - XPSEnableSetPosition(args[0].ival); -} - -/* void XPSSetPosSleepTime(int posSleep) */ -static const iocshArg XPSSetPosSleepTimeArg0 = {"Set Position Sleep Time", iocshArgInt}; -static const iocshArg * const XPSSetPosSleepTimeArgs[1] = {&XPSSetPosSleepTimeArg0}; -static const iocshFuncDef xpsSetPosSleepTime = {"XPSSetPosSleepTime", 1, XPSSetPosSleepTimeArgs}; -static void xpsSetPosSleepTimeCallFunc(const iocshArgBuf *args) -{ - XPSSetPosSleepTime(args[0].ival); -} - -/* void XPSDisablePoll(int posSleep) */ -static const iocshArg XPSDisablePollArg0 = {"Set disablePoll value", iocshArgInt}; -static const iocshArg * const XPSDisablePollArgs[1] = {&XPSDisablePollArg0}; -static const iocshFuncDef xpsDisablePoll = {"XPSDisablePoll", 1, XPSDisablePollArgs}; -static void xpsDisablePollCallFunc(const iocshArgBuf *args) -{ - XPSDisablePoll(args[0].ival); -} - -/* void XPSEnableMoveToHome(int card, const char * positionerName, int distance) */ -static const iocshArg XPSEnableMoveToHomeArg0 = {"Card number", iocshArgInt}; -static const iocshArg XPSEnableMoveToHomeArg1 = {"Axis name", iocshArgString}; -static const iocshArg XPSEnableMoveToHomeArg2 = {"Distance", iocshArgInt}; -static const iocshArg * const XPSEnableMoveToHomeArgs[3] = {&XPSEnableMoveToHomeArg0, - &XPSEnableMoveToHomeArg1, - &XPSEnableMoveToHomeArg2}; -static const iocshFuncDef xpsEnableMoveToHome = {"XPSEnableMoveToHome", 3, XPSEnableMoveToHomeArgs}; -static void xpsEnableMoveToHomeCallFunc(const iocshArgBuf *args) -{ - XPSEnableMoveToHome(args[0].ival, args[1].sval, args[2].ival); -} - -static void XPSRegister(void) -{ - - iocshRegister(&setupXPS, setupXPSCallFunc); - iocshRegister(&configXPS, configXPSCallFunc); - iocshRegister(&configXPSAxis, configXPSAxisCallFunc); - iocshRegister(&xpsEnableSetPosition, xpsEnableSetPositionCallFunc); - iocshRegister(&xpsSetPosSleepTime, xpsSetPosSleepTimeCallFunc); - iocshRegister(&xpsDisablePoll, xpsDisablePollCallFunc); - iocshRegister(&TCLRun, TCLRunCallFunc); - iocshRegister(&XPSC8GatheringTest, XPSC8GatheringTestCallFunc); - iocshRegister(&xpsEnableMoveToHome, xpsEnableMoveToHomeCallFunc); -} - -epicsExportRegistrar(XPSRegister); - diff --git a/motorApp/NewportSrc/drvXPSAsyn.h b/motorApp/NewportSrc/drvXPSAsyn.h deleted file mode 100644 index adb9f2ac..00000000 --- a/motorApp/NewportSrc/drvXPSAsyn.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef DRV_MOTOR_XPS_ASYN_H -#define DRV_MOTOR_XPS_ASYN_H - -#ifdef __cplusplus -extern "C" { -#endif - -int XPSSetup(int numControllers); /* number of XPS controllers in system. */ - -int XPSConfig(int card, /* Controller number */ - const char *ip, /* XPS IP address or IP name */ - int port, /* IP port number that XPS is listening on */ - int numAxes, /* Number of axes this controller supports */ - int movingPollPeriod, /* Time to poll (msec) when an axis is in motion */ - int idlePollPeriod); /* Time to poll (msec) when an axis is idle. 0 for no polling */ - -int XPSConfigAxis(int card, /* specify which controller 0-up*/ - int axis, /* axis number 0-7 */ - const char *positionerName, /* groupName.positionerName e.g. Diffractometer.Phi */ - const char *stepsPerUnit, /* steps per user unit */ - int noDisabledError); /* If 1 then don't report disabled state as error */ - -void XPSDisablePoll(int disablePollVal); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/motorApp/NewportSrc/drvXPSAsynAux.c b/motorApp/NewportSrc/drvXPSAsynAux.c deleted file mode 100644 index ab5671b3..00000000 --- a/motorApp/NewportSrc/drvXPSAsynAux.c +++ /dev/null @@ -1,703 +0,0 @@ -/* drvXPSAsynAux.c */ - -/* This driver implements "auxilliary" commands for the XPS controller, i.e. - * commands beyond those for the motor record. These include support for - * analog and digital I/O. */ - -#include -#include -#include -#include -#include - -#include /* !! for callocMustSucceed() */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -typedef struct { - char *portName; - int socketID; - epicsMutexId lock; - epicsEventId pollerEventId; - double pollerTimeout; - asynInterface common; - asynInterface float64; - void *float64InterruptPvt; - asynInterface uint32D; - void *uint32DInterruptPvt; - asynInterface drvUser; - asynUser *pasynUser; - int shuttingDown; -} drvXPSAsynAuxPvt; - -typedef enum { - analogInput, - analogOutput, - analogGain, - binaryInput, - binaryOutput -} drvXPSAsynAuxCommand; - -typedef struct { - drvXPSAsynAuxCommand command; - char *commandString; -} drvXPSAsynAuxCommandStruct; - -static drvXPSAsynAuxCommandStruct drvXPSAsynAuxCommands[] = { - {analogInput, "ANALOG_INPUT"}, - {analogOutput, "ANALOG_OUTPUT"}, - {analogGain, "ANALOG_GAIN"}, - {binaryInput, "BINARY_INPUT"}, - {binaryOutput, "BINARY_OUTPUT"} -}; - -#define TCP_TIMEOUT 1.0 - -#define MAX_ANALOG_INPUTS 4 -#define MAX_ANALOG_OUTPUTS 4 -#define MAX_DIGITAL_INPUTS 4 -#define MAX_DIGITAL_OUTPUTS 3 - -static char *analogInputNames[MAX_ANALOG_INPUTS] = { - "GPIO2.ADC1", /* Analog Input # 1 of the I/O board connector # 2 */ - "GPIO2.ADC2", /* Analog Input # 2 of the I/O board connector # 2 */ - "GPIO2.ADC3", /* Analog Input # 3 of the I/O board connector # 2 */ - "GPIO2.ADC4", /* Analog Input # 4 of the I/O board connector # 2 */ -}; -static char *analogOutputNames[MAX_ANALOG_OUTPUTS] = { - "GPIO2.DAC1", /* Analog Output # 1 of the I/O board connector # 2 */ - "GPIO2.DAC2", /* Analog Output # 2 of the I/O board connector # 2 */ - "GPIO2.DAC3", /* Analog Output # 3 of the I/O board connector # 2 */ - "GPIO2.DAC4", /* Analog Output # 4 of the I/O board connector # 2 */ -}; -static char *digitalInputNames[MAX_DIGITAL_INPUTS] = { - "GPIO1.DI", /* Digital Input of the I/O board connector # 1 (8 bits) */ - "GPIO2.DI", /* Digital Input of the I/O board connector # 2 (6 bits) */ - "GPIO3.DI", /* Digital Input of the I/O board connector # 3 (6 bits) */ - "GPIO4.DI", /* Digital Input of the I/O board connector # 4 (16 bits) */ -}; -static char *digitalOutputNames[MAX_DIGITAL_OUTPUTS] = { - "GPIO1.DO", /* Digital Output of the I/O board connector # 1 (8 bits) */ - "GPIO3.DO", /* Digital Output of the I/O board connector # 3 (6 bits) */ - "GPIO4.DO", /* Digital Output of the I/O board connector # 4 (16 bits) */ -}; - -/* These functions are used by the interfaces */ -static asynStatus readFloat64 (void *drvPvt, asynUser *pasynUser, - epicsFloat64 *value); -static asynStatus writeFloat64 (void *drvPvt, asynUser *pasynUser, - epicsFloat64 value); -static asynStatus readUInt32D (void *drvPvt, asynUser *pasynUser, - epicsUInt32 *value, epicsUInt32 mask); -static asynStatus writeUInt32D (void *drvPvt, asynUser *pasynUser, - epicsUInt32 value, epicsUInt32 mask); -static asynStatus drvUserCreate (void *drvPvt, asynUser *pasynUser, - const char *drvInfo, - const char **pptypeName, size_t *psize); -static asynStatus drvUserGetType (void *drvPvt, asynUser *pasynUser, - const char **pptypeName, size_t *psize); -static asynStatus drvUserDestroy (void *drvPvt, asynUser *pasynUser); - -static void report (void *drvPvt, FILE *fp, int details); -static asynStatus connect (void *drvPvt, asynUser *pasynUser); -static asynStatus disconnect (void *drvPvt, asynUser *pasynUser); - - -static asynCommon drvXPSAsynAuxCommon = { - report, - connect, - disconnect -}; - -static asynFloat64 drvXPSAsynAuxFloat64 = { - writeFloat64, - readFloat64 -}; - -static asynUInt32Digital drvXPSAsynAuxUInt32D = { - writeUInt32D, - readUInt32D, - NULL, - NULL, - NULL, - NULL, - NULL -}; - -static asynDrvUser drvXPSAsynAuxDrvUser = { - drvUserCreate, - drvUserGetType, - drvUserDestroy -}; - -static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt); - -static void shutdownCallback(drvXPSAsynAuxPvt *pPvt); - - -int XPSAuxConfig(const char *portName, /* asyn port name */ - const char *ip, /* XPS IP address or IP name */ - int port, /* IP port number that XPS is listening on */ - int pollPeriod) /* Time to poll (msec) analog and digital inputs */ - -{ - drvXPSAsynAuxPvt *pPvt; - asynStatus status; - epicsThreadId threadId; - - pPvt = callocMustSucceed(1, sizeof(*pPvt), "XPSAuxConfig"); - pPvt->portName = epicsStrDup(portName); - pPvt->lock = epicsMutexCreate(); - pPvt->pollerEventId = epicsEventCreate(epicsEventEmpty); - - pPvt->socketID = TCP_ConnectToServer((char *)ip, port, TCP_TIMEOUT); - if (pPvt->socketID < 0) { - printf("drvXPSAsynAuxConfig: error calling TCP_ConnectToServer\n"); - return -1; - } - pPvt->pollerTimeout = pollPeriod/1000.; - - /* Register a shutdown callback */ - epicsAtExit((void *)shutdownCallback, pPvt); - - /* Link with higher level routines */ - pPvt->common.interfaceType = asynCommonType; - pPvt->common.pinterface = (void *)&drvXPSAsynAuxCommon; - pPvt->common.drvPvt = pPvt; - pPvt->float64.interfaceType = asynFloat64Type; - pPvt->float64.pinterface = (void *)&drvXPSAsynAuxFloat64; - pPvt->float64.drvPvt = pPvt; - pPvt->uint32D.interfaceType = asynUInt32DigitalType; - pPvt->uint32D.pinterface = (void *)&drvXPSAsynAuxUInt32D; - pPvt->uint32D.drvPvt = pPvt; - pPvt->drvUser.interfaceType = asynDrvUserType; - pPvt->drvUser.pinterface = (void *)&drvXPSAsynAuxDrvUser; - pPvt->drvUser.drvPvt = pPvt; - status = pasynManager->registerPort(portName, - ASYN_MULTIDEVICE, /*is multiDevice*/ - 1, /* autoconnect */ - 0, /* medium priority */ - 0); /* default stack size */ - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register port\n"); - return -1; - } - status = pasynManager->registerInterface(portName,&pPvt->common); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register common.\n"); - return -1; - } - status = pasynFloat64Base->initialize(pPvt->portName,&pPvt->float64); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register float64\n"); - return -1; - } - status = pasynManager->registerInterruptSource(pPvt->portName, &pPvt->float64, - &pPvt->float64InterruptPvt); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register float64 interrupts\n"); - return -1; - } - - status = pasynUInt32DigitalBase->initialize(pPvt->portName,&pPvt->uint32D); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register uint32D\n"); - return -1; - } - status = pasynManager->registerInterruptSource(pPvt->portName, &pPvt->uint32D, - &pPvt->uint32DInterruptPvt); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register uint32D interrupts\n"); - return -1; - } - - status = pasynManager->registerInterface(portName,&pPvt->drvUser); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig ERROR: Can't register drvUser.\n"); - return -1; - } - - /* Create asynUser for debugging */ - pPvt->pasynUser = pasynManager->createAsynUser(0, 0); - - /* Connect to device */ - status = pasynManager->connectDevice(pPvt->pasynUser, portName, -1); - if (status != asynSuccess) { - errlogPrintf("XPSAuxConfig, connectDevice failed\n"); - return -1; - } - threadId = epicsThreadCreate("XPSAuxPoller", epicsThreadPriorityMedium, - epicsThreadGetStackSize(epicsThreadStackMedium), - (EPICSTHREADFUNC)XPSAuxPoller, - pPvt); - if (threadId == NULL) { - errlogPrintf("XPSAuxConfig, epicsThreadCreate failed\n"); - return(-1); - } - - return 0; -} - -static asynStatus readFloat64(void *drvPvt, asynUser *pasynUser, - epicsFloat64 *value) -{ - drvXPSAsynAuxPvt *pPvt = (drvXPSAsynAuxPvt *)drvPvt; - int channel; - drvXPSAsynAuxCommand command = pasynUser->reason; - char *GPIOName; - int status; - - if (pPvt->shuttingDown) return asynError; - - pasynManager->getAddr(pasynUser, &channel); - - switch(command) { - case analogInput: - if ((channel < 0) || (channel >= MAX_ANALOG_INPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readFloat64 channel out of range=%d", - channel); - return(asynError); - } - GPIOName = analogInputNames[channel]; - break; - case analogOutput: - if ((channel < 0) || (channel >= MAX_ANALOG_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readFloat64 channel out of range=%d", - channel); - return(asynError); - } - GPIOName = analogOutputNames[channel]; - break; - default: - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readFloat64 invalid command=%d", - command); - return(asynError); - } - status = GPIOAnalogGet(pPvt->socketID, 1, GPIOName, value); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readFloat64 error calling GPIOAnalogGet=%d", - status); - return(asynError); - } - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "drvXPSAsynAux::readFloat64, value=%f\n", *value); - return(asynSuccess); -} - - -static asynStatus writeFloat64(void *drvPvt, asynUser *pasynUser, - epicsFloat64 value) -{ - drvXPSAsynAuxPvt *pPvt = (drvXPSAsynAuxPvt *)drvPvt; - int channel; - drvXPSAsynAuxCommand command = pasynUser->reason; - char *GPIOName; - int status; - - if (pPvt->shuttingDown) return asynError; - - pasynManager->getAddr(pasynUser, &channel); - - switch(command) { - case analogOutput: - if ((channel < 0) || (channel >= MAX_ANALOG_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeFloat64 channel out of range=%d", - channel); - return(asynError); - } - GPIOName = analogOutputNames[channel]; - break; - default: - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeFloat64 invalid command=%d", - command); - return(asynError); - } - status = GPIOAnalogSet(pPvt->socketID, 1, GPIOName, &value); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeFloat64 error calling GPIOAnalogSet=%d", - status); - return(asynError); - } - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "drvXPSAsynAux::writeFloat64, value=%f\n", value); - return(asynSuccess); -} - -static asynStatus readUInt32D(void *drvPvt, asynUser *pasynUser, - epicsUInt32 *value, epicsUInt32 mask) -{ - drvXPSAsynAuxPvt *pPvt = (drvXPSAsynAuxPvt *)drvPvt; - int channel; - drvXPSAsynAuxCommand command = pasynUser->reason; - int status; - unsigned short rawValue; - - if (pPvt->shuttingDown) return asynError; - - pasynManager->getAddr(pasynUser, &channel); - - switch(command) { - case binaryInput: - if ((channel < 0) || (channel >= MAX_DIGITAL_INPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D readBi channel out of range=%d", - channel); - return(asynError); - } - status = GPIODigitalGet(pPvt->socketID, digitalInputNames[channel], &rawValue); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D error calling GPIODigitalGet=%d", - status); - return(asynError); - } - *value = rawValue & mask; - break; - case binaryOutput: - if ((channel < 0) || (channel >= MAX_DIGITAL_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D readBo channel out of range=%d", - channel); - return(asynError); - } - status = GPIODigitalGet(pPvt->socketID, digitalOutputNames[channel], &rawValue); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D error calling GPIODigitalGet=%d", - status); - return(asynError); - } - *value = rawValue & mask; - break; - case analogGain: - if ((channel < 0) || (channel >= MAX_ANALOG_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D channel out of range=%d", - channel); - return(asynError); - } - status = GPIOAnalogGainGet(pPvt->socketID, 1, analogInputNames[channel], (int*)value); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D error calling GPIOAnalogGainSet=%d", - status); - return(asynError); - } - break; - default: - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::readUInt32D invalid command=%d", - command); - return(asynError); - } - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "drvXPSAsynAux::readUInt32D, value=%x\n", *value); - return(asynSuccess); -} - -static asynStatus writeUInt32D(void *drvPvt, asynUser *pasynUser, - epicsUInt32 value, epicsUInt32 mask) -{ - drvXPSAsynAuxPvt *pPvt = (drvXPSAsynAuxPvt *)drvPvt; - int channel; - drvXPSAsynAuxCommand command = pasynUser->reason; - char *GPIOName; - int status; - - if (pPvt->shuttingDown) return asynError; - - pasynManager->getAddr(pasynUser, &channel); - - switch(command) { - case binaryOutput: - if ((channel < 0) || (channel >= MAX_DIGITAL_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D channel out of range=%d", - channel); - return(asynError); - } - GPIOName = digitalOutputNames[channel]; - status = GPIODigitalSet(pPvt->socketID, GPIOName, mask, value); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D error calling GPIODigitalSet=%d", - status); - return(asynError); - } - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "drvXPSAsynAux::writeUInt32D, set binary output value=%d\n", value); - break; - case analogGain: - if ((channel < 0) || (channel >= MAX_ANALOG_OUTPUTS)) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D channel out of range=%d", - channel); - return(asynError); - } - GPIOName = analogInputNames[channel]; - status = GPIOAnalogGainSet(pPvt->socketID, 1, GPIOName, (int*)&value); - if (status) { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D error calling GPIOAnalogGainSet=%d", - status); - return(asynError); - } - asynPrint(pasynUser, ASYN_TRACEIO_DRIVER, - "drvXPSAsynAux::writeUInt32D, set gain value=%d\n", value); - break; - default: - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::writeUInt32D invalid command=%d", - command); - return(asynError); - } - return(asynSuccess); -} - -static void shutdownCallback(drvXPSAsynAuxPvt *pPvt) -{ - epicsMutexMustLock(pPvt->lock); - pPvt->shuttingDown = 1; - epicsMutexUnlock(pPvt->lock); -} - -static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt) -{ - char analogNames[100] = ""; - double analogValues[MAX_ANALOG_INPUTS]; - unsigned short digitalValues[MAX_DIGITAL_INPUTS]; - unsigned short digitalValuesPrev[MAX_DIGITAL_INPUTS]; - ELLLIST *pclientList; - interruptNode *pnode; - asynUInt32DigitalInterrupt *pUInt32DigitalInterrupt; - asynFloat64Interrupt *pfloat64Interrupt; - int firstTime = 1; - int i; - int status; - asynUser *pasynUser; - int addr, reason, mask, changedBits; - - /* Build strings with the names of the analog and digital inputs */ - for (i=0; ipollerEventId, pPvt->pollerTimeout); - epicsMutexMustLock(pPvt->lock); - if (pPvt->shuttingDown) break; - status = GPIOAnalogGet(pPvt->socketID, MAX_ANALOG_INPUTS, analogNames, analogValues); - if (status) { - asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR, - "drvXPSAsynAux::XPSAuxPoller error calling GPIOAnalogGet=%d\n", status); - } - for (i=0; isocketID, digitalInputNames[i], &digitalValues[i]); - if (status) { - asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR, - "drvXPSAsynAux::XPSAuxPoller error calling GPIODigitalGet=%d\n", status); - } - } - - /* Call back any clients who have registered for callbacks on changed digital bits */ - pasynManager->interruptStart(pPvt->uint32DInterruptPvt, &pclientList); - pnode = (interruptNode *)ellFirst(pclientList); - while (pnode) { - pUInt32DigitalInterrupt = pnode->drvPvt; - pasynUser = pUInt32DigitalInterrupt->pasynUser; - pasynManager->getAddr(pasynUser, &addr); - reason = pasynUser->reason; - mask = pUInt32DigitalInterrupt->mask; - changedBits = digitalValues[addr] ^ digitalValuesPrev[addr]; - if (firstTime) changedBits = 0xffff; - if ((mask & changedBits) && (reason == binaryInput)) { - pUInt32DigitalInterrupt->callback(pUInt32DigitalInterrupt->userPvt, pasynUser, - mask & digitalValues[addr]); - } - pnode = (interruptNode *)ellNext(&pnode->node); - } - pasynManager->interruptEnd(pPvt->uint32DInterruptPvt); - for (i=0; iinterruptStart(pPvt->float64InterruptPvt, &pclientList); - pnode = (interruptNode *)ellFirst(pclientList); - while (pnode) { - pfloat64Interrupt = pnode->drvPvt; - addr = pfloat64Interrupt->addr; - reason = pfloat64Interrupt->pasynUser->reason; - if (reason == analogInput) { - pfloat64Interrupt->callback(pfloat64Interrupt->userPvt, - pfloat64Interrupt->pasynUser, - analogValues[addr]); - } - pnode = (interruptNode *)ellNext(&pnode->node); - } - pasynManager->interruptEnd(pPvt->float64InterruptPvt); - epicsMutexUnlock(pPvt->lock); - firstTime = 0; - } -} - - -/* asynDrvUser routines */ -static asynStatus drvUserCreate(void *drvPvt, asynUser *pasynUser, - const char *drvInfo, - const char **pptypeName, size_t *psize) -{ - int i; - char *pstring; - int ncommands = sizeof(drvXPSAsynAuxCommands)/sizeof(drvXPSAsynAuxCommands[0]); - - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "drvXPSAsynAux::drvUserCreate, drvInfo=%s, pptypeName=%p, psize=%p, pasynUser=%p\n", - drvInfo, pptypeName, psize, pasynUser); - - for (i=0; i < ncommands; i++) { - pstring = drvXPSAsynAuxCommands[i].commandString; - if (epicsStrCaseCmp(drvInfo, pstring) == 0) { - break; - } - } - if (i < ncommands) { - pasynUser->reason = drvXPSAsynAuxCommands[i].command; - if (pptypeName) { - *pptypeName = epicsStrDup(pstring); - } - if (psize) { - *psize = sizeof(drvXPSAsynAuxCommands[i].command); - } - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "drvXPSAsynAux::drvUserCreate, command=%d string=%s\n", - pasynUser->reason, pstring); - return(asynSuccess); - } else { - epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize, - "drvXPSAsynAux::drvUserCreate, unknown command=%s", drvInfo); - return(asynError); - } -} - -static asynStatus drvUserGetType(void *drvPvt, asynUser *pasynUser, - const char **pptypeName, size_t *psize) -{ - drvXPSAsynAuxCommand command = pasynUser->reason; - - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "drvXPSAsynAux::drvUserGetType entered"); - - *pptypeName = NULL; - *psize = 0; - if (pptypeName) - *pptypeName = epicsStrDup(drvXPSAsynAuxCommands[command].commandString); - if (psize) *psize = sizeof(command); - return(asynSuccess); -} - -static asynStatus drvUserDestroy(void *drvPvt, asynUser *pasynUser) -{ - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "drvXPSAsynAux::drvUserDestroy, drvPvt=%p, pasynUser=%p\n", - drvPvt, pasynUser); - - return(asynSuccess); -} - -/* asynCommon routines */ - -/* Report parameters */ -static void report(void *drvPvt, FILE *fp, int details) -{ - drvXPSAsynAuxPvt *pPvt = (drvXPSAsynAuxPvt *)drvPvt; - interruptNode *pnode; - ELLLIST *pclientList; - - fprintf(fp, "Port: %s\n", pPvt->portName); - if (details >= 1) { - /* Report uint32D interrupts */ - pasynManager->interruptStart(pPvt->uint32DInterruptPvt, &pclientList); - pnode = (interruptNode *)ellFirst(pclientList); - while (pnode) { - asynUInt32DigitalInterrupt *puint32DInterrupt = pnode->drvPvt; - fprintf(fp, " int32 callback client address=%p, addr=%d, reason=%d\n", - puint32DInterrupt->callback, puint32DInterrupt->addr, - puint32DInterrupt->pasynUser->reason); - pnode = (interruptNode *)ellNext(&pnode->node); - } - pasynManager->interruptEnd(pPvt->uint32DInterruptPvt); - - /* Report float64 interrupts */ - pasynManager->interruptStart(pPvt->float64InterruptPvt, &pclientList); - pnode = (interruptNode *)ellFirst(pclientList); - while (pnode) { - asynFloat64Interrupt *pfloat64Interrupt = pnode->drvPvt; - fprintf(fp, " float64 callback client address=%p, addr=%d, reason=%d\n", - pfloat64Interrupt->callback, pfloat64Interrupt->addr, - pfloat64Interrupt->pasynUser->reason); - pnode = (interruptNode *)ellNext(&pnode->node); - } - pasynManager->interruptEnd(pPvt->float64InterruptPvt); - } -} - -/* Connect */ -static asynStatus connect(void *drvPvt, asynUser *pasynUser) -{ - pasynManager->exceptionConnect(pasynUser); - - asynPrint(pasynUser, ASYN_TRACE_FLOW, - "drvXPSAsynAux::connect, pasynUser=%p\n", pasynUser); - return(asynSuccess); -} - -/* Disconnect */ -static asynStatus disconnect(void *drvPvt, asynUser *pasynUser) -{ - pasynManager->exceptionDisconnect(pasynUser); - return(asynSuccess); -} - -static const iocshArg configArg0 = { "portName",iocshArgString}; -static const iocshArg configArg1 = { "IP address",iocshArgString}; -static const iocshArg configArg2 = { "IP port",iocshArgInt}; -static const iocshArg configArg3 = { "polling period",iocshArgInt}; -static const iocshArg * const configArgs[4] = {&configArg0, - &configArg1, - &configArg2, - &configArg3}; -static const iocshFuncDef configFuncDef = {"XPSAuxConfig",4,configArgs}; -static void configCallFunc(const iocshArgBuf *args) -{ - XPSAuxConfig(args[0].sval, args[1].sval, args[2].ival, args[3].ival); -} - -void drvXPSAsynAuxRegister(void) -{ - iocshRegister(&configFuncDef,configCallFunc); -} - -epicsExportRegistrar(drvXPSAsynAuxRegister); diff --git a/motorApp/NewportSrc/hxp_drivers.cpp b/motorApp/NewportSrc/hxp_drivers.cpp deleted file mode 100644 index 0ca5211c..00000000 --- a/motorApp/NewportSrc/hxp_drivers.cpp +++ /dev/null @@ -1,6899 +0,0 @@ -/* - * Created source file hxp_drivers.cpp for API description - */ - - -#include -#include -#include -#include -#include "Socket.h" - -#define epicsExportSharedSymbols -#include -#include "XPS_C8_drivers.h" -#ifdef _WIN32 -#include "strtok_r.h" -#endif - -#define SIZE_SMALL 1024 -#define SIZE_NOMINAL 1024 -#define SIZE_BIG 2048 -#define SIZE_HUGE 65536 - -#define SIZE_EXECUTE_METHOD 1024 - -#define SIZE_NAME 100 -#ifdef __cplusplus -extern "C" -{ -#else -#typedef int bool; /* C does not know bool, only C++ */ -#endif - - -#define DLL_VERSION "Library version for HXP Firmware V1.3.x" - -/************************************************************************* -* Replace 'oldChar' by 'newChar' only between the startChar and endChar -*************************************************************************/ -void ReplaceCharacter (char *strSourceInOut, char oldChar, char newChar, char startChar, char endChar) -{ - char *pt; - char *ptNext; - ptNext = strSourceInOut; - do - { - pt = strchr(ptNext, startChar); - if (pt != NULL) - { - *pt++; - while ((pt != NULL) && (*pt != endChar)) - { - if (*pt == oldChar) - *pt = newChar; - pt++; - } - ptNext = pt++; - } - } - while ((pt != NULL) && (ptNext != NULL)); -} - -/************************************************************************* -* Delete space and tabulation characters between 'startChar' and 'endChar' -*************************************************************************/ -void CleanString (char *strSourceInOut, char startChar, char endChar) -{ - int len = 0; - int startIndex = 0; - int endIndex = 0; - int outputIndex = 0; - char outputString[SIZE_NOMINAL]; - len = strlen(strSourceInOut); - do - { - while ((strSourceInOut[startIndex] != startChar) && (startIndex < len) && (outputIndex < SIZE_NOMINAL)) - { - outputString[outputIndex] = strSourceInOut[startIndex]; - outputIndex++; - startIndex++; - } - while ((strSourceInOut[endIndex] != endChar) && (endIndex < len)) - endIndex++; - if ((startIndex != endIndex) && (startIndex < len)) - { - for (int i = startIndex; (i <= endIndex) && (outputIndex < SIZE_NOMINAL); i++) - { - if ((strSourceInOut[i] != ' ') && (strSourceInOut[i] != '\t')) - { - outputString[outputIndex] = strSourceInOut[i]; - outputIndex++; - } - } - endIndex++; - startIndex = endIndex; - } - } - while (startIndex < len); - outputString[outputIndex] = '\0'; - strcpy (strSourceInOut, outputString); -} - -/************************************************************************* -* Delete a specified characters -*************************************************************************/ -void DeleteCharacters (char *strSourceInOut, char *charactersToDelete) -{ - int len = 0; - int nbChar = 0; - int outputIndex = 0; - bool bCopy; - char outputString[SIZE_NOMINAL]; - len = strlen(strSourceInOut); - nbChar = strlen(charactersToDelete); - for (int i = 0; (i <= len) && (outputIndex < SIZE_NOMINAL); i++) - { - bCopy = true; - for (int j = 0; (j < nbChar) && (bCopy == true); j++) - { - if (strSourceInOut[i] == charactersToDelete[j]) - bCopy = false; - } - if (bCopy) - { - outputString[outputIndex] = strSourceInOut[i]; - outputIndex++; - } - } - outputString[outputIndex] = '\0'; - strcpy (strSourceInOut, outputString); -} - -/***********************************************************************/ -int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut) -{ - return (ConnectToServer(Ip_Address, Ip_Port, TimeOut)); -} -/***********************************************************************/ -void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout) -{ - SetTCPTimeout(SocketIndex, Timeout); -} -/***********************************************************************/ -void __stdcall HXPTCP_CloseSocket(int SocketIndex) -{ - CloseSocket(SocketIndex); -} -/***********************************************************************/ -char * __stdcall HXPTCP_GetError(int SocketIndex) -{ - return (GetError(SocketIndex)); -} -/***********************************************************************/ -char * __stdcall HXPGetLibraryVersion(void) -{ - return (DLL_VERSION); -} - -/*********************************************************************** - * ControllerMotionKernelTimeLoadGet : Get controller motion kernel time load - * - * - Parameters : - * int SocketIndex - * double *CPUTotalLoadRatio - * double *CPUCorrectorLoadRatio - * double *CPUProfilerLoadRatio - * double *CPUServitudesLoadRatio - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelTimeLoadGet (double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTotalLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUCorrectorLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUProfilerLoadRatio); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUServitudesLoadRatio); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ElapsedTimeGet : Return elapsed time from controller power on - * - * - Parameters : - * int SocketIndex - * double *ElapsedTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ElapsedTimeGet (double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", ElapsedTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorStringGet : Return the error string corresponding to the error code - * - * - Parameters : - * int SocketIndex - * int ErrorCode - * char *ErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorStringGet (%d,char *)", ErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorString, pt); - ptNext = strchr (ErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * FirmwareVersionGet : Return firmware version - * - * - Parameters : - * int SocketIndex - * char *Version - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "FirmwareVersionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Version, pt); - ptNext = strchr (Version, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecute : Execute a TCL script from a TCL file - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *ParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecute (%s,%s,%s)", TCLFileName, TaskName, ParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptExecuteAndWait : Execute a TCL script from a TCL file and wait the end of execution to return - * - * - Parameters : - * int SocketIndex - * char *TCLFileName - * char *TaskName - * char *InputParametersList - * char *OutputParametersList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptExecuteAndWait (%s,%s,%s,char *)", TCLFileName, TaskName, InputParametersList); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (OutputParametersList, pt); - ptNext = strchr (OutputParametersList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TCLScriptKill : Kill TCL Task - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTCLScriptKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TCLScriptKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerGet : Get a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int *FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerGet (%s,int *)", TimerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", FrequencyTicks); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TimerSet : Set a timer - * - * - Parameters : - * int SocketIndex - * char *TimerName - * int FrequencyTicks - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TimerSet (%s,%d)", TimerName, FrequencyTicks); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Reboot : Reboot the controller - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReboot (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Reboot ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * Login : Log in - * - * - Parameters : - * int SocketIndex - * char *Name - * char *Password - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "Login (%s,%s)", Name, Password); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CloseAllOtherSockets : Close all socket beside the one used to send this command - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCloseAllOtherSockets (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CloseAllOtherSockets ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventAdd : ** OBSOLETE ** Add an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * char *ActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventAdd (%s,%s,%s,%s,%s,%s,%s)", PositionerName, EventName, EventParameter, ActionName, ActionParameter1, ActionParameter2, ActionParameter3); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventGet : ** OBSOLETE ** Read events and actions list - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventsAndActionsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventsAndActionsList, pt); - ptNext = strchr (EventsAndActionsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventRemove : ** OBSOLETE ** Delete an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventRemove (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventWait : ** OBSOLETE ** Wait an event - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *EventName - * char *EventParameter - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventWait (%s,%s,%s)", PositionerName, EventName, EventParameter); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerSet : Configure one or several events - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedEventName - * char *EventParameter1 - * char *EventParameter2 - * char *EventParameter3 - * char *EventParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedEventNameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray1[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray2[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray3[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, EventParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray4[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationTriggerGet : Read the event configuration - * - * - Parameters : - * int SocketIndex - * char *EventTriggerConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationTriggerGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionSet : Configure one or several actions - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *ExtendedActionName - * char *ActionParameter1 - * char *ActionParameter2 - * char *ActionParameter3 - * char *ActionParameter4 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ExtendedActionNameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray1)[SIZE_NAME]; - stringArray1 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter1List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray1[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray1[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray1[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray1[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray2)[SIZE_NAME]; - stringArray2 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter2List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray2[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray2[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray2[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray2[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray3)[SIZE_NAME]; - stringArray3 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter3List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray3[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray3[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray3[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray3[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - char (*stringArray4)[SIZE_NAME]; - stringArray4 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, ActionParameter4List, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray4[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray4[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray4[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray4[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%s,%s,%s,%s", stringArray0[i], stringArray1[i], stringArray2[i], stringArray3[i], stringArray4[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - delete [] stringArray1; - delete [] stringArray2; - delete [] stringArray3; - delete [] stringArray4; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedConfigurationActionGet : Read the action configuration - * - * - Parameters : - * int SocketIndex - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedConfigurationActionGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedStart : Launch the last event and action configuration and return an ID - * - * - Parameters : - * int SocketIndex - * int *ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedStart (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ID); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedAllGet : Read all event and action configurations - * - * - Parameters : - * int SocketIndex - * char *EventActionConfigurations - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedAllGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventActionConfigurations, pt); - ptNext = strchr (EventActionConfigurations, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedGet : Read the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * char *EventTriggerConfiguration - * char *ActionConfiguration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedGet (%d,char *,char *)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventTriggerConfiguration, pt); - ptNext = strchr (EventTriggerConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionConfiguration, pt); - ptNext = strchr (ActionConfiguration, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedRemove : Remove the event and action configuration defined by ID - * - * - Parameters : - * int SocketIndex - * int ID - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedRemove (%d)", ID); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventExtendedWait : Wait events from the last event configuration - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventExtendedWait (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventExtendedWait ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataAcquire : Acquire a configured data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringDataAcquire (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataAcquire ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringDataGet : Get a data line from gathering buffer - * - * - Parameters : - * int SocketIndex - * int IndexPoint - * char *DataBufferLine - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringDataGet (%d,char *)", IndexPoint); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DataBufferLine, pt); - ptNext = strchr (DataBufferLine, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringReset : Empty the gathered data in memory to start new gathering from scratch - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringRun : Start a new gathering - * - * - Parameters : - * int SocketIndex - * int DataNumber - * int Divisor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringRun (%d,%d)", DataNumber, Divisor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringStop : Stop the data gathering (without saving to file) - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringStop (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringStop ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationSet : Configuration acquisition - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, TypeList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalConfigurationGet : Read different mnemonique type - * - * - Parameters : - * int SocketIndex - * char *Type - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalConfigurationGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Type, pt); - ptNext = strchr (Type, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalCurrentNumberGet : Maximum number of samples and current number during acquisition - * - * - Parameters : - * int SocketIndex - * int *CurrentNumber - * int *MaximumSamplesNumber - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalCurrentNumberGet (int *,int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", CurrentNumber); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", MaximumSamplesNumber); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalStopAndSave : Stop acquisition and save data - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalStopAndSave ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArrayGet : Get global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArrayGet (%d,char *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ValueString, pt); - ptNext = strchr (ValueString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GlobalArraySet : Set global array value - * - * - Parameters : - * int SocketIndex - * int Number - * char *ValueString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GlobalArraySet (%d,%s)", Number, ValueString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArrayGet : Get double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double *DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArrayGet (%d,double *)", Number); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DoubleValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * DoubleGlobalArraySet : Set double global array value - * - * - Parameters : - * int SocketIndex - * int Number - * double DoubleValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "DoubleGlobalArraySet (%d,%.13g)", Number, DoubleValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGet : Read analog input or analog output for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double *AnalogValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,double *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &AnalogValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogSet : Set analog output for one or few output - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * double AnalogOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%.13g", stringArray0[i], AnalogOutputValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainGet : Read analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int *AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainGet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,int *", stringArray0[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &AnalogInputGainValue[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIOAnalogGainSet : Set analog input gain (1, 2, 4 or 8) for one or few input - * - * - Parameters : - * int SocketIndex - * int nbElement - * char *GPIOName - * int AnalogInputGainValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Split list */ - char *token; - char seps[] = " \t;"; - int indice; - char list [SIZE_NOMINAL]; - char *list_r; - char subString[] = "{}"; - - char (*stringArray0)[SIZE_NAME]; - stringArray0 = new char [NbElements][SIZE_NAME]; - indice = 0; - strncpyWithEOS(list, GPIONameList, SIZE_NOMINAL, SIZE_NOMINAL); - ReplaceCharacter(list, ';', ':', '{', '}'); /* for argument {x1;x2} */ - CleanString(list, '{', '}'); - list_r = NULL; - token = strtok_r (list, seps, &list_r); - while ((NULL != token) && (indice < NbElements)) - { - memset(stringArray0[indice],'\0', SIZE_NAME); - strncpyWithEOS(stringArray0[indice], token, SIZE_NAME, SIZE_NAME); - ReplaceCharacter (stringArray0[indice], ':', ';', '{', '}'); - DeleteCharacters (stringArray0[indice], subString); - token = strtok_r (NULL, seps, &list_r); - indice++; - } - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIOAnalogGainSet ("); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%s,%d", stringArray0[i], AnalogInputGainValue[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Clear memory */ - delete [] stringArray0; - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalGet : Read digital output or digital input - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short *DigitalValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalGet (%s,unsigned short *)", GPIOName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%hu", DigitalValue); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GPIODigitalSet : Set Digital Output for one or few output TTL - * - * - Parameters : - * int SocketIndex - * char *GPIOName - * unsigned short Mask - * unsigned short DigitalOutputValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GPIODigitalSet (%s,%hu,%hu)", GPIOName, Mask, DigitalOutputValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupCorrectorOutputGet : Return corrector outputs - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CorrectorOutput - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupCorrectorOutputGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CorrectorOutput[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearch : Start home search sequence - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearch (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupHomeSearchAndRelativeMove : Start home search sequence and execute a displacement - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupHomeSearchAndRelativeMove (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitialize : Start the initialization - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitialize (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupInitializeWithEncoderCalibration : Start the initialization with encoder calibration - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupInitializeWithEncoderCalibration (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupKill : Kill the group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupKill (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupKill (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbort : Abort a move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbort (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveAbsolute : Do an absolute move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveAbsolute (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetPosition[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMoveRelative : Do a relative move - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double TargetDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMoveRelative (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "%.13g", TargetDisplacement[i]); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionDisable : Set Motion disable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionDisable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupMotionEnable : Set Motion enable on selected group - * - * - Parameters : - * int SocketIndex - * char *GroupName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupMotionEnable (%s)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCorrectedProfilerGet : Return corrected profiler positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * double PositionX - * double PositionY - * double *CorrectedProfilerPositionX - * double *CorrectedProfilerPositionY - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCorrectedProfilerGet (%s,%.13g,%.13g,double *,double *)", GroupName, PositionX, PositionY); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionX); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CorrectedProfilerPositionY); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionCurrentGet : Return current positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *CurrentEncoderPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionCurrentGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &CurrentEncoderPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionSetpointGet : Return setpoint positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *SetPointPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionSetpointGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &SetPointPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupPositionTargetGet : Return target positions - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int nbElement - * double *TargetPosition - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - char temp[SIZE_NOMINAL]; - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupPositionTargetGet (%s,", GroupName); - for (int i = 0; i < NbElements; i++) - { - sprintf (temp, "double *"); - strncat (ExecuteMethod, temp, SIZE_SMALL); - if ((i + 1) < NbElements) - { - strncat (ExecuteMethod, ",", SIZE_SMALL); - } - } - strcat (ExecuteMethod, ")"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - - for (int i = 0; i < NbElements; i++) - { - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", &TargetPosition[i]); - } - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusGet : Return group status - * - * - Parameters : - * int SocketIndex - * char *GroupName - * int *Status - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusGet (%s,int *)", GroupName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", Status); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusStringGet : Return the group status string corresponding to the group status code - * - * - Parameters : - * int SocketIndex - * int GroupStatusCode - * char *GroupStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusStringGet (%d,char *)", GroupStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusString, pt); - ptNext = strchr (GroupStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * KillAll : Put all groups in 'Not initialized' state - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPKillAll (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "KillAll ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * RestartApplication : Restart the Controller - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPRestartApplication (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "RestartApplication ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashGet : Read backlash value and status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *BacklashValue - * char *BacklaskStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashGet (%s,double *,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", BacklashValue); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (BacklaskStatus, pt); - ptNext = strchr (BacklaskStatus, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashSet : Set backlash value - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double BacklashValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%.13g)", PositionerName, BacklashValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashEnable : Enable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashEnable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerBacklashDisable : Disable the backlash - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerBacklashDisable (%s)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersSet : Update filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double NotchFrequency1 - * double NotchBandwith1 - * double NotchGain1 - * double NotchFrequency2 - * double NotchBandwith2 - * double NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorNotchFiltersGet : Read filters parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *NotchFrequency1 - * double *NotchBandwith1 - * double *NotchGain1 - * double *NotchFrequency2 - * double *NotchBandwith2 - * double *NotchGain2 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersGet (%s,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchFrequency2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchBandwith2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", NotchGain2); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFAccelerationGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocitySet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainVelocity - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDFFVelocityGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainVelocity - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocityGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double KD - * double KS - * double IntegrationTime - * double DerivativeFilterCutOffFrequency - * double GKP - * double GKI - * double GKD - * double KForm - * double FeedForwardGainVelocity - * double FeedForwardGainAcceleration - * double Friction - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIDDualFFVoltageGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *KD - * double *KS - * double *IntegrationTime - * double *DerivativeFilterCutOffFrequency - * double *GKP - * double *GKI - * double *GKD - * double *KForm - * double *FeedForwardGainVelocity - * double *FeedForwardGainAcceleration - * double *Friction - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageGet (%s,bool *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KS); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DerivativeFilterCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", GKD); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KForm); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", FeedForwardGainAcceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Friction); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionSet : Update corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool ClosedLoopStatus - * double KP - * double KI - * double IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%.13g,%.13g,%.13g)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorPIPositionGet : Read corrector parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * bool *ClosedLoopStatus - * double *KP - * double *KI - * double *IntegrationTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - int boolScanTmp; - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorPIPositionGet (%s,bool *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", &boolScanTmp); - *ClosedLoopStatus = (bool) boolScanTmp; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KP); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", KI); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", IntegrationTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCorrectorTypeGet : Read corrector type - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *CorrectorType - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCorrectorTypeGet (%s,char *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (CorrectorType, pt); - ptNext = strchr (CorrectorType, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersSet : Set current velocity and acceleration cut off frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double CurrentVelocityCutOffFrequency - * double CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersSet (%s,%.13g,%.13g)", PositionerName, CurrentVelocityCutOffFrequency, CurrentAccelerationCutOffFrequency); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerCurrentVelocityAccelerationFiltersGet : Get current velocity and acceleration cut off frequencies - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CurrentVelocityCutOffFrequency - * double *CurrentAccelerationCutOffFrequency - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerCurrentVelocityAccelerationFiltersGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentVelocityCutOffFrequency); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentAccelerationCutOffFrequency); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusGet : Read positioner driver status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *DriverStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", DriverStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusStringGet : Return the positioner driver status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerDriverStatus - * char *PositionerDriverStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusStringGet (%d,char *)", PositionerDriverStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusString, pt); - ptNext = strchr (PositionerDriverStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderAmplitudeValuesGet : Read analog interpolated encoder amplitude values - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *CalibrationSinusAmplitude - * double *CurrentSinusAmplitude - * double *CalibrationCosinusAmplitude - * double *CurrentCosinusAmplitude - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderAmplitudeValuesGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentSinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CalibrationCosinusAmplitude); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CurrentCosinusAmplitude); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerEncoderCalibrationParametersGet : Read analog interpolated encoder calibration parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SinusOffset - * double *CosinusOffset - * double *DifferentialGain - * double *PhaseCompensation - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerEncoderCalibrationParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CosinusOffset); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", DifferentialGain); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PhaseCompensation); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorGet : Read and clear positioner error code - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorRead : Read only positioner error code without clear it - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *ErrorCode - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorRead (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ErrorCode); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorStringGet : Return the positioner status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerErrorCode - * char *PositionerErrorString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorStringGet (%d,char *)", PositionerErrorCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorString, pt); - ptNext = strchr (PositionerErrorString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusGet : Read positioner hardware status - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *HardwareStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", HardwareStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusStringGet : Return the positioner hardware status string corresponding to the positioner error code - * - * - Parameters : - * int SocketIndex - * int PositionerHardwareStatus - * char *PositionerHardwareStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusStringGet (%d,char *)", PositionerHardwareStatus); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusString, pt); - ptNext = strchr (PositionerHardwareStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorGet : Get hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int *InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorGet (%s,int *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", InterpolationFactor); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardInterpolatorFactorSet : Set hard interpolator parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * int InterpolationFactor - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardInterpolatorFactorSet (%s,%d)", PositionerName, InterpolationFactor); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMaximumVelocityAndAccelerationGet : Return maximum velocity and acceleration of the positioner - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *MaximumVelocity - * double *MaximumAcceleration - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMaximumVelocityAndAccelerationGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumVelocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumAcceleration); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneGet : Read motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *PositionWindow - * double *VelocityWindow - * double *CheckingTime - * double *MeanPeriod - * double *TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneGet (%s,double *,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", PositionWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VelocityWindow); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CheckingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MeanPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", TimeOut); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerMotionDoneSet : Update motion done parameters - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double PositionWindow - * double VelocityWindow - * double CheckingTime - * double MeanPeriod - * double TimeOut - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%.13g,%.13g,%.13g,%.13g,%.13g)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaExactVelocityAjustedDisplacementGet : Return adjusted displacement to get exact velocity - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double DesiredDisplacement - * double *AdjustedDisplacement - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%.13g,double *)", PositionerName, DesiredDisplacement); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", AdjustedDisplacement); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersGet : Read dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *Velocity - * double *Acceleration - * double *MinimumTjerkTime - * double *MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersGet (%s,double *,double *,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Velocity); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Acceleration); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumTjerkTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumTjerkTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaParametersSet : Update dynamic parameters for one axe of a group for a future displacement - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double Velocity - * double Acceleration - * double MinimumTjerkTime - * double MaximumTjerkTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%.13g,%.13g,%.13g,%.13g)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerSGammaPreviousMotionTimesGet : Read SettingTime and SettlingTime - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *SettingTime - * double *SettlingTime - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerSGammaPreviousMotionTimesGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettingTime); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SettlingTime); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterGet : Return the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterGet (%s,%s,char *)", PositionerName, ParameterName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ParameterValue, pt); - ptNext = strchr (ParameterValue, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerStageParameterSet : Save the stage parameter - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * char *ParameterName - * char *ParameterValue - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerStageParameterSet (%s,%s,%s)", PositionerName, ParameterName, ParameterValue); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsGet : Read UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double *UserMinimumTarget - * double *UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsGet (%s,double *,double *)", PositionerName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMinimumTarget); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserMaximumTarget); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerUserTravelLimitsSet : Update UserMinimumTarget and UserMaximumTarget - * - * - Parameters : - * int SocketIndex - * char *PositionerName - * double UserMinimumTarget - * double UserMaximumTarget - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%.13g,%.13g)", PositionerName, UserMinimumTarget, UserMaximumTarget); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodMoveAbsolute : Hexapod absolute move in a specific coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double X - * double Y - * double Z - * double U - * double V - * double W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodMoveAbsolute (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodMoveIncremental : Hexapod incremental move in a specific coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double dX - * double dY - * double dZ - * double dU - * double dV - * double dW - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodMoveIncremental (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, dX, dY, dZ, dU, dV, dW); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinatesGet : Get coordinates in a specific coordinate system of a point specified in another coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystemIn - * char *CoordinateSystemOut - * double Xin - * double Yin - * double Zin - * double Uin - * double Vin - * double Win - * double *Xout - * double *Yout - * double *Zout - * double *Uout - * double *Vout - * double *Wout - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinatesGet (%s,%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystemIn, CoordinateSystemOut, Xin, Yin, Zin, Uin, Vin, Win); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Xout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Yout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Zout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Uout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Vout); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Wout); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinateSystemSet : Modify the position of a coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double X - * double Y - * double Z - * double U - * double V - * double W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinateSystemSet (%s,%s,%.13g,%.13g,%.13g,%.13g,%.13g,%.13g)", GroupName, CoordinateSystem, X, Y, Z, U, V, W); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HexapodCoordinateSystemGet : Get the position of a coordinate system - * - * - Parameters : - * int SocketIndex - * char *GroupName - * char *CoordinateSystem - * double *X - * double *Y - * double *Z - * double *U - * double *V - * double *W - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HexapodCoordinateSystemGet (%s,%s,double *,double *,double *,double *,double *,double *)", GroupName, CoordinateSystem); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", X); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Y); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", Z); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", U); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", W); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleExecute : Execute an optional module - * - * - Parameters : - * int SocketIndex - * char *ModuleFileName - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleExecute (%s,%s)", ModuleFileName, TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * OptionalModuleKill : Kill an optional module - * - * - Parameters : - * int SocketIndex - * char *TaskName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "OptionalModuleKill (%s)", TaskName); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusGet : Read controller current status - * - * - Parameters : - * int SocketIndex - * int *ControllerStatus - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusGet (int *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%d", ControllerStatus); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerStatusStringGet : Return the controller status string corresponding to the controller status code - * - * - Parameters : - * int SocketIndex - * int ControllerStatusCode - * char *ControllerStatusString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerStatusStringGet (%d,char *)", ControllerStatusCode); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ControllerStatusString, pt); - ptNext = strchr (ControllerStatusString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMCIESet : Set CIE EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMCIESet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDACOffsetCIESet : Set CIE DAC offsets - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * double DAC1Offset - * double DAC2Offset - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%.13g,%.13g)", PlugNumber, DAC1Offset, DAC2Offset); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMDriverSet : Set Driver EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMDriverSet (%d,%s)", PlugNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EEPROMINTSet : Set INT EEPROM reference string - * - * - Parameters : - * int SocketIndex - * int CardNumber - * char *ReferenceString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "EEPROMINTSet (%d,%s)", CardNumber, ReferenceString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUCoreAndBoardSupplyVoltagesGet : Get power informations - * - * - Parameters : - * int SocketIndex - * double *VoltageCPUCore - * double *SupplyVoltage1P5V - * double *SupplyVoltage3P3V - * double *SupplyVoltage5V - * double *SupplyVoltage12V - * double *SupplyVoltageM12V - * double *SupplyVoltageM5V - * double *SupplyVoltage5VSB - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUCoreAndBoardSupplyVoltagesGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", VoltageCPUCore); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage1P5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage3P3V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM12V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltageM5V); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", SupplyVoltage5VSB); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * CPUTemperatureAndFanSpeedGet : Get CPU temperature and fan speed - * - * - Parameters : - * int SocketIndex - * double *CPUTemperature - * double *CPUFanSpeed - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "CPUTemperatureAndFanSpeedGet (double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUTemperature); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", CPUFanSpeed); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionListGet : Action list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPActionListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ActionExtendedListGet : Action extended list - * - * - Parameters : - * int SocketIndex - * char *ActionList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ActionExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ActionList, pt); - ptNext = strchr (ActionList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIExtendedListGet : API method list - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * APIListGet : API method list without extended API - * - * - Parameters : - * int SocketIndex - * char *Method - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPAPIListGet (int SocketIndex, char * Method) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "APIListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (Method, pt); - ptNext = strchr (Method, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ErrorListGet : Error list - * - * - Parameters : - * int SocketIndex - * char *ErrorsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ErrorsList, pt); - ptNext = strchr (ErrorsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * EventListGet : General event list - * - * - Parameters : - * int SocketIndex - * char *EventList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPEventListGet (int SocketIndex, char * EventList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "EventListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (EventList, pt); - ptNext = strchr (EventList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringListGet : Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExtendedListGet : Gathering type extended list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExtendedListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringExternalListGet : External Gathering type list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringExternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GroupStatusListGet : Group status list - * - * - Parameters : - * int SocketIndex - * char *GroupStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "GroupStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (GroupStatusList, pt); - ptNext = strchr (GroupStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareInternalListGet : Internal hardware list - * - * - Parameters : - * int SocketIndex - * char *InternalHardwareList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareInternalListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (InternalHardwareList, pt); - ptNext = strchr (InternalHardwareList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * HardwareDriverAndStageGet : Smart hardware - * - * - Parameters : - * int SocketIndex - * int PlugNumber - * char *DriverName - * char *StageName - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_NOMINAL); - - /* Convert to string */ - sprintf (ExecuteMethod, "HardwareDriverAndStageGet (%d,char *,char *)", PlugNumber); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_NOMINAL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (DriverName, pt); - ptNext = strchr (DriverName, ','); - if (ptNext != NULL) *ptNext = '\0'; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (StageName, pt); - ptNext = strchr (StageName, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ObjectsListGet : Group name and positioner name - * - * - Parameters : - * int SocketIndex - * char *ObjectsList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_HUGE); - - /* Convert to string */ - sprintf (ExecuteMethod, "ObjectsListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_HUGE); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ObjectsList, pt); - ptNext = strchr (ObjectsList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerErrorListGet : Positioner error list - * - * - Parameters : - * int SocketIndex - * char *PositionerErrorList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerErrorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerErrorList, pt); - ptNext = strchr (PositionerErrorList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerHardwareStatusListGet : Positioner hardware status list - * - * - Parameters : - * int SocketIndex - * char *PositionerHardwareStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerHardwareStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerHardwareStatusList, pt); - ptNext = strchr (PositionerHardwareStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PositionerDriverStatusListGet : Positioner driver status list - * - * - Parameters : - * int SocketIndex - * char *PositionerDriverStatusList - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "PositionerDriverStatusListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (PositionerDriverStatusList, pt); - ptNext = strchr (PositionerDriverStatusList, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingActionListGet : Get referencing action list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingActionListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ReferencingSensorListGet : Get referencing sensor list - * - * - Parameters : - * int SocketIndex - * char *list - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_BIG); - - /* Convert to string */ - sprintf (ExecuteMethod, "ReferencingSensorListGet (char *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_BIG); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (list, pt); - ptNext = strchr (list, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * GatheringUserDatasGet : Return UserDatas values - * - * - Parameters : - * int SocketIndex - * double *UserData1 - * double *UserData2 - * double *UserData3 - * double *UserData4 - * double *UserData5 - * double *UserData6 - * double *UserData7 - * double *UserData8 - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "GatheringUserDatasGet (double *,double *,double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData1); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData2); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData3); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData4); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData5); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData6); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData7); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", UserData8); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxGet : Get controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * double *MinimumCorrectorPeriod - * double *MaximumCorrectorPeriod - * double *MinimumProfilerPeriod - * double *MaximumProfilerPeriod - * double *MinimumServitudesPeriod - * double *MaximumServitudesPeriod - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxGet (double *,double *,double *,double *,double *,double *)"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumCorrectorPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumProfilerPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MinimumServitudesPeriod); - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) sscanf (pt, "%lf", MaximumServitudesPeriod); - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * ControllerMotionKernelPeriodMinMaxReset : Reset controller motion kernel min/max periods - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "ControllerMotionKernelPeriodMinMaxReset ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * TestTCP : Test TCP/IP transfert - * - * - Parameters : - * int SocketIndex - * char *InputString - * char *ReturnString - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "TestTCP (%s,char *)", InputString); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (ret == 0) - { - char * pt; - char * ptNext; - - pt = ReturnedValue; - ptNext = NULL; - if (pt != NULL) pt = strchr (pt, ','); - if (pt != NULL) pt++; - if (pt != NULL) strcpy (ReturnString, pt); - ptNext = strchr (ReturnString, ','); - if (ptNext != NULL) *ptNext = '\0'; - } - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - -/*********************************************************************** - * PrepareForUpdate : Kill QNX processes for firmware update - * - * - Parameters : - * int SocketIndex - * - Return : - * int errorCode - ***********************************************************************/ -int __stdcall HXPPrepareForUpdate (int SocketIndex) -{ - int ret = -1; - char ExecuteMethod[SIZE_EXECUTE_METHOD]; - char *ReturnedValue = (char *) malloc (sizeof(char) * SIZE_SMALL); - - /* Convert to string */ - sprintf (ExecuteMethod, "PrepareForUpdate ()"); - - /* Send this string and wait return function from controller */ - /* return function : ==0 -> OK ; < 0 -> NOK */ - SendAndReceive (SocketIndex, ExecuteMethod, ReturnedValue, SIZE_SMALL); - if (strlen (ReturnedValue) > 0) - sscanf (ReturnedValue, "%i", &ret); - - /* Get the returned values in the out parameters */ - if (NULL != ReturnedValue) - free (ReturnedValue); - - return (ret); -} - - - -#ifdef __cplusplus -} -#endif diff --git a/motorApp/NewportSrc/hxp_drivers.h b/motorApp/NewportSrc/hxp_drivers.h deleted file mode 100644 index 09ddc3e5..00000000 --- a/motorApp/NewportSrc/hxp_drivers.h +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************* - * XPS_API.h * - * * - * Description: * - * XPS functions * - *************************************************/ - -#define DLL epicsShareFunc - -#if !defined(_WIN32) && !defined(CYGWIN32) -#define __stdcall -#endif - -#ifdef __rtems__ - #include "strtok_r.h" -#endif - -#ifdef __cplusplus -extern "C" -{ -#else -typedef int bool; /* C does not know bool, only C++ */ -#endif - - - -DLL int __stdcall HXPTCP_ConnectToServer(char *Ip_Address, int Ip_Port, double TimeOut); -DLL void __stdcall HXPTCP_SetTimeout(int SocketIndex, double Timeout); -DLL void __stdcall HXPTCP_CloseSocket(int SocketIndex); -DLL char * __stdcall HXPTCP_GetError(int SocketIndex); -DLL char * __stdcall HXPGetLibraryVersion(void); -DLL int __stdcall HXPControllerMotionKernelTimeLoadGet (int SocketIndex, double * CPUTotalLoadRatio, double * CPUCorrectorLoadRatio, double * CPUProfilerLoadRatio, double * CPUServitudesLoadRatio); /* Get controller motion kernel time load */ -DLL int __stdcall HXPElapsedTimeGet (int SocketIndex, double * ElapsedTime); /* Return elapsed time from controller power on */ -DLL int __stdcall HXPErrorStringGet (int SocketIndex, int ErrorCode, char * ErrorString); /* Return the error string corresponding to the error code */ -DLL int __stdcall HXPFirmwareVersionGet (int SocketIndex, char * Version); /* Return firmware version */ -DLL int __stdcall HXPTCLScriptExecute (int SocketIndex, char * TCLFileName, char * TaskName, char * ParametersList); /* Execute a TCL script from a TCL file */ -DLL int __stdcall HXPTCLScriptExecuteAndWait (int SocketIndex, char * TCLFileName, char * TaskName, char * InputParametersList, char * OutputParametersList); /* Execute a TCL script from a TCL file and wait the end of execution to return */ -DLL int __stdcall HXPTCLScriptKill (int SocketIndex, char * TaskName); /* Kill TCL Task */ -DLL int __stdcall HXPTimerGet (int SocketIndex, char * TimerName, int * FrequencyTicks); /* Get a timer */ -DLL int __stdcall HXPTimerSet (int SocketIndex, char * TimerName, int FrequencyTicks); /* Set a timer */ -DLL int __stdcall HXPReboot (int SocketIndex); /* Reboot the controller */ -DLL int __stdcall HXPLogin (int SocketIndex, char * Name, char * Password); /* Log in */ -DLL int __stdcall HXPCloseAllOtherSockets (int SocketIndex); /* Close all socket beside the one used to send this command */ -DLL int __stdcall HXPEventAdd (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter, char * ActionName, char * ActionParameter1, char * ActionParameter2, char * ActionParameter3); /* ** OBSOLETE ** Add an event */ -DLL int __stdcall HXPEventGet (int SocketIndex, char * PositionerName, char * EventsAndActionsList); /* ** OBSOLETE ** Read events and actions list */ -DLL int __stdcall HXPEventRemove (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Delete an event */ -DLL int __stdcall HXPEventWait (int SocketIndex, char * PositionerName, char * EventName, char * EventParameter); /* ** OBSOLETE ** Wait an event */ -DLL int __stdcall HXPEventExtendedConfigurationTriggerSet (int SocketIndex, int NbElements, char * ExtendedEventNameList, char * EventParameter1List, char * EventParameter2List, char * EventParameter3List, char * EventParameter4List); /* Configure one or several events */ -DLL int __stdcall HXPEventExtendedConfigurationTriggerGet (int SocketIndex, char * EventTriggerConfiguration); /* Read the event configuration */ -DLL int __stdcall HXPEventExtendedConfigurationActionSet (int SocketIndex, int NbElements, char * ExtendedActionNameList, char * ActionParameter1List, char * ActionParameter2List, char * ActionParameter3List, char * ActionParameter4List); /* Configure one or several actions */ -DLL int __stdcall HXPEventExtendedConfigurationActionGet (int SocketIndex, char * ActionConfiguration); /* Read the action configuration */ -DLL int __stdcall HXPEventExtendedStart (int SocketIndex, int * ID); /* Launch the last event and action configuration and return an ID */ -DLL int __stdcall HXPEventExtendedAllGet (int SocketIndex, char * EventActionConfigurations); /* Read all event and action configurations */ -DLL int __stdcall HXPEventExtendedGet (int SocketIndex, int ID, char * EventTriggerConfiguration, char * ActionConfiguration); /* Read the event and action configuration defined by ID */ -DLL int __stdcall HXPEventExtendedRemove (int SocketIndex, int ID); /* Remove the event and action configuration defined by ID */ -DLL int __stdcall HXPEventExtendedWait (int SocketIndex); /* Wait events from the last event configuration */ -DLL int __stdcall HXPGatheringConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall HXPGatheringConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall HXPGatheringCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall HXPGatheringStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall HXPGatheringDataAcquire (int SocketIndex); /* Acquire a configured data */ -DLL int __stdcall HXPGatheringDataGet (int SocketIndex, int IndexPoint, char * DataBufferLine); /* Get a data line from gathering buffer */ -DLL int __stdcall HXPGatheringReset (int SocketIndex); /* Empty the gathered data in memory to start new gathering from scratch */ -DLL int __stdcall HXPGatheringRun (int SocketIndex, int DataNumber, int Divisor); /* Start a new gathering */ -DLL int __stdcall HXPGatheringStop (int SocketIndex); /* Stop the data gathering (without saving to file) */ -DLL int __stdcall HXPGatheringExternalConfigurationSet (int SocketIndex, int NbElements, char * TypeList); /* Configuration acquisition */ -DLL int __stdcall HXPGatheringExternalConfigurationGet (int SocketIndex, char * Type); /* Read different mnemonique type */ -DLL int __stdcall HXPGatheringExternalCurrentNumberGet (int SocketIndex, int * CurrentNumber, int * MaximumSamplesNumber); /* Maximum number of samples and current number during acquisition */ -DLL int __stdcall HXPGatheringExternalStopAndSave (int SocketIndex); /* Stop acquisition and save data */ -DLL int __stdcall HXPGlobalArrayGet (int SocketIndex, int Number, char * ValueString); /* Get global array value */ -DLL int __stdcall HXPGlobalArraySet (int SocketIndex, int Number, char * ValueString); /* Set global array value */ -DLL int __stdcall HXPDoubleGlobalArrayGet (int SocketIndex, int Number, double * DoubleValue); /* Get double global array value */ -DLL int __stdcall HXPDoubleGlobalArraySet (int SocketIndex, int Number, double DoubleValue); /* Set double global array value */ -DLL int __stdcall HXPGPIOAnalogGet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogValue[]); /* Read analog input or analog output for one or few input */ -DLL int __stdcall HXPGPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameList, double AnalogOutputValue[]); /* Set analog output for one or few output */ -DLL int __stdcall HXPGPIOAnalogGainGet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Read analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall HXPGPIOAnalogGainSet (int SocketIndex, int NbElements, char * GPIONameList, int AnalogInputGainValue[]); /* Set analog input gain (1, 2, 4 or 8) for one or few input */ -DLL int __stdcall HXPGPIODigitalGet (int SocketIndex, char * GPIOName, unsigned short * DigitalValue); /* Read digital output or digital input */ -DLL int __stdcall HXPGPIODigitalSet (int SocketIndex, char * GPIOName, unsigned short Mask, unsigned short DigitalOutputValue); /* Set Digital Output for one or few output TTL */ -DLL int __stdcall HXPGroupCorrectorOutputGet (int SocketIndex, char * GroupName, int NbElements, double CorrectorOutput[]); /* Return corrector outputs */ -DLL int __stdcall HXPGroupHomeSearch (int SocketIndex, char * GroupName); /* Start home search sequence */ -DLL int __stdcall HXPGroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Start home search sequence and execute a displacement */ -DLL int __stdcall HXPGroupInitialize (int SocketIndex, char * GroupName); /* Start the initialization */ -DLL int __stdcall HXPGroupInitializeWithEncoderCalibration (int SocketIndex, char * GroupName); /* Start the initialization with encoder calibration */ -DLL int __stdcall HXPGroupKill (int SocketIndex, char * GroupName); /* Kill the group */ -DLL int __stdcall HXPGroupMoveAbort (int SocketIndex, char * GroupName); /* Abort a move */ -DLL int __stdcall HXPGroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Do an absolute move */ -DLL int __stdcall HXPGroupMoveRelative (int SocketIndex, char * GroupName, int NbElements, double TargetDisplacement[]); /* Do a relative move */ -DLL int __stdcall HXPGroupMotionDisable (int SocketIndex, char * GroupName); /* Set Motion disable on selected group */ -DLL int __stdcall HXPGroupMotionEnable (int SocketIndex, char * GroupName); /* Set Motion enable on selected group */ -DLL int __stdcall HXPGroupPositionCorrectedProfilerGet (int SocketIndex, char * GroupName, double PositionX, double PositionY, double * CorrectedProfilerPositionX, double * CorrectedProfilerPositionY); /* Return corrected profiler positions */ -DLL int __stdcall HXPGroupPositionCurrentGet (int SocketIndex, char * GroupName, int NbElements, double CurrentEncoderPosition[]); /* Return current positions */ -DLL int __stdcall HXPGroupPositionSetpointGet (int SocketIndex, char * GroupName, int NbElements, double SetPointPosition[]); /* Return setpoint positions */ -DLL int __stdcall HXPGroupPositionTargetGet (int SocketIndex, char * GroupName, int NbElements, double TargetPosition[]); /* Return target positions */ -DLL int __stdcall HXPGroupStatusGet (int SocketIndex, char * GroupName, int * Status); /* Return group status */ -DLL int __stdcall HXPGroupStatusStringGet (int SocketIndex, int GroupStatusCode, char * GroupStatusString); /* Return the group status string corresponding to the group status code */ -DLL int __stdcall HXPKillAll (int SocketIndex); /* Put all groups in 'Not initialized' state */ -DLL int __stdcall HXPRestartApplication (int SocketIndex); /* Restart the Controller */ -DLL int __stdcall HXPPositionerBacklashGet (int SocketIndex, char * PositionerName, double * BacklashValue, char * BacklaskStatus); /* Read backlash value and status */ -DLL int __stdcall HXPPositionerBacklashSet (int SocketIndex, char * PositionerName, double BacklashValue); /* Set backlash value */ -DLL int __stdcall HXPPositionerBacklashEnable (int SocketIndex, char * PositionerName); /* Enable the backlash */ -DLL int __stdcall HXPPositionerBacklashDisable (int SocketIndex, char * PositionerName); /* Disable the backlash */ -DLL int __stdcall HXPPositionerCorrectorNotchFiltersSet (int SocketIndex, char * PositionerName, double NotchFrequency1, double NotchBandwith1, double NotchGain1, double NotchFrequency2, double NotchBandwith2, double NotchGain2); /* Update filters parameters */ -DLL int __stdcall HXPPositionerCorrectorNotchFiltersGet (int SocketIndex, char * PositionerName, double * NotchFrequency1, double * NotchBandwith1, double * NotchGain1, double * NotchFrequency2, double * NotchBandwith2, double * NotchGain2); /* Read filters parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainAcceleration); /* Update corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDFFAccelerationGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainAcceleration); /* Read corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity); /* Update corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDFFVelocityGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity); /* Read corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double KD, double KS, double IntegrationTime, double DerivativeFilterCutOffFrequency, double GKP, double GKI, double GKD, double KForm, double FeedForwardGainVelocity, double FeedForwardGainAcceleration, double Friction); /* Update corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIDDualFFVoltageGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * KD, double * KS, double * IntegrationTime, double * DerivativeFilterCutOffFrequency, double * GKP, double * GKI, double * GKD, double * KForm, double * FeedForwardGainVelocity, double * FeedForwardGainAcceleration, double * Friction); /* Read corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIPositionSet (int SocketIndex, char * PositionerName, bool ClosedLoopStatus, double KP, double KI, double IntegrationTime); /* Update corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorPIPositionGet (int SocketIndex, char * PositionerName, bool * ClosedLoopStatus, double * KP, double * KI, double * IntegrationTime); /* Read corrector parameters */ -DLL int __stdcall HXPPositionerCorrectorTypeGet (int SocketIndex, char * PositionerName, char * CorrectorType); /* Read corrector type */ -DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersSet (int SocketIndex, char * PositionerName, double CurrentVelocityCutOffFrequency, double CurrentAccelerationCutOffFrequency); /* Set current velocity and acceleration cut off frequencies */ -DLL int __stdcall HXPPositionerCurrentVelocityAccelerationFiltersGet (int SocketIndex, char * PositionerName, double * CurrentVelocityCutOffFrequency, double * CurrentAccelerationCutOffFrequency); /* Get current velocity and acceleration cut off frequencies */ -DLL int __stdcall HXPPositionerDriverStatusGet (int SocketIndex, char * PositionerName, int * DriverStatus); /* Read positioner driver status */ -DLL int __stdcall HXPPositionerDriverStatusStringGet (int SocketIndex, int PositionerDriverStatus, char * PositionerDriverStatusString); /* Return the positioner driver status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerEncoderAmplitudeValuesGet (int SocketIndex, char * PositionerName, double * CalibrationSinusAmplitude, double * CurrentSinusAmplitude, double * CalibrationCosinusAmplitude, double * CurrentCosinusAmplitude); /* Read analog interpolated encoder amplitude values */ -DLL int __stdcall HXPPositionerEncoderCalibrationParametersGet (int SocketIndex, char * PositionerName, double * SinusOffset, double * CosinusOffset, double * DifferentialGain, double * PhaseCompensation); /* Read analog interpolated encoder calibration parameters */ -DLL int __stdcall HXPPositionerErrorGet (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read and clear positioner error code */ -DLL int __stdcall HXPPositionerErrorRead (int SocketIndex, char * PositionerName, int * ErrorCode); /* Read only positioner error code without clear it */ -DLL int __stdcall HXPPositionerErrorStringGet (int SocketIndex, int PositionerErrorCode, char * PositionerErrorString); /* Return the positioner status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerHardwareStatusGet (int SocketIndex, char * PositionerName, int * HardwareStatus); /* Read positioner hardware status */ -DLL int __stdcall HXPPositionerHardwareStatusStringGet (int SocketIndex, int PositionerHardwareStatus, char * PositionerHardwareStatusString); /* Return the positioner hardware status string corresponding to the positioner error code */ -DLL int __stdcall HXPPositionerHardInterpolatorFactorGet (int SocketIndex, char * PositionerName, int * InterpolationFactor); /* Get hard interpolator parameters */ -DLL int __stdcall HXPPositionerHardInterpolatorFactorSet (int SocketIndex, char * PositionerName, int InterpolationFactor); /* Set hard interpolator parameters */ -DLL int __stdcall HXPPositionerMaximumVelocityAndAccelerationGet (int SocketIndex, char * PositionerName, double * MaximumVelocity, double * MaximumAcceleration); /* Return maximum velocity and acceleration of the positioner */ -DLL int __stdcall HXPPositionerMotionDoneGet (int SocketIndex, char * PositionerName, double * PositionWindow, double * VelocityWindow, double * CheckingTime, double * MeanPeriod, double * TimeOut); /* Read motion done parameters */ -DLL int __stdcall HXPPositionerMotionDoneSet (int SocketIndex, char * PositionerName, double PositionWindow, double VelocityWindow, double CheckingTime, double MeanPeriod, double TimeOut); /* Update motion done parameters */ -DLL int __stdcall HXPPositionerSGammaExactVelocityAjustedDisplacementGet (int SocketIndex, char * PositionerName, double DesiredDisplacement, double * AdjustedDisplacement); /* Return adjusted displacement to get exact velocity */ -DLL int __stdcall HXPPositionerSGammaParametersGet (int SocketIndex, char * PositionerName, double * Velocity, double * Acceleration, double * MinimumTjerkTime, double * MaximumTjerkTime); /* Read dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall HXPPositionerSGammaParametersSet (int SocketIndex, char * PositionerName, double Velocity, double Acceleration, double MinimumTjerkTime, double MaximumTjerkTime); /* Update dynamic parameters for one axe of a group for a future displacement */ -DLL int __stdcall HXPPositionerSGammaPreviousMotionTimesGet (int SocketIndex, char * PositionerName, double * SettingTime, double * SettlingTime); /* Read SettingTime and SettlingTime */ -DLL int __stdcall HXPPositionerStageParameterGet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Return the stage parameter */ -DLL int __stdcall HXPPositionerStageParameterSet (int SocketIndex, char * PositionerName, char * ParameterName, char * ParameterValue); /* Save the stage parameter */ -DLL int __stdcall HXPPositionerUserTravelLimitsGet (int SocketIndex, char * PositionerName, double * UserMinimumTarget, double * UserMaximumTarget); /* Read UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall HXPPositionerUserTravelLimitsSet (int SocketIndex, char * PositionerName, double UserMinimumTarget, double UserMaximumTarget); /* Update UserMinimumTarget and UserMaximumTarget */ -DLL int __stdcall HXPHexapodMoveAbsolute (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Hexapod absolute move in a specific coordinate system */ -DLL int __stdcall HXPHexapodMoveIncremental (int SocketIndex, char * GroupName, char * CoordinateSystem, double dX, double dY, double dZ, double dU, double dV, double dW); /* Hexapod incremental move in a specific coordinate system */ -DLL int __stdcall HXPHexapodCoordinatesGet (int SocketIndex, char * GroupName, char * CoordinateSystemIn, char * CoordinateSystemOut, double Xin, double Yin, double Zin, double Uin, double Vin, double Win, double * Xout, double * Yout, double * Zout, double * Uout, double * Vout, double * Wout); /* Get coordinates in a specific coordinate system of a point specified in another coordinate system */ -DLL int __stdcall HXPHexapodCoordinateSystemSet (int SocketIndex, char * GroupName, char * CoordinateSystem, double X, double Y, double Z, double U, double V, double W); /* Modify the position of a coordinate system */ -DLL int __stdcall HXPHexapodCoordinateSystemGet (int SocketIndex, char * GroupName, char * CoordinateSystem, double * X, double * Y, double * Z, double * U, double * V, double * W); /* Get the position of a coordinate system */ -DLL int __stdcall HXPOptionalModuleExecute (int SocketIndex, char * ModuleFileName, char * TaskName); /* Execute an optional module */ -DLL int __stdcall HXPOptionalModuleKill (int SocketIndex, char * TaskName); /* Kill an optional module */ -DLL int __stdcall HXPControllerStatusGet (int SocketIndex, int * ControllerStatus); /* Read controller current status */ -DLL int __stdcall HXPControllerStatusStringGet (int SocketIndex, int ControllerStatusCode, char * ControllerStatusString); /* Return the controller status string corresponding to the controller status code */ -DLL int __stdcall HXPEEPROMCIESet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set CIE EEPROM reference string */ -DLL int __stdcall HXPEEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC1Offset, double DAC2Offset); /* Set CIE DAC offsets */ -DLL int __stdcall HXPEEPROMDriverSet (int SocketIndex, int PlugNumber, char * ReferenceString); /* Set Driver EEPROM reference string */ -DLL int __stdcall HXPEEPROMINTSet (int SocketIndex, int CardNumber, char * ReferenceString); /* Set INT EEPROM reference string */ -DLL int __stdcall HXPCPUCoreAndBoardSupplyVoltagesGet (int SocketIndex, double * VoltageCPUCore, double * SupplyVoltage1P5V, double * SupplyVoltage3P3V, double * SupplyVoltage5V, double * SupplyVoltage12V, double * SupplyVoltageM12V, double * SupplyVoltageM5V, double * SupplyVoltage5VSB); /* Get power informations */ -DLL int __stdcall HXPCPUTemperatureAndFanSpeedGet (int SocketIndex, double * CPUTemperature, double * CPUFanSpeed); /* Get CPU temperature and fan speed */ -DLL int __stdcall HXPActionListGet (int SocketIndex, char * ActionList); /* Action list */ -DLL int __stdcall HXPActionExtendedListGet (int SocketIndex, char * ActionList); /* Action extended list */ -DLL int __stdcall HXPAPIExtendedListGet (int SocketIndex, char * Method); /* API method list */ -DLL int __stdcall HXPAPIListGet (int SocketIndex, char * Method); /* API method list without extended API */ -DLL int __stdcall HXPErrorListGet (int SocketIndex, char * ErrorsList); /* Error list */ -DLL int __stdcall HXPEventListGet (int SocketIndex, char * EventList); /* General event list */ -DLL int __stdcall HXPGatheringListGet (int SocketIndex, char * list); /* Gathering type list */ -DLL int __stdcall HXPGatheringExtendedListGet (int SocketIndex, char * list); /* Gathering type extended list */ -DLL int __stdcall HXPGatheringExternalListGet (int SocketIndex, char * list); /* External Gathering type list */ -DLL int __stdcall HXPGroupStatusListGet (int SocketIndex, char * GroupStatusList); /* Group status list */ -DLL int __stdcall HXPHardwareInternalListGet (int SocketIndex, char * InternalHardwareList); /* Internal hardware list */ -DLL int __stdcall HXPHardwareDriverAndStageGet (int SocketIndex, int PlugNumber, char * DriverName, char * StageName); /* Smart hardware */ -DLL int __stdcall HXPObjectsListGet (int SocketIndex, char * ObjectsList); /* Group name and positioner name */ -DLL int __stdcall HXPPositionerErrorListGet (int SocketIndex, char * PositionerErrorList); /* Positioner error list */ -DLL int __stdcall HXPPositionerHardwareStatusListGet (int SocketIndex, char * PositionerHardwareStatusList); /* Positioner hardware status list */ -DLL int __stdcall HXPPositionerDriverStatusListGet (int SocketIndex, char * PositionerDriverStatusList); /* Positioner driver status list */ -DLL int __stdcall HXPReferencingActionListGet (int SocketIndex, char * list); /* Get referencing action list */ -DLL int __stdcall HXPReferencingSensorListGet (int SocketIndex, char * list); /* Get referencing sensor list */ -DLL int __stdcall HXPGatheringUserDatasGet (int SocketIndex, double * UserData1, double * UserData2, double * UserData3, double * UserData4, double * UserData5, double * UserData6, double * UserData7, double * UserData8); /* Return UserDatas values */ -DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxGet (int SocketIndex, double * MinimumCorrectorPeriod, double * MaximumCorrectorPeriod, double * MinimumProfilerPeriod, double * MaximumProfilerPeriod, double * MinimumServitudesPeriod, double * MaximumServitudesPeriod); /* Get controller motion kernel min/max periods */ -DLL int __stdcall HXPControllerMotionKernelPeriodMinMaxReset (int SocketIndex); /* Reset controller motion kernel min/max periods */ -DLL int __stdcall HXPTestTCP (int SocketIndex, char * InputString, char * ReturnString); /* Test TCP/IP transfert */ -DLL int __stdcall HXPPrepareForUpdate (int SocketIndex); /* Kill QNX processes for firmware update */ - - -#ifdef __cplusplus -} -#endif diff --git a/motorApp/NewportSrc/hxp_errors.h b/motorApp/NewportSrc/hxp_errors.h deleted file mode 100644 index 3bc40dc5..00000000 --- a/motorApp/NewportSrc/hxp_errors.h +++ /dev/null @@ -1,98 +0,0 @@ -//////////////////////////////////////////////////////////////////// -// Created header file hxp_errors.h for XPS function errors -// - -// TCL interpretor error -#define ERR_TCL_INTERPRETOR_ERROR 1 - -// No error -#define SUCCESS 0 - -// XPS errors -#define ERR_TCL_INTERPRETOR_ERROR 1 -#define ERR_BUSY_SOCKET -1 -#define ERR_TCP_TIMEOUT -2 -#define ERR_STRING_TOO_LONG -3 -#define ERR_UNKNOWN_COMMAND -4 -#define ERR_POSITIONER_ERROR -5 -#define ERR_WRONG_FORMAT -7 -#define ERR_WRONG_OBJECT_TYPE -8 -#define ERR_WRONG_PARAMETERS_NUMBER -9 -#define ERR_WRONG_TYPE -10 -#define ERR_WRONG_TYPE_BIT_WORD -11 -#define ERR_WRONG_TYPE_BOOL -12 -#define ERR_WRONG_TYPE_CHAR -13 -#define ERR_WRONG_TYPE_DOUBLE -14 -#define ERR_WRONG_TYPE_INT -15 -#define ERR_WRONG_TYPE_UNSIGNEDINT -16 -#define ERR_PARAMETER_OUT_OF_RANGE -17 -#define ERR_POSITIONER_NAME -18 -#define ERR_GROUP_NAME -19 -#define ERR_FATAL_INIT -20 -#define ERR_IN_INITIALIZATION -21 -#define ERR_NOT_ALLOWED_ACTION -22 -#define ERR_POSITION_COMPARE_NOT_SET -23 -#define ERR_UNCOMPATIBLE -24 -#define ERR_FOLLOWING_ERROR -25 -#define ERR_EMERGENCY_SIGNAL -26 -#define ERR_GROUP_ABORT_MOTION -27 -#define ERR_GROUP_HOME_SEARCH_TIMEOUT -28 -#define ERR_MNEMOTYPEGATHERING -29 -#define ERR_GATHERING_NOT_STARTED -30 -#define ERR_HOME_OUT_RANGE -31 -#define ERR_GATHERING_NOT_CONFIGURED -32 -#define ERR_GROUP_MOTION_DONE_TIMEOUT -33 -#define ERR_TRAVEL_LIMITS -35 -#define ERR_UNKNOWN_TCL_FILE -36 -#define ERR_TCL_SCRIPT_KILL -38 -#define ERR_TCL_INTERPRETOR -37 -#define ERR_MNEMO_ACTION -39 -#define ERR_MNEMO_EVENT -40 -#define ERR_SLAVE_CONFIGURATION -41 -#define ERR_JOG_OUT_OF_RANGE -42 -#define ERR_GATHERING_RUNNING -43 -#define ERR_SLAVE -44 -#define ERR_END_OF_RUN -45 -#define ERR_NOT_ALLOWED_BACKLASH -46 -#define ERR_WRONG_TCL_TASKNAME -47 -#define ERR_BASE_VELOCITY -48 -#define ERR_GROUP_HOME_SEARCH_ZM_ERROR -49 -#define ERR_MOTOR_INITIALIZATION_ERROR -50 -#define ERR_WRITE_FILE -60 -#define ERR_READ_FILE -61 -#define ERR_TRAJ_ELEM_TYPE -62 -#define ERR_TRAJ_ELEM_LINE -65 -#define ERR_TRAJ_EMPTY -66 -#define ERR_TRAJ_VEL_LIMIT -68 -#define ERR_TRAJ_ACC_LIMIT -69 -#define ERR_TRAJ_FINAL_VELOCITY -70 -#define ERR_MSG_QUEUE -71 -#define ERR_TRAJ_INITIALIZATION -72 -#define ERR_END_OF_FILE -73 -#define ERR_READ_FILE_PARAMETER_KEY -74 -#define ERR_TRAJ_TIME -75 -#define ERR_EVENTS_NOT_CONFIGURED -80 -#define ERR_ACTIONS_NOT_CONFIGURED -81 -#define ERR_EVENT_BUFFER_FULL -82 -#define ERR_EVENT_ID_UNDEFINED -83 -#define ERR_HOME_SEARCH_GANTRY_TOLERANCE_ERROR -85 -#define ERR_OPTIONAL_EXTERNAL_MODULE_FILE -94 -#define ERR_OPTIONAL_EXTERNAL_MODULE_EXECUTE -95 -#define ERR_OPTIONAL_EXTERNAL_MODULE_KILL -96 -#define ERR_OPTIONAL_EXTERNAL_MODULE_LOAD -97 -#define ERR_OPTIONAL_EXTERNAL_MODULE_UNLOAD -98 -#define ERR_FATAL_EXTERNAL_MODULE_LOAD -99 -#define ERR_INTERNAL_ERROR -100 -#define ERR_RELAY_FEEDBACK_TEST_NO_OSCILLATION -101 -#define ERR_RELAY_FEEDBACK_TEST_SIGNAL_NOISY -102 -#define ERR_SIGNAL_POINTS_NOT_ENOUGH -103 -#define ERR_PID_TUNING_INITIALIZATION -104 -#define ERR_SCALING_CALIBRATION -105 -#define ERR_WRONG_USERNAME_OR_PASSWORD -106 -#define ERR_NEED_ADMINISTRATOR_RIGHTS -107 -#define ERR_SOCKET_CLOSED_BY_ADMIN -108 -#define ERR_NEED_TO_BE_HOMED_AT_LEAST_ONCE -109 -#define ERR_NOT_ALLOWED_FOR_GANTRY -110 -#define ERR_GATHERING_BUFFER_FULL -111 -#define ERR_BOTH_ENDS_OF_RUNS_ACTIVATED -113 -#define ERR_HARDWARE_FUNCTION_NOT_SUPPORTED -115 diff --git a/motorApp/NewportSrc/seqPVmacros.h b/motorApp/NewportSrc/seqPVmacros.h deleted file mode 100755 index 33b8a1aa..00000000 --- a/motorApp/NewportSrc/seqPVmacros.h +++ /dev/null @@ -1,245 +0,0 @@ -/*================================================================ - * - * seqPVmacros.h -- PV-related macros for EPICS State Notation - * Language (SNL) code development - * - * 2004-May-19 [jemian] merged all DEBUG_PRINTn macros into one macro - * 2003-Oct-01 [jemian] changed errlogPrintf to printf (can't use in interrupts) - * 2003-Mar-20 [jemian] changed pvSet to PVPUT (and pvSetStr to PVPUTSTR) - * 2003-Mar-19 [jemian] changed printf to errlogPrintf - * 2002-Sep-24 [tischler] added pvSetStr and DEBUG_PRINT (a la Jemian) - * 2002-Jun-04 [lazmo] renamed to seqPVmacros.h - * 2002-Mar-08 [lazmo] added pvSet() - * 2002-Feb-21 [lazmo] fixed comments - * 2001-Nov-24 [lazmo] added PVA & PVAA - * 2001-Oct-18 [lazmo] original - * - * Author: - * M. Laznovsky -- lazmo_at_slac.stanford.edu - * - *================================================================ - */ - -/*---------------------------------------------------------------- - * PV() -- declare a variable and the EPICS PV it's assigned to, with - * optional monitor & event flag. One line takes the place of - * the usual: - * - * int blah; - * assign blah ... - * monitor blah; - * evflag blahFLag; - * sync blah ... - * - * Format: - * - * PV( varType, varName, pvName, other ) - * - * Where: - * - * varType is int, short, float, etc. - * varName is the variable name, e.g. foo - * pvName is the associated PV, e.g. "XYZ:ETC:FOO" - * other is one of the following: - * NoMon - * Monitor - * EvFlag - * - * Examples: - * - * PV (int, gui_goo, "{STN}:GUI:GOO", NoMon); <-- no monitor - * PV (float, gui_fudge, "{STN}:GUI:FUDGE", Monitor); <-- w/monitor - * PV (short, gui_run, "{STN}:GUI:RUN", EvFlag); <-- w/monitor & event flag - * - *---------------------------------------------------------------- - */ - -#define PV(_TYPE_,_VAR_,_PV_,_OTHER_) \ - _TYPE_ _VAR_; \ - assign _VAR_ to _PV_ \ - _OTHER_ (_VAR_) - -/*---------------------------------------------------------------- - * PVA(), for single waveform rec or array of PVs - * - * "varName" becomes array of ; 3rd arg is number of elements - * - * examples: - * - * single waveform record: - * - * PVA (short, plot_x0, 32, "{STN}:DATA:PLOT:X0", NoMon); - * - * array of PVs: - * - * #define PVA_zap { \ - * "{STN}:GUI:ZAP1", \ - * "{STN}:GUI:ZAP2", \ - * "{STN}:GUI:ZAP3" \ - * } - * PVA (int, zap, 3, PVA_zap, EvFlag); - * - *---------------------------------------------------------------- - */ - -#define PVA(_TYPE_,_VAR_,_NELEM_,_PV_,_OTHER_) \ - _TYPE_ _VAR_ [ _NELEM_ ]; \ - assign _VAR_ to _PV_ \ - _OTHER_ (_VAR_) - -/*---------------------------------------------------------------- - * PVAA(), for arrays of waveform records - * - * "varName" becomes double-dimensioned array of - * 3rd arg is number of waveform records - * 4th arg is number of elements per record - * Need to define another macro first for "_PV_" - * - * example: - * - * #define PVAA_plotx { \ - * "{STN}:DATA:PLOT:X1", \ - * "{STN}:DATA:PLOT:X2", \ - * "{STN}:DATA:PLOT:X3" \ - * } - * PVAA (short, plotx, 3, 500, PVAA_plotx, NoMon); - * - *---------------------------------------------------------------- - */ - -#define PVAA(_TYPE_,_VAR_,_NREC_,_NELEM_,_PV_,_OTHER_) \ - _TYPE_ _VAR_ [ _NREC_ ] [ _NELEM_ ]; \ - assign _VAR_ to _PV_ \ - _OTHER_ (_VAR_) - -/*---------------------------------------------------------------- - * macros for last arg of PV* ("_OTHER_") - *---------------------------------------------------------------- - */ - -/* - * no monitor - */ -#define NoMon(_VAR_) /* this macro intentionally left blank :P */ - -/* - * monitor - */ -#define Monitor(_VAR_) ; monitor _VAR_ - -/* - * monitor & event flag; flag var will be named "_EvFlag" - */ -#define EvFlag(_VAR_) \ - Monitor (_VAR_); \ - evflag _VAR_##_mon; \ - sync _VAR_ _VAR_##_mon - -/*================================================================*/ -/*================================================================*/ - -/*---------------------------------------------------------------- - * PVPUT() -- variable assign and pvPut() in one - * - * Format: - * - * PVPUT( varName, expr ) - * - * Where: - * - * varName is the variable name, e.g. foo - * expr is any C expression - * - * Examples: - * - * PVPUT (foo, 3); - * expands to: - * foo = 3; - * pvPut(foo); - * - * PVPUT (bar, xyz + 2); - * expands to: - * bar = xyz + 2; - * pvPut(bar); - * - *---------------------------------------------------------------- - */ - -#define PVPUT(_VAR_,_EXPR_) \ - { \ - _VAR_ = ( _EXPR_ ); \ - pvPut(_VAR_); \ - } - -/*---------------------------------------------------------------- - * PVPUTSTR() -- string assign and pvPut() in one - * - * Format: - * - * PVPUTSTR( strName, string expr ) - * - * Where: - * - * strName is the variable name, e.g. foo - * string expr is any C expression that points to a string - * - * Example: - * - * PVPUTSTR (foo, "error message"); - * expands to: - * strcpy(foo,"error message"); - * pvPut(foo); - * - *---------------------------------------------------------------- - */ - -#define PVPUTSTR(_STR_,_EXPR_) \ - { \ - strcpy(_STR_,_EXPR_); \ - pvPut(_STR_); \ - } - -/*================================================================*/ -/*================================================================*/ - -/*---------------------------------------------------------------- - * DEBUG_PRINT() -- print a debug string for a particular debug level - * - * Format: - * - * DEBUG_PRINT( debug_level, string format, v1, v2, v3, v4 ) - * - * Where: - * - * debug_level is the debugging level, ie 3 - * string format is an sprintf format specifier - * v1, v2, v3, v4 are optional arguments for the sprintf format - * - * Example: - * - * DEBUG_PRINT (1, "ERROR, how did I get here?", 0, 0, 0, 0 ); - * - *---------------------------------------------------------------- - */ - -#if defined(NO_DEBUGGING_OUTPUT) -#define DEBUG_PRINT(DEBUG_LEVEL, FMT,V1,V2,V3,V4) ; -#else - -#define DEBUG_PRINT(DEBUG_LEVEL,FMT,V1,V2,V3,V4) \ - if (debug_flag >= DEBUG_LEVEL) { \ - printf("<%s,%d,%s,%d> ", \ - __FILE__, __LINE__, \ - SNLtaskName, DEBUG_LEVEL); \ - printf(FMT,V1,V2,V3,V4); \ - printf("\n"); \ - } - - -#endif - -/*================================================================*/ -/*================================================================*/ -/*================================================================*/ - -/* end */ diff --git a/motorApp/NewportSrc/strtok_r.c b/motorApp/NewportSrc/strtok_r.c deleted file mode 100644 index 642d9d41..00000000 --- a/motorApp/NewportSrc/strtok_r.c +++ /dev/null @@ -1,49 +0,0 @@ - -#include "strtok_r.h" -#include - -char* strtok_r(char *s, const char *delim, char **lasts) -{ - char *spanp; - int c, sc; - char *tok; - - - if (s == NULL && (s = *lasts) == NULL) - return (NULL); - - /* - * Skip (span) leading delimiters (s += strspn(s, delim), sort of). - */ - cont: - c = *s++; - for (spanp = (char *)delim; (sc = *spanp++) != 0;) { - if (c == sc) - goto cont; - } - - if (c == 0) { /* no non-delimiter characters */ - *lasts = NULL; - return (NULL); - } - tok = s - 1; - - /* - * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). - * Note that delim must have one NUL; we stop if we see that, too. - */ - for (;;) { - c = *s++; - spanp = (char *)delim; - do { - if ((sc = *spanp++) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *lasts = s; - return (tok); - } - } while (sc != 0); - } -} diff --git a/motorApp/NewportSrc/strtok_r.h b/motorApp/NewportSrc/strtok_r.h deleted file mode 100644 index 82f2cc04..00000000 --- a/motorApp/NewportSrc/strtok_r.h +++ /dev/null @@ -1,9 +0,0 @@ -/* strtok_r prototype */ -#ifdef __cplusplus -extern "C" -{ -#endif -char* strtok_r(char *, const char *, char **); -#ifdef __cplusplus -} -#endif diff --git a/motorApp/NewportSrc/tclCall.cc b/motorApp/NewportSrc/tclCall.cc deleted file mode 100644 index 57a3ac51..00000000 --- a/motorApp/NewportSrc/tclCall.cc +++ /dev/null @@ -1,53 +0,0 @@ -/* This function alows you to run a tcl script from within the - Public/Scripts directory of the Newport XPS with the ip - address contained in the string below. - - ->tclcall(tclScriptName.tcl,arbProcessName,tclScriptArgs) - - - - By Jon Kelly 2005 */ - - -#include -#define epicsExportSharedSymbols -#include -#include "tclCall.h" -#include "XPS_C8_drivers.h" -#include "Socket.h" - -#define TIMEOUT 1 - -static int getsocket(void); - -epicsShareFunc void tclcall(char const *name,char const *taskName,char const *args){ - - int status = 0; - int socket; - - socket = getsocket(); - status = TCLScriptExecute(socket,(char *)name, - (char*)taskName,(char *)args); - - printf("TCL Call Status %i\n",status); - if (status < 0) { - printf("Error Name called %s, Task Name %s, Args %s\n",\ - name,taskName,args); - } - - return; -} - -static int getsocket(void) -{ - char ipchar[] = "164.54.160.124"; - int socket = 0; - int port = 5001; - - printf("XPS ip = %s\n",ipchar); - - socket = TCP_ConnectToServer(ipchar,port,TIMEOUT); - if (socket < 0) - printf(" Error TCP_ConnectToServer\n"); - return (socket); -} diff --git a/motorApp/NewportSrc/tclCall.h b/motorApp/NewportSrc/tclCall.h deleted file mode 100644 index 341ea903..00000000 --- a/motorApp/NewportSrc/tclCall.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -epicsShareFunc void tclcall(char const *name,char const *taskName,char const *args); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - diff --git a/motorApp/NewportSrc/trajectoryScan.h b/motorApp/NewportSrc/trajectoryScan.h deleted file mode 100644 index dafa5cdb..00000000 --- a/motorApp/NewportSrc/trajectoryScan.h +++ /dev/null @@ -1,250 +0,0 @@ -/* trajectoryScan.h - * - * This file is included in MM4005_trajectoryScan.st and XPS_trajectoryScan.st to - * ensure consistency and minimize duplication of code. - */ - - -/* State codes for Build, Read and Execute. Careful, these must match the - * corresponding MBBI records, but there is no way to check this */ -#define BUILD_STATE_DONE 0 -#define BUILD_STATE_BUSY 1 -#define READ_STATE_DONE 0 -#define READ_STATE_BUSY 1 -#define EXECUTE_STATE_DONE 0 -#define EXECUTE_STATE_MOVE_START 1 -#define EXECUTE_STATE_EXECUTING 2 -#define EXECUTE_STATE_FLYBACK 3 - -/* Status codes for Build, Execute and Read */ -#define STATUS_UNDEFINED 0 -#define STATUS_SUCCESS 1 -#define STATUS_FAILURE 2 -#define STATUS_ABORT 3 -#define STATUS_TIMEOUT 4 - -/* Time modes */ -#define TIME_MODE_TOTAL 0 -#define TIME_MODE_PER_ELEMENT 1 - -/* Move modes */ -#define MOVE_MODE_RELATIVE 0 -#define MOVE_MODE_ABSOLUTE 1 -#define MOVE_MODE_HYBRID 2 - -/* The maximum number of axes per controller. If this is changed from 8 - * then many assign statements in this file must be changed */ -#define MAX_AXES 8 - -/* Define PVs */ -int debugLevel; assign debugLevel to "{P}{R}DebugLevel.VAL"; -monitor debugLevel; -int numAxes; assign numAxes to "{P}{R}NumAxes.VAL"; -monitor numAxes; -int nelements; assign nelements to "{P}{R}Nelements.VAL"; -monitor nelements; -int npulses; assign npulses to "{P}{R}Npulses.VAL"; -monitor npulses; -int startPulses; assign startPulses to "{P}{R}StartPulses.VAL"; -monitor startPulses; -int endPulses; assign endPulses to "{P}{R}EndPulses.VAL"; -monitor endPulses; -int nactual; assign nactual to "{P}{R}Nactual.VAL"; -int moveMode; assign moveMode to "{P}{R}MoveMode.VAL"; -monitor moveMode; -double time_PV; assign time_PV to "{P}{R}Time.VAL"; -monitor time_PV; -double timeScale; assign timeScale to "{P}{R}TimeScale.VAL"; -monitor timeScale; -int timeMode; assign timeMode to "{P}{R}TimeMode.VAL"; -monitor timeMode; -double accel; assign accel to "{P}{R}Accel.VAL"; -monitor accel; -int build; assign build to "{P}{R}Build.VAL"; -monitor build; -int buildState; assign buildState to "{P}{R}BuildState.VAL"; -int buildStatus; assign buildStatus to "{P}{R}BuildStatus.VAL"; -string buildMessage;assign buildMessage to "{P}{R}BuildMessage.VAL"; -int simMode; assign simMode to "{P}{R}SimMode.VAL"; -monitor simMode; -int execute; assign execute to "{P}{R}Execute.VAL"; -monitor execute; -int execState; assign execState to "{P}{R}ExecState.VAL"; -monitor execState; -int execStatus; assign execStatus to "{P}{R}ExecStatus.VAL"; -string execMessage; assign execMessage to "{P}{R}ExecMessage.VAL"; -int abort; assign abort to "{P}{R}Abort.VAL"; -monitor abort; -int readback; assign readback to "{P}{R}Readback.VAL"; -monitor readback; -int readState; assign readState to "{P}{R}ReadState.VAL"; -int readStatus; assign readStatus to "{P}{R}ReadStatus.VAL"; -string readMessage; assign readMessage to "{P}{R}ReadMessage.VAL"; -double timeTrajectory[MAX_ELEMENTS]; -assign timeTrajectory to "{P}{R}TimeTraj.VAL"; -monitor timeTrajectory; -string trajectoryFile; assign trajectoryFile to "{P}{R}TrajectoryFile.VAL"; -monitor trajectoryFile; - -int moveAxis[MAX_AXES]; -assign moveAxis to - {"{P}{R}M1Move.VAL", - "{P}{R}M2Move.VAL", - "{P}{R}M3Move.VAL", - "{P}{R}M4Move.VAL", - "{P}{R}M5Move.VAL", - "{P}{R}M6Move.VAL", - "{P}{R}M7Move.VAL", - "{P}{R}M8Move.VAL"}; -monitor moveAxis; - -double motorTrajectory[MAX_AXES][MAX_ELEMENTS]; -assign motorTrajectory to - {"{P}{R}M1Traj.VAL", - "{P}{R}M2Traj.VAL", - "{P}{R}M3Traj.VAL", - "{P}{R}M4Traj.VAL", - "{P}{R}M5Traj.VAL", - "{P}{R}M6Traj.VAL", - "{P}{R}M7Traj.VAL", - "{P}{R}M8Traj.VAL"}; -monitor motorTrajectory; - -double motorReadbacks[MAX_AXES][MAX_PULSES]; -assign motorReadbacks to - {"{P}{R}M1Actual.VAL", - "{P}{R}M2Actual.VAL", - "{P}{R}M3Actual.VAL", - "{P}{R}M4Actual.VAL", - "{P}{R}M5Actual.VAL", - "{P}{R}M6Actual.VAL", - "{P}{R}M7Actual.VAL", - "{P}{R}M8Actual.VAL"}; - -double motorError[MAX_AXES][MAX_PULSES]; -assign motorError to - {"{P}{R}M1Error.VAL", - "{P}{R}M2Error.VAL", - "{P}{R}M3Error.VAL", - "{P}{R}M4Error.VAL", - "{P}{R}M5Error.VAL", - "{P}{R}M6Error.VAL", - "{P}{R}M7Error.VAL", - "{P}{R}M8Error.VAL"}; - -double motorCurrent[MAX_AXES]; -assign motorCurrent to - {"{P}{R}M1Current.VAL", - "{P}{R}M2Current.VAL", - "{P}{R}M3Current.VAL", - "{P}{R}M4Current.VAL", - "{P}{R}M5Current.VAL", - "{P}{R}M6Current.VAL", - "{P}{R}M7Current.VAL", - "{P}{R}M8Current.VAL"}; - -double motorMDVS[MAX_AXES]; -assign motorMDVS to - {"{P}{R}M1MDVS.VAL", - "{P}{R}M2MDVS.VAL", - "{P}{R}M3MDVS.VAL", - "{P}{R}M4MDVS.VAL", - "{P}{R}M5MDVS.VAL", - "{P}{R}M6MDVS.VAL", - "{P}{R}M7MDVS.VAL", - "{P}{R}M8MDVS.VAL"}; -monitor motorMDVS; - -double motorMDVA[MAX_AXES]; -assign motorMDVA to - {"{P}{R}M1MDVA.VAL", - "{P}{R}M2MDVA.VAL", - "{P}{R}M3MDVA.VAL", - "{P}{R}M4MDVA.VAL", - "{P}{R}M5MDVA.VAL", - "{P}{R}M6MDVA.VAL", - "{P}{R}M7MDVA.VAL", - "{P}{R}M8MDVA.VAL"}; - -int motorMDVE[MAX_AXES]; -assign motorMDVE to - {"{P}{R}M1MDVE.VAL", - "{P}{R}M2MDVE.VAL", - "{P}{R}M3MDVE.VAL", - "{P}{R}M4MDVE.VAL", - "{P}{R}M5MDVE.VAL", - "{P}{R}M6MDVE.VAL", - "{P}{R}M7MDVE.VAL", - "{P}{R}M8MDVE.VAL"}; - -double motorMVA[MAX_AXES]; -assign motorMVA to - {"{P}{R}M1MVA.VAL", - "{P}{R}M2MVA.VAL", - "{P}{R}M3MVA.VAL", - "{P}{R}M4MVA.VAL", - "{P}{R}M5MVA.VAL", - "{P}{R}M6MVA.VAL", - "{P}{R}M7MVA.VAL", - "{P}{R}M8MVA.VAL"}; - -int motorMVE[MAX_AXES]; -assign motorMVE to - {"{P}{R}M1MVE.VAL", - "{P}{R}M2MVE.VAL", - "{P}{R}M3MVE.VAL", - "{P}{R}M4MVE.VAL", - "{P}{R}M5MVE.VAL", - "{P}{R}M6MVE.VAL", - "{P}{R}M7MVE.VAL", - "{P}{R}M8MVE.VAL"}; - -double motorMAA[MAX_AXES]; -assign motorMAA to - {"{P}{R}M1MAA.VAL", - "{P}{R}M2MAA.VAL", - "{P}{R}M3MAA.VAL", - "{P}{R}M4MAA.VAL", - "{P}{R}M5MAA.VAL", - "{P}{R}M6MAA.VAL", - "{P}{R}M7MAA.VAL", - "{P}{R}M8MAA.VAL"}; - -int motorMAE[MAX_AXES]; -assign motorMAE to - {"{P}{R}M1MAE.VAL", - "{P}{R}M2MAE.VAL", - "{P}{R}M3MAE.VAL", - "{P}{R}M4MAE.VAL", - "{P}{R}M5MAE.VAL", - "{P}{R}M6MAE.VAL", - "{P}{R}M7MAE.VAL", - "{P}{R}M8MAE.VAL"}; - -/* We don't assign the EPICS motors here because there may be fewer than - * MAX_AXES actually in use. */ -double epicsMotorPos[MAX_AXES]; -assign epicsMotorPos to {"","","","","","","",""}; -monitor epicsMotorPos; - -double epicsMotorDir[MAX_AXES]; -assign epicsMotorDir to {"","","","","","","",""}; -monitor epicsMotorDir; - -double epicsMotorOff[MAX_AXES]; -assign epicsMotorOff to {"","","","","","","",""}; -monitor epicsMotorOff; - -double epicsMotorDone[MAX_AXES]; -assign epicsMotorDone to {"","","","","","","",""}; -monitor epicsMotorDone; - - -evflag buildMon; sync build buildMon; -evflag executeMon; sync execute executeMon; -evflag execStateMon; sync execState execStateMon; -evflag abortMon; sync abort abortMon; -evflag readbackMon; sync readback readbackMon; -evflag nelementsMon; sync nelements nelementsMon; -evflag motorMDVSMon; sync motorMDVS motorMDVSMon; - diff --git a/motorApp/NewportSrc/xpsSlave.st b/motorApp/NewportSrc/xpsSlave.st deleted file mode 100644 index 690e0152..00000000 --- a/motorApp/NewportSrc/xpsSlave.st +++ /dev/null @@ -1,138 +0,0 @@ -program xpsSlave("name=xpsSlave,P=xxx:,R=xps:slave,IP=192.168.1.11,M=GROUP1.POSITIONER,S=GROUP2") - -/* Turn on run-time debug messages */ -option +d; -/* Make the generated code reentrant */ -option +r; -/* Suppress SNC warnings */ -/*option -w;*/ - -#include "seqPVmacros.h" -%%#define epicsExportSharedSymbols -%%#include -%%#include "XPS_C8_drivers.h" - -#define PORT 5001 -#define TIMEOUT 100.0 - -char* SNLtaskName; -char* ip; -char* master; -char* slave; -%%int xps_socket; -int val; -char* masterRdbk; -double ratioRdbk; - -/* PV definitions */ - -PV(int, debug_flag, "{P}{R}:debug.VAL", Monitor); -/* the ok PV is an indicator that slave mode has been configured. it should only be false after a power-cycle before initializing */ -PV(int, ok_pv, "{P}{R}:ok.VAL", NoMon); -PV(int, on_pv, "{P}{R}:on.VAL", EvFlag); -PV(int, init_pv, "{P}{R}:init.VAL", EvFlag); -PV(double, ratio_pv, "{P}{R}:ratio.VAL", Monitor); -PV(double, ratioRdbk_pv, "{P}{R}:ratioRdbk.VAL", NoMon); - -ss slave_main -{ - state init - { - when () - { - /* get macros */ - ip = macValueGet("IP"); - master = macValueGet("M"); - slave = macValueGet("S"); - SNLtaskName = macValueGet("name"); - - /* Connect to the XPS controller (save the xps_socket ID) */ - %%xps_socket = TCP_ConnectToServer(pVar->ip, PORT, TIMEOUT); - - DEBUG_PRINT(2, "init -> update", 0, 0, 0, 0); - - efClear(init_pv_mon); - efClear(on_pv_mon); - - } state update - } - - state update - { - when () - { - /* Check if slave mode is on and set the on_pv appropriately */ - %%pVar->val = SingleAxisSlaveParametersGet(xps_socket, pVar->slave, pVar->masterRdbk, &pVar->ratioRdbk); - DEBUG_PRINT(2, "update(): val = %i, masterRdbk = %s, ratioRdbk = %f", val, masterRdbk, ratioRdbk, 0); - - /* Set the ok indictor to 1 if slave parameters exist */ - if (val == 0) - { - PVPUT(ok_pv, 1); - } - else - { - PVPUT(ok_pv, 0); - } - - /* what is the initial value if the first poll fails? */ - /* display the ratio */ - PVPUT(ratioRdbk_pv, ratioRdbk); - - DEBUG_PRINT(2, "update -> idle", 0, 0, 0, 0); - - } state idle - - } - - state modeChange - { - when () - { - if (on_pv == 1) - { - %%pVar->val = SingleAxisSlaveModeEnable(xps_socket, pVar->slave); - DEBUG_PRINT(2, "on_pv == 1", 0, 0, 0, 0); - } - else - { - %%pVar->val = SingleAxisSlaveModeDisable(xps_socket, pVar->slave); - DEBUG_PRINT(2, "on_pv != 1", 0, 0, 0, 0); - } - DEBUG_PRINT(2, "modeChange -> idle", 0, 0, 0, 0); - } state idle - - } - - /* Should reinit wait until a move is done before changing the gear ratio? */ - state reinit - { - when () - { - %%pVar->val = SingleAxisSlaveParametersSet(xps_socket, pVar->slave, pVar->master, pVar->ratio_pv); - DEBUG_PRINT(2, "reinit(): val = %i", val, 0, 0, 0); - - /* reset the init PV */ - PVPUT(init_pv, 0); - efClear(init_pv_mon); - DEBUG_PRINT(2, "reinit -> update", 0, 0, 0, 0); - - } state update - } - - state idle - { - when ( efTestAndClear(on_pv_mon) && ok_pv == 1 ) - { - /* A mode toggle has been requested */ - DEBUG_PRINT(2, "idle -> modeChange", 0, 0, 0, 0); - } state modeChange - - when ( efTest(init_pv_mon) ) - { - /* A reinit has been requested */ - DEBUG_PRINT(2, "idle -> reinit", 0, 0, 0, 0); - } state reinit - - } -} diff --git a/motorApp/NewportSrc/xps_ftp.c b/motorApp/NewportSrc/xps_ftp.c deleted file mode 100644 index 2f63facd..00000000 --- a/motorApp/NewportSrc/xps_ftp.c +++ /dev/null @@ -1,386 +0,0 @@ -/******************************************************************** - * ftp.c : source file for FTP functions for XPS motion Controller * - * * - * Authors : Max Lekeux * - * * - * Modifications history : * - * - 23aug06,ML : creation * - * * - * Warning : These functions were created to work with the XPS FTP * - * server. They prove the possibility to use standard * - * FTP functions. They are developped to be * - * cross-platform (Linux, Unix, Windows, VxWorks) * - * * - * Warning for Visual C++ : don't forget to add wsock32.lib to the * - * link. To do so add it in Menu Project->Settings * - * Tab Link -> Objects/Library modules * - ********************************************************************/ - - -/******[ includes ]**************************************************/ -#include "xps_ftp.h" - -/* local functions */ -static int code(char*); -static int sendFtpCommandAndReceive (SOCKET, char*, char*); -static int getPort (SOCKET, char*); -#ifdef DEBUG -static void printRecv (char*, int); -#endif - - -/******[ ftpConnect ]************************************************/ -epicsShareFunc int ftpConnect (char* ip, char* login, char* password, SOCKET* socketFD) -{ - char command[COMMAND_SIZE]; - char returnString[RETURN_SIZE]; - struct sockaddr_in sockAddr; - SOCKET sockFD; - - memset(&sockAddr, 0, sizeof(sockAddr)); - - sockFD = socket(AF_INET, SOCK_STREAM, 0); - - sockAddr.sin_family = AF_INET; - sockAddr.sin_port = htons(21); - sockAddr.sin_addr.s_addr = inet_addr(ip); - - if (connect(sockFD, (struct sockaddr *)&sockAddr, sizeof(sockAddr)) < 0) - return -1; - - do { - recv(sockFD, returnString, RETURN_SIZE, 0); - } - while (strchr(returnString,'\n')==NULL); - - /* login */ - sprintf(command, "USER %s", login); - if (-1 == sendFtpCommandAndReceive (sockFD, command, returnString)) - return -2; - - sprintf(command, "PASS %s", password); - if (-1 == sendFtpCommandAndReceive (sockFD, command, returnString)) - return -3; - - sprintf(command, "PASV"); - sendFtpCommandAndReceive (sockFD, command, returnString); - sprintf(command, "TYPE I"); - sendFtpCommandAndReceive (sockFD, command, returnString); - - *socketFD = sockFD; - - return 0; -} - - -/******[ ftpDisconnect ]*********************************************/ -epicsShareFunc int ftpDisconnect (SOCKET socketFD) -{ -#ifdef _WIN32 - return closesocket(socketFD); -#else - return close(socketFD); -#endif -} - - -/******[ ftpChangeDir ]**********************************************/ -epicsShareFunc int ftpChangeDir (SOCKET socketFD, char* destination) -{ - char command[COMMAND_SIZE]; - char returnString[RETURN_SIZE]; - - sprintf(command, "CWD %s", destination); - if (-1 == sendFtpCommandAndReceive (socketFD, command, returnString)) - return -1; - - return 0; -} - - -/******[ ftpRetrieveFile ]*******************************************/ -epicsShareFunc int ftpRetrieveFile(SOCKET socketFD, char *filename) -{ - int port_rcv, i; - SOCKET socketFDReceive; - struct sockaddr_in adr_rcv; - char ip[IP_SIZE]; - char command[COMMAND_SIZE]; - char returnString[RETURN_SIZE]; - FILE *file; - - memset(&adr_rcv, 0, sizeof(adr_rcv)); - - port_rcv = getPort(socketFD, ip); - - socketFDReceive = socket (AF_INET, SOCK_STREAM, 0); - - adr_rcv.sin_family = AF_INET; - adr_rcv.sin_addr.s_addr = inet_addr(ip); -#ifdef _WIN32 - adr_rcv.sin_port = htons((u_short)port_rcv); -#else - adr_rcv.sin_port = htons(port_rcv); -#endif - - if (0 > connect (socketFDReceive, (struct sockaddr *) &adr_rcv, sizeof(adr_rcv))) - { - fprintf(stderr,"Cound not connect to FTP server to retrieve file %s\n", filename); - return -1; - - } - - /* send command */ - sprintf(command, "RETR %s", filename); - if (-1 == sendFtpCommandAndReceive (socketFD, command, returnString)) - return -1; - - /* Check there is no problem with file */ - if (code(returnString) == 550) - return -1; - - /* open file on localhost */ - if (NULL == (file = fopen(filename, "wb"))) - { - fprintf(stderr,"Cound not open file \"%s\" for writing on local host\n", filename); - return -1; - } - - do - { - i = recv(socketFDReceive,returnString, RETURN_SIZE,0); - fwrite(returnString, sizeof(char), i, file); - } - while(i!=0); - -#ifdef _WIN32 - closesocket(socketFDReceive); -#else - close(socketFDReceive); -#endif - - fclose(file); - - i = recv(socketFD, returnString, RETURN_SIZE, 0); /* read "226 Transfer complete." */ - -#ifdef DEBUG - printf(" -> "); - printRecv(returnString, i); -#endif - - return 0; -} - - -/******[ ftpStoreFile ]**********************************************/ -epicsShareFunc int ftpStoreFile(SOCKET socketFD, char *filename) -{ - int port_snd, i; - SOCKET socketFDSend; - struct sockaddr_in adr_snd; - char ip[IP_SIZE]; - char command[COMMAND_SIZE]; - char returnString[RETURN_SIZE]; - FILE *file; - - memset(&adr_snd, 0, sizeof(adr_snd)); - - port_snd = getPort(socketFD, ip); - - socketFDSend = socket (AF_INET, SOCK_STREAM, 0); - - adr_snd.sin_family = AF_INET; - adr_snd.sin_addr.s_addr = inet_addr(ip); -#ifdef _WIN32 - adr_snd.sin_port = htons((u_short)port_snd); -#else - adr_snd.sin_port = htons(port_snd); -#endif - - if (0 > connect (socketFDSend, (struct sockaddr *) &adr_snd, sizeof(adr_snd))) - { - fprintf(stderr,"Cound not connect to FTP server to retrieve file %s\n", filename); - return -1; - - } - - /* send command */ - sprintf(command, "STOR %s", filename); - if (-1 == sendFtpCommandAndReceive (socketFD, command, returnString)) - return -1; - - /* open file on localhost */ - if (NULL == (file = fopen(filename, "rb"))) - { - fprintf(stderr,"Cound not open file \"%s\" for reading on local host\n", filename); - return -1; - } - - do - { - i = (int)fread(returnString, sizeof(char), RETURN_SIZE, file); - send(socketFDSend,returnString, i, 0); - } - while(i != 0); - -#ifdef _WIN32 - closesocket(socketFDSend); -#else - close(socketFDSend); -#endif - - fclose(file); - - i = recv(socketFD, returnString, RETURN_SIZE, 0); /* read "226 Transfer complete." */ - -#ifdef DEBUG - printf(" -> "); - printRecv(returnString, i); -#endif - - return 0; -} - - -/******[ code ]******************************************************/ -static int code (char *str) -{ - char tmp[3]; - strncpy(tmp, str, 3); - return atoi(tmp); -} - - -/******[ sendFtpCommandAndReceive ]**********************************/ -static int sendFtpCommandAndReceive (SOCKET socketFD, char* command, char* returnString) -{ - int receivedBytes; - char str_rec[RETURN_SIZE]; - -#ifdef DEBUG - printf("%s\n", command); -#endif - - sprintf(command, "%s\n", command); - - send (socketFD, command, (int)strlen(command), 0); - receivedBytes = recv(socketFD, str_rec, RETURN_SIZE, 0); - -#ifdef DEBUG - printf(" -> "); - printRecv (str_rec, receivedBytes); -#endif - - str_rec[receivedBytes] = '\0'; - - switch (code(str_rec)) - { - case 530: - fprintf(stderr, "Connection error\n"); return -1; - case 421: - fprintf(stderr, "Connection time out\n"); return -1; - default: - break; - } - - if (str_rec[3] == '-') /* Reading a "-" in third position means that */ - { /* the server wants to informations with one packet */ - /* for each line. */ - char tmp_code[3]; - int i, found_end = 0; - size_t j; - - strncpy(tmp_code, str_rec, 3); - while (!found_end) /* It is the end if we receive the code followed by a space */ - { - j = 0; - while ((j+4) < strlen(str_rec)) - { - if (tmp_code[0] == str_rec[j]) /* search the first letter of the code */ - { - if ((tmp_code[1] == str_rec[j+1]) - && (tmp_code[2] == str_rec[j+2]) - && (str_rec[j+3] == ' ')) - { /* compare the rest + space */ - found_end = 1; - break; - } - else - j++; - } - else - j++; - } - - if ((j+4) >= strlen(str_rec)) { /* Last line not found yet, keep going */ - i = recv(socketFD, str_rec, RETURN_SIZE, 0); - str_rec[i] = '\0'; - } - } - } - - strncpy(returnString, str_rec, RETURN_SIZE); - return 1; -} - - -/******[ getPort ]***************************************************/ -static int getPort (SOCKET socketFD, char* ip) -{ - char command[COMMAND_SIZE], returnString[RETURN_SIZE], tmp[RETURN_SIZE]; - int count, i, j, port; - - strcpy(command, "PASV"); - sendFtpCommandAndReceive (socketFD, command, returnString); - - i = 27; - count = 0; - while (count < 4) - { - if (returnString[i] == ',') - { - count++; - if (count < 4) - ip[i++-27] = '.'; - } - else - { - ip[i-27] = returnString[i]; - i++; - } - } - ip[i-27] = '\0'; - - j = ++i; - while (returnString[i] != ',') - { - tmp[i-j] = returnString[i]; - i++; - } - - tmp[i-j] = '\0'; - port = (atoi (tmp) * 256); - - j = ++i; - while (returnString[i] != ')') - { - tmp[i-j] = returnString[i]; - i++; - } - - tmp[i-j] = '\0'; - port += atoi (tmp); - - return port; -} - - -#ifdef DEBUG -/******[ printRecv ]**************************************************/ -static void printRecv (char *str, int i) -{ - int j; - for (j = 0; j < i; j++) - printf("%c", str[j]); -} -#endif diff --git a/motorApp/NewportSrc/xps_ftp.h b/motorApp/NewportSrc/xps_ftp.h deleted file mode 100644 index 0e198476..00000000 --- a/motorApp/NewportSrc/xps_ftp.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************** - * ftp.h : header file for FTP functions * - * * - * Authors : Max Lekeux * - * * - * Modifications : * - * - 23aug06,ML : creation * - * * - * Warning : These functions were created to work with the XPS FTP * - * server. They prove the possibility to use standard * - * FTP functions. They are developped to be * - * cross-platform (Linux, Unix, Windows, VxWorks) * - * * - * Warning for Visual C++ : don't forget to add wsock32.lib to the * - * link. To do so add it in Menu Project->Settings * - * Tab Link -> Objects/Library modules * - ********************************************************************/ - -/* #define VXWORKS */ - -/******[ includes ]**************************************************/ -#include -#include -#include - -#include -#include - - -/******[ defines ]***************************************************/ -/* #define DEBUG */ - -#define IP_SIZE 16 /* size of an IP address */ -#define NAME_SIZE 128 /* size for login, password */ -#define COMMAND_SIZE 256 /* size of a FTP command string */ -#define RETURN_SIZE 1500 /* size of a return (size of standard IP package) */ -#define PATH_SIZE 256 /* size of path */ - -#ifdef __cplusplus -extern "C" { -#endif - -/******[ prototypes ]************************************************/ -/* FTP commands */ -epicsShareFunc int ftpConnect (char*, char*, char*, SOCKET*); -epicsShareFunc int ftpDisconnect (SOCKET); -epicsShareFunc int ftpChangeDir (SOCKET, char*); -epicsShareFunc int ftpRetrieveFile (SOCKET, char*); -epicsShareFunc int ftpStoreFile(SOCKET, char*); - -#ifdef __cplusplus -} -#endif diff --git a/motorApp/op/adl/HXP.adl b/motorApp/op/adl/HXP.adl deleted file mode 100644 index d50f766b..00000000 --- a/motorApp/op/adl/HXP.adl +++ /dev/null @@ -1,177 +0,0 @@ - -file { - name="/home/oxygen21/KPETERSN/epics/ioc/synApps_5_6/kmp/kmpApp/op/adl/HXP.adl" - version=030107 -} -display { - object { - x=342 - y=122 - width=150 - height=189 - } - clr=64 - bclr=1 - cmap="" - gridSpacing=10 - gridOn=0 - snapToGrid=1 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -composite { - object { - x=10 - y=10 - width=130 - height=164 - } - "composite name"="" - children { - "related display" { - object { - x=10 - y=87 - width=130 - height=22 - } - display[0] { - label="HXP_extra.adl" - name="HXP_extra.adl" - args="P=$(P),R=$(R)" - } - clr=0 - bclr=17 - label="-HXP extra" - } - "related display" { - object { - x=10 - y=152 - width=130 - height=22 - } - display[0] { - label="HXP_coordSys.adl" - name="HXP_coordSys.adl" - args="P=$(P),R=$(R)" - } - clr=0 - bclr=17 - label="-HXP coordSys" - } - "related display" { - object { - x=10 - y=55 - width=130 - height=22 - } - display[0] { - label="HXP_motors.adl" - name="HXP_motors.adl" - args="P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6)" - } - clr=0 - bclr=17 - label="-HXP motors" - } - "related display" { - object { - x=10 - y=120 - width=130 - height=22 - } - display[0] { - label="HXP_moveAll.adl" - name="HXP_moveAll.adl" - args="P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6)" - } - clr=0 - bclr=17 - label="-HXP moveAll" - } - text { - object { - x=10 - y=10 - width=130 - height=30 - } - "basic attribute" { - clr=14 - } - textix="$(P)$(R)" - align="horiz. centered" - } - } -} diff --git a/motorApp/op/adl/HXP_coordSys.adl b/motorApp/op/adl/HXP_coordSys.adl deleted file mode 100644 index 94045822..00000000 --- a/motorApp/op/adl/HXP_coordSys.adl +++ /dev/null @@ -1,723 +0,0 @@ - -file { - name="/home/oxygen21/KPETERSN/epics/synApps_5_6/support/motor-svn/motorApp/op/adl/HXP_coordSys.adl" - version=030107 -} -display { - object { - x=411 - y=293 - width=800 - height=285 - } - clr=14 - bclr=3 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -composite { - object { - x=442 - y=235 - width=345 - height=30 - } - "composite name"="" - children { - rectangle { - object { - x=442 - y=235 - width=345 - height=30 - } - "basic attribute" { - clr=20 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="calc" - calc="A<0" - chan="$(P)$(R)ERROR" - } - } - "text update" { - object { - x=447 - y=241 - width=335 - height=20 - } - monitor { - chan="$(P)$(R)ERR_DESC" - clr=20 - bclr=3 - } - align="horiz. centered" - format="string" - limits { - } - } - } -} -"message button" { - object { - x=10 - y=230 - width=125 - height=40 - } - control { - chan="$(P)$(R)SET_CS" - clr=14 - bclr=31 - } - label="Set CS" - press_msg="1" - release_msg="0" -} -"message button" { - object { - x=308 - y=230 - width=125 - height=40 - } - control { - chan="$(P)$(R)READ_CS" - clr=14 - bclr=0 - } - label="Read CS" - press_msg="1" - release_msg="0" -} -"text entry" { - object { - x=90 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_X" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=210 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_Y" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=330 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_Z" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=450 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_U" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=570 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_V" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=690 - y=186 - width=98 - height=25 - } - control { - chan="$(P)$(R)CS_SET_W" - clr=14 - bclr=51 - } - limits { - } -} -"text update" { - object { - x=93 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:X" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=213 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:Y" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=333 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:Z" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=453 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:U" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=573 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:V" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=693 - y=75 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)TOOL:W" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=93 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:X" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=213 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:Y" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=333 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:Z" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=453 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:U" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=573 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:V" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=693 - y=112 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)BASE:W" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=94 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:X" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=214 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:Y" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=334 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:Z" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=454 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:U" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=574 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:V" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=694 - y=149 - width=94 - height=17 - } - monitor { - chan="$(P)$(R)WORK:W" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=10 - y=75 - width=70 - height=17 - } - "basic attribute" { - clr=54 - } - textix="Tool" - align="horiz. centered" -} -text { - object { - x=10 - y=112 - width=70 - height=17 - } - "basic attribute" { - clr=54 - } - textix="Base" - align="horiz. centered" -} -text { - object { - x=10 - y=149 - width=70 - height=17 - } - "basic attribute" { - clr=54 - } - textix="Work" - align="horiz. centered" -} -composite { - object { - x=10 - y=38 - width=777 - height=17 - } - "composite name"="" - children { - text { - object { - x=93 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="X" - align="horiz. centered" - } - text { - object { - x=213 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="Y" - align="horiz. centered" - } - text { - object { - x=333 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="Z" - align="horiz. centered" - } - text { - object { - x=453 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="U" - align="horiz. centered" - } - text { - object { - x=573 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="V" - align="horiz. centered" - } - text { - object { - x=693 - y=38 - width=94 - height=17 - } - "basic attribute" { - clr=54 - } - textix="W" - align="horiz. centered" - } - text { - object { - x=10 - y=38 - width=70 - height=17 - } - "basic attribute" { - clr=54 - } - textix="CS" - align="horiz. centered" - } - } -} -menu { - object { - x=8 - y=183 - width=75 - height=30 - } - control { - chan="$(P)$(R)CS_TO_SET" - clr=14 - bclr=4 - } -} -rectangle { - object { - x=0 - y=0 - width=800 - height=20 - } - "basic attribute" { - clr=0 - } -} -text { - object { - x=0 - y=0 - width=820 - height=20 - } - "basic attribute" { - clr=54 - } - textix="$(P)$(R) Coordinate System Definitions" - align="horiz. centered" -} diff --git a/motorApp/op/adl/HXP_extra.adl b/motorApp/op/adl/HXP_extra.adl deleted file mode 100644 index 1cef010b..00000000 --- a/motorApp/op/adl/HXP_extra.adl +++ /dev/null @@ -1,224 +0,0 @@ - -file { - name="/home/oxygen21/KPETERSN/epics/ioc/synApps_5_6/kmp/kmpApp/op/adl/HXP_extra.adl" - version=030107 -} -display { - object { - x=208 - y=115 - width=350 - height=250 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -rectangle { - object { - x=0 - y=0 - width=350 - height=30 - } - "basic attribute" { - clr=0 - } -} -text { - object { - x=0 - y=0 - width=350 - height=30 - } - "basic attribute" { - clr=54 - } - textix="$(P)$(R)" - align="horiz. centered" -} -text { - object { - x=62 - y=44 - width=110 - height=30 - } - "basic attribute" { - clr=14 - } - textix="Coord Sys" -} -menu { - object { - x=177 - y=44 - width=110 - height=36 - } - control { - chan="$(P)$(R)CS" - clr=14 - bclr=4 - } -} -text { - object { - x=62 - y=81 - width=110 - height=30 - } - "basic attribute" { - clr=14 - } - textix="Status" -} -"text update" { - object { - x=177 - y=81 - width=110 - height=30 - } - monitor { - chan="$(P)$(R)STATUS" - clr=14 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=179 - y=129 - width=110 - height=30 - } - monitor { - chan="$(P)$(R)ERROR" - clr=14 - bclr=4 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=64 - y=129 - width=110 - height=30 - } - "basic attribute" { - clr=14 - } - textix="Error" -} -text { - object { - x=62 - y=165 - width=225 - height=30 - } - "basic attribute" { - clr=14 - } - textix="Error Description" - align="horiz. centered" -} -"text update" { - object { - x=6 - y=204 - width=335 - height=22 - } - monitor { - chan="$(P)$(R)ERR_DESC" - clr=14 - bclr=4 - } - align="horiz. centered" - format="string" - limits { - } -} diff --git a/motorApp/op/adl/HXP_motors.adl b/motorApp/op/adl/HXP_motors.adl deleted file mode 100644 index ecebbe6b..00000000 --- a/motorApp/op/adl/HXP_motors.adl +++ /dev/null @@ -1,2814 +0,0 @@ - -file { - name="/home/oxygen21/KPETERSN/epics/ioc/synApps_5_6/kmp/kmpApp/op/adl/HXP_motors.adl" - version=030107 -} -display { - object { - x=35 - y=624 - width=720 - height=200 - } - clr=14 - bclr=3 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -"text update" { - object { - x=0 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M1).DMOV" - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).LVIO" - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1)_able.VAL" - } -} -rectangle { - object { - x=0 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=28 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M1).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=28 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=60 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M1).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=5 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M1)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M1)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M1)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M1)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M1),PV=$(M1)" - } - clr=14 - bclr=51 -} -text { - object { - x=27 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=2 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M1).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=28 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M1).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=89 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M1).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=0 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).LLS" - } -} -rectangle { - object { - x=110 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).HLS" - } -} -"text update" { - object { - x=0 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M1).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=0 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=0 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M1))" - align="horiz. centered" -} -rectangle { - object { - x=7 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).SET" - } -} -rectangle { - object { - x=9 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).SET" - } -} -"text update" { - object { - x=11 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M1).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=28 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1)_able.VAL" - } -} -"text update" { - object { - x=120 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M2).DMOV" - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).LVIO" - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2)_able.VAL" - } -} -rectangle { - object { - x=120 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=148 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M2).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=148 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=180 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M2).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=125 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M2)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M2)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M2)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M2)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M2),PV=$(M2)" - } - clr=14 - bclr=51 -} -text { - object { - x=147 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=122 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M2).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=148 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M2).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=209 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M2).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=120 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).LLS" - } -} -rectangle { - object { - x=230 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).HLS" - } -} -"text update" { - object { - x=120 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M2).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=120 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=120 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M2))" - align="horiz. centered" -} -rectangle { - object { - x=127 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).SET" - } -} -rectangle { - object { - x=129 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).SET" - } -} -"text update" { - object { - x=131 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M2).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=148 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2)_able.VAL" - } -} -"text update" { - object { - x=240 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M3).DMOV" - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).LVIO" - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3)_able.VAL" - } -} -rectangle { - object { - x=240 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=268 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M3).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=268 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=300 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M3).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=245 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M3)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M3)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M3)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M3)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M3),PV=$(M3)" - } - clr=14 - bclr=51 -} -text { - object { - x=267 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=242 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M3).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=268 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M3).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=329 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M3).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=240 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).LLS" - } -} -rectangle { - object { - x=350 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).HLS" - } -} -"text update" { - object { - x=240 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M3).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=240 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=240 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M3))" - align="horiz. centered" -} -rectangle { - object { - x=247 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).SET" - } -} -rectangle { - object { - x=249 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).SET" - } -} -"text update" { - object { - x=251 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M3).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=268 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3)_able.VAL" - } -} -"text update" { - object { - x=360 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M4).DMOV" - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).LVIO" - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4)_able.VAL" - } -} -rectangle { - object { - x=360 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=388 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M4).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=388 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=420 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M4).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=365 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M4)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M4)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M4)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M4)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M4),PV=$(M4)" - } - clr=14 - bclr=51 -} -text { - object { - x=387 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=362 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M4).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=388 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M4).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=449 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M4).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=360 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).LLS" - } -} -rectangle { - object { - x=470 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).HLS" - } -} -"text update" { - object { - x=360 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M4).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=360 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=360 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M4))" - align="horiz. centered" -} -rectangle { - object { - x=367 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).SET" - } -} -rectangle { - object { - x=369 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).SET" - } -} -"text update" { - object { - x=371 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M4).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=388 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4)_able.VAL" - } -} -"text update" { - object { - x=480 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M5).DMOV" - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).LVIO" - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5)_able.VAL" - } -} -rectangle { - object { - x=480 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=508 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M5).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=508 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=540 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M5).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=485 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M5)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M5)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M5)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M5)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M5),PV=$(M5)" - } - clr=14 - bclr=51 -} -text { - object { - x=507 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=482 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M5).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=508 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M5).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=569 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M5).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=480 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).LLS" - } -} -rectangle { - object { - x=590 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).HLS" - } -} -"text update" { - object { - x=480 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M5).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=480 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=480 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M5))" - align="horiz. centered" -} -rectangle { - object { - x=487 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).SET" - } -} -rectangle { - object { - x=489 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).SET" - } -} -"text update" { - object { - x=491 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M5).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=508 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5)_able.VAL" - } -} -"text update" { - object { - x=600 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M6).DMOV" - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).LVIO" - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6)_able.VAL" - } -} -rectangle { - object { - x=600 - y=97 - width=116 - height=40 - } - "basic attribute" { - clr=14 - width=3 - } -} -text { - object { - x=628 - y=121 - width=60 - height=15 - } - "basic attribute" { - clr=60 - fill="outline" - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M6).DMOV" - } - textix="Moving" - align="horiz. centered" -} -text { - object { - x=628 - y=127 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).SET" - } - textix="Calibrate" - align="horiz. centered" -} -"message button" { - object { - x=660 - y=137 - width=53 - height=20 - } - control { - chan="$(P)$(M6).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -"related display" { - object { - x=605 - y=137 - width=20 - height=20 - } - display[0] { - label="Help" - name="motorx_help.adl" - args="P=$(P),M=$(M6)" - } - display[1] { - label="More" - name="motorx_more.adl" - args="P=$(P),M=$(M6)" - } - display[2] { - label="Setup" - name="motorx_setup.adl" - args="P=$(P),M=$(M6)" - } - display[3] { - label="All" - name="motorx_all.adl" - args="P=$(P),M=$(M6)" - } - display[4] { - label="Setup scan parameters" - name="scanParms.adl" - args="P=$(P),Q=$(M6),PV=$(M6)" - } - clr=14 - bclr=51 -} -text { - object { - x=627 - y=139 - width=30 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=602 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M6).TWR" - clr=14 - bclr=51 - } - label="<" - press_msg="1" -} -"text entry" { - object { - x=628 - y=99 - width=60 - height=20 - } - control { - chan="$(P)$(M6).TWV" - clr=14 - bclr=51 - } - limits { - } -} -"message button" { - object { - x=689 - y=99 - width=25 - height=36 - } - control { - chan="$(P)$(M6).TWF" - clr=14 - bclr=51 - } - label=">" - press_msg="1" -} -rectangle { - object { - x=600 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).LLS" - } -} -rectangle { - object { - x=710 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).HLS" - } -} -"text update" { - object { - x=600 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M6).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=600 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=600 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M6))" - align="horiz. centered" -} -rectangle { - object { - x=607 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).SET" - } -} -rectangle { - object { - x=609 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).SET" - } -} -"text update" { - object { - x=611 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M6).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=628 - y=119 - width=60 - height=10 - } - "basic attribute" { - clr=30 - fill="outline" - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).LVIO" - } - textix="Soft limit" - align="horiz. centered" -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6)_able.VAL" - } -} -polyline { - object { - x=118 - y=0 - width=2 - height=158 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (119,1) - (119,157) - } -} -polyline { - object { - x=238 - y=0 - width=2 - height=158 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (239,1) - (239,157) - } -} -polyline { - object { - x=358 - y=0 - width=2 - height=158 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (359,1) - (359,157) - } -} -polyline { - object { - x=478 - y=0 - width=2 - height=158 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (479,1) - (479,157) - } -} -polyline { - object { - x=598 - y=0 - width=2 - height=157 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (599,1) - (599,156) - } -} -composite { - object { - x=9 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=9 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M1).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -text { - object { - x=4 - y=169 - width=95 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Coord Sys" -} -menu { - object { - x=105 - y=164 - width=105 - height=30 - } - control { - chan="$(P)$(R)CS" - clr=14 - bclr=4 - } -} -text { - object { - x=570 - y=169 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Status" - align="horiz. centered" -} -"text update" { - object { - x=647 - y=169 - width=60 - height=20 - } - monitor { - chan="$(P)$(R)STATUS" - clr=14 - bclr=3 - } - align="horiz. centered" - limits { - } -} -composite { - object { - x=129 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=129 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M2).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -composite { - object { - x=249 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=249 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M3).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -composite { - object { - x=369 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=369 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M4).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -composite { - object { - x=489 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=489 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M5).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -composite { - object { - x=609 - y=69 - width=98 - height=25 - } - "composite name"="" - children { - "text entry" { - object { - x=609 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(M6).VAL" - clr=14 - bclr=51 - } - limits { - } - } - } - "dynamic attribute" { - vis="if zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=9 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=129 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=249 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=369 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=489 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=609 - y=69 - width=98 - height=25 - } - "basic attribute" { - clr=3 - width=2 - } - "dynamic attribute" { - vis="if not zero" - calc="A" - chan="$(P)$(R)CS" - } -} -rectangle { - object { - x=220 - y=165 - width=345 - height=30 - } - "basic attribute" { - clr=20 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="calc" - calc="A<0" - chan="$(P)$(R)ERROR" - } -} -"text update" { - object { - x=225 - y=171 - width=335 - height=20 - } - monitor { - chan="$(P)$(R)ERR_DESC" - clr=20 - bclr=3 - } - align="horiz. centered" - format="string" - limits { - } -} diff --git a/motorApp/op/adl/HXP_moveAll.adl b/motorApp/op/adl/HXP_moveAll.adl deleted file mode 100644 index 76dc086c..00000000 --- a/motorApp/op/adl/HXP_moveAll.adl +++ /dev/null @@ -1,1636 +0,0 @@ - -file { - name="/home/oxygen21/KPETERSN/epics/ioc/synApps_5_6/kmp/kmpApp/op/adl/HXP_moveAll.adl" - version=030107 -} -display { - object { - x=411 - y=293 - width=720 - height=165 - } - clr=14 - bclr=3 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -"text update" { - object { - x=0 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M1).DMOV" - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).LVIO" - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1)_able.VAL" - } -} -"message button" { - object { - x=502 - y=106 - width=125 - height=40 - } - control { - chan="$(P)$(M1).STOP" - clr=31 - bclr=20 - } - label="STOP" - press_msg="1" -} -rectangle { - object { - x=0 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).LLS" - } -} -rectangle { - object { - x=110 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).HLS" - } -} -"text update" { - object { - x=0 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M1).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=0 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=0 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M1))" - align="horiz. centered" -} -rectangle { - object { - x=7 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).SET" - } -} -rectangle { - object { - x=9 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1).SET" - } -} -"text update" { - object { - x=11 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M1).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=6 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M1)_able.VAL" - } -} -"text update" { - object { - x=120 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M2).DMOV" - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).LVIO" - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2)_able.VAL" - } -} -rectangle { - object { - x=120 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).LLS" - } -} -rectangle { - object { - x=230 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).HLS" - } -} -"text update" { - object { - x=120 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M2).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=120 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=120 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M2))" - align="horiz. centered" -} -rectangle { - object { - x=127 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).SET" - } -} -rectangle { - object { - x=129 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2).SET" - } -} -"text update" { - object { - x=131 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M2).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=126 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M2)_able.VAL" - } -} -"text update" { - object { - x=240 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M3).DMOV" - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).LVIO" - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3)_able.VAL" - } -} -rectangle { - object { - x=240 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).LLS" - } -} -rectangle { - object { - x=350 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).HLS" - } -} -"text update" { - object { - x=240 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M3).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=240 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=240 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M3))" - align="horiz. centered" -} -rectangle { - object { - x=247 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).SET" - } -} -rectangle { - object { - x=249 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3).SET" - } -} -"text update" { - object { - x=251 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M3).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=246 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M3)_able.VAL" - } -} -"text update" { - object { - x=360 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M4).DMOV" - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).LVIO" - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4)_able.VAL" - } -} -rectangle { - object { - x=360 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).LLS" - } -} -rectangle { - object { - x=470 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).HLS" - } -} -"text update" { - object { - x=360 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M4).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=360 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=360 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M4))" - align="horiz. centered" -} -rectangle { - object { - x=367 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).SET" - } -} -rectangle { - object { - x=369 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4).SET" - } -} -"text update" { - object { - x=371 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M4).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=366 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M4)_able.VAL" - } -} -"text update" { - object { - x=480 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M5).DMOV" - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).LVIO" - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5)_able.VAL" - } -} -rectangle { - object { - x=480 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).LLS" - } -} -rectangle { - object { - x=590 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).HLS" - } -} -"text update" { - object { - x=480 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M5).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=480 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=480 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M5))" - align="horiz. centered" -} -rectangle { - object { - x=487 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).SET" - } -} -rectangle { - object { - x=489 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5).SET" - } -} -"text update" { - object { - x=491 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M5).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=486 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M5)_able.VAL" - } -} -"text update" { - object { - x=600 - y=0 - width=116 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=54 - bclr=0 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=60 - width=2 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(M6).DMOV" - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=30 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).LVIO" - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=14 - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6)_able.VAL" - } -} -rectangle { - object { - x=600 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).LLS" - } -} -rectangle { - object { - x=710 - y=45 - width=6 - height=50 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).HLS" - } -} -"text update" { - object { - x=600 - y=32 - width=116 - height=12 - } - monitor { - chan="$(P)$(M6).EGU" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=600 - y=20 - width=116 - height=12 - } - "basic attribute" { - clr=54 - width=2 - } -} -text { - object { - x=600 - y=21 - width=116 - height=10 - } - "basic attribute" { - clr=0 - fill="outline" - } - textix="($(P)$(M6))" - align="horiz. centered" -} -rectangle { - object { - x=607 - y=41 - width=102 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).SET" - } -} -rectangle { - object { - x=609 - y=43 - width=98 - height=21 - } - "basic attribute" { - clr=30 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6).SET" - } -} -"text update" { - object { - x=611 - y=45 - width=94 - height=17 - } - monitor { - chan="$(P)$(M6).RBV" - clr=54 - bclr=3 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=606 - y=66 - width=104 - height=31 - } - "basic attribute" { - clr=20 - style="dash" - fill="outline" - width=2 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(M6)_able.VAL" - } -} -polyline { - object { - x=118 - y=0 - width=2 - height=101 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (119,1) - (119,100) - } -} -polyline { - object { - x=238 - y=0 - width=2 - height=101 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (239,1) - (239,100) - } -} -polyline { - object { - x=358 - y=0 - width=2 - height=101 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (359,1) - (359,100) - } -} -polyline { - object { - x=478 - y=0 - width=2 - height=101 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (479,1) - (479,100) - } -} -polyline { - object { - x=598 - y=0 - width=2 - height=101 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (599,1) - (599,100) - } -} -"text entry" { - object { - x=369 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T4" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=489 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T5" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=609 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T6" - clr=14 - bclr=51 - } - limits { - } -} -"related display" { - object { - x=655 - y=140 - width=20 - height=20 - } - display[0] { - label="Help" - } - display[1] { - label="HXP_motors" - name="HXP_motors.adl" - args="P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6)" - } - display[2] { - label="HXP_extra" - name="HXP_extra.adl" - args="P=$(P),R=$(R)" - } - clr=14 - bclr=51 -} -text { - object { - x=678 - y=142 - width=31 - height=18 - } - "basic attribute" { - clr=14 - } - textix="More" - align="horiz. centered" -} -"message button" { - object { - x=365 - y=105 - width=125 - height=40 - } - control { - chan="$(P)$(R)MOVE_ALL" - clr=31 - bclr=18 - } - label="Go" - press_msg="1" - release_msg="0" -} -composite { - object { - x=8 - y=104 - width=345 - height=30 - } - "composite name"="" - children { - rectangle { - object { - x=8 - y=104 - width=345 - height=30 - } - "basic attribute" { - clr=20 - fill="outline" - width=2 - } - "dynamic attribute" { - vis="calc" - calc="A<0" - chan="$(P)$(R)ERROR" - } - } - "text update" { - object { - x=13 - y=110 - width=335 - height=20 - } - monitor { - chan="$(P)$(R)ERR_DESC" - clr=20 - bclr=3 - } - align="horiz. centered" - format="string" - limits { - } - } - } -} -composite { - object { - x=10 - y=140 - width=137 - height=20 - } - "composite name"="" - children { - text { - object { - x=10 - y=140 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Status" - align="horiz. centered" - } - "text update" { - object { - x=87 - y=140 - width=60 - height=20 - } - monitor { - chan="$(P)$(R)STATUS" - clr=14 - bclr=3 - } - align="horiz. centered" - limits { - } - } - } -} -"text entry" { - object { - x=9 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T1" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=129 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T2" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=249 - y=69 - width=98 - height=25 - } - control { - chan="$(P)$(R)T3" - clr=14 - bclr=51 - } - limits { - } -} diff --git a/motorApp/op/adl/XPSAux.adl b/motorApp/op/adl/XPSAux.adl deleted file mode 100644 index f599f7dd..00000000 --- a/motorApp/op/adl/XPSAux.adl +++ /dev/null @@ -1,3429 +0,0 @@ - -file { - name="/home/epics/devel/motor/5-9beta/motorApp/op/adl/XPSAux.adl" - version=030000 -} -display { - object { - x=78 - y=203 - width=900 - height=660 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=322 - y=6 - width=256 - height=32 - } - "basic attribute" { - clr=14 - } - textix="XPS Auxilliary I/O" -} -text { - object { - x=384 - y=52 - width=132 - height=25 - } - "basic attribute" { - clr=14 - } - textix="Digital I/O" -} -text { - object { - x=255 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="1" - align="horiz. centered" -} -text { - object { - x=295 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="2" - align="horiz. centered" -} -text { - object { - x=335 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="3" - align="horiz. centered" -} -text { - object { - x=375 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="4" - align="horiz. centered" -} -text { - object { - x=415 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="5" - align="horiz. centered" -} -text { - object { - x=455 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="6" - align="horiz. centered" -} -text { - object { - x=495 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="7" - align="horiz. centered" -} -text { - object { - x=535 - y=86 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="8" - align="horiz. centered" -} -composite { - object { - x=5 - y=200 - width=483 - height=54 - } - "composite name"="" - children { - composite { - object { - x=11 - y=205 - width=472 - height=44 - } - "composite name"="" - children { - text { - object { - x=11 - y=217 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="GPIO2" - } - "text update" { - object { - x=139 - y=217 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)2Li.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - format="hexadecimal" - limits { - } - } - text { - object { - x=85 - y=217 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Input" - } - oval { - object { - x=296 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi1.VAL" - } - } - oval { - object { - x=296 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi1.VAL" - } - } - oval { - object { - x=336 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi2.VAL" - } - } - oval { - object { - x=336 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi2.VAL" - } - } - oval { - object { - x=376 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi3.VAL" - } - } - oval { - object { - x=376 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi3.VAL" - } - } - oval { - object { - x=416 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi4.VAL" - } - } - oval { - object { - x=416 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi4.VAL" - } - } - oval { - object { - x=456 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi5.VAL" - } - } - oval { - object { - x=456 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi5.VAL" - } - } - oval { - object { - x=256 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)2Bi0.VAL" - } - } - oval { - object { - x=256 - y=205 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)2Bi0.VAL" - } - } - "related display" { - object { - x=248 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi0" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=288 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi1" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=328 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi2" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=368 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi3" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=408 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi4" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=448 - y=231 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)2Bi5" - } - clr=14 - bclr=51 - } - } - } - rectangle { - object { - x=5 - y=200 - width=483 - height=54 - } - "basic attribute" { - clr=14 - fill="outline" - } - } - } -} -composite { - object { - x=5 - y=259 - width=483 - height=87 - } - "composite name"="" - children { - rectangle { - object { - x=5 - y=259 - width=483 - height=87 - } - "basic attribute" { - clr=14 - fill="outline" - } - } - composite { - object { - x=10 - y=264 - width=473 - height=77 - } - "composite name"="" - children { - text { - object { - x=10 - y=294 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="GPIO3" - } - oval { - object { - x=295 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi1.VAL" - } - } - oval { - object { - x=295 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi1.VAL" - } - } - "choice button" { - object { - x=288 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo1" - clr=14 - bclr=51 - } - } - oval { - object { - x=335 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi2.VAL" - } - } - oval { - object { - x=335 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi2.VAL" - } - } - "choice button" { - object { - x=328 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo2" - clr=14 - bclr=51 - } - } - oval { - object { - x=375 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi3.VAL" - } - } - oval { - object { - x=375 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi3.VAL" - } - } - "choice button" { - object { - x=368 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo3" - clr=14 - bclr=51 - } - } - oval { - object { - x=415 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi4.VAL" - } - } - oval { - object { - x=415 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi4.VAL" - } - } - "choice button" { - object { - x=408 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo4" - clr=14 - bclr=51 - } - } - oval { - object { - x=455 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi5.VAL" - } - } - oval { - object { - x=455 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi5.VAL" - } - } - "choice button" { - object { - x=448 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo5" - clr=14 - bclr=51 - } - } - oval { - object { - x=255 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)3Bi0.VAL" - } - } - oval { - object { - x=255 - y=264 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)3Bi0.VAL" - } - } - "choice button" { - object { - x=248 - y=289 - width=35 - height=30 - } - control { - chan="$(P)$(R)3Bo0" - clr=14 - bclr=51 - } - } - "text update" { - object { - x=138 - y=264 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)3Li.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - format="hexadecimal" - limits { - } - } - "text entry" { - object { - x=138 - y=294 - width=100 - height=20 - } - control { - chan="$(P)$(R)3Lo.VAL" - clr=14 - bclr=51 - } - format="hexadecimal" - limits { - } - } - "related display" { - object { - x=247 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi0" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=287 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi1" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=327 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi2" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=367 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi3" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=407 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi4" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=447 - y=323 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)3Bi5" - } - clr=14 - bclr=51 - } - text { - object { - x=84 - y=264 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Input" - } - text { - object { - x=74 - y=294 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" - } - } - } - } -} -composite { - object { - x=5 - y=351 - width=883 - height=87 - } - "composite name"="" - children { - rectangle { - object { - x=5 - y=351 - width=883 - height=87 - } - "basic attribute" { - clr=14 - fill="outline" - } - } - composite { - object { - x=10 - y=356 - width=873 - height=77 - } - "composite name"="" - children { - text { - object { - x=10 - y=386 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="GPIO4" - } - oval { - object { - x=295 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi1.VAL" - } - } - oval { - object { - x=295 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi1.VAL" - } - } - "choice button" { - object { - x=288 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo1" - clr=14 - bclr=51 - } - } - oval { - object { - x=335 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi2.VAL" - } - } - oval { - object { - x=335 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi2.VAL" - } - } - "choice button" { - object { - x=328 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo2" - clr=14 - bclr=51 - } - } - oval { - object { - x=375 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi3.VAL" - } - } - oval { - object { - x=375 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi3.VAL" - } - } - "choice button" { - object { - x=368 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo3" - clr=14 - bclr=51 - } - } - oval { - object { - x=415 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi4.VAL" - } - } - oval { - object { - x=415 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi4.VAL" - } - } - "choice button" { - object { - x=408 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo4" - clr=14 - bclr=51 - } - } - oval { - object { - x=455 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi5.VAL" - } - } - oval { - object { - x=455 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi5.VAL" - } - } - "choice button" { - object { - x=448 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo5" - clr=14 - bclr=51 - } - } - oval { - object { - x=495 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi6.VAL" - } - } - oval { - object { - x=495 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi6.VAL" - } - } - "choice button" { - object { - x=488 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo6" - clr=14 - bclr=51 - } - } - oval { - object { - x=535 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi7.VAL" - } - } - oval { - object { - x=535 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi7.VAL" - } - } - "choice button" { - object { - x=528 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo7" - clr=14 - bclr=51 - } - } - oval { - object { - x=615 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi9.VAL" - } - } - oval { - object { - x=615 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi9.VAL" - } - } - "choice button" { - object { - x=608 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo9" - clr=14 - bclr=51 - } - } - oval { - object { - x=575 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi8.VAL" - } - } - oval { - object { - x=575 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi8.VAL" - } - } - "choice button" { - object { - x=568 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo8" - clr=14 - bclr=51 - } - } - oval { - object { - x=655 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi10.VAL" - } - } - oval { - object { - x=655 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi10.VAL" - } - } - "choice button" { - object { - x=648 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo10" - clr=14 - bclr=51 - } - } - oval { - object { - x=695 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi11.VAL" - } - } - oval { - object { - x=695 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi11.VAL" - } - } - "choice button" { - object { - x=688 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo11" - clr=14 - bclr=51 - } - } - oval { - object { - x=735 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi12.VAL" - } - } - oval { - object { - x=735 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi12.VAL" - } - } - "choice button" { - object { - x=728 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo12" - clr=14 - bclr=51 - } - } - oval { - object { - x=775 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi13.VAL" - } - } - oval { - object { - x=775 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi13.VAL" - } - } - "choice button" { - object { - x=768 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo13" - clr=14 - bclr=51 - } - } - oval { - object { - x=815 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi14.VAL" - } - } - oval { - object { - x=815 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi14.VAL" - } - } - "choice button" { - object { - x=808 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo14" - clr=14 - bclr=51 - } - } - oval { - object { - x=855 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi15.VAL" - } - } - oval { - object { - x=855 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi15.VAL" - } - } - "choice button" { - object { - x=848 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo15" - clr=14 - bclr=51 - } - } - oval { - object { - x=255 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)4Bi0.VAL" - } - } - oval { - object { - x=255 - y=356 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)4Bi0.VAL" - } - } - "choice button" { - object { - x=248 - y=381 - width=35 - height=30 - } - control { - chan="$(P)$(R)4Bo0" - clr=14 - bclr=51 - } - } - "text update" { - object { - x=138 - y=356 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)4Li.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - format="hexadecimal" - limits { - } - } - "text entry" { - object { - x=138 - y=386 - width=100 - height=20 - } - control { - chan="$(P)$(R)4Lo.VAL" - clr=14 - bclr=51 - } - format="hexadecimal" - limits { - } - } - "related display" { - object { - x=247 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi0" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=287 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi1" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=327 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi2" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=367 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi3" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=407 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi4" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=447 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi5" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=487 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi6" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=527 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi7" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=567 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi8" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=607 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi9" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=647 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi10" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=687 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi11" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=727 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi12" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=767 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi13" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=807 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi14" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=847 - y=415 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)4Bi15" - } - clr=14 - bclr=51 - } - text { - object { - x=84 - y=356 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Input" - } - text { - object { - x=74 - y=386 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" - } - } - } - } -} -text { - object { - x=342 - y=458 - width=216 - height=25 - } - "basic attribute" { - clr=14 - } - textix="Analog I/O (GPIO2)" -} -text { - object { - x=160 - y=493 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Input" -} -rectangle { - object { - x=5 - y=489 - width=500 - height=165 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -composite { - object { - x=5 - y=108 - width=563 - height=87 - } - "composite name"="" - children { - rectangle { - object { - x=5 - y=108 - width=563 - height=87 - } - "basic attribute" { - clr=14 - fill="outline" - } - } - composite { - object { - x=10 - y=113 - width=553 - height=77 - } - "composite name"="" - children { - text { - object { - x=10 - y=143 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="GPIO1" - } - oval { - object { - x=295 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi1.VAL" - } - } - oval { - object { - x=295 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi1.VAL" - } - } - "choice button" { - object { - x=288 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo1" - clr=14 - bclr=51 - } - } - oval { - object { - x=335 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi2.VAL" - } - } - oval { - object { - x=335 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi2.VAL" - } - } - "choice button" { - object { - x=328 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo2" - clr=14 - bclr=51 - } - } - oval { - object { - x=375 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi3.VAL" - } - } - oval { - object { - x=375 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi3.VAL" - } - } - "choice button" { - object { - x=368 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo3" - clr=14 - bclr=51 - } - } - oval { - object { - x=415 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi4.VAL" - } - } - oval { - object { - x=415 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi4.VAL" - } - } - "choice button" { - object { - x=408 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo4" - clr=14 - bclr=51 - } - } - oval { - object { - x=455 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi5.VAL" - } - } - oval { - object { - x=455 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi5.VAL" - } - } - "choice button" { - object { - x=448 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo5" - clr=14 - bclr=51 - } - } - oval { - object { - x=495 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi6.VAL" - } - } - oval { - object { - x=495 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi6.VAL" - } - } - "choice button" { - object { - x=488 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo6" - clr=14 - bclr=51 - } - } - oval { - object { - x=535 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi7.VAL" - } - } - oval { - object { - x=535 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi7.VAL" - } - } - "choice button" { - object { - x=528 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo7" - clr=14 - bclr=51 - } - } - oval { - object { - x=255 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)1Bi0.VAL" - } - } - oval { - object { - x=255 - y=113 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)1Bi0.VAL" - } - } - "choice button" { - object { - x=248 - y=138 - width=35 - height=30 - } - control { - chan="$(P)$(R)1Bo0" - clr=14 - bclr=51 - } - } - "text update" { - object { - x=138 - y=113 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)1Li.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - format="hexadecimal" - limits { - } - } - "text entry" { - object { - x=138 - y=143 - width=100 - height=20 - } - control { - chan="$(P)$(R)1Lo.VAL" - clr=14 - bclr=51 - } - format="hexadecimal" - limits { - } - } - "related display" { - object { - x=247 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi0" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=287 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi1" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=327 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi2" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=367 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi3" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=407 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi4" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=447 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi5" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=487 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi6" - } - clr=14 - bclr=51 - } - "related display" { - object { - x=527 - y=172 - width=35 - height=18 - } - display[0] { - name="XPSAuxBi_more.adl" - args="P=$(P), R=$(R)1Bi7" - } - clr=14 - bclr=51 - } - text { - object { - x=84 - y=113 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Input" - } - text { - object { - x=74 - y=143 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" - } - } - } - } -} -text { - object { - x=12 - y=540 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai0.VAL" - } - textix=" 1" - align="horiz. centered" -} -"text update" { - object { - x=188 - y=540 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)Ai0.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=293 - y=540 - width=40 - height=22 - } - control { - chan="$(P)$(R)Ai0.PREC" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=16 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Chan." - align="horiz. centered" -} -text { - object { - x=106 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Description" - align="horiz. centered" -} -text { - object { - x=221 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Volts" - align="horiz. centered" -} -text { - object { - x=300 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Prec." - align="horiz. centered" -} -text { - object { - x=12 - y=565 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai1.VAL" - } - textix=" 2" - align="horiz. centered" -} -"text update" { - object { - x=188 - y=565 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)Ai1.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=293 - y=565 - width=40 - height=22 - } - control { - chan="$(P)$(R)Ai1.PREC" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=12 - y=590 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai1.VAL" - } - textix=" 3" - align="horiz. centered" -} -"text update" { - object { - x=188 - y=590 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)Ai2.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=293 - y=590 - width=40 - height=22 - } - control { - chan="$(P)$(R)Ai2.PREC" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=12 - y=615 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai2.VAL" - } - textix=" 4" - align="horiz. centered" -} -"text update" { - object { - x=188 - y=615 - width=100 - height=20 - } - monitor { - chan="$(P)$(R)Ai3.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=293 - y=615 - width=40 - height=22 - } - control { - chan="$(P)$(R)Ai3.PREC" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=35 - y=540 - width=148 - height=20 - } - control { - chan="$(P)$(R)Ai0.DESC" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=35 - y=565 - width=148 - height=20 - } - control { - chan="$(P)$(R)Ai1.DESC" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=35 - y=590 - width=148 - height=20 - } - control { - chan="$(P)$(R)Ai2.DESC" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { - object { - x=35 - y=615 - width=148 - height=20 - } - control { - chan="$(P)$(R)Ai3.DESC" - clr=14 - bclr=51 - } - limits { - } -} -composite { - object { - x=538 - y=489 - width=350 - height=165 - } - "composite name"="" - children { - text { - object { - x=674 - y=493 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" - } - rectangle { - object { - x=538 - y=489 - width=350 - height=165 - } - "basic attribute" { - clr=14 - fill="outline" - } - } - composite { - object { - x=564 - y=519 - width=280 - height=116 - } - "composite name"="" - children { - text { - object { - x=568 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Chan." - align="horiz. centered" - } - "text entry" { - object { - x=589 - y=540 - width=100 - height=20 - } - control { - chan="$(P)$(R)Ao0.VAL" - clr=14 - bclr=51 - } - limits { - } - } - valuator { - object { - x=694 - y=540 - width=150 - height=20 - } - control { - chan="$(P)$(R)Ao0.VAL" - clr=14 - bclr=51 - } - dPrecision=1.000000 - limits { - } - } - text { - object { - x=564 - y=540 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai0.VAL" - } - textix=" 1" - align="horiz. centered" - } - text { - object { - x=564 - y=565 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai1.VAL" - } - textix=" 2" - align="horiz. centered" - } - text { - object { - x=564 - y=590 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai1.VAL" - } - textix=" 3" - align="horiz. centered" - } - text { - object { - x=564 - y=615 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - "dynamic attribute" { - chan="$(P)$(R)Ai2.VAL" - } - textix=" 4" - align="horiz. centered" - } - "text entry" { - object { - x=589 - y=565 - width=100 - height=20 - } - control { - chan="$(P)$(R)Ao1.VAL" - clr=14 - bclr=51 - } - limits { - } - } - valuator { - object { - x=694 - y=565 - width=150 - height=20 - } - control { - chan="$(P)$(R)Ao1.VAL" - clr=14 - bclr=51 - } - dPrecision=1.000000 - limits { - } - } - "text entry" { - object { - x=589 - y=590 - width=100 - height=20 - } - control { - chan="$(P)$(R)Ao2.VAL" - clr=14 - bclr=51 - } - limits { - } - } - valuator { - object { - x=694 - y=590 - width=150 - height=20 - } - control { - chan="$(P)$(R)Ao2.VAL" - clr=14 - bclr=51 - } - dPrecision=1.000000 - limits { - } - } - "text entry" { - object { - x=589 - y=615 - width=100 - height=20 - } - control { - chan="$(P)$(R)Ao3.VAL" - clr=14 - bclr=51 - } - limits { - } - } - valuator { - object { - x=694 - y=615 - width=150 - height=20 - } - control { - chan="$(P)$(R)Ao3.VAL" - clr=14 - bclr=51 - } - dPrecision=1.000000 - limits { - } - } - } - } - } -} -composite { - object { - x=338 - y=519 - width=86 - height=116 - } - "composite name"="" - children { - menu { - object { - x=338 - y=540 - width=86 - height=20 - } - control { - chan="$(P)$(R)Ai0.SCAN" - clr=14 - bclr=4 - } - } - text { - object { - x=363 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Scan" - align="horiz. centered" - } - menu { - object { - x=338 - y=565 - width=86 - height=20 - } - control { - chan="$(P)$(R)Ai1.SCAN" - clr=14 - bclr=4 - } - } - menu { - object { - x=338 - y=590 - width=86 - height=20 - } - control { - chan="$(P)$(R)Ai2.SCAN" - clr=14 - bclr=4 - } - } - menu { - object { - x=338 - y=615 - width=86 - height=20 - } - control { - chan="$(P)$(R)Ai3.SCAN" - clr=14 - bclr=4 - } - } - } -} -menu { - object { - x=432 - y=540 - width=60 - height=20 - } - control { - chan="$(P)$(R)Ai0Gain.VAL" - clr=14 - bclr=4 - } -} -text { - object { - x=444 - y=519 - width=35 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Gain" - align="horiz. centered" -} -menu { - object { - x=432 - y=565 - width=60 - height=20 - } - control { - chan="$(P)$(R)Ai1Gain.VAL" - clr=14 - bclr=4 - } -} -menu { - object { - x=432 - y=590 - width=60 - height=20 - } - control { - chan="$(P)$(R)Ai2Gain.VAL" - clr=14 - bclr=4 - } -} -menu { - object { - x=432 - y=615 - width=60 - height=20 - } - control { - chan="$(P)$(R)Ai3Gain.VAL" - clr=14 - bclr=4 - } -} -text { - object { - x=495 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="7" - align="horiz. centered" -} -text { - object { - x=535 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="8" - align="horiz. centered" -} -text { - object { - x=575 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="9" - align="horiz. centered" -} -text { - object { - x=615 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="10" - align="horiz. centered" -} -text { - object { - x=655 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="11" - align="horiz. centered" -} -text { - object { - x=695 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="12" - align="horiz. centered" -} -text { - object { - x=735 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="13" - align="horiz. centered" -} -text { - object { - x=775 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="14" - align="horiz. centered" -} -text { - object { - x=815 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="15" - align="horiz. centered" -} -text { - object { - x=855 - y=325 - width=20 - height=20 - } - "basic attribute" { - clr=14 - } - textix="16" - align="horiz. centered" -} diff --git a/motorApp/op/adl/XPSAuxBi_more.adl b/motorApp/op/adl/XPSAuxBi_more.adl deleted file mode 100644 index 4cb747cf..00000000 --- a/motorApp/op/adl/XPSAuxBi_more.adl +++ /dev/null @@ -1,162 +0,0 @@ - -file { - name="i:\epics\synApps5-1beta2\ipUnidig\ipUnidigApp\op\adl\IpUnidig_more.adl" - version=030003 -} -display { - object { - x=140 - y=349 - width=180 - height=100 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=-10 - y=8 - width=200 - height=20 - } - "basic attribute" { - clr=14 - } - textix="$(P)$(R)" - align="horiz. centered" -} -menu { - object { - x=40 - y=70 - width=100 - height=20 - } - control { - chan="$(P)$(R).SCAN" - clr=14 - bclr=51 - } -} -oval { - object { - x=115 - y=39 - width=20 - height=20 - } - "basic attribute" { - clr=15 - } - "dynamic attribute" { - vis="if zero" - chan="$(P)$(R)" - } -} -"text update" { - object { - x=46 - y=39 - width=60 - height=20 - } - monitor { - chan="$(P)$(R).VAL" - clr=14 - bclr=51 - } - align="horiz. centered" - format="hexadecimal" - limits { - } -} -oval { - object { - x=115 - y=39 - width=20 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="if not zero" - chan="$(P)$(R)" - } -} diff --git a/motorApp/op/adl/XPSAuxTest.adl b/motorApp/op/adl/XPSAuxTest.adl deleted file mode 100644 index 9f9b76b3..00000000 --- a/motorApp/op/adl/XPSAuxTest.adl +++ /dev/null @@ -1,105 +0,0 @@ - -file { - name="XPSAuxTest.adl" - version=030000 -} -display { - object { - x=839 - y=49 - width=150 - height=100 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -"related display" { - object { - x=17 - y=39 - width=110 - height=25 - } - display[0] { - label="XPS Auxilliary" - name="XPSAux.adl" - args="P=IOC:, R=XPSAux" - } - clr=14 - bclr=4 - label="XPSAux" -} diff --git a/motorApp/op/adl/XPSExtra.adl b/motorApp/op/adl/XPSExtra.adl deleted file mode 100644 index 8540fcb9..00000000 --- a/motorApp/op/adl/XPSExtra.adl +++ /dev/null @@ -1,195 +0,0 @@ - -file { - name="XPSExtra.adl" - version=030000 -} -display { - object { - x=560 - y=84 - width=350 - height=150 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=-87 - y=97 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="GPIO1" -} -"text update" { - object { - x=159 - y=42 - width=100 - height=20 - } - monitor { - chan="IOC:m1READBACK.VAL" - clr=14 - bclr=51 - } - align="horiz. right" - limits { - } -} -"text entry" { - object { - x=159 - y=72 - width=100 - height=20 - } - control { - chan="IOC:m1MIN_JERK_TIME" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=73 - y=42 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Readback" -} -text { - object { - x=13 - y=72 - width=140 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Min. jerk time" -} -"text entry" { - object { - x=159 - y=101 - width=100 - height=20 - } - control { - chan="IOC:m1MAX_JERK_TIME" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=13 - y=101 - width=140 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Max. jerk time" -} -text { - object { - x=11 - y=11 - width=310 - height=20 - } - "basic attribute" { - clr=14 - } - textix="XPS with standard EPICS records" -} diff --git a/motorApp/op/adl/XPSPositionCompare.adl b/motorApp/op/adl/XPSPositionCompare.adl deleted file mode 100644 index 4823ea35..00000000 --- a/motorApp/op/adl/XPSPositionCompare.adl +++ /dev/null @@ -1,522 +0,0 @@ - -file { - name="/home/epics/devel/motor/motorApp/op/adl/XPSPositionCompare.adl" - version=030107 -} -display { - object { - x=428 - y=115 - width=880 - height=140 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=33 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Description" - align="horiz. centered" -} -text { - object { - x=38 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Motor" - align="horiz. centered" -} -text { - object { - x=282 - y=5 - width=286 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - } - textix="XPS Position Compare" - align="horiz. centered" -} -polyline { - object { - x=2 - y=34 - width=880 - height=0 - } - "basic attribute" { - clr=14 - fill="outline" - } - points { - (2,34) - (882,34) - } -} -text { - object { - x=215 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Enable" - align="horiz. centered" -} -rectangle { - object { - x=5 - y=80 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -"text update" { - object { - x=10 - y=110 - width=200 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=45 - } - limits { - } -} -menu { - object { - x=215 - y=110 - width=130 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=88 - width=130 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=560 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=560 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text update" { - object { - x=350 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=455 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text update" { - object { - x=455 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -composite { - object { - x=350 - y=40 - width=520 - height=36 - } - "composite name"="" - children { - text { - object { - x=350 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Mode" - align="horiz. centered" - } - text { - object { - x=455 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Position" - align="horiz. centered" - } - text { - object { - x=560 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Size" - align="horiz. centered" - } - text { - object { - x=350 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Minimum" - align="horiz. centered" - } - text { - object { - x=455 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Maximum" - align="horiz. centered" - } - text { - object { - x=560 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Step" - align="horiz. centered" - } - text { - object { - x=665 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Width (us)" - align="horiz. centered" - } - text { - object { - x=665 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Pulse" - align="horiz. centered" - } - text { - object { - x=770 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Time (us)" - align="horiz. centered" - } - text { - object { - x=770 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Settling" - align="horiz. centered" - } - } -} diff --git a/motorApp/op/adl/XPSPositionCompare8.adl b/motorApp/op/adl/XPSPositionCompare8.adl deleted file mode 100644 index c21af6bb..00000000 --- a/motorApp/op/adl/XPSPositionCompare8.adl +++ /dev/null @@ -1,2191 +0,0 @@ - -file { - name="/home/epics/devel/motor/motorApp/op/adl/XPSPositionCompare8.adl" - version=030107 -} -display { - object { - x=428 - y=115 - width=880 - height=560 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -text { - object { - x=33 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Description" - align="horiz. centered" -} -text { - object { - x=38 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Motor" - align="horiz. centered" -} -text { - object { - x=282 - y=5 - width=286 - height=26 - } - "basic attribute" { - clr=14 - fill="outline" - } - textix="XPS Position Compare" - align="horiz. centered" -} -polyline { - object { - x=2 - y=34 - width=880 - height=0 - } - "basic attribute" { - clr=14 - fill="outline" - } - points { - (2,34) - (882,34) - } -} -"text update" { - object { - x=10 - y=110 - width=200 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=45 - } - limits { - } -} -rectangle { - object { - x=4 - y=140 - width=840 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -"text update" { - object { - x=9 - y=170 - width=200 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=170 - width=200 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=230 - width=200 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=290 - width=200 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=350 - width=200 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=410 - width=200 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=470 - width=200 - height=20 - } - monitor { - chan="$(P)$(M7).DESC" - clr=14 - bclr=45 - } - limits { - } -} -"text update" { - object { - x=10 - y=530 - width=200 - height=20 - } - monitor { - chan="$(P)$(M8).DESC" - clr=14 - bclr=45 - } - limits { - } -} -text { - object { - x=215 - y=56 - width=129 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Mode" - align="horiz. centered" -} -menu { - object { - x=215 - y=110 - width=129 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=88 - width=129 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=214 - y=170 - width=129 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=214 - y=148 - width=129 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=170 - width=129 - height=20 - } - control { - chan="$(P)$(M2)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=148 - width=129 - height=18 - } - monitor { - chan="$(P)$(M2)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=230 - width=129 - height=20 - } - control { - chan="$(P)$(M3)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=208 - width=129 - height=18 - } - monitor { - chan="$(P)$(M3)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=290 - width=129 - height=20 - } - control { - chan="$(P)$(M4)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=268 - width=129 - height=18 - } - monitor { - chan="$(P)$(M4)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=350 - width=129 - height=20 - } - control { - chan="$(P)$(M5)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=328 - width=129 - height=18 - } - monitor { - chan="$(P)$(M5)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=410 - width=129 - height=20 - } - control { - chan="$(P)$(M6)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=388 - width=129 - height=18 - } - monitor { - chan="$(P)$(M6)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=470 - width=129 - height=20 - } - control { - chan="$(P)$(M7)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=448 - width=129 - height=18 - } - monitor { - chan="$(P)$(M7)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -menu { - object { - x=215 - y=530 - width=129 - height=20 - } - control { - chan="$(P)$(M8)PositionCompareMode" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=215 - y=508 - width=129 - height=18 - } - monitor { - chan="$(P)$(M8)PositionCompareMode_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -text { - object { - x=350 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Position" - align="horiz. centered" -} -text { - object { - x=455 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Position" - align="horiz. centered" -} -text { - object { - x=560 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Size" - align="horiz. centered" -} -text { - object { - x=350 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Minimum" - align="horiz. centered" -} -text { - object { - x=455 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Maximum" - align="horiz. centered" -} -text { - object { - x=560 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Step" - align="horiz. centered" -} -text { - object { - x=665 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Width (us)" - align="horiz. centered" -} -text { - object { - x=665 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Pulse" - align="horiz. centered" -} -text { - object { - x=770 - y=56 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Time (us)" - align="horiz. centered" -} -text { - object { - x=770 - y=40 - width=100 - height=20 - } - "basic attribute" { - clr=54 - fill="outline" - } - textix="Settling" - align="horiz. centered" -} -"text entry" { - object { - x=350 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=110 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=88 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=349 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=454 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=559 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=664 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=769 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M1)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=349 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=454 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=559 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=664 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=769 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M1)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M2)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M2)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M2)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M2)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=170 - width=100 - height=20 - } - control { - chan="$(P)$(M2)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M2)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M2)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M2)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M2)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=148 - width=100 - height=18 - } - monitor { - chan="$(P)$(M2)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(M3)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(M3)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(M3)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(M3)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=230 - width=100 - height=20 - } - control { - chan="$(P)$(M3)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=208 - width=100 - height=18 - } - monitor { - chan="$(P)$(M3)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=208 - width=100 - height=18 - } - monitor { - chan="$(P)$(M3)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=208 - width=100 - height=18 - } - monitor { - chan="$(P)$(M3)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=208 - width=100 - height=18 - } - monitor { - chan="$(P)$(M3)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=208 - width=100 - height=18 - } - monitor { - chan="$(P)$(M3)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(M4)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(M4)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(M4)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(M4)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=290 - width=100 - height=20 - } - control { - chan="$(P)$(M4)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=268 - width=100 - height=18 - } - monitor { - chan="$(P)$(M4)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=268 - width=100 - height=18 - } - monitor { - chan="$(P)$(M4)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=268 - width=100 - height=18 - } - monitor { - chan="$(P)$(M4)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=268 - width=100 - height=18 - } - monitor { - chan="$(P)$(M4)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=268 - width=100 - height=18 - } - monitor { - chan="$(P)$(M4)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=350 - width=100 - height=20 - } - control { - chan="$(P)$(M5)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=350 - width=100 - height=20 - } - control { - chan="$(P)$(M5)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=350 - width=100 - height=20 - } - control { - chan="$(P)$(M5)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=350 - width=100 - height=20 - } - control { - chan="$(P)$(M5)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=350 - width=100 - height=20 - } - control { - chan="$(P)$(M5)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=328 - width=100 - height=18 - } - monitor { - chan="$(P)$(M5)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=328 - width=100 - height=18 - } - monitor { - chan="$(P)$(M5)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=328 - width=100 - height=18 - } - monitor { - chan="$(P)$(M5)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=328 - width=100 - height=18 - } - monitor { - chan="$(P)$(M5)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=328 - width=100 - height=18 - } - monitor { - chan="$(P)$(M5)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=410 - width=100 - height=20 - } - control { - chan="$(P)$(M6)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=410 - width=100 - height=20 - } - control { - chan="$(P)$(M6)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=410 - width=100 - height=20 - } - control { - chan="$(P)$(M6)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=410 - width=100 - height=20 - } - control { - chan="$(P)$(M6)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=410 - width=100 - height=20 - } - control { - chan="$(P)$(M6)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=388 - width=100 - height=18 - } - monitor { - chan="$(P)$(M6)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=388 - width=100 - height=18 - } - monitor { - chan="$(P)$(M6)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=388 - width=100 - height=18 - } - monitor { - chan="$(P)$(M6)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=388 - width=100 - height=18 - } - monitor { - chan="$(P)$(M6)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=388 - width=100 - height=18 - } - monitor { - chan="$(P)$(M6)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=470 - width=100 - height=20 - } - control { - chan="$(P)$(M7)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=470 - width=100 - height=20 - } - control { - chan="$(P)$(M7)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=470 - width=100 - height=20 - } - control { - chan="$(P)$(M7)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=470 - width=100 - height=20 - } - control { - chan="$(P)$(M7)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=470 - width=100 - height=20 - } - control { - chan="$(P)$(M7)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=448 - width=100 - height=18 - } - monitor { - chan="$(P)$(M7)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=448 - width=100 - height=18 - } - monitor { - chan="$(P)$(M7)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=448 - width=100 - height=18 - } - monitor { - chan="$(P)$(M7)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=448 - width=100 - height=18 - } - monitor { - chan="$(P)$(M7)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=448 - width=100 - height=18 - } - monitor { - chan="$(P)$(M7)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text entry" { - object { - x=350 - y=530 - width=100 - height=20 - } - control { - chan="$(P)$(M8)PositionCompareMinPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=455 - y=530 - width=100 - height=20 - } - control { - chan="$(P)$(M8)PositionCompareMaxPosition" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -"text entry" { - object { - x=560 - y=530 - width=100 - height=20 - } - control { - chan="$(P)$(M8)PositionCompareStepSize" - clr=14 - bclr=51 - } - clrmod="discrete" - limits { - } -} -menu { - object { - x=665 - y=530 - width=100 - height=20 - } - control { - chan="$(P)$(M8)PositionComparePulseWidth" - clr=14 - bclr=51 - } -} -menu { - object { - x=770 - y=530 - width=100 - height=20 - } - control { - chan="$(P)$(M8)PositionCompareSettlingTime" - clr=14 - bclr=51 - } -} -"text update" { - object { - x=350 - y=508 - width=100 - height=18 - } - monitor { - chan="$(P)$(M8)PositionCompareMinPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=455 - y=508 - width=100 - height=18 - } - monitor { - chan="$(P)$(M8)PositionCompareMaxPosition_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=560 - y=508 - width=100 - height=18 - } - monitor { - chan="$(P)$(M8)PositionCompareStepSize_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=665 - y=508 - width=100 - height=18 - } - monitor { - chan="$(P)$(M8)PositionComparePulseWidth_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -"text update" { - object { - x=770 - y=508 - width=100 - height=18 - } - monitor { - chan="$(P)$(M8)PositionCompareSettlingTime_RBV" - clr=54 - bclr=4 - } - align="horiz. centered" - limits { - } -} -rectangle { - object { - x=5 - y=80 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=140 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=200 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=260 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=320 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=380 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=440 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} -rectangle { - object { - x=5 - y=500 - width=870 - height=55 - } - "basic attribute" { - clr=14 - fill="outline" - } -} diff --git a/motorApp/op/adl/XPSTop.adl b/motorApp/op/adl/XPSTop.adl deleted file mode 100644 index 094c1e51..00000000 --- a/motorApp/op/adl/XPSTop.adl +++ /dev/null @@ -1,186 +0,0 @@ - -file { - name="/home/epics/devel/motor/motorApp/op/adl/XPSTop.adl" - version=030107 -} -display { - object { - x=833 - y=53 - width=200 - height=205 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -"related display" { - object { - x=25 - y=104 - width=150 - height=25 - } - display[0] { - label="Motor 1" - name="XPSExtra.adl" - args="P=IOC:, M1=m1" - } - display[1] { - label="Motor 2" - name="XPSExtra.adl" - args="P=IOC:, M1=m2" - } - clr=14 - bclr=4 - label="Extra motor PVs" -} -"related display" { - object { - x=25 - y=134 - width=150 - height=25 - } - display[0] { - label="XPS Profile Move" - name="profileMove.adl" - args="P=IOC:, R=Prof1:, TITLE=XPSProfileMove, M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8" - } - clr=14 - bclr=4 - label="Profile move" -} -"related display" { - object { - x=25 - y=74 - width=150 - height=25 - } - display[0] { - label="XPS Auxilliary" - name="XPSAux.adl" - args="P=IOC:, R=XPSAux" - } - clr=14 - bclr=4 - label="Auxilliary I/O" -} -text { - object { - x=6 - y=11 - width=150 - height=25 - } - "basic attribute" { - clr=14 - } - textix="Newport XPS Test" -} -"related display" { - object { - x=25 - y=44 - width=150 - height=25 - } - display[0] { - label="Motors" - name="motor3x.adl" - args="P=IOC:, M1=m1, M2=m2, M3=m3" - } - clr=14 - bclr=4 - label="Motors" -} -"related display" { - object { - x=25 - y=164 - width=150 - height=25 - } - display[0] { - label="XPS Position Compare" - name="XPSPositionCompare8.adl" - args="P=IOC:, R=PC1:, TITLE=XPSProfileMove, M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8" - } - clr=14 - bclr=4 - label="Position compare" -} diff --git a/motorApp/op/adl/profileMoveXPS.adl b/motorApp/op/adl/profileMoveXPS.adl deleted file mode 100644 index 0c4ce6bc..00000000 --- a/motorApp/op/adl/profileMoveXPS.adl +++ /dev/null @@ -1,1392 +0,0 @@ - -file { - name="/home/epics/devel/motor/motorApp/op/adl/profileMoveXPS.adl" - version=030102 -} -display { - object { - x=194 - y=194 - width=800 - height=400 - } - clr=14 - bclr=4 - cmap="" - gridSpacing=5 - gridOn=0 - snapToGrid=0 -} -"color map" { - ncolors=65 - colors { - ffffff, - ececec, - dadada, - c8c8c8, - bbbbbb, - aeaeae, - 9e9e9e, - 919191, - 858585, - 787878, - 696969, - 5a5a5a, - 464646, - 2d2d2d, - 000000, - 00d800, - 1ebb00, - 339900, - 2d7f00, - 216c00, - fd0000, - de1309, - be190b, - a01207, - 820400, - 5893ff, - 597ee1, - 4b6ec7, - 3a5eab, - 27548d, - fbf34a, - f9da3c, - eeb62b, - e19015, - cd6100, - ffb0ff, - d67fe2, - ae4ebc, - 8b1a96, - 610a75, - a4aaff, - 8793e2, - 6a73c1, - 4d52a4, - 343386, - c7bb6d, - b79d5c, - a47e3c, - 7d5627, - 58340f, - 99ffff, - 73dfff, - 4ea5f9, - 2a63e4, - 0a00b8, - ebf1b5, - d4db9d, - bbc187, - a6a462, - 8b8239, - 73ff6b, - 52da3b, - 3cb420, - 289315, - 1a7309, - } -} -rectangle { - object { - x=175 - y=7 - width=450 - height=35 - } - "basic attribute" { - clr=56 - } -} -text { - object { - x=205 - y=13 - width=396 - height=25 - } - "basic attribute" { - clr=14 - } - textix="$(TITLE)" - align="horiz. centered" -} -rectangle { - object { - x=5 - y=51 - width=790 - height=275 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } -} -"text update" { - object { - x=9 - y=120 - width=150 - height=20 - } - monitor { - chan="$(P)$(M1).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=145 - width=150 - height=20 - } - monitor { - chan="$(P)$(M2).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=170 - width=150 - height=20 - } - monitor { - chan="$(P)$(M3).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=195 - width=150 - height=20 - } - monitor { - chan="$(P)$(M4).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=220 - width=150 - height=20 - } - monitor { - chan="$(P)$(M5).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=245 - width=150 - height=20 - } - monitor { - chan="$(P)$(M6).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=270 - width=150 - height=20 - } - monitor { - chan="$(P)$(M7).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -"text update" { - object { - x=9 - y=295 - width=150 - height=20 - } - monitor { - chan="$(P)$(M8).DESC" - clr=14 - bclr=4 - } - align="horiz. right" - limits { - } -} -composite { - object { - x=586 - y=58 - width=100 - height=261 - } - "composite name"="" - children { - text { - object { - x=598 - y=91 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Velocity" - } - text { - object { - x=603 - y=67 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Maximum" - } - "text update" { - object { - x=598 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - rectangle { - object { - x=586 - y=58 - width=100 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - "text update" { - object { - x=598 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=598 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MaxVelocity" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - } -} -composite { - object { - x=691 - y=58 - width=100 - height=261 - } - "composite name"="" - children { - text { - object { - x=707 - y=91 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Accel." - } - text { - object { - x=702 - y=67 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Maximum" - } - "text update" { - object { - x=697 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - rectangle { - object { - x=691 - y=58 - width=100 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - "text update" { - object { - x=697 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=697 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MaxAcceleration" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - } -} -composite { - object { - x=171 - y=58 - width=200 - height=261 - } - "composite name"="" - children { - text { - object { - x=199 - y=67 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="First" - } - text { - object { - x=194 - y=91 - width=60 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Output" - } - text { - object { - x=299 - y=67 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="First" - } - text { - object { - x=284 - y=91 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Readback" - } - "text update" { - object { - x=273 - y=195 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M4Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=195 - width=90 - height=20 - } - control { - chan="$(P)$(R)M4Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=220 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M5Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=220 - width=90 - height=20 - } - control { - chan="$(P)$(R)M5Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=245 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M6Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=245 - width=90 - height=20 - } - control { - chan="$(P)$(R)M6Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=120 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M1Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=120 - width=90 - height=20 - } - control { - chan="$(P)$(R)M1Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=145 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M2Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=145 - width=90 - height=20 - } - control { - chan="$(P)$(R)M2Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=170 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M3Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=170 - width=90 - height=20 - } - control { - chan="$(P)$(R)M3Positions" - clr=14 - bclr=51 - } - limits { - } - } - rectangle { - object { - x=171 - y=58 - width=200 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - "text update" { - object { - x=273 - y=295 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M8Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=295 - width=90 - height=20 - } - control { - chan="$(P)$(R)M8Positions" - clr=14 - bclr=51 - } - limits { - } - } - "text update" { - object { - x=273 - y=270 - width=90 - height=20 - } - monitor { - chan="$(P)$(R)M7Readbacks" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text entry" { - object { - x=175 - y=270 - width=90 - height=20 - } - control { - chan="$(P)$(R)M7Positions" - clr=14 - bclr=51 - } - limits { - } - } - } -} -composite { - object { - x=481 - y=58 - width=100 - height=261 - } - "composite name"="" - children { - text { - object { - x=493 - y=91 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Position" - } - text { - object { - x=498 - y=67 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Maximum" - } - "text update" { - object { - x=493 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - rectangle { - object { - x=481 - y=58 - width=100 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - "text update" { - object { - x=493 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=493 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MaxPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - } -} -composite { - object { - x=376 - y=58 - width=100 - height=261 - } - "composite name"="" - children { - text { - object { - x=388 - y=91 - width=80 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Position" - } - text { - object { - x=393 - y=67 - width=70 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Minimum" - } - "text update" { - object { - x=388 - y=195 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M4MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=220 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M5MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=245 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M6MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=120 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M1MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=145 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M2MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=170 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M3MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - rectangle { - object { - x=376 - y=58 - width=100 - height=261 - } - "basic attribute" { - clr=14 - fill="outline" - width=2 - } - } - "text update" { - object { - x=388 - y=295 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M8MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - "text update" { - object { - x=388 - y=270 - width=80 - height=20 - } - monitor { - chan="$(P)$(R)M7MinPosition" - clr=54 - bclr=4 - } - align="horiz. right" - limits { - } - } - } -} -composite { - object { - x=7 - y=334 - width=355 - height=20 - } - "composite name"="" - children { - text { - object { - x=7 - y=334 - width=230 - height=20 - } - "basic attribute" { - clr=14 - } - textix="DT of 1st time element:" - } - "text entry" { - object { - x=242 - y=334 - width=120 - height=20 - } - control { - chan="$(P)$(R)Times" - clr=14 - bclr=51 - } - limits { - } - } - } -} -composite { - object { - x=7 - y=368 - width=275 - height=20 - } - "composite name"="" - children { - "text entry" { - object { - x=162 - y=368 - width=120 - height=20 - } - control { - chan="$(P)$(R)GroupName" - clr=14 - bclr=51 - } - limits { - } - } - text { - object { - x=7 - y=368 - width=150 - height=20 - } - "basic attribute" { - clr=14 - } - textix="XPS group name:" - } - } -} -composite { - object { - x=300 - y=368 - width=485 - height=20 - } - "composite name"="" - children { - text { - object { - x=300 - y=368 - width=200 - height=20 - } - "basic attribute" { - clr=14 - } - textix="XPS trajectory file:" - } - "text entry" { - object { - x=505 - y=368 - width=280 - height=20 - } - control { - chan="$(P)$(R)TrajectoryFile" - clr=14 - bclr=51 - } - limits { - } - } - } -} diff --git a/motorApp/op/opi/HXP.opi b/motorApp/op/opi/HXP.opi deleted file mode 100644 index 1a326206..00000000 --- a/motorApp/op/opi/HXP.opi +++ /dev/null @@ -1,324 +0,0 @@ - - false - - true - - 50c2e0b0:146018aa821:f2a - 3.2.10.20140131 - - true - 189 - HXP - false - false - - - - - - - Display - true - 150 - - true - 10 - - false - -1 - -1 - - - 122 - 342 - - - true - - true - 50c2e0b0:146018aa821:f2b - - 164 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 130 - 0 - - false - false - 1 - - - - 10 - - 10 - - - false - true - false - 50c2e0b0:146018aa821:f2c - - 22 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 130 - 6 - - - - 1 - - - - 77 - - - HXP_extra.opi - - true - - 0 - HXP_extra.adl - - - $(pv_name) -$(pv_value) - 0 - - - false - true - false - 50c2e0b0:146018aa821:f2d - - 22 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 130 - 6 - - - - 1 - - - - 142 - - - HXP_coordSys.opi - - true - - 0 - HXP_coordSys.adl - - - $(pv_name) -$(pv_value) - 0 - - - false - true - false - 50c2e0b0:146018aa821:f2e - - 22 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 130 - 6 - - - - 1 - - - - 45 - - - HXP_motors.opi - - true - - 0 - HXP_motors.adl - - - $(pv_name) -$(pv_value) - 0 - - - false - true - false - 50c2e0b0:146018aa821:f2f - - 22 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 130 - 6 - - - - 1 - - - - 110 - - - HXP_moveAll.opi - - true - - 0 - HXP_moveAll.adl - - - $(pv_name) -$(pv_value) - 0 - - - true - 1 - 50c2e0b0:146018aa821:f30 - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - $(P)$(R) - - - - 130 - 0 - - 1 - - - - 1 - - 0 - false - - 0 - - - \ No newline at end of file diff --git a/motorApp/op/opi/HXP_coordSys.opi b/motorApp/op/opi/HXP_coordSys.opi deleted file mode 100644 index bbbe064c..00000000 --- a/motorApp/op/opi/HXP_coordSys.opi +++ /dev/null @@ -1,2195 +0,0 @@ - - false - - true - - 50c2e0b0:146018aa821:f39 - 3.2.10.20140131 - - true - 285 - HXP_coordSys - false - false - - - - - - - Display - true - 800 - - true - 5 - - false - -1 - -1 - - - 293 - 411 - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:f63 - - - - - 20 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 800 - 0 - 0 - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 50c2e0b0:146018aa821:f3a - - 30 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 345 - 0 - - false - false - 1 - - - - 235 - - 442 - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:f3b - - - - - 30 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 345 - 0 - 0 - - - - true - - - false - - $(P)$(R)ERROR - - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - true - 1 - false - 50c2e0b0:146018aa821:f3c - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 4 - true - false - $(P)$(R)ERR_DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 335 - 0 - - - 1 - - - - 1 - - 6 - false - $(pv_name) -$(pv_value) - 5 - - - - - true - - true - 50c2e0b0:146018aa821:f5a - - 17 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 777 - 0 - - false - false - 1 - - - - 38 - - 10 - - - true - 1 - 50c2e0b0:146018aa821:f5b - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - X - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 83 - - - true - 1 - 50c2e0b0:146018aa821:f5c - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - Y - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 203 - - - true - 1 - 50c2e0b0:146018aa821:f5d - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - Z - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 323 - - - true - 1 - 50c2e0b0:146018aa821:f5e - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - U - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 443 - - - true - 1 - 50c2e0b0:146018aa821:f5f - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - V - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 563 - - - true - 1 - 50c2e0b0:146018aa821:f60 - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - W - - - - 94 - 0 - - 1 - - - - 1 - - 0 - false - - 683 - - - true - 1 - 50c2e0b0:146018aa821:f61 - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - CS - - - - 70 - 0 - - 1 - - - - 1 - - 0 - false - - 0 - - - - false - true - 50c2e0b0:146018aa821:f3d - - 40 - - Action Button - false - - true - true - false - - $(P)$(R)SET_CS - - - - - - - Action Button - true - Set CS - false - - Default - - 125 - 0 - 0 - - - - true - 1 - - - - 230 - - - $(P)$(R)SET_CS - 1 - 10 - - - - - $(P)$(R)SET_CS - 0 - 10 - - - - - $(pv_name) -$(pv_value) - 10 - - - false - true - 50c2e0b0:146018aa821:f3e - - 40 - - Action Button - false - - true - true - false - - $(P)$(R)READ_CS - - - - - - - Action Button - true - Read CS - false - - Default - - 125 - 0 - 0 - - - - true - 1 - - - - 230 - - - $(P)$(R)READ_CS - 1 - 10 - - - - - $(P)$(R)READ_CS - 0 - 10 - - - - - $(pv_name) -$(pv_value) - 308 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f3f - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_X - - - - 0 - false - - - false - 0 - - - - 186 - - 90 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f40 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_Y - - - - 0 - false - - - false - 0 - - - - 186 - - 210 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f41 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_Z - - - - 0 - false - - - false - 0 - - - - 186 - - 330 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f42 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_U - - - - 0 - false - - - false - 0 - - - - 186 - - 450 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f43 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_V - - - - 0 - false - - - false - 0 - - - - 186 - - 570 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:f44 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)CS_SET_W - - - - 0 - false - - - false - 0 - - - - 186 - - 690 - $(pv_name) -$(pv_value) - - - true - true - 1 - false - 50c2e0b0:146018aa821:f45 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:X - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 93 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f46 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:Y - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 213 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f47 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:Z - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 333 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f48 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:U - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 453 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f49 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:V - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 573 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4a - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)TOOL:W - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 75 - false - $(pv_name) -$(pv_value) - 693 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4b - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:X - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 93 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4c - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:Y - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 213 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4d - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:Z - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 333 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4e - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:U - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 453 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f4f - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:V - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 573 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f50 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)BASE:W - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 112 - false - $(pv_name) -$(pv_value) - 693 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f51 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:X - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 94 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f52 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:Y - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 214 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f53 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:Z - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 334 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f54 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:U - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 454 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f55 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:V - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 574 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f56 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)WORK:W - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 149 - false - $(pv_name) -$(pv_value) - 694 - - - true - 1 - 50c2e0b0:146018aa821:f57 - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - Tool - - - - 70 - 0 - - 1 - - - - 1 - - 75 - false - - 10 - - - true - 1 - 50c2e0b0:146018aa821:f58 - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - Base - - - - 70 - 0 - - 1 - - - - 1 - - 112 - false - - 10 - - - true - 1 - 50c2e0b0:146018aa821:f59 - false - - 17 - Label - - true - true - false - - true - false - - - - - - - Label - true - Work - - - - 70 - 0 - - 1 - - - - 1 - - 149 - false - - 10 - - - false - true - true - 50c2e0b0:146018aa821:f62 - - 30 - Menu Button - false - - true - true - false - - false - $(P)$(R)CS_TO_SET - - - - - - - Menu Button - true - false - - Default - - 75 - 6 - - - - 1 - - - - 183 - - $(pv_name) -$(pv_value) - 8 - - - true - 1 - 50c2e0b0:146018aa821:f64 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - $(P)$(R) Coordinate System Definitions - - - - 820 - 0 - - 1 - - - - 1 - - 0 - false - - 0 - - \ No newline at end of file diff --git a/motorApp/op/opi/HXP_extra.opi b/motorApp/op/opi/HXP_extra.opi deleted file mode 100644 index ae5a7ce8..00000000 --- a/motorApp/op/opi/HXP_extra.opi +++ /dev/null @@ -1,492 +0,0 @@ - - false - - true - - 50c2e0b0:146018aa821:f92 - 3.2.10.20140131 - - true - 250 - HXP_extra - false - false - - - - - - - Display - true - 350 - - true - 5 - - false - -1 - -1 - - - 115 - 208 - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:f93 - - - - - 30 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 350 - 0 - 0 - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 50c2e0b0:146018aa821:f94 - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - $(P)$(R) - - - - 350 - 0 - - 1 - - - - 1 - - 0 - false - - 0 - - - true - 1 - 50c2e0b0:146018aa821:f95 - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - Coord Sys - - - - 110 - 0 - - 1 - - - - 0 - - 44 - false - - 62 - - - false - true - true - 50c2e0b0:146018aa821:f96 - - 36 - Menu Button - false - - true - true - false - - false - $(P)$(R)CS - - - - - - - Menu Button - true - false - - Default - - 110 - 6 - - - - 1 - - - - 44 - - $(pv_name) -$(pv_value) - 177 - - - true - 1 - 50c2e0b0:146018aa821:f97 - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - Status - - - - 110 - 0 - - 1 - - - - 0 - - 81 - false - - 62 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f98 - false - 0.0 - - 30 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)STATUS - - - - - - - Text Update - true - ###### - false - 0 - - - - 110 - 0 - - - 1 - - - - 1 - - 81 - false - $(pv_name) -$(pv_value) - 177 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f99 - false - 0.0 - - 30 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)ERROR - - - - - - - Text Update - true - ###### - false - 0 - - - - 110 - 0 - - - 1 - - - - 1 - - 129 - false - $(pv_name) -$(pv_value) - 179 - - - true - 1 - 50c2e0b0:146018aa821:f9a - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - Error - - - - 110 - 0 - - 1 - - - - 0 - - 129 - false - - 64 - - - true - 1 - 50c2e0b0:146018aa821:f9b - false - - 30 - Label - - true - true - false - - true - false - - - - - - - Label - true - Error Description - - - - 225 - 0 - - 1 - - - - 1 - - 165 - false - - 62 - - - true - true - 1 - false - 50c2e0b0:146018aa821:f9c - false - 0.0 - - 22 - Text Update - false - - true - true - false - - 4 - true - false - $(P)$(R)ERR_DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 335 - 0 - - - 1 - - - - 1 - - 204 - false - $(pv_name) -$(pv_value) - 6 - - \ No newline at end of file diff --git a/motorApp/op/opi/HXP_motors.opi b/motorApp/op/opi/HXP_motors.opi deleted file mode 100644 index ed029436..00000000 --- a/motorApp/op/opi/HXP_motors.opi +++ /dev/null @@ -1,9777 +0,0 @@ - - false - - true - - 50c2e0b0:146018aa821:fa9 - 3.2.10.20140131 - - true - 200 - HXP_motors - false - false - - - - - - - Display - true - 720 - - true - 5 - - false - -1 - -1 - - - 624 - 35 - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fab - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fac - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fad - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fae - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 0 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fb7 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M1).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 0 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fb8 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M1).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 110 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fba - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 0 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fbc - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M1).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 7 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fbd - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M1).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 9 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fc0 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M1)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fc2 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fc3 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fc4 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fc5 - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 120 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fce - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M2).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 120 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fcf - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M2).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 230 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fd1 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 120 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fd3 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M2).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 127 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fd4 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M2).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 129 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fd7 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M2)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fd9 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fda - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fdb - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fdc - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 240 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fe5 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M3).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 240 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fe6 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M3).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 350 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fe8 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 240 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fea - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M3).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 247 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:feb - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M3).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 249 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:fee - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M3)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ff0 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ff1 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ff2 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ff3 - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 360 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ffc - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M4).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 360 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:ffd - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M4).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 470 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:fff - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 360 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1001 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M4).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 367 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1002 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M4).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 369 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1005 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M4)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1007 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1008 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1009 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:100a - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 480 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1013 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M5).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 480 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1014 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M5).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 590 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1016 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 480 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1018 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M5).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 487 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1019 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M5).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 489 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:101c - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M5)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:101e - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:101f - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1020 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1021 - - - - - 40 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 97 - $(pv_name) -$(pv_value) - 600 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:102a - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M6).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 600 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:102b - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M6).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 710 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:102d - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 600 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:102f - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M6).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 607 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1030 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M6).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 609 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1033 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M6)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1049 - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 9 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:104a - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 129 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:104b - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 249 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:104c - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 369 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:104d - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 489 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:104e - - - - - 25 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(R)CS - - - - 1 - 0 - true - - - - - 69 - $(pv_name) -$(pv_value) - 609 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:104f - - - - - 30 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 345 - 0 - 0 - - - - true - - - false - - $(P)$(R)ERROR - - - - 1 - 2 - true - - - - - 165 - $(pv_name) -$(pv_value) - 220 - false - - - - true - - true - 50c2e0b0:146018aa821:1039 - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 9 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:103a - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M1).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - - true - - true - 50c2e0b0:146018aa821:103f - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 129 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1040 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M2).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - - true - - true - 50c2e0b0:146018aa821:1041 - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 249 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1042 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M3).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - - true - - true - 50c2e0b0:146018aa821:1043 - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 369 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1044 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M4).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - - true - - true - 50c2e0b0:146018aa821:1045 - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 489 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1046 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M5).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - - true - - true - 50c2e0b0:146018aa821:1047 - - 25 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 98 - 0 - - - - true - - - false - - $(P)$(R)CS - - - false - false - 1 - - - - 69 - - 609 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1048 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M6).VAL - - - - 0 - false - - - false - 0 - - - - 0 - - 0 - $(pv_name) -$(pv_value) - - - - true - true - 1 - false - 50c2e0b0:146018aa821:faa - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 0 - - - true - 1 - 50c2e0b0:146018aa821:faf - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M1).DMOV - - - 1 - - - - 1 - - 121 - false - - 28 - - - true - 1 - 50c2e0b0:146018aa821:fb0 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M1).SET - - - 1 - - - - 1 - - 127 - false - - 28 - - - false - true - 50c2e0b0:146018aa821:fb1 - - 20 - - Action Button - false - - true - true - false - - $(P)$(M1).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M1).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 60 - - - false - true - false - 50c2e0b0:146018aa821:fb2 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M1) - - 0 - Help - - - motorx_more.opi - - true - $(M1) - - 0 - More - - - motorx_setup.opi - - true - $(M1) - - 0 - Setup - - - motorx_all.opi - - true - $(M1) - - 0 - All - - - scanParms.opi - - true - $(M1) - $(M1) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 5 - - - true - 1 - 50c2e0b0:146018aa821:fb3 - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 27 - - - false - true - 50c2e0b0:146018aa821:fb4 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M1).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M1).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 2 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:fb5 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M1).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 28 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:fb6 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M1).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M1).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 89 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fb9 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 0 - - - true - 1 - 50c2e0b0:146018aa821:fbb - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M1)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 0 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fbe - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 11 - - - true - 1 - 50c2e0b0:146018aa821:fbf - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M1).LVIO - - - 1 - - - - 1 - - 119 - false - - 28 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fc1 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 120 - - - true - 1 - 50c2e0b0:146018aa821:fc6 - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M2).DMOV - - - 1 - - - - 1 - - 121 - false - - 148 - - - true - 1 - 50c2e0b0:146018aa821:fc7 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M2).SET - - - 1 - - - - 1 - - 127 - false - - 148 - - - false - true - 50c2e0b0:146018aa821:fc8 - - 20 - - Action Button - false - - true - true - false - - $(P)$(M2).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M2).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 180 - - - false - true - false - 50c2e0b0:146018aa821:fc9 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M2) - - 0 - Help - - - motorx_more.opi - - true - $(M2) - - 0 - More - - - motorx_setup.opi - - true - $(M2) - - 0 - Setup - - - motorx_all.opi - - true - $(M2) - - 0 - All - - - scanParms.opi - - true - $(M2) - $(M2) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 125 - - - true - 1 - 50c2e0b0:146018aa821:fca - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 147 - - - false - true - 50c2e0b0:146018aa821:fcb - - 36 - - Action Button - false - - true - true - false - - $(P)$(M2).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M2).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 122 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:fcc - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M2).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 148 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:fcd - - 36 - - Action Button - false - - true - true - false - - $(P)$(M2).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M2).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 209 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fd0 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 120 - - - true - 1 - 50c2e0b0:146018aa821:fd2 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M2)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 120 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fd5 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 131 - - - true - 1 - 50c2e0b0:146018aa821:fd6 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M2).LVIO - - - 1 - - - - 1 - - 119 - false - - 148 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fd8 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 240 - - - true - 1 - 50c2e0b0:146018aa821:fdd - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M3).DMOV - - - 1 - - - - 1 - - 121 - false - - 268 - - - true - 1 - 50c2e0b0:146018aa821:fde - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M3).SET - - - 1 - - - - 1 - - 127 - false - - 268 - - - false - true - 50c2e0b0:146018aa821:fdf - - 20 - - Action Button - false - - true - true - false - - $(P)$(M3).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M3).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 300 - - - false - true - false - 50c2e0b0:146018aa821:fe0 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M3) - - 0 - Help - - - motorx_more.opi - - true - $(M3) - - 0 - More - - - motorx_setup.opi - - true - $(M3) - - 0 - Setup - - - motorx_all.opi - - true - $(M3) - - 0 - All - - - scanParms.opi - - true - $(M3) - $(M3) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 245 - - - true - 1 - 50c2e0b0:146018aa821:fe1 - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 267 - - - false - true - 50c2e0b0:146018aa821:fe2 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M3).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M3).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 242 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:fe3 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M3).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 268 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:fe4 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M3).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M3).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 329 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fe7 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 240 - - - true - 1 - 50c2e0b0:146018aa821:fe9 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M3)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 240 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fec - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 251 - - - true - 1 - 50c2e0b0:146018aa821:fed - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M3).LVIO - - - 1 - - - - 1 - - 119 - false - - 268 - - - true - true - 1 - false - 50c2e0b0:146018aa821:fef - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 360 - - - true - 1 - 50c2e0b0:146018aa821:ff4 - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M4).DMOV - - - 1 - - - - 1 - - 121 - false - - 388 - - - true - 1 - 50c2e0b0:146018aa821:ff5 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M4).SET - - - 1 - - - - 1 - - 127 - false - - 388 - - - false - true - 50c2e0b0:146018aa821:ff6 - - 20 - - Action Button - false - - true - true - false - - $(P)$(M4).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M4).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 420 - - - false - true - false - 50c2e0b0:146018aa821:ff7 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M4) - - 0 - Help - - - motorx_more.opi - - true - $(M4) - - 0 - More - - - motorx_setup.opi - - true - $(M4) - - 0 - Setup - - - motorx_all.opi - - true - $(M4) - - 0 - All - - - scanParms.opi - - true - $(M4) - $(M4) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 365 - - - true - 1 - 50c2e0b0:146018aa821:ff8 - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 387 - - - false - true - 50c2e0b0:146018aa821:ff9 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M4).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M4).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 362 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:ffa - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M4).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 388 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:ffb - - 36 - - Action Button - false - - true - true - false - - $(P)$(M4).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M4).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 449 - - - true - true - 1 - false - 50c2e0b0:146018aa821:ffe - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 360 - - - true - 1 - 50c2e0b0:146018aa821:1000 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M4)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 360 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1003 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 371 - - - true - 1 - 50c2e0b0:146018aa821:1004 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M4).LVIO - - - 1 - - - - 1 - - 119 - false - - 388 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1006 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 480 - - - true - 1 - 50c2e0b0:146018aa821:100b - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M5).DMOV - - - 1 - - - - 1 - - 121 - false - - 508 - - - true - 1 - 50c2e0b0:146018aa821:100c - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M5).SET - - - 1 - - - - 1 - - 127 - false - - 508 - - - false - true - 50c2e0b0:146018aa821:100d - - 20 - - Action Button - false - - true - true - false - - $(P)$(M5).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M5).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 540 - - - false - true - false - 50c2e0b0:146018aa821:100e - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M5) - - 0 - Help - - - motorx_more.opi - - true - $(M5) - - 0 - More - - - motorx_setup.opi - - true - $(M5) - - 0 - Setup - - - motorx_all.opi - - true - $(M5) - - 0 - All - - - scanParms.opi - - true - $(M5) - $(M5) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 485 - - - true - 1 - 50c2e0b0:146018aa821:100f - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 507 - - - false - true - 50c2e0b0:146018aa821:1010 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M5).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M5).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 482 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1011 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M5).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 508 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:1012 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M5).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M5).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 569 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1015 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 480 - - - true - 1 - 50c2e0b0:146018aa821:1017 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M5)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 480 - - - true - true - 1 - false - 50c2e0b0:146018aa821:101a - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 491 - - - true - 1 - 50c2e0b0:146018aa821:101b - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M5).LVIO - - - 1 - - - - 1 - - 119 - false - - 508 - - - true - true - 1 - false - 50c2e0b0:146018aa821:101d - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 600 - - - true - 1 - 50c2e0b0:146018aa821:1022 - false - - 15 - Label - - true - true - false - - true - false - - - - - - - Label - true - Moving - - - - 60 - 0 - - - - true - - - false - - $(P)$(M6).DMOV - - - 1 - - - - 1 - - 121 - false - - 628 - - - true - 1 - 50c2e0b0:146018aa821:1023 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Calibrate - - - - 60 - 0 - - - - true - - - false - - $(P)$(M6).SET - - - 1 - - - - 1 - - 127 - false - - 628 - - - false - true - 50c2e0b0:146018aa821:1024 - - 20 - - Action Button - false - - true - true - false - - $(P)$(M6).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 53 - 0 - 0 - - - - false - 1 - - - - 137 - - - $(P)$(M6).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 660 - - - false - true - false - 50c2e0b0:146018aa821:1025 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 137 - - - motorx_help.opi - - true - $(M6) - - 0 - Help - - - motorx_more.opi - - true - $(M6) - - 0 - More - - - motorx_setup.opi - - true - $(M6) - - 0 - Setup - - - motorx_all.opi - - true - $(M6) - - 0 - All - - - scanParms.opi - - true - $(M6) - $(M6) - - 0 - Setup scan parameters - - - $(pv_name) -$(pv_value) - 605 - - - true - 1 - 50c2e0b0:146018aa821:1026 - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 30 - 0 - - 1 - - - - 1 - - 139 - false - - 627 - - - false - true - 50c2e0b0:146018aa821:1027 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M6).TWR - - - - - - - Action Button - true - < - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M6).TWR - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 602 - - - false - false - true - false - true - false - - 20 - false - false - true - - - - true - Text Input - - - - - 60 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1028 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(M6).TWV - - - - 0 - false - - - false - 0 - - - - 99 - - 628 - $(pv_name) -$(pv_value) - - - false - true - 50c2e0b0:146018aa821:1029 - - 36 - - Action Button - false - - true - true - false - - $(P)$(M6).TWF - - - - - - - Action Button - true - > - false - - Default - - 25 - 0 - 0 - - - - false - 1 - - - - 99 - - - $(P)$(M6).TWF - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 689 - - - true - true - 1 - false - 50c2e0b0:146018aa821:102c - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 600 - - - true - 1 - 50c2e0b0:146018aa821:102e - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M6)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 600 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1031 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 611 - - - true - 1 - 50c2e0b0:146018aa821:1032 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - Soft limit - - - - 60 - 0 - - - - true - - - false - - $(P)$(M6).LVIO - - - 1 - - - - 1 - - 119 - false - - 628 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:1034 - 0.0 - - 0 - 157 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 119 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:1035 - 0.0 - - 0 - 157 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 239 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:1036 - 0.0 - - 0 - 157 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 359 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:1037 - 0.0 - - 0 - 157 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 479 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:1038 - 0.0 - - 0 - 156 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 599 - - - true - 1 - 50c2e0b0:146018aa821:103b - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Coord Sys - - - - 95 - 0 - - 1 - - - - 0 - - 169 - false - - 4 - - - false - true - true - 50c2e0b0:146018aa821:103c - - 30 - Menu Button - false - - true - true - false - - false - $(P)$(R)CS - - - - - - - Menu Button - true - false - - Default - - 105 - 6 - - - - 1 - - - - 164 - - $(pv_name) -$(pv_value) - 105 - - - true - 1 - 50c2e0b0:146018aa821:103d - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Status - - - - 70 - 0 - - 1 - - - - 1 - - 169 - false - - 570 - - - true - true - 1 - false - 50c2e0b0:146018aa821:103e - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)STATUS - - - - - - - Text Update - true - ###### - false - 0 - - - - 60 - 0 - - - 1 - - - - 1 - - 169 - false - $(pv_name) -$(pv_value) - 647 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1050 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 4 - true - false - $(P)$(R)ERR_DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 335 - 0 - - - 1 - - - - 1 - - 171 - false - $(pv_name) -$(pv_value) - 225 - - \ No newline at end of file diff --git a/motorApp/op/opi/HXP_moveAll.opi b/motorApp/op/opi/HXP_moveAll.opi deleted file mode 100644 index 9990bae8..00000000 --- a/motorApp/op/opi/HXP_moveAll.opi +++ /dev/null @@ -1,5909 +0,0 @@ - - false - - true - - 50c2e0b0:146018aa821:10fa - 3.2.10.20140131 - - true - 165 - HXP_moveAll - false - false - - - - - - - Display - true - 720 - - true - 5 - - false - -1 - -1 - - - 293 - 411 - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:10fc - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:10fd - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:10fe - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M1)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1100 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M1).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 0 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1101 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M1).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 110 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1103 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 0 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1105 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M1).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 7 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1106 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M1).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 9 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1108 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M1)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 6 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:110a - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:110b - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:110c - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M2)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:110d - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M2).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 120 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:110e - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M2).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 230 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1110 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 120 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1112 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M2).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 127 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1113 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M2).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 129 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1115 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M2)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 126 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1117 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1118 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1119 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M3)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:111a - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M3).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 240 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:111b - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M3).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 350 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:111d - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 240 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:111f - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M3).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 247 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1120 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M3).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 249 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1122 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M3)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 246 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1124 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1125 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1126 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M4)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1127 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M4).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 360 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1128 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M4).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 470 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:112a - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 360 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:112c - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M4).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 367 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:112d - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M4).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 369 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:112f - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M4)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 366 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1131 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1132 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1133 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M5)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1134 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M5).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 480 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1135 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M5).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 590 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1137 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 480 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1139 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M5).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 487 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:113a - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M5).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 489 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:113c - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M5)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 486 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:113e - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6).DMOV - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:113f - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6).LVIO - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1140 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 0 - 0 - - - - true - - - false - - $(P)$(M6)_able.VAL - - - - 1 - 0 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1141 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M6).LLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 600 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1142 - - - - - 50 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 6 - 0 - 0 - - - - true - - - false - - $(P)$(M6).HLS - - - - 1 - 0 - true - - - - - 45 - $(pv_name) -$(pv_value) - 710 - false - - - false - true - 100.0 - - - - 50c2e0b0:146018aa821:1144 - - - - - 12 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 116 - 0 - 0 - - - 1 - 0 - true - - - - - 20 - $(pv_name) -$(pv_value) - 600 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1146 - - - - - 26 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 102 - 0 - 0 - - - - true - - - false - - $(P)$(M6).SET - - - - 1 - 2 - true - - - - - 41 - $(pv_name) -$(pv_value) - 607 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1147 - - - - - 21 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 98 - 0 - 0 - - - - true - - - false - - $(P)$(M6).SET - - - - 1 - 2 - true - - - - - 43 - $(pv_name) -$(pv_value) - 609 - false - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1149 - - - - - 31 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 104 - 1 - 0 - - - - true - - - false - - $(P)$(M6)_able.VAL - - - - 1 - 2 - true - - - - - 66 - $(pv_name) -$(pv_value) - 606 - false - - - - true - - true - 50c2e0b0:146018aa821:1155 - - 30 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 345 - 0 - - false - false - 1 - - - - 104 - - 8 - - - false - true - 0.0 - - - - 50c2e0b0:146018aa821:1156 - - - - - 30 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 345 - 0 - 0 - - - - true - - - false - - $(P)$(R)ERROR - - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - true - 1 - false - 50c2e0b0:146018aa821:1157 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 4 - true - false - $(P)$(R)ERR_DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 335 - 0 - - - 1 - - - - 1 - - 6 - false - $(pv_name) -$(pv_value) - 5 - - - - - true - - true - 50c2e0b0:146018aa821:1158 - - 20 - Grouping Container - - true - true - false - - true - false - - - - - - - true - Grouping Container - - Default - - 137 - 0 - - false - false - 1 - - - - 140 - - 10 - - - true - 1 - 50c2e0b0:146018aa821:1159 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Status - - - - 70 - 0 - - 1 - - - - 1 - - 0 - false - - 0 - - - true - true - 1 - false - 50c2e0b0:146018aa821:115a - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)STATUS - - - - - - - Text Update - true - ###### - false - 0 - - - - 60 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 77 - - - - true - true - 1 - false - 50c2e0b0:146018aa821:10fb - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 0 - - - false - true - 50c2e0b0:146018aa821:10ff - - 40 - - Action Button - false - - true - true - false - - $(P)$(M1).STOP - - - - - - - Action Button - true - STOP - false - - Default - - 125 - 0 - 0 - - - - false - 1 - - - - 106 - - - $(P)$(M1).STOP - 1 - 10 - - - - - $(pv_name) -$(pv_value) - 502 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1102 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 0 - - - true - 1 - 50c2e0b0:146018aa821:1104 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M1)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 0 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1107 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 11 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1109 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 120 - - - true - true - 1 - false - 50c2e0b0:146018aa821:110f - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 120 - - - true - 1 - 50c2e0b0:146018aa821:1111 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M2)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 120 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1114 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 131 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1116 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 240 - - - true - true - 1 - false - 50c2e0b0:146018aa821:111c - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 240 - - - true - 1 - 50c2e0b0:146018aa821:111e - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M3)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 240 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1121 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 251 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1123 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 360 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1129 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 360 - - - true - 1 - 50c2e0b0:146018aa821:112b - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M4)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 360 - - - true - true - 1 - false - 50c2e0b0:146018aa821:112e - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 371 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1130 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 480 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1136 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 480 - - - true - 1 - 50c2e0b0:146018aa821:1138 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M5)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 480 - - - true - true - 1 - false - 50c2e0b0:146018aa821:113b - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 491 - - - true - true - 1 - false - 50c2e0b0:146018aa821:113d - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 0 - false - $(pv_name) -$(pv_value) - 600 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1143 - false - 0.0 - - 12 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).EGU - - - - - - - Text Update - true - ###### - false - 0 - - - - 116 - 0 - - - 1 - - - - 1 - - 32 - false - $(pv_name) -$(pv_value) - 600 - - - true - 1 - 50c2e0b0:146018aa821:1145 - false - - 10 - Label - - true - true - false - - true - false - - - - - - - Label - true - ($(P)$(M6)) - - - - 116 - 0 - - 1 - - - - 1 - - 21 - false - - 600 - - - true - true - 1 - false - 50c2e0b0:146018aa821:1148 - false - 0.0 - - 17 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).RBV - - - - - - - Text Update - true - ###### - false - 0 - - - - 94 - 0 - - - 1 - - - - 1 - - 45 - false - $(pv_name) -$(pv_value) - 611 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:114a - 0.0 - - 0 - 100 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 119 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:114b - 0.0 - - 0 - 100 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 239 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:114c - 0.0 - - 0 - 100 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 359 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:114d - 0.0 - - 0 - 100 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 479 - - - false - true - 20 - true - 100.0 - 50c2e0b0:146018aa821:114e - 0.0 - - 0 - 100 - true - Polyline - false - 255 - - true - true - true - - - - - - false - - - - - - - - Polyline - true - false - - Default - - 1 - 0 - 0 - - - 1 - 1 - true - - - - - 1 - $(pv_name) -$(pv_value) - 599 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:114f - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T4 - - - - 0 - false - - - false - 0 - - - - 69 - - 369 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1150 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T5 - - - - 0 - false - - - false - 0 - - - - 69 - - 489 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:1151 - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T6 - - - - 0 - false - - - false - 0 - - - - 69 - - 609 - $(pv_name) -$(pv_value) - - - false - true - false - 50c2e0b0:146018aa821:1152 - - 20 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 20 - 6 - - - - 1 - - - - 140 - - - HXP_motors.opi - - true - - 0 - HXP_motors - - - HXP_extra.opi - - true - - 0 - HXP_extra - - - $(pv_name) -$(pv_value) - 655 - - - true - 1 - 50c2e0b0:146018aa821:1153 - false - - 18 - Label - - true - true - false - - true - false - - - - - - - Label - true - More - - - - 31 - 0 - - 1 - - - - 1 - - 142 - false - - 678 - - - false - true - 50c2e0b0:146018aa821:1154 - - 40 - - Action Button - false - - true - true - false - - $(P)$(R)MOVE_ALL - - - - - - - Action Button - true - Go - false - - Default - - 125 - 0 - 0 - - - - true - 1 - - - - 105 - - - $(P)$(R)MOVE_ALL - 1 - 10 - - - - - $(P)$(R)MOVE_ALL - 0 - 10 - - - - - $(pv_name) -$(pv_value) - 365 - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:115b - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T1 - - - - 0 - false - - - false - 0 - - - - 69 - - 9 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:115c - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T2 - - - - 0 - false - - - false - 0 - - - - 69 - - 129 - $(pv_name) -$(pv_value) - - - false - false - true - false - true - false - - 25 - false - false - true - - - - true - Text Input - - - - - 98 - 3 - - false - Infinity - 1 - false - -Infinity - 0 - false - 50c2e0b0:146018aa821:115d - 0.0 - - Text Input - 1 - - true - true - false - - 0 - false - $(P)$(R)T3 - - - - 0 - false - - - false - 0 - - - - 69 - - 249 - $(pv_name) -$(pv_value) - - \ No newline at end of file diff --git a/motorApp/op/opi/XPSAux.opi b/motorApp/op/opi/XPSAux.opi deleted file mode 100644 index 585632c9..00000000 --- a/motorApp/op/opi/XPSAux.opi +++ /dev/null @@ -1,12997 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-32cf - 3.1.2.20120830 - - true - 660 - XPSAux - false - false - - - - - - - Display - true - 900 - - true - 5 - - false - -1 - -1 - - - 203 - 78 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-3242 - - - - - 165 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 500 - 0 - 0 - - - 1 - 1 - true - - - - - 489 - $(pv_name) -$(pv_value) - 5 - false - - - - true - - true - 39872d87:13e14015f61:-32c4 - - 54 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 483 - 0 - - false - 1 - - - - - 200 - - 5 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-32ad - - - - - 54 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 483 - 0 - 0 - - - 1 - 1 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 39872d87:13e14015f61:-32c3 - - 44 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 472 - 0 - - false - 1 - - - - - 5 - - 6 - - true - 1 - 39872d87:13e14015f61:-32c2 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - GPIO2 - - - - 50 - 0 - - 1 - - - - 0 - - 12 - true - - 0 - - - true - true - 1 - false - 39872d87:13e14015f61:-32c1 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 3 - true - false - $(P)$(R)2Li.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 12 - false - $(pv_name) -$(pv_value) - 128 - - - true - 1 - 39872d87:13e14015f61:-32c0 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Input - - - - 50 - 0 - - 1 - - - - 0 - - 12 - true - - 74 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32bf - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32be - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32bd - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32bc - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32bb - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32ba - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b9 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b8 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b7 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b6 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b5 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32b4 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)2Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - false - 39872d87:13e14015f61:-32b3 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi0 - - 0 - - - - $(pv_name) -$(pv_value) - 237 - - - false - true - false - 39872d87:13e14015f61:-32b2 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi1 - - 0 - - - - $(pv_name) -$(pv_value) - 277 - - - false - true - false - 39872d87:13e14015f61:-32b1 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi2 - - 0 - - - - $(pv_name) -$(pv_value) - 317 - - - false - true - false - 39872d87:13e14015f61:-32b0 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi3 - - 0 - - - - $(pv_name) -$(pv_value) - 357 - - - false - true - false - 39872d87:13e14015f61:-32af - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi4 - - 0 - - - - $(pv_name) -$(pv_value) - 397 - - - false - true - false - 39872d87:13e14015f61:-32ae - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 26 - - - XPSAuxBi_more.opi - - true - $(R)2Bi5 - - 0 - - - - $(pv_name) -$(pv_value) - 437 - - - - - - true - - true - 39872d87:13e14015f61:-32ac - - 87 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 483 - 0 - - false - 1 - - - - - 259 - - 5 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-32ab - - - - - 87 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 483 - 0 - 0 - - - 1 - 1 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 39872d87:13e14015f61:-32aa - - 77 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 473 - 0 - - false - 1 - - - - - 5 - - 5 - - true - 1 - 39872d87:13e14015f61:-32a9 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - GPIO3 - - - - 50 - 0 - - 1 - - - - 0 - - 30 - true - - 0 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a8 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a7 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 39872d87:13e14015f61:-32a6 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo1 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 278 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a5 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a4 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 39872d87:13e14015f61:-32a3 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo2 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 318 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a2 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-32a1 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 39872d87:13e14015f61:-32a0 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo3 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 358 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-329f - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-329e - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 39872d87:13e14015f61:-329d - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo4 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 398 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-329c - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-329b - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 39872d87:13e14015f61:-329a - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo5 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 438 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3299 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3298 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)3Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 39872d87:13e14015f61:-3297 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)3Bo0 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 238 - - - true - true - 1 - false - 39872d87:13e14015f61:-3296 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 3 - true - false - $(P)$(R)3Li.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 0 - false - $(pv_name) -$(pv_value) - 128 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3295 - 0.0 - Text Input - - true - true - false - - 3 - false - 0 - $(P)$(R)3Lo.VAL - - - - false - 0 - - - false - - - - 0 - - 30 - $(pv_name) -$(pv_value) - 128 - - - false - true - false - 39872d87:13e14015f61:-3294 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi0 - - 0 - - - - $(pv_name) -$(pv_value) - 237 - - - false - true - false - 39872d87:13e14015f61:-3293 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi1 - - 0 - - - - $(pv_name) -$(pv_value) - 277 - - - false - true - false - 39872d87:13e14015f61:-3292 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi2 - - 0 - - - - $(pv_name) -$(pv_value) - 317 - - - false - true - false - 39872d87:13e14015f61:-3291 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi3 - - 0 - - - - $(pv_name) -$(pv_value) - 357 - - - false - true - false - 39872d87:13e14015f61:-3290 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi4 - - 0 - - - - $(pv_name) -$(pv_value) - 397 - - - false - true - false - 39872d87:13e14015f61:-328f - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)3Bi5 - - 0 - - - - $(pv_name) -$(pv_value) - 437 - - - true - 1 - 39872d87:13e14015f61:-328e - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Input - - - - 50 - 0 - - 1 - - - - 0 - - 0 - true - - 74 - - - true - 1 - 39872d87:13e14015f61:-328d - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Output - - - - 60 - 0 - - 1 - - - - 0 - - 30 - true - - 64 - - - - - - true - - true - 39872d87:13e14015f61:-328c - - 87 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 883 - 0 - - false - 1 - - - - - 351 - - 5 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-328b - - - - - 87 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 883 - 0 - 0 - - - 1 - 1 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 39872d87:13e14015f61:-328a - - 77 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 873 - 0 - - false - 1 - - - - - 5 - - 5 - - true - 1 - 39872d87:13e14015f61:-3289 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - GPIO4 - - - - 50 - 0 - - 1 - - - - 0 - - 30 - true - - 0 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3288 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3287 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 39872d87:13e14015f61:-3286 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo1 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 278 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3285 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3284 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 39872d87:13e14015f61:-3283 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo2 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 318 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3282 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3281 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 39872d87:13e14015f61:-3280 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo3 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 358 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-327f - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-327e - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 39872d87:13e14015f61:-327d - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo4 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 398 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-327c - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-327b - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 39872d87:13e14015f61:-327a - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo5 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 438 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3279 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi6.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 485 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3278 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi6.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 485 - false - - - false - true - 39872d87:13e14015f61:-3277 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo6 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 478 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3276 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi7.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 525 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3275 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi7.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 525 - false - - - false - true - 39872d87:13e14015f61:-3274 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo7 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 518 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3273 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi9.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 605 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3272 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi9.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 605 - false - - - false - true - 39872d87:13e14015f61:-3271 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo9 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 598 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3270 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi8.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 565 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-326f - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi8.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 565 - false - - - false - true - 39872d87:13e14015f61:-326e - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo8 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 558 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-326d - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi10.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 645 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-326c - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi10.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 645 - false - - - false - true - 39872d87:13e14015f61:-326b - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo10 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 638 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-326a - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi11.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 685 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3269 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi11.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 685 - false - - - false - true - 39872d87:13e14015f61:-3268 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo11 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 678 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3267 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi12.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 725 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3266 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi12.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 725 - false - - - false - true - 39872d87:13e14015f61:-3265 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo12 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 718 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3264 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi13.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 765 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3263 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi13.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 765 - false - - - false - true - 39872d87:13e14015f61:-3262 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo13 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 758 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3261 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi14.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 805 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3260 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi14.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 805 - false - - - false - true - 39872d87:13e14015f61:-325f - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo14 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 798 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-325e - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi15.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 845 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-325d - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi15.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 845 - false - - - false - true - 39872d87:13e14015f61:-325c - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo15 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 838 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-325b - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-325a - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)4Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 39872d87:13e14015f61:-3259 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)4Bo0 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 238 - - - true - true - 1 - false - 39872d87:13e14015f61:-3258 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 3 - true - false - $(P)$(R)4Li.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 0 - false - $(pv_name) -$(pv_value) - 128 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3257 - 0.0 - Text Input - - true - true - false - - 3 - false - 0 - $(P)$(R)4Lo.VAL - - - - false - 0 - - - false - - - - 0 - - 30 - $(pv_name) -$(pv_value) - 128 - - - false - true - false - 39872d87:13e14015f61:-3256 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi0 - - 0 - - - - $(pv_name) -$(pv_value) - 237 - - - false - true - false - 39872d87:13e14015f61:-3255 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi1 - - 0 - - - - $(pv_name) -$(pv_value) - 277 - - - false - true - false - 39872d87:13e14015f61:-3254 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi2 - - 0 - - - - $(pv_name) -$(pv_value) - 317 - - - false - true - false - 39872d87:13e14015f61:-3253 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi3 - - 0 - - - - $(pv_name) -$(pv_value) - 357 - - - false - true - false - 39872d87:13e14015f61:-3252 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi4 - - 0 - - - - $(pv_name) -$(pv_value) - 397 - - - false - true - false - 39872d87:13e14015f61:-3251 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi5 - - 0 - - - - $(pv_name) -$(pv_value) - 437 - - - false - true - false - 39872d87:13e14015f61:-3250 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi6 - - 0 - - - - $(pv_name) -$(pv_value) - 477 - - - false - true - false - 39872d87:13e14015f61:-324f - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi7 - - 0 - - - - $(pv_name) -$(pv_value) - 517 - - - false - true - false - 39872d87:13e14015f61:-324e - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi8 - - 0 - - - - $(pv_name) -$(pv_value) - 557 - - - false - true - false - 39872d87:13e14015f61:-324d - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi9 - - 0 - - - - $(pv_name) -$(pv_value) - 597 - - - false - true - false - 39872d87:13e14015f61:-324c - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi10 - - 0 - - - - $(pv_name) -$(pv_value) - 637 - - - false - true - false - 39872d87:13e14015f61:-324b - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi11 - - 0 - - - - $(pv_name) -$(pv_value) - 677 - - - false - true - false - 39872d87:13e14015f61:-324a - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi12 - - 0 - - - - $(pv_name) -$(pv_value) - 717 - - - false - true - false - 39872d87:13e14015f61:-3249 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi13 - - 0 - - - - $(pv_name) -$(pv_value) - 757 - - - false - true - false - 39872d87:13e14015f61:-3248 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi14 - - 0 - - - - $(pv_name) -$(pv_value) - 797 - - - false - true - false - 39872d87:13e14015f61:-3247 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)4Bi15 - - 0 - - - - $(pv_name) -$(pv_value) - 837 - - - true - 1 - 39872d87:13e14015f61:-3246 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Input - - - - 50 - 0 - - 1 - - - - 0 - - 0 - true - - 74 - - - true - 1 - 39872d87:13e14015f61:-3245 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Output - - - - 60 - 0 - - 1 - - - - 0 - - 30 - true - - 64 - - - - - - true - - true - 39872d87:13e14015f61:-3241 - - 87 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 563 - 0 - - false - 1 - - - - - 108 - - 5 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-3240 - - - - - 87 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 563 - 0 - 0 - - - 1 - 1 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 39872d87:13e14015f61:-323f - - 77 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 553 - 0 - - false - 1 - - - - - 5 - - 5 - - true - 1 - 39872d87:13e14015f61:-323e - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - GPIO1 - - - - 50 - 0 - - 1 - - - - 0 - - 30 - true - - 0 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-323d - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-323c - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi1.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 285 - false - - - false - true - 39872d87:13e14015f61:-323b - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo1 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 278 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-323a - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3239 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi2.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 325 - false - - - false - true - 39872d87:13e14015f61:-3238 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo2 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 318 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3237 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3236 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi3.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 365 - false - - - false - true - 39872d87:13e14015f61:-3235 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo3 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 358 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3234 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3233 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi4.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 405 - false - - - false - true - 39872d87:13e14015f61:-3232 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo4 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 398 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3231 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3230 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi5.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 445 - false - - - false - true - 39872d87:13e14015f61:-322f - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo5 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 438 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-322e - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi6.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 485 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-322d - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi6.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 485 - false - - - false - true - 39872d87:13e14015f61:-322c - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo6 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 478 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-322b - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi7.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 525 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-322a - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi7.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 525 - false - - - false - true - 39872d87:13e14015f61:-3229 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo7 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 518 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3228 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-3227 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R)1Bi0.VAL - - - - 1 - 0 - true - - - - - 0 - $(pv_name) -$(pv_value) - 245 - false - - - false - true - 39872d87:13e14015f61:-3226 - - 30 - Choice Button - false - - true - true - false - - $(P)$(R)1Bo0 - - - - - - - Choice Button - true - false - - Default - - 35 - 0 - - - - - - - Choice 1 - Choice 2 - Choice 3 - - 1 - false - - - - true - - 25 - $(pv_name) -$(pv_value) - 238 - - - true - true - 1 - false - 39872d87:13e14015f61:-3225 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 3 - true - false - $(P)$(R)1Li.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 0 - false - $(pv_name) -$(pv_value) - 128 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3224 - 0.0 - Text Input - - true - true - false - - 3 - false - 0 - $(P)$(R)1Lo.VAL - - - - false - 0 - - - false - - - - 0 - - 30 - $(pv_name) -$(pv_value) - 128 - - - false - true - false - 39872d87:13e14015f61:-3223 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi0 - - 0 - - - - $(pv_name) -$(pv_value) - 237 - - - false - true - false - 39872d87:13e14015f61:-3222 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi1 - - 0 - - - - $(pv_name) -$(pv_value) - 277 - - - false - true - false - 39872d87:13e14015f61:-3221 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi2 - - 0 - - - - $(pv_name) -$(pv_value) - 317 - - - false - true - false - 39872d87:13e14015f61:-3220 - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi3 - - 0 - - - - $(pv_name) -$(pv_value) - 357 - - - false - true - false - 39872d87:13e14015f61:-321f - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi4 - - 0 - - - - $(pv_name) -$(pv_value) - 397 - - - false - true - false - 39872d87:13e14015f61:-321e - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi5 - - 0 - - - - $(pv_name) -$(pv_value) - 437 - - - false - true - false - 39872d87:13e14015f61:-321d - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi6 - - 0 - - - - $(pv_name) -$(pv_value) - 477 - - - false - true - false - 39872d87:13e14015f61:-321c - - 18 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 35 - 6 - - - - 1 - - - - 59 - - - XPSAuxBi_more.opi - - true - $(R)1Bi7 - - 0 - - - - $(pv_name) -$(pv_value) - 517 - - - true - 1 - 39872d87:13e14015f61:-321b - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Input - - - - 50 - 0 - - 1 - - - - 0 - - 0 - true - - 74 - - - true - 1 - 39872d87:13e14015f61:-321a - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Output - - - - 60 - 0 - - 1 - - - - 0 - - 30 - true - - 64 - - - - - - true - - true - 39872d87:13e14015f61:-3205 - - 165 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 350 - 0 - - false - 1 - - - - - 489 - - 538 - - false - true - 0.0 - - - - 39872d87:13e14015f61:-3203 - - - - - 165 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 350 - 0 - 0 - - - 1 - 1 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - - true - - true - 39872d87:13e14015f61:-3202 - - 116 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 280 - 0 - - false - 1 - - - - - 30 - - 26 - - true - 1 - 39872d87:13e14015f61:-3201 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Chan. - - - - 35 - 0 - - 1 - - - - 1 - - 0 - true - - 4 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3200 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ao0.VAL - - - - false - 0 - - - false - - - - 0 - - 21 - $(pv_name) -$(pv_value) - 25 - - - 20.0 - true - true - - - - - - - true - - - - - 20 - 50 - false - 10.0 - - - - true - Scaled Slider - true - - Default - - 150 - true - 0 - true - - true - true - 100.0 - 1 - false - false - 0.0 - 39872d87:13e14015f61:-31ff - true - - true - - - - Scaled Slider - - true - true - false - - - - - $(P)$(R)Ao0.VAL - - - - 1.0 - false - 80.0 - - Default - - 90.0 - - - - - - - - - true - true - - - - 10.0 - 21 - - 130 - $(pv_name) -$(pv_value) - - - true - 1 - 39872d87:13e14015f61:-31fe - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 1 - - - - 20 - 0 - - 1 - - - - 1 - - 21 - true - - 0 - - - true - 1 - 39872d87:13e14015f61:-31fd - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 2 - - - - 20 - 0 - - 1 - - - - 1 - - 46 - true - - 0 - - - true - 1 - 39872d87:13e14015f61:-31fc - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 3 - - - - 20 - 0 - - 1 - - - - 1 - - 71 - true - - 0 - - - true - 1 - 39872d87:13e14015f61:-31fb - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 4 - - - - 20 - 0 - - 1 - - - - 1 - - 96 - true - - 0 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-31fa - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ao1.VAL - - - - false - 0 - - - false - - - - 0 - - 46 - $(pv_name) -$(pv_value) - 25 - - - 20.0 - true - true - - - - - - - true - - - - - 20 - 50 - false - 10.0 - - - - true - Scaled Slider - true - - Default - - 150 - true - 0 - true - - true - true - 100.0 - 1 - false - false - 0.0 - 39872d87:13e14015f61:-31f9 - true - - true - - - - Scaled Slider - - true - true - false - - - - - $(P)$(R)Ao1.VAL - - - - 1.0 - false - 80.0 - - Default - - 90.0 - - - - - - - - - true - true - - - - 10.0 - 46 - - 130 - $(pv_name) -$(pv_value) - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-31f8 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ao2.VAL - - - - false - 0 - - - false - - - - 0 - - 71 - $(pv_name) -$(pv_value) - 25 - - - 20.0 - true - true - - - - - - - true - - - - - 20 - 50 - false - 10.0 - - - - true - Scaled Slider - true - - Default - - 150 - true - 0 - true - - true - true - 100.0 - 1 - false - false - 0.0 - 39872d87:13e14015f61:-31f7 - true - - true - - - - Scaled Slider - - true - true - false - - - - - $(P)$(R)Ao2.VAL - - - - 1.0 - false - 80.0 - - Default - - 90.0 - - - - - - - - - true - true - - - - 10.0 - 71 - - 130 - $(pv_name) -$(pv_value) - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-31f6 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ao3.VAL - - - - false - 0 - - - false - - - - 0 - - 96 - $(pv_name) -$(pv_value) - 25 - - - 20.0 - true - true - - - - - - - true - - - - - 20 - 50 - false - 10.0 - - - - true - Scaled Slider - true - - Default - - 150 - true - 0 - true - - true - true - 100.0 - 1 - false - false - 0.0 - 39872d87:13e14015f61:-31f5 - true - - true - - - - Scaled Slider - - true - true - false - - - - - $(P)$(R)Ao3.VAL - - - - 1.0 - false - 80.0 - - Default - - 90.0 - - - - - - - - - true - true - - - - 10.0 - 96 - - 130 - $(pv_name) -$(pv_value) - - - - true - 1 - 39872d87:13e14015f61:-3204 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Output - - - - 50 - 0 - - 1 - - - - 0 - - 4 - true - - 136 - - - - - true - - true - 39872d87:13e14015f61:-31f4 - - 116 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 86 - 0 - - false - 1 - - - - - 519 - - 338 - - false - true - true - 39872d87:13e14015f61:-31f3 - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai0.SCAN - - - - - - - Menu Button - true - false - - Default - - 86 - 6 - - - - 1 - - - - 21 - - $(pv_name) -$(pv_value) - 0 - - - true - 1 - 39872d87:13e14015f61:-31f2 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Scan - - - - 35 - 0 - - 1 - - - - 1 - - 0 - true - - 25 - - - false - true - true - 39872d87:13e14015f61:-31f1 - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai1.SCAN - - - - - - - Menu Button - true - false - - Default - - 86 - 6 - - - - 1 - - - - 46 - - $(pv_name) -$(pv_value) - 0 - - - false - true - true - 39872d87:13e14015f61:-31f0 - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai2.SCAN - - - - - - - Menu Button - true - false - - Default - - 86 - 6 - - - - 1 - - - - 71 - - $(pv_name) -$(pv_value) - 0 - - - false - true - true - 39872d87:13e14015f61:-31ef - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai3.SCAN - - - - - - - Menu Button - true - false - - Default - - 86 - 6 - - - - 1 - - - - 96 - - $(pv_name) -$(pv_value) - 0 - - - - true - 1 - 39872d87:13e14015f61:-32ce - false - - 32 - Label - - true - true - false - - true - false - - - - - - - Label - true - XPS Auxilliary I/O - - - - 256 - 0 - - 1 - - - - 0 - - 6 - true - - 322 - - - true - 1 - 39872d87:13e14015f61:-32cd - false - - 25 - Label - - true - true - false - - true - false - - - - - - - Label - true - Digital I/O - - - - 132 - 0 - - 1 - - - - 0 - - 52 - true - - 384 - - - true - 1 - 39872d87:13e14015f61:-32cc - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 1 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 255 - - - true - 1 - 39872d87:13e14015f61:-32cb - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 2 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 295 - - - true - 1 - 39872d87:13e14015f61:-32ca - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 3 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 335 - - - true - 1 - 39872d87:13e14015f61:-32c9 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 4 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 375 - - - true - 1 - 39872d87:13e14015f61:-32c8 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 5 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 415 - - - true - 1 - 39872d87:13e14015f61:-32c7 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 6 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 455 - - - true - 1 - 39872d87:13e14015f61:-32c6 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 7 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 495 - - - true - 1 - 39872d87:13e14015f61:-32c5 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 8 - - - - 20 - 0 - - 1 - - - - 1 - - 86 - true - - 535 - - - true - 1 - 39872d87:13e14015f61:-3244 - false - - 25 - Label - - true - true - false - - true - false - - - - - - - Label - true - Analog I/O (GPIO2) - - - - 216 - 0 - - 1 - - - - 0 - - 458 - true - - 342 - - - true - 1 - 39872d87:13e14015f61:-3243 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Input - - - - 50 - 0 - - 1 - - - - 0 - - 493 - true - - 160 - - - true - 1 - 39872d87:13e14015f61:-3219 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 1 - - - - 20 - 0 - - 1 - - - - 1 - - 540 - true - - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:-3218 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)Ai0.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 540 - false - $(pv_name) -$(pv_value) - 188 - - - false - true - 1 - false - false - - 22 - false - true - - - - Text Input - true - - - - - 40 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3217 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai0.PREC - - - - false - 0 - - - false - - - - 0 - - 540 - $(pv_name) -$(pv_value) - 293 - - - true - 1 - 39872d87:13e14015f61:-3216 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Chan. - - - - 35 - 0 - - 1 - - - - 1 - - 519 - true - - 16 - - - true - 1 - 39872d87:13e14015f61:-3215 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Description - - - - 35 - 0 - - 1 - - - - 1 - - 519 - true - - 106 - - - true - 1 - 39872d87:13e14015f61:-3214 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Volts - - - - 35 - 0 - - 1 - - - - 1 - - 519 - true - - 221 - - - true - 1 - 39872d87:13e14015f61:-3213 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Prec. - - - - 35 - 0 - - 1 - - - - 1 - - 519 - true - - 300 - - - true - 1 - 39872d87:13e14015f61:-3212 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 2 - - - - 20 - 0 - - 1 - - - - 1 - - 565 - true - - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:-3211 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)Ai1.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 565 - false - $(pv_name) -$(pv_value) - 188 - - - false - true - 1 - false - false - - 22 - false - true - - - - Text Input - true - - - - - 40 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3210 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai1.PREC - - - - false - 0 - - - false - - - - 0 - - 565 - $(pv_name) -$(pv_value) - 293 - - - true - 1 - 39872d87:13e14015f61:-320f - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 3 - - - - 20 - 0 - - 1 - - - - 1 - - 590 - true - - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:-320e - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)Ai2.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 590 - false - $(pv_name) -$(pv_value) - 188 - - - false - true - 1 - false - false - - 22 - false - true - - - - Text Input - true - - - - - 40 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-320d - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai2.PREC - - - - false - 0 - - - false - - - - 0 - - 590 - $(pv_name) -$(pv_value) - 293 - - - true - 1 - 39872d87:13e14015f61:-320c - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 4 - - - - 20 - 0 - - 1 - - - - 1 - - 615 - true - - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:-320b - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)Ai3.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 615 - false - $(pv_name) -$(pv_value) - 188 - - - false - true - 1 - false - false - - 22 - false - true - - - - Text Input - true - - - - - 40 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-320a - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai3.PREC - - - - false - 0 - - - false - - - - 0 - - 615 - $(pv_name) -$(pv_value) - 293 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 148 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3209 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai0.DESC - - - - false - 0 - - - false - - - - 0 - - 540 - $(pv_name) -$(pv_value) - 35 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 148 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3208 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai1.DESC - - - - false - 0 - - - false - - - - 0 - - 565 - $(pv_name) -$(pv_value) - 35 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 148 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3207 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai2.DESC - - - - false - 0 - - - false - - - - 0 - - 590 - $(pv_name) -$(pv_value) - 35 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 148 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-3206 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Ai3.DESC - - - - false - 0 - - - false - - - - 0 - - 615 - $(pv_name) -$(pv_value) - 35 - - - false - true - true - 39872d87:13e14015f61:-31ee - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai0Gain.VAL - - - - - - - Menu Button - true - false - - Default - - 60 - 6 - - - - 1 - - - - 540 - - $(pv_name) -$(pv_value) - 432 - - - true - 1 - 39872d87:13e14015f61:-31ed - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Gain - - - - 35 - 0 - - 1 - - - - 1 - - 519 - true - - 444 - - - false - true - true - 39872d87:13e14015f61:-31ec - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai1Gain.VAL - - - - - - - Menu Button - true - false - - Default - - 60 - 6 - - - - 1 - - - - 565 - - $(pv_name) -$(pv_value) - 432 - - - false - true - true - 39872d87:13e14015f61:-31eb - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai2Gain.VAL - - - - - - - Menu Button - true - false - - Default - - 60 - 6 - - - - 1 - - - - 590 - - $(pv_name) -$(pv_value) - 432 - - - false - true - true - 39872d87:13e14015f61:-31ea - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R)Ai3Gain.VAL - - - - - - - Menu Button - true - false - - Default - - 60 - 6 - - - - 1 - - - - 615 - - $(pv_name) -$(pv_value) - 432 - - - true - 1 - 39872d87:13e14015f61:-31e9 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 7 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 495 - - - true - 1 - 39872d87:13e14015f61:-31e8 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 8 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 535 - - - true - 1 - 39872d87:13e14015f61:-31e7 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 9 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 575 - - - true - 1 - 39872d87:13e14015f61:-31e6 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 10 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 615 - - - true - 1 - 39872d87:13e14015f61:-31e5 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 11 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 655 - - - true - 1 - 39872d87:13e14015f61:-31e4 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 12 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 695 - - - true - 1 - 39872d87:13e14015f61:-31e3 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 13 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 735 - - - true - 1 - 39872d87:13e14015f61:-31e2 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 14 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 775 - - - true - 1 - 39872d87:13e14015f61:-31e1 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 15 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 815 - - - true - 1 - 39872d87:13e14015f61:-31e0 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - 16 - - - - 20 - 0 - - 1 - - - - 1 - - 325 - true - - 855 - - \ No newline at end of file diff --git a/motorApp/op/opi/XPSAuxBi_more.opi b/motorApp/op/opi/XPSAuxBi_more.opi deleted file mode 100644 index 9853f03f..00000000 --- a/motorApp/op/opi/XPSAuxBi_more.opi +++ /dev/null @@ -1,303 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-30ee - 3.1.2.20120830 - - true - 100 - XPSAuxBi_more - false - false - - - - - - - Display - true - 180 - - true - 5 - - false - -1 - -1 - - - 349 - 140 - - true - 1 - 39872d87:13e14015f61:-30ed - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - $(P)$(R) - - - - 200 - 0 - - 1 - - - - 1 - - 8 - true - - -10 - - - false - true - true - 39872d87:13e14015f61:-30ec - - 20 - Menu Button - false - - true - true - false - - false - $(P)$(R).SCAN - - - - - - - Menu Button - true - false - - Default - - 100 - 6 - - - - 1 - - - - 70 - - $(pv_name) -$(pv_value) - 40 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-30eb - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R) - - - - 1 - 0 - true - - - - - 39 - $(pv_name) -$(pv_value) - 115 - false - - - true - true - 1 - false - 39872d87:13e14015f61:-30ea - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 3 - true - false - $(P)$(R).VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 60 - 0 - - - 1 - - - - 1 - - 39 - false - $(pv_name) -$(pv_value) - 46 - - - false - true - 100.0 - - - - 39872d87:13e14015f61:-30e9 - - - - - 20 - true - Ellipse - false - 255 - - true - true - true - - false - - - - - - - - Ellipse - true - - - - false - - Default - - 20 - 0 - 0 - - - - true - - - false - - $(P)$(R) - - - - 1 - 0 - true - - - - - 39 - $(pv_name) -$(pv_value) - 115 - false - - \ No newline at end of file diff --git a/motorApp/op/opi/XPSAuxTest.opi b/motorApp/op/opi/XPSAuxTest.opi deleted file mode 100644 index 47d0e4ed..00000000 --- a/motorApp/op/opi/XPSAuxTest.opi +++ /dev/null @@ -1,88 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-30e1 - 3.1.2.20120830 - - true - 100 - XPSAuxTest - false - false - - - - - - - Display - true - 150 - - true - 5 - - false - -1 - -1 - - - 49 - 839 - - false - true - false - 39872d87:13e14015f61:-30e0 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 110 - 6 - - - - 1 - - - - 39 - - - XPSAux.opi - - true -

IOC:

- XPSAux -
- 0 - XPS Auxilliary -
-
- $(pv_name) -$(pv_value) - 17 -
-
\ No newline at end of file diff --git a/motorApp/op/opi/XPSExtra.opi b/motorApp/op/opi/XPSExtra.opi deleted file mode 100644 index 69182f4f..00000000 --- a/motorApp/op/opi/XPSExtra.opi +++ /dev/null @@ -1,402 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-30dc - 3.1.2.20120830 - - true - 150 - XPSExtra - false - false - - - - - - - Display - true - 350 - - true - 5 - - false - -1 - -1 - - - 84 - 560 - - true - 1 - 39872d87:13e14015f61:-30db - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - GPIO1 - - - - 50 - 0 - - 1 - - - - 0 - - 97 - true - - -87 - - - true - true - 1 - false - 39872d87:13e14015f61:-30da - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - IOC:m1READBACK.VAL - - - - - - - Text Update - true - ###### - false - 0 - - - - 100 - 0 - - - 1 - - - - 0 - - 42 - false - $(pv_name) -$(pv_value) - 159 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-30d9 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - IOC:m1MIN_JERK_TIME - - - - false - 0 - - - false - - - - 0 - - 72 - $(pv_name) -$(pv_value) - 159 - - - true - 1 - 39872d87:13e14015f61:-30d8 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Readback - - - - 80 - 0 - - 1 - - - - 0 - - 42 - true - - 73 - - - true - 1 - 39872d87:13e14015f61:-30d7 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Min. jerk time - - - - 140 - 0 - - 1 - - - - 0 - - 72 - true - - 13 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 100 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:-30d6 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - IOC:m1MAX_JERK_TIME - - - - false - 0 - - - false - - - - 0 - - 101 - $(pv_name) -$(pv_value) - 159 - - - true - 1 - 39872d87:13e14015f61:-30d5 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Max. jerk time - - - - 140 - 0 - - 1 - - - - 0 - - 101 - true - - 13 - - - true - 1 - 39872d87:13e14015f61:-30d4 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - XPS with standard EPICS records - - - - 310 - 0 - - 1 - - - - 0 - - 11 - true - - 11 - - \ No newline at end of file diff --git a/motorApp/op/opi/XPSTest.opi b/motorApp/op/opi/XPSTest.opi deleted file mode 100644 index bc6ceecc..00000000 --- a/motorApp/op/opi/XPSTest.opi +++ /dev/null @@ -1,306 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-30c9 - 3.1.2.20120830 - - true - 175 - XPSTest - false - false - - - - - - - Display - true - 200 - - true - 5 - - false - -1 - -1 - - - 30 - 537 - - false - true - false - 39872d87:13e14015f61:-30c8 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 104 - - - XPSExtra.opi - - true -

IOC:

- m1 -
- 0 - Motor 1 -
- - XPSExtra.opi - - true -

IOC:

- m2 -
- 0 - Motor 2 -
-
- $(pv_name) -$(pv_value) - 25 -
- - false - true - false - 39872d87:13e14015f61:-30c7 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 134 - - - trajectoryScan.opi - - true -

IOC:

- traj1 - XPS_trajectory - m1 - m2 -
- 0 - XPS Trajectory Scan -
-
- $(pv_name) -$(pv_value) - 25 -
- - false - true - false - 39872d87:13e14015f61:-30c6 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 74 - - - XPSAux.opi - - true -

IOC:

- XPSAux -
- 0 - XPS Auxilliary -
-
- $(pv_name) -$(pv_value) - 25 -
- - true - 1 - 39872d87:13e14015f61:-30c5 - false - - 25 - Label - - true - true - false - - true - false - - - - - - - Label - true - Newport XPS Test - - - - 150 - 0 - - 1 - - - - 0 - - 11 - true - - 6 - - - false - true - false - 39872d87:13e14015f61:-30c4 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 44 - - - motor3x.opi - - true -

IOC:

- m1 - m2 - m3 -
- 0 - Motors -
-
- $(pv_name) -$(pv_value) - 25 -
-
\ No newline at end of file diff --git a/motorApp/op/opi/XPSTop.opi b/motorApp/op/opi/XPSTop.opi deleted file mode 100644 index 4eee3853..00000000 --- a/motorApp/op/opi/XPSTop.opi +++ /dev/null @@ -1,312 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:-30bc - 3.1.2.20120830 - - true - 175 - XPSTop - false - false - - - - - - - Display - true - 200 - - true - 5 - - false - -1 - -1 - - - 53 - 833 - - false - true - false - 39872d87:13e14015f61:-30bb - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 104 - - - XPSExtra.opi - - true -

IOC:

- m1 -
- 0 - Motor 1 -
- - XPSExtra.opi - - true -

IOC:

- m2 -
- 0 - Motor 2 -
-
- $(pv_name) -$(pv_value) - 25 -
- - false - true - false - 39872d87:13e14015f61:-30ba - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 134 - - - profileMove.opi - - true -

IOC:

- Prof1: - XPSProfileMove - m1 - m2 - m3 - m4 - m5 - m6 - m7 - m8 -
- 0 - XPS Profile Move -
-
- $(pv_name) -$(pv_value) - 25 -
- - false - true - false - 39872d87:13e14015f61:-30b9 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 74 - - - XPSAux.opi - - true -

IOC:

- XPSAux -
- 0 - XPS Auxilliary -
-
- $(pv_name) -$(pv_value) - 25 -
- - true - 1 - 39872d87:13e14015f61:-30b8 - false - - 25 - Label - - true - true - false - - true - false - - - - - - - Label - true - Newport XPS Test - - - - 150 - 0 - - 1 - - - - 0 - - 11 - true - - 6 - - - false - true - false - 39872d87:13e14015f61:-30b7 - - 25 - Menu Button - false - - true - true - false - - false - - - - - - - - Menu Button - true - false - - Default - - 150 - 6 - - - - 1 - - - - 44 - - - motor3x.opi - - true -

IOC:

- m1 - m2 - m3 -
- 0 - Motors -
-
- $(pv_name) -$(pv_value) - 25 -
-
\ No newline at end of file diff --git a/motorApp/op/opi/profileMoveXPS.opi b/motorApp/op/opi/profileMoveXPS.opi deleted file mode 100644 index cc0e7868..00000000 --- a/motorApp/op/opi/profileMoveXPS.opi +++ /dev/null @@ -1,4473 +0,0 @@ - - false - - true - - 39872d87:13e14015f61:11d7 - 3.1.2.20120830 - - true - 400 - profileMoveXPS - false - false - - - - - - - Display - true - 800 - - true - 5 - - false - -1 - -1 - - - 194 - 194 - - false - true - 100.0 - - - - 39872d87:13e14015f61:11d8 - - - - - 35 - true - Rectangle - false - 255 - - true - true - false - - false - - - - - - - - Rectangle - true - - - - false - - Default - - 450 - 0 - 0 - - - 1 - 0 - true - - - - - 7 - $(pv_name) -$(pv_value) - 175 - false - - - false - true - 0.0 - - - - 39872d87:13e14015f61:11da - - - - - 275 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 790 - 0 - 0 - - - 1 - 2 - true - - - - - 51 - $(pv_name) -$(pv_value) - 5 - false - - - - true - - true - 39872d87:13e14015f61:11e3 - - 261 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 100 - 0 - - false - 1 - - - - - 58 - - 586 - - false - true - 0.0 - - - - 39872d87:13e14015f61:11ec - - - - - 261 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 100 - 0 - 0 - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 39872d87:13e14015f61:11e4 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Velocity - - - - 80 - 0 - - 1 - - - - 0 - - 33 - true - - 12 - - - true - 1 - 39872d87:13e14015f61:11e5 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Maximum - - - - 70 - 0 - - 1 - - - - 0 - - 9 - true - - 17 - - - true - true - 1 - false - 39872d87:13e14015f61:11e6 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M4MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 137 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11e7 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M5MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 162 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11e8 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M6MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 187 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11e9 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M1MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 62 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11ea - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M2MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 87 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11eb - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M3MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 112 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11ed - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M8MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 237 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:11ee - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M7MaxVelocity - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 212 - false - $(pv_name) -$(pv_value) - 12 - - - - - true - - true - 39872d87:13e14015f61:11ef - - 261 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 100 - 0 - - false - 1 - - - - - 58 - - 691 - - false - true - 0.0 - - - - 39872d87:13e14015f61:11f8 - - - - - 261 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 100 - 0 - 0 - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 39872d87:13e14015f61:11f0 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Accel. - - - - 60 - 0 - - 1 - - - - 0 - - 33 - true - - 16 - - - true - 1 - 39872d87:13e14015f61:11f1 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Maximum - - - - 70 - 0 - - 1 - - - - 0 - - 9 - true - - 11 - - - true - true - 1 - false - 39872d87:13e14015f61:11f2 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M4MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 137 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f3 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M5MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 162 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f4 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M6MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 187 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f5 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M1MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 62 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f6 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M2MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 87 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f7 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M3MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 112 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11f9 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M8MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 237 - false - $(pv_name) -$(pv_value) - 6 - - - true - true - 1 - false - 39872d87:13e14015f61:11fa - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M7MaxAcceleration - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 212 - false - $(pv_name) -$(pv_value) - 6 - - - - - true - - true - 39872d87:13e14015f61:11fb - - 261 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 200 - 0 - - false - 1 - - - - - 58 - - 171 - - false - true - 0.0 - - - - 39872d87:13e14015f61:120c - - - - - 261 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 200 - 0 - 0 - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 39872d87:13e14015f61:11fc - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - First - - - - 50 - 0 - - 1 - - - - 0 - - 9 - true - - 28 - - - true - 1 - 39872d87:13e14015f61:11fd - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Output - - - - 60 - 0 - - 1 - - - - 0 - - 33 - true - - 23 - - - true - 1 - 39872d87:13e14015f61:11fe - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - First - - - - 50 - 0 - - 1 - - - - 0 - - 9 - true - - 128 - - - true - 1 - 39872d87:13e14015f61:11ff - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Readback - - - - 80 - 0 - - 1 - - - - 0 - - 33 - true - - 113 - - - true - true - 1 - false - 39872d87:13e14015f61:1200 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M4Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 137 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1201 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M4Positions - - - - false - 0 - - - false - - - - 0 - - 137 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:1202 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M5Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 162 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1203 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M5Positions - - - - false - 0 - - - false - - - - 0 - - 162 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:1204 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M6Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 187 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1205 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M6Positions - - - - false - 0 - - - false - - - - 0 - - 187 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:1206 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M1Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 62 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1207 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M1Positions - - - - false - 0 - - - false - - - - 0 - - 62 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:1208 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M2Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 87 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1209 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M2Positions - - - - false - 0 - - - false - - - - 0 - - 87 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:120a - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M3Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 112 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:120b - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M3Positions - - - - false - 0 - - - false - - - - 0 - - 112 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:120d - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M8Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 237 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:120e - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M8Positions - - - - false - 0 - - - false - - - - 0 - - 237 - $(pv_name) -$(pv_value) - 4 - - - true - true - 1 - false - 39872d87:13e14015f61:120f - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M7Readbacks - - - - - - - Text Update - true - ###### - false - 0 - - - - 90 - 0 - - - 1 - - - - 0 - - 212 - false - $(pv_name) -$(pv_value) - 102 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 90 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1210 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)M7Positions - - - - false - 0 - - - false - - - - 0 - - 212 - $(pv_name) -$(pv_value) - 4 - - - - - true - - true - 39872d87:13e14015f61:1211 - - 261 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 100 - 0 - - false - 1 - - - - - 58 - - 481 - - false - true - 0.0 - - - - 39872d87:13e14015f61:121a - - - - - 261 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 100 - 0 - 0 - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 39872d87:13e14015f61:1212 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Position - - - - 80 - 0 - - 1 - - - - 0 - - 33 - true - - 12 - - - true - 1 - 39872d87:13e14015f61:1213 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Maximum - - - - 70 - 0 - - 1 - - - - 0 - - 9 - true - - 17 - - - true - true - 1 - false - 39872d87:13e14015f61:1214 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M4MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 137 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1215 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M5MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 162 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1216 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M6MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 187 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1217 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M1MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 62 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1218 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M2MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 87 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1219 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M3MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 112 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:121b - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M8MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 237 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:121c - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M7MaxPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 212 - false - $(pv_name) -$(pv_value) - 12 - - - - - true - - true - 39872d87:13e14015f61:121d - - 261 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 100 - 0 - - false - 1 - - - - - 58 - - 376 - - false - true - 0.0 - - - - 39872d87:13e14015f61:1226 - - - - - 261 - true - Rectangle - false - 255 - - true - true - false - - true - - - - - - - - Rectangle - true - - - - false - - Default - - 100 - 0 - 0 - - - 1 - 2 - true - - - - - 0 - $(pv_name) -$(pv_value) - 0 - false - - - true - 1 - 39872d87:13e14015f61:121e - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Position - - - - 80 - 0 - - 1 - - - - 0 - - 33 - true - - 12 - - - true - 1 - 39872d87:13e14015f61:121f - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - Minimum - - - - 70 - 0 - - 1 - - - - 0 - - 9 - true - - 17 - - - true - true - 1 - false - 39872d87:13e14015f61:1220 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M4MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 137 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1221 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M5MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 162 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1222 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M6MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 187 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1223 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M1MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 62 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1224 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M2MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 87 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1225 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M3MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 112 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1227 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M8MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 237 - false - $(pv_name) -$(pv_value) - 12 - - - true - true - 1 - false - 39872d87:13e14015f61:1228 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(R)M7MinPosition - - - - - - - Text Update - true - ###### - false - 0 - - - - 80 - 0 - - - 1 - - - - 0 - - 212 - false - $(pv_name) -$(pv_value) - 12 - - - - - true - - true - 39872d87:13e14015f61:1229 - - 20 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 355 - 0 - - false - 1 - - - - - 334 - - 7 - - true - 1 - 39872d87:13e14015f61:122a - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - DT of 1st time element: - - - - 230 - 0 - - 1 - - - - 0 - - 0 - true - - 0 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 120 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:122b - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)Times - - - - false - 0 - - - false - - - - 0 - - 0 - $(pv_name) -$(pv_value) - 235 - - - - - true - - true - 39872d87:13e14015f61:122c - - 20 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 275 - 0 - - false - 1 - - - - - 368 - - 7 - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 120 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:122d - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)GroupName - - - - false - 0 - - - false - - - - 0 - - 0 - $(pv_name) -$(pv_value) - 155 - - - true - 1 - 39872d87:13e14015f61:122e - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - XPS group name: - - - - 150 - 0 - - 1 - - - - 0 - - 0 - true - - 0 - - - - - true - - true - 39872d87:13e14015f61:122f - - 20 - Grouping Container - - true - true - false - - true - false - - - - - - - Grouping Container - true - - Default - - 485 - 0 - - false - 1 - - - - - 368 - - 300 - - true - 1 - 39872d87:13e14015f61:1230 - false - - 20 - Label - - true - true - false - - true - false - - - - - - - Label - true - XPS trajectory file: - - - - 200 - 0 - - 1 - - - - 0 - - 0 - true - - 0 - - - false - true - 1 - false - false - - 20 - false - true - - - - Text Input - true - - - - - 280 - 3 - - 1 - Infinity - -Infinity - false - 39872d87:13e14015f61:1231 - 0.0 - Text Input - - true - true - false - - 1 - false - 0 - $(P)$(R)TrajectoryFile - - - - false - 0 - - - false - - - - 0 - - 0 - $(pv_name) -$(pv_value) - 205 - - - - true - 1 - 39872d87:13e14015f61:11d9 - false - - 25 - Label - - true - true - false - - true - false - - - - - - - Label - true - $(TITLE) - - - - 396 - 0 - - 1 - - - - 1 - - 13 - true - - 205 - - - true - true - 1 - false - 39872d87:13e14015f61:11db - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M1).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 120 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11dc - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M2).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 145 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11dd - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M3).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 170 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11de - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M4).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 195 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11df - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M5).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 220 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11e0 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M6).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 245 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11e1 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M7).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 270 - false - $(pv_name) -$(pv_value) - 9 - - - true - true - 1 - false - 39872d87:13e14015f61:11e2 - false - 0.0 - - 20 - Text Update - false - - true - true - false - - 1 - true - false - $(P)$(M8).DESC - - - - - - - Text Update - true - ###### - false - 0 - - - - 150 - 0 - - - 1 - - - - 0 - - 295 - false - $(pv_name) -$(pv_value) - 9 - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/HXP.ui b/motorApp/op/ui/autoconvert/HXP.ui deleted file mode 100644 index c8e202d2..00000000 --- a/motorApp/op/ui/autoconvert/HXP.ui +++ /dev/null @@ -1,244 +0,0 @@ - - -MainWindow - - - - 342 - 122 - 150 - 189 - - - - - -QWidget#centralWidget {background: rgba(236, 236, 236, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 10 - 10 - 132 - 166 - - - - - - 0 - 77 - 130 - 22 - - - - - 255 - 255 - 255 - - - - - 51 - 153 - 0 - - - - -HXP extra - - - Menu - - - HXP_extra.adl - - - HXP_extra.adl - - - P=$(P),R=$(R) - - - false - - - - - - 0 - 142 - 130 - 22 - - - - - 255 - 255 - 255 - - - - - 51 - 153 - 0 - - - - -HXP coordSys - - - Menu - - - HXP_coordSys.adl - - - HXP_coordSys.adl - - - P=$(P),R=$(R) - - - false - - - - - - 0 - 45 - 130 - 22 - - - - - 255 - 255 - 255 - - - - - 51 - 153 - 0 - - - - -HXP motors - - - Menu - - - HXP_motors.adl - - - HXP_motors.adl - - - P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6) - - - false - - - - - - 0 - 110 - 130 - 22 - - - - - 255 - 255 - 255 - - - - - 51 - 153 - 0 - - - - -HXP moveAll - - - Menu - - - HXP_moveAll.adl - - - HXP_moveAll.adl - - - P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6) - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 144 - 30 - - - - - caLabel_0 - caFrame_0 - caRelatedDisplay_0 - caRelatedDisplay_1 - caRelatedDisplay_2 - caRelatedDisplay_3 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/HXP_coordSys.ui b/motorApp/op/ui/autoconvert/HXP_coordSys.ui deleted file mode 100644 index 4fa03b5b..00000000 --- a/motorApp/op/ui/autoconvert/HXP_coordSys.ui +++ /dev/null @@ -1,2011 +0,0 @@ - - -MainWindow - - - - 411 - 293 - 800 - 285 - - - - - -QWidget#centralWidget {background: rgba(200, 200, 200, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 442 - 235 - 347 - 32 - - - - - caGraphics::Rectangle - - - - 0 - 0 - 345 - 30 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::Calc - - - A<0 - - - $(P)$(R)ERROR - - - - - - 5 - 6 - 335 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)ERR_DESC - - - - 253 - 0 - 0 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - string - - - caLineEdit::Static - - - - - - - 10 - 230 - 125 - 40 - - - - EPushButton::WidthAndHeight - - - $(P)$(R)SET_CS - - - - 0 - 0 - 0 - - - - - 249 - 218 - 60 - - - - Set CS - - - 1 - - - 0 - - - caMessageButton::Static - - - - - - 308 - 230 - 125 - 40 - - - - EPushButton::WidthAndHeight - - - $(P)$(R)READ_CS - - - - 0 - 0 - 0 - - - - - 255 - 255 - 255 - - - - Read CS - - - 1 - - - 0 - - - caMessageButton::Static - - - - - - 90 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_X - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 210 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_Y - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 330 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_Z - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 450 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_U - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 570 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_V - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 690 - 186 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)CS_SET_W - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 93 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:X - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 213 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:Y - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 333 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:Z - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 453 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:U - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 573 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:V - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 693 - 75 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TOOL:W - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 93 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:X - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 213 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:Y - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 333 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:Z - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 453 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:U - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 573 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:V - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 693 - 112 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)BASE:W - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 94 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:X - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 214 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:Y - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 334 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:Z - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 454 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:U - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 574 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:V - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 694 - 149 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)WORK:W - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - Tool - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 10 - 75 - 70 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - Base - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 10 - 112 - 70 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - Work - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 10 - 149 - 70 - 17 - - - - - - - 10 - 38 - 779 - 19 - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - X - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 83 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - Y - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 203 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - Z - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 323 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - U - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 443 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - V - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 563 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - W - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 683 - 0 - 94 - 17 - - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - CS - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 70 - 17 - - - - - - - - 8 - 183 - 75 - 30 - - - - $(P)$(R)CS_TO_SET - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - caGraphics::Rectangle - - - - 0 - 0 - 800 - 20 - - - - - 255 - 255 - 255 - - - - Filled - - - - 255 - 255 - 255 - - - - Solid - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - $(P)$(R) Coordinate System Definitions - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 820 - 20 - - - - caRectangle_0 - caFrame_0 - caLabel_0 - caLabel_1 - caLabel_2 - caLabel_3 - caLabel_4 - caLabel_5 - caLabel_6 - caLabel_7 - caLabel_8 - caLabel_9 - caFrame_1 - caRectangle_1 - caLabel_10 - caLineEdit_0 - caMessageButton_0 - caMessageButton_1 - caTextEntry_0 - caTextEntry_1 - caTextEntry_2 - caTextEntry_3 - caTextEntry_4 - caTextEntry_5 - caLineEdit_1 - caLineEdit_2 - caLineEdit_3 - caLineEdit_4 - caLineEdit_5 - caLineEdit_6 - caLineEdit_7 - caLineEdit_8 - caLineEdit_9 - caLineEdit_10 - caLineEdit_11 - caLineEdit_12 - caLineEdit_13 - caLineEdit_14 - caLineEdit_15 - caLineEdit_16 - caLineEdit_17 - caLineEdit_18 - caMenu_0 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/HXP_extra.ui b/motorApp/op/ui/autoconvert/HXP_extra.ui deleted file mode 100644 index 4f0fc90c..00000000 --- a/motorApp/op/ui/autoconvert/HXP_extra.ui +++ /dev/null @@ -1,439 +0,0 @@ - - -MainWindow - - - - 208 - 115 - 350 - 250 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - caGraphics::Rectangle - - - - 0 - 0 - 350 - 30 - - - - - 255 - 255 - 255 - - - - Filled - - - - 255 - 255 - 255 - - - - Solid - - - - - QFrame::NoFrame - - - - 10 - 0 - 184 - - - - - 10 - 0 - 184 - - - - $(P)$(R) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 350 - 30 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Coord Sys - - - ESimpleLabel::WidthAndHeight - - - - 62 - 44 - 162 - 30 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 177 - 44 - 110 - 36 - - - - $(P)$(R)CS - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Status - - - ESimpleLabel::WidthAndHeight - - - - 62 - 81 - 110 - 30 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 177 - 81 - 110 - 30 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)STATUS - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 179 - 129 - 110 - 30 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)ERROR - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Error - - - ESimpleLabel::WidthAndHeight - - - - 64 - 129 - 110 - 30 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Error Description - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 62 - 165 - 306 - 30 - - - - - - - 6 - 204 - 335 - 22 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)ERR_DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - string - - - caLineEdit::Static - - - caRectangle_0 - caLabel_0 - caLabel_1 - caLabel_2 - caLabel_3 - caLabel_4 - caMenu_0 - caLineEdit_0 - caLineEdit_1 - caLineEdit_2 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/HXP_motors.ui b/motorApp/op/ui/autoconvert/HXP_motors.ui deleted file mode 100644 index 63730edc..00000000 --- a/motorApp/op/ui/autoconvert/HXP_motors.ui +++ /dev/null @@ -1,7206 +0,0 @@ - - -MainWindow - - - - 35 - 624 - 720 - 200 - - - - - -QWidget#centralWidget {background: rgba(200, 200, 200, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 0 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M1).DMOV - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).LVIO - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1)_able.VAL - - - - - caGraphics::Rectangle - - - - 0 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M1).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 28 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M1).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 28 - 127 - 60 - 10 - - - - - - - 60 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M1).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 5 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M1);P=$(P),M=$(M1);P=$(P),M=$(M1);P=$(P),M=$(M1);P=$(P),Q=$(M1),PV=$(M1) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 27 - 139 - 43 - 18 - - - - - - - 2 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M1).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 28 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 89 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M1).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 0 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).LLS - - - - - caGraphics::Rectangle - - - - 110 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).HLS - - - - - - 0 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M1)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 7 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).SET - - - - - caGraphics::Rectangle - - - - 9 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).SET - - - - - - 11 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M1).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 28 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M1)_able.VAL - - - - - - 120 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M2).DMOV - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).LVIO - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2)_able.VAL - - - - - caGraphics::Rectangle - - - - 120 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M2).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 148 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M2).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 148 - 127 - 60 - 10 - - - - - - - 180 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M2).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 125 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M2);P=$(P),M=$(M2);P=$(P),M=$(M2);P=$(P),M=$(M2);P=$(P),Q=$(M2),PV=$(M2) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 147 - 139 - 43 - 18 - - - - - - - 122 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M2).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 148 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 209 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M2).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 120 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).LLS - - - - - caGraphics::Rectangle - - - - 230 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).HLS - - - - - - 120 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 120 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M2)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 120 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 127 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).SET - - - - - caGraphics::Rectangle - - - - 129 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).SET - - - - - - 131 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M2).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 148 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M2)_able.VAL - - - - - - 240 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M3).DMOV - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).LVIO - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3)_able.VAL - - - - - caGraphics::Rectangle - - - - 240 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M3).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 268 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M3).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 268 - 127 - 60 - 10 - - - - - - - 300 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M3).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 245 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M3);P=$(P),M=$(M3);P=$(P),M=$(M3);P=$(P),M=$(M3);P=$(P),Q=$(M3),PV=$(M3) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 267 - 139 - 43 - 18 - - - - - - - 242 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M3).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 268 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 329 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M3).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 240 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).LLS - - - - - caGraphics::Rectangle - - - - 350 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).HLS - - - - - - 240 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 240 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M3)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 240 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 247 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).SET - - - - - caGraphics::Rectangle - - - - 249 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).SET - - - - - - 251 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M3).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 268 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M3)_able.VAL - - - - - - 360 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M4).DMOV - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).LVIO - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4)_able.VAL - - - - - caGraphics::Rectangle - - - - 360 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M4).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 388 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M4).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 388 - 127 - 60 - 10 - - - - - - - 420 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M4).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 365 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M4);P=$(P),M=$(M4);P=$(P),M=$(M4);P=$(P),M=$(M4);P=$(P),Q=$(M4),PV=$(M4) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 387 - 139 - 43 - 18 - - - - - - - 362 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M4).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 388 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 449 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M4).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 360 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).LLS - - - - - caGraphics::Rectangle - - - - 470 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).HLS - - - - - - 360 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 360 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M4)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 360 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 367 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).SET - - - - - caGraphics::Rectangle - - - - 369 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).SET - - - - - - 371 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M4).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 388 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M4)_able.VAL - - - - - - 480 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M5).DMOV - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).LVIO - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5)_able.VAL - - - - - caGraphics::Rectangle - - - - 480 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M5).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 508 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M5).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 508 - 127 - 60 - 10 - - - - - - - 540 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M5).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 485 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M5);P=$(P),M=$(M5);P=$(P),M=$(M5);P=$(P),M=$(M5);P=$(P),Q=$(M5),PV=$(M5) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 507 - 139 - 43 - 18 - - - - - - - 482 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M5).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 508 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 569 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M5).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 480 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).LLS - - - - - caGraphics::Rectangle - - - - 590 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).HLS - - - - - - 480 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 480 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M5)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 480 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 487 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).SET - - - - - caGraphics::Rectangle - - - - 489 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).SET - - - - - - 491 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M5).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 508 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M5)_able.VAL - - - - - - 600 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M6).DMOV - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).LVIO - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6)_able.VAL - - - - - caGraphics::Rectangle - - - - 600 - 97 - 116 - 40 - - - - 3 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - - - QFrame::NoFrame - - - - 115 - 255 - 107 - - - - - 115 - 255 - 107 - - - - caLabel::IfZero - - - $(P)$(M6).DMOV - - - Moving - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 628 - 121 - 60 - 15 - - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M6).SET - - - Calibrate - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 628 - 127 - 60 - 10 - - - - - - - 660 - 137 - 53 - 20 - - - - EPushButton::WidthAndHeight - - - $(P)$(M6).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - - 605 - 137 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;More;Setup;All;Setup scan parameters - - - motorx_help.adl;motorx_more.adl;motorx_setup.adl;motorx_all.adl;scanParms.adl - - - P=$(P),M=$(M6);P=$(P),M=$(M6);P=$(P),M=$(M6);P=$(P),M=$(M6);P=$(P),Q=$(M6),PV=$(M6) - - - false;false;false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 627 - 139 - 43 - 18 - - - - - - - 602 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M6).TWR - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - < - - - 1 - - - caMessageButton::Static - - - - - - 628 - 99 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).TWV - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 689 - 99 - 25 - 36 - - - - EPushButton::WidthAndHeight - - - $(P)$(M6).TWF - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - > - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 600 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).LLS - - - - - caGraphics::Rectangle - - - - 710 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).HLS - - - - - - 600 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 600 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M6)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 600 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 607 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).SET - - - - - caGraphics::Rectangle - - - - 609 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).SET - - - - - - 611 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - caLabel::IfNotZero - - - $(P)$(M6).LVIO - - - Soft limit - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 628 - 119 - 60 - 10 - - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M6)_able.VAL - - - - - - 118 - 0 - 2 - 158 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,157; - - - - - - 238 - 0 - 2 - 158 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,157; - - - - - - 358 - 0 - 2 - 158 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,157; - - - - - - 478 - 0 - 2 - 158 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,157; - - - - - - 598 - 0 - 2 - 157 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,156; - - - - - - 9 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Coord Sys - - - ESimpleLabel::WidthAndHeight - - - - 4 - 169 - 108 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 105 - 164 - 105 - 30 - - - - $(P)$(R)CS - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Status - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 570 - 169 - 72 - 20 - - - - - - - 647 - 169 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)STATUS - - - - 0 - 0 - 0 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 129 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - - 249 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - - 369 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - - 489 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - - 609 - 69 - 100 - 27 - - - - - - 0 - 0 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caFrame::IfZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 9 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 129 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 249 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 369 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 489 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 609 - 69 - 98 - 25 - - - - 2 - - - - 200 - 200 - 200 - - - - Filled - - - - 200 - 200 - 200 - - - - Solid - - - caGraphics::IfNotZero - - - A - - - $(P)$(R)CS - - - - - caGraphics::Rectangle - - - - 220 - 165 - 345 - 30 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::Calc - - - A<0 - - - $(P)$(R)ERROR - - - - - - 225 - 171 - 335 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)ERR_DESC - - - - 253 - 0 - 0 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - string - - - caLineEdit::Static - - - caRectangle_0 - caRectangle_1 - caRectangle_2 - caRectangle_3 - caLabel_0 - caLabel_1 - caLabel_2 - caRectangle_4 - caRectangle_5 - caRectangle_6 - caLabel_3 - caRectangle_7 - caRectangle_8 - caLabel_4 - caRectangle_9 - caRectangle_10 - caRectangle_11 - caRectangle_12 - caRectangle_13 - caLabel_5 - caLabel_6 - caLabel_7 - caRectangle_14 - caRectangle_15 - caRectangle_16 - caLabel_8 - caRectangle_17 - caRectangle_18 - caLabel_9 - caRectangle_19 - caRectangle_20 - caRectangle_21 - caRectangle_22 - caRectangle_23 - caLabel_10 - caLabel_11 - caLabel_12 - caRectangle_24 - caRectangle_25 - caRectangle_26 - caLabel_13 - caRectangle_27 - caRectangle_28 - caLabel_14 - caRectangle_29 - caRectangle_30 - caRectangle_31 - caRectangle_32 - caRectangle_33 - caLabel_15 - caLabel_16 - caLabel_17 - caRectangle_34 - caRectangle_35 - caRectangle_36 - caLabel_18 - caRectangle_37 - caRectangle_38 - caLabel_19 - caRectangle_39 - caRectangle_40 - caRectangle_41 - caRectangle_42 - caRectangle_43 - caLabel_20 - caLabel_21 - caLabel_22 - caRectangle_44 - caRectangle_45 - caRectangle_46 - caLabel_23 - caRectangle_47 - caRectangle_48 - caLabel_24 - caRectangle_49 - caRectangle_50 - caRectangle_51 - caRectangle_52 - caRectangle_53 - caLabel_25 - caLabel_26 - caLabel_27 - caRectangle_54 - caRectangle_55 - caRectangle_56 - caLabel_28 - caRectangle_57 - caRectangle_58 - caLabel_29 - caRectangle_59 - caPolyLine_0 - caPolyLine_1 - caPolyLine_2 - caPolyLine_3 - caPolyLine_4 - caFrame_0 - caLabel_30 - caLabel_31 - caFrame_1 - caFrame_2 - caFrame_3 - caFrame_4 - caFrame_5 - caRectangle_60 - caRectangle_61 - caRectangle_62 - caRectangle_63 - caRectangle_64 - caRectangle_65 - caRectangle_66 - caLineEdit_0 - caMessageButton_0 - caRelatedDisplay_0 - caMessageButton_1 - caTextEntry_0 - caMessageButton_2 - caLineEdit_1 - caLineEdit_2 - caLineEdit_3 - caMessageButton_3 - caRelatedDisplay_1 - caMessageButton_4 - caTextEntry_1 - caMessageButton_5 - caLineEdit_4 - caLineEdit_5 - caLineEdit_6 - caMessageButton_6 - caRelatedDisplay_2 - caMessageButton_7 - caTextEntry_2 - caMessageButton_8 - caLineEdit_7 - caLineEdit_8 - caLineEdit_9 - caMessageButton_9 - caRelatedDisplay_3 - caMessageButton_10 - caTextEntry_3 - caMessageButton_11 - caLineEdit_10 - caLineEdit_11 - caLineEdit_12 - caMessageButton_12 - caRelatedDisplay_4 - caMessageButton_13 - caTextEntry_4 - caMessageButton_14 - caLineEdit_13 - caLineEdit_14 - caLineEdit_15 - caMessageButton_15 - caRelatedDisplay_5 - caMessageButton_16 - caTextEntry_5 - caMessageButton_17 - caLineEdit_16 - caLineEdit_17 - caTextEntry_6 - caMenu_0 - caLineEdit_18 - caTextEntry_7 - caTextEntry_8 - caTextEntry_9 - caTextEntry_10 - caTextEntry_11 - caLineEdit_19 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/HXP_moveAll.ui b/motorApp/op/ui/autoconvert/HXP_moveAll.ui deleted file mode 100644 index 01781fac..00000000 --- a/motorApp/op/ui/autoconvert/HXP_moveAll.ui +++ /dev/null @@ -1,4434 +0,0 @@ - - -MainWindow - - - - 411 - 293 - 720 - 165 - - - - - -QWidget#centralWidget {background: rgba(200, 200, 200, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 0 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M1).DMOV - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).LVIO - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1)_able.VAL - - - - - - 502 - 106 - 125 - 40 - - - - EPushButton::WidthAndHeight - - - $(P)$(M1).STOP - - - - 249 - 218 - 60 - - - - - 253 - 0 - 0 - - - - STOP - - - 1 - - - caMessageButton::Static - - - - - caGraphics::Rectangle - - - - 0 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).LLS - - - - - caGraphics::Rectangle - - - - 110 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).HLS - - - - - - 0 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M1)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 7 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).SET - - - - - caGraphics::Rectangle - - - - 9 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M1).SET - - - - - - 11 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 6 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M1)_able.VAL - - - - - - 120 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M2).DMOV - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).LVIO - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2)_able.VAL - - - - - caGraphics::Rectangle - - - - 120 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).LLS - - - - - caGraphics::Rectangle - - - - 230 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).HLS - - - - - - 120 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 120 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M2)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 120 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 127 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).SET - - - - - caGraphics::Rectangle - - - - 129 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M2).SET - - - - - - 131 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 126 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M2)_able.VAL - - - - - - 240 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M3).DMOV - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).LVIO - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3)_able.VAL - - - - - caGraphics::Rectangle - - - - 240 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).LLS - - - - - caGraphics::Rectangle - - - - 350 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).HLS - - - - - - 240 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 240 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M3)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 240 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 247 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).SET - - - - - caGraphics::Rectangle - - - - 249 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M3).SET - - - - - - 251 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 246 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M3)_able.VAL - - - - - - 360 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M4).DMOV - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).LVIO - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4)_able.VAL - - - - - caGraphics::Rectangle - - - - 360 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).LLS - - - - - caGraphics::Rectangle - - - - 470 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).HLS - - - - - - 360 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 360 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M4)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 360 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 367 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).SET - - - - - caGraphics::Rectangle - - - - 369 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M4).SET - - - - - - 371 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 366 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M4)_able.VAL - - - - - - 480 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M5).DMOV - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).LVIO - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5)_able.VAL - - - - - caGraphics::Rectangle - - - - 480 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).LLS - - - - - caGraphics::Rectangle - - - - 590 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).HLS - - - - - - 480 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 480 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M5)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 480 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 487 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).SET - - - - - caGraphics::Rectangle - - - - 489 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M5).SET - - - - - - 491 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 486 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M5)_able.VAL - - - - - - 600 - 0 - 116 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).DESC - - - - 10 - 0 - 184 - - - - - 255 - 255 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 115 - 255 - 107 - - - - Filled - - - - 115 - 255 - 107 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(M6).DMOV - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 251 - 243 - 74 - - - - Filled - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).LVIO - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6)_able.VAL - - - - - caGraphics::Rectangle - - - - 600 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).LLS - - - - - caGraphics::Rectangle - - - - 710 - 45 - 6 - 50 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).HLS - - - - - - 600 - 32 - 116 - 12 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).EGU - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 600 - 20 - 116 - 12 - - - - 2 - - - - 10 - 0 - 184 - - - - Filled - - - - 10 - 0 - 184 - - - - Solid - - - - - QFrame::NoFrame - - - - 255 - 255 - 255 - - - - - 255 - 255 - 255 - - - - ($(P)$(M6)) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 600 - 21 - 116 - 10 - - - - - - caGraphics::Rectangle - - - - 607 - 41 - 102 - 26 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).SET - - - - - caGraphics::Rectangle - - - - 609 - 43 - 98 - 21 - - - - 2 - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - - 251 - 243 - 74 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(M6).SET - - - - - - 611 - 45 - 94 - 17 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).RBV - - - - 10 - 0 - 184 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 606 - 66 - 104 - 31 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Dash - - - caGraphics::IfNotZero - - - $(P)$(M6)_able.VAL - - - - - - 118 - 0 - 2 - 101 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,100; - - - - - - 238 - 0 - 2 - 101 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,100; - - - - - - 358 - 0 - 2 - 101 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,100; - - - - - - 478 - 0 - 2 - 101 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,100; - - - - - - 598 - 0 - 2 - 101 - - - - 2 - - - - 0 - 0 - 0 - - - - Filled - - - - 0 - 0 - 0 - - - - Solid - - - 1,1;1,100; - - - - - - 369 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T4 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 489 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T5 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 609 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T6 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 655 - 140 - 20 - 20 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - Help;HXP_motors;HXP_extra - - - ;HXP_motors.adl;HXP_extra.adl - - - ;P=$(P),R=$(R),M1=$(M1),M2=$(M2),M3=$(M3),M4=$(M4),M5=$(M5),M6=$(M6);P=$(P),R=$(R) - - - false;false;false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - More - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 678 - 142 - 43 - 18 - - - - - - - 365 - 105 - 125 - 40 - - - - EPushButton::WidthAndHeight - - - $(P)$(R)MOVE_ALL - - - - 249 - 218 - 60 - - - - - 45 - 127 - 0 - - - - Go - - - 1 - - - 0 - - - caMessageButton::Static - - - - - - 8 - 104 - 347 - 32 - - - - - caGraphics::Rectangle - - - - 0 - 0 - 345 - 30 - - - - 2 - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::Calc - - - A<0 - - - $(P)$(R)ERROR - - - - - - 5 - 6 - 335 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)ERR_DESC - - - - 253 - 0 - 0 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - string - - - caLineEdit::Static - - - - - - - 10 - 140 - 139 - 22 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Status - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 72 - 20 - - - - - - - 77 - 0 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)STATUS - - - - 0 - 0 - 0 - - - - - 200 - 200 - 200 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - - 9 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T1 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 129 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T2 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 249 - 69 - 98 - 25 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)T3 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - caRectangle_0 - caRectangle_1 - caRectangle_2 - caRectangle_3 - caRectangle_4 - caRectangle_5 - caLabel_0 - caRectangle_6 - caRectangle_7 - caRectangle_8 - caRectangle_9 - caRectangle_10 - caRectangle_11 - caRectangle_12 - caRectangle_13 - caRectangle_14 - caLabel_1 - caRectangle_15 - caRectangle_16 - caRectangle_17 - caRectangle_18 - caRectangle_19 - caRectangle_20 - caRectangle_21 - caRectangle_22 - caRectangle_23 - caLabel_2 - caRectangle_24 - caRectangle_25 - caRectangle_26 - caRectangle_27 - caRectangle_28 - caRectangle_29 - caRectangle_30 - caRectangle_31 - caRectangle_32 - caLabel_3 - caRectangle_33 - caRectangle_34 - caRectangle_35 - caRectangle_36 - caRectangle_37 - caRectangle_38 - caRectangle_39 - caRectangle_40 - caRectangle_41 - caLabel_4 - caRectangle_42 - caRectangle_43 - caRectangle_44 - caRectangle_45 - caRectangle_46 - caRectangle_47 - caRectangle_48 - caRectangle_49 - caRectangle_50 - caLabel_5 - caRectangle_51 - caRectangle_52 - caRectangle_53 - caPolyLine_0 - caPolyLine_1 - caPolyLine_2 - caPolyLine_3 - caPolyLine_4 - caLabel_6 - caRectangle_54 - caFrame_0 - caLabel_7 - caFrame_1 - caLineEdit_0 - caMessageButton_0 - caLineEdit_1 - caLineEdit_2 - caLineEdit_3 - caLineEdit_4 - caLineEdit_5 - caLineEdit_6 - caLineEdit_7 - caLineEdit_8 - caLineEdit_9 - caLineEdit_10 - caLineEdit_11 - caLineEdit_12 - caLineEdit_13 - caLineEdit_14 - caLineEdit_15 - caLineEdit_16 - caLineEdit_17 - caTextEntry_0 - caTextEntry_1 - caTextEntry_2 - caRelatedDisplay_0 - caMessageButton_1 - caLineEdit_18 - caLineEdit_19 - caTextEntry_3 - caTextEntry_4 - caTextEntry_5 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSAux.ui b/motorApp/op/ui/autoconvert/XPSAux.ui deleted file mode 100644 index 8c73daba..00000000 --- a/motorApp/op/ui/autoconvert/XPSAux.ui +++ /dev/null @@ -1,9136 +0,0 @@ - - -MainWindow - - - - 78 - 203 - 900 - 660 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - XPS Auxilliary I/O - - - ESimpleLabel::WidthAndHeight - - - - 322 - 6 - 345 - 32 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Digital I/O - - - ESimpleLabel::WidthAndHeight - - - - 384 - 52 - 165 - 25 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 1 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 255 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 2 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 295 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 3 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 335 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 4 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 375 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 5 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 415 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 6 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 455 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 7 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 495 - 86 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 8 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 535 - 86 - 20 - 20 - - - - - - - 5 - 200 - 485 - 56 - - - - - - 6 - 5 - 474 - 46 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GPIO2 - - - ESimpleLabel::WidthAndHeight - - - - 0 - 12 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 128 - 12 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)2Li.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - hexadecimal - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Input - - - ESimpleLabel::WidthAndHeight - - - - 74 - 12 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi1.VAL - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi1.VAL - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi2.VAL - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi2.VAL - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi3.VAL - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi3.VAL - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi4.VAL - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi4.VAL - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi5.VAL - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi5.VAL - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)2Bi0.VAL - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)2Bi0.VAL - - - - - - 237 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi0 - - - false - - - - - - 277 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi1 - - - false - - - - - - 317 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi2 - - - false - - - - - - 357 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi3 - - - false - - - - - - 397 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi4 - - - false - - - - - - 437 - 26 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)2Bi5 - - - false - - - - - - caGraphics::Rectangle - - - - 0 - 0 - 483 - 54 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - - 5 - 259 - 485 - 89 - - - - - caGraphics::Rectangle - - - - 0 - 0 - 483 - 87 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 5 - 5 - 475 - 79 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GPIO3 - - - ESimpleLabel::WidthAndHeight - - - - 0 - 30 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi1.VAL - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi1.VAL - - - - - - 278 - 25 - 35 - 30 - - - - $(P)$(R)3Bo1 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi2.VAL - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi2.VAL - - - - - - 318 - 25 - 35 - 30 - - - - $(P)$(R)3Bo2 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi3.VAL - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi3.VAL - - - - - - 358 - 25 - 35 - 30 - - - - $(P)$(R)3Bo3 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi4.VAL - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi4.VAL - - - - - - 398 - 25 - 35 - 30 - - - - $(P)$(R)3Bo4 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi5.VAL - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi5.VAL - - - - - - 438 - 25 - 35 - 30 - - - - $(P)$(R)3Bo5 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)3Bi0.VAL - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)3Bi0.VAL - - - - - - 238 - 25 - 35 - 30 - - - - $(P)$(R)3Bo0 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - - 128 - 0 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)3Li.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - hexadecimal - - - caLineEdit::Static - - - - - - 128 - 30 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)3Lo.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - hexadecimal - - - - - - 237 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi0 - - - false - - - - - - 277 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi1 - - - false - - - - - - 317 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi2 - - - false - - - - - - 357 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi3 - - - false - - - - - - 397 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi4 - - - false - - - - - - 437 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)3Bi5 - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Input - - - ESimpleLabel::WidthAndHeight - - - - 74 - 0 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Output - - - ESimpleLabel::WidthAndHeight - - - - 64 - 30 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 5 - 351 - 885 - 89 - - - - - caGraphics::Rectangle - - - - 0 - 0 - 883 - 87 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 5 - 5 - 875 - 79 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GPIO4 - - - ESimpleLabel::WidthAndHeight - - - - 0 - 30 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi1.VAL - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi1.VAL - - - - - - 278 - 25 - 35 - 30 - - - - $(P)$(R)4Bo1 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi2.VAL - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi2.VAL - - - - - - 318 - 25 - 35 - 30 - - - - $(P)$(R)4Bo2 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi3.VAL - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi3.VAL - - - - - - 358 - 25 - 35 - 30 - - - - $(P)$(R)4Bo3 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi4.VAL - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi4.VAL - - - - - - 398 - 25 - 35 - 30 - - - - $(P)$(R)4Bo4 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi5.VAL - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi5.VAL - - - - - - 438 - 25 - 35 - 30 - - - - $(P)$(R)4Bo5 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 485 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi6.VAL - - - - - caGraphics::Circle - - - - 485 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi6.VAL - - - - - - 478 - 25 - 35 - 30 - - - - $(P)$(R)4Bo6 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 525 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi7.VAL - - - - - caGraphics::Circle - - - - 525 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi7.VAL - - - - - - 518 - 25 - 35 - 30 - - - - $(P)$(R)4Bo7 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 605 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi9.VAL - - - - - caGraphics::Circle - - - - 605 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi9.VAL - - - - - - 598 - 25 - 35 - 30 - - - - $(P)$(R)4Bo9 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 565 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi8.VAL - - - - - caGraphics::Circle - - - - 565 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi8.VAL - - - - - - 558 - 25 - 35 - 30 - - - - $(P)$(R)4Bo8 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 645 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi10.VAL - - - - - caGraphics::Circle - - - - 645 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi10.VAL - - - - - - 638 - 25 - 35 - 30 - - - - $(P)$(R)4Bo10 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 685 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi11.VAL - - - - - caGraphics::Circle - - - - 685 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi11.VAL - - - - - - 678 - 25 - 35 - 30 - - - - $(P)$(R)4Bo11 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 725 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi12.VAL - - - - - caGraphics::Circle - - - - 725 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi12.VAL - - - - - - 718 - 25 - 35 - 30 - - - - $(P)$(R)4Bo12 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 765 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi13.VAL - - - - - caGraphics::Circle - - - - 765 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi13.VAL - - - - - - 758 - 25 - 35 - 30 - - - - $(P)$(R)4Bo13 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 805 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi14.VAL - - - - - caGraphics::Circle - - - - 805 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi14.VAL - - - - - - 798 - 25 - 35 - 30 - - - - $(P)$(R)4Bo14 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 845 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi15.VAL - - - - - caGraphics::Circle - - - - 845 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi15.VAL - - - - - - 838 - 25 - 35 - 30 - - - - $(P)$(R)4Bo15 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)4Bi0.VAL - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)4Bi0.VAL - - - - - - 238 - 25 - 35 - 30 - - - - $(P)$(R)4Bo0 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - - 128 - 0 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)4Li.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - hexadecimal - - - caLineEdit::Static - - - - - - 128 - 30 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)4Lo.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - hexadecimal - - - - - - 237 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi0 - - - false - - - - - - 277 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi1 - - - false - - - - - - 317 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi2 - - - false - - - - - - 357 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi3 - - - false - - - - - - 397 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi4 - - - false - - - - - - 437 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi5 - - - false - - - - - - 477 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi6 - - - false - - - - - - 517 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi7 - - - false - - - - - - 557 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi8 - - - false - - - - - - 597 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi9 - - - false - - - - - - 637 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi10 - - - false - - - - - - 677 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi11 - - - false - - - - - - 717 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi12 - - - false - - - - - - 757 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi13 - - - false - - - - - - 797 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi14 - - - false - - - - - - 837 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)4Bi15 - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Input - - - ESimpleLabel::WidthAndHeight - - - - 74 - 0 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Output - - - ESimpleLabel::WidthAndHeight - - - - 64 - 30 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Analog I/O (GPIO2) - - - ESimpleLabel::WidthAndHeight - - - - 342 - 458 - 270 - 25 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Input - - - ESimpleLabel::WidthAndHeight - - - - 160 - 493 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Rectangle - - - - 5 - 489 - 500 - 165 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 5 - 108 - 565 - 89 - - - - - caGraphics::Rectangle - - - - 0 - 0 - 563 - 87 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 5 - 5 - 555 - 79 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GPIO1 - - - ESimpleLabel::WidthAndHeight - - - - 0 - 30 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi1.VAL - - - - - caGraphics::Circle - - - - 285 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi1.VAL - - - - - - 278 - 25 - 35 - 30 - - - - $(P)$(R)1Bo1 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi2.VAL - - - - - caGraphics::Circle - - - - 325 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi2.VAL - - - - - - 318 - 25 - 35 - 30 - - - - $(P)$(R)1Bo2 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi3.VAL - - - - - caGraphics::Circle - - - - 365 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi3.VAL - - - - - - 358 - 25 - 35 - 30 - - - - $(P)$(R)1Bo3 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi4.VAL - - - - - caGraphics::Circle - - - - 405 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi4.VAL - - - - - - 398 - 25 - 35 - 30 - - - - $(P)$(R)1Bo4 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi5.VAL - - - - - caGraphics::Circle - - - - 445 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi5.VAL - - - - - - 438 - 25 - 35 - 30 - - - - $(P)$(R)1Bo5 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 485 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi6.VAL - - - - - caGraphics::Circle - - - - 485 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi6.VAL - - - - - - 478 - 25 - 35 - 30 - - - - $(P)$(R)1Bo6 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 525 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi7.VAL - - - - - caGraphics::Circle - - - - 525 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi7.VAL - - - - - - 518 - 25 - 35 - 30 - - - - $(P)$(R)1Bo7 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R)1Bi0.VAL - - - - - caGraphics::Circle - - - - 245 - 0 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R)1Bi0.VAL - - - - - - 238 - 25 - 35 - 30 - - - - $(P)$(R)1Bo0 - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caChoice::Static - - - - - - 128 - 0 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)1Li.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - hexadecimal - - - caLineEdit::Static - - - - - - 128 - 30 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)1Lo.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - hexadecimal - - - - - - 237 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi0 - - - false - - - - - - 277 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi1 - - - false - - - - - - 317 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi2 - - - false - - - - - - 357 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi3 - - - false - - - - - - 397 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi4 - - - false - - - - - - 437 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi5 - - - false - - - - - - 477 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi6 - - - false - - - - - - 517 - 59 - 35 - 18 - - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Menu - - - - - - XPSAuxBi_more.adl - - - P=$(P), R=$(R)1Bi7 - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Input - - - ESimpleLabel::WidthAndHeight - - - - 74 - 0 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Output - - - ESimpleLabel::WidthAndHeight - - - - 64 - 30 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai0.VAL - - - 1 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 12 - 540 - 24 - 20 - - - - - - - 188 - 540 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai0.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 293 - 540 - 40 - 22 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai0.PREC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Chan. - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 16 - 519 - 60 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Description - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 106 - 519 - 132 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Volts - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 221 - 519 - 60 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Prec. - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 300 - 519 - 60 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai1.VAL - - - 2 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 12 - 565 - 24 - 20 - - - - - - - 188 - 565 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai1.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 293 - 565 - 40 - 22 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai1.PREC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai1.VAL - - - 3 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 12 - 590 - 24 - 20 - - - - - - - 188 - 590 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai2.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 293 - 590 - 40 - 22 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai2.PREC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai2.VAL - - - 4 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 12 - 615 - 24 - 20 - - - - - - - 188 - 615 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai3.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 293 - 615 - 40 - 22 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai3.PREC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 35 - 540 - 148 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai0.DESC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 35 - 565 - 148 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai1.DESC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 35 - 590 - 148 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai2.DESC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 35 - 615 - 148 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ai3.DESC - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 538 - 489 - 352 - 167 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Output - - - ESimpleLabel::WidthAndHeight - - - - 136 - 4 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - caGraphics::Rectangle - - - - 0 - 0 - 350 - 165 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 26 - 30 - 282 - 118 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Chan. - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 4 - 0 - 60 - 20 - - - - - - - 25 - 21 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ao0.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 130 - 21 - 150 - 20 - - - - $(P)$(R)Ao0.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - 1.000000 - - - caSlider::Channel - - - caSlider::Channel - - - 0.0 - - - 1.0 - - - Right - - - NoScale - - - caSlider::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai0.VAL - - - 1 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 21 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai1.VAL - - - 2 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 46 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai1.VAL - - - 3 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 71 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R)Ai2.VAL - - - 4 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 96 - 24 - 20 - - - - - - - 25 - 46 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ao1.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 130 - 46 - 150 - 20 - - - - $(P)$(R)Ao1.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - 1.000000 - - - caSlider::Channel - - - caSlider::Channel - - - 0.0 - - - 1.0 - - - Right - - - NoScale - - - caSlider::Static - - - - - - 25 - 71 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ao2.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 130 - 71 - 150 - 20 - - - - $(P)$(R)Ao2.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - 1.000000 - - - caSlider::Channel - - - caSlider::Channel - - - 0.0 - - - 1.0 - - - Right - - - NoScale - - - caSlider::Static - - - - - - 25 - 96 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Ao3.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 130 - 96 - 150 - 20 - - - - $(P)$(R)Ao3.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - 1.000000 - - - caSlider::Channel - - - caSlider::Channel - - - 0.0 - - - 1.0 - - - Right - - - NoScale - - - caSlider::Static - - - - - - - - 338 - 519 - 88 - 118 - - - - - - 0 - 21 - 86 - 20 - - - - $(P)$(R)Ai0.SCAN - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Scan - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 25 - 0 - 48 - 20 - - - - - - - 0 - 46 - 86 - 20 - - - - $(P)$(R)Ai1.SCAN - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - - 0 - 71 - 86 - 20 - - - - $(P)$(R)Ai2.SCAN - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - - 0 - 96 - 86 - 20 - - - - $(P)$(R)Ai3.SCAN - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - - - 432 - 540 - 60 - 20 - - - - $(P)$(R)Ai0Gain.VAL - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Gain - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 444 - 519 - 48 - 20 - - - - - - - 432 - 565 - 60 - 20 - - - - $(P)$(R)Ai1Gain.VAL - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - - 432 - 590 - 60 - 20 - - - - $(P)$(R)Ai2Gain.VAL - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - - 432 - 615 - 60 - 20 - - - - $(P)$(R)Ai3Gain.VAL - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - caMenu::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 7 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 495 - 325 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 8 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 535 - 325 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 9 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 575 - 325 - 20 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 10 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 615 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 11 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 655 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 12 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 695 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 13 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 735 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 14 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 775 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 15 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 815 - 325 - 24 - 20 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - 16 - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 855 - 325 - 24 - 20 - - - - caLabel_0 - caLabel_1 - caLabel_2 - caLabel_3 - caLabel_4 - caLabel_5 - caLabel_6 - caLabel_7 - caLabel_8 - caLabel_9 - caLabel_10 - caLabel_11 - caGraphics_0 - caGraphics_1 - caGraphics_2 - caGraphics_3 - caGraphics_4 - caGraphics_5 - caGraphics_6 - caGraphics_7 - caGraphics_8 - caGraphics_9 - caGraphics_10 - caGraphics_11 - caFrame_1 - caRectangle_0 - caFrame_0 - caRectangle_1 - caLabel_12 - caGraphics_12 - caGraphics_13 - caGraphics_14 - caGraphics_15 - caGraphics_16 - caGraphics_17 - caGraphics_18 - caGraphics_19 - caGraphics_20 - caGraphics_21 - caGraphics_22 - caGraphics_23 - caLabel_13 - caLabel_14 - caFrame_3 - caFrame_2 - caRectangle_2 - caLabel_15 - caGraphics_24 - caGraphics_25 - caGraphics_26 - caGraphics_27 - caGraphics_28 - caGraphics_29 - caGraphics_30 - caGraphics_31 - caGraphics_32 - caGraphics_33 - caGraphics_34 - caGraphics_35 - caGraphics_36 - caGraphics_37 - caGraphics_38 - caGraphics_39 - caGraphics_40 - caGraphics_41 - caGraphics_42 - caGraphics_43 - caGraphics_44 - caGraphics_45 - caGraphics_46 - caGraphics_47 - caGraphics_48 - caGraphics_49 - caGraphics_50 - caGraphics_51 - caGraphics_52 - caGraphics_53 - caGraphics_54 - caGraphics_55 - caLabel_16 - caLabel_17 - caFrame_5 - caFrame_4 - caLabel_18 - caLabel_19 - caRectangle_3 - caRectangle_4 - caLabel_20 - caGraphics_56 - caGraphics_57 - caGraphics_58 - caGraphics_59 - caGraphics_60 - caGraphics_61 - caGraphics_62 - caGraphics_63 - caGraphics_64 - caGraphics_65 - caGraphics_66 - caGraphics_67 - caGraphics_68 - caGraphics_69 - caGraphics_70 - caGraphics_71 - caLabel_21 - caLabel_22 - caFrame_7 - caFrame_6 - caLabel_23 - caLabel_24 - caLabel_25 - caLabel_26 - caLabel_27 - caLabel_28 - caLabel_29 - caLabel_30 - caLabel_31 - caRectangle_5 - caLabel_32 - caLabel_33 - caLabel_34 - caLabel_35 - caLabel_36 - caFrame_9 - caFrame_8 - caLabel_37 - caFrame_10 - caLabel_38 - caLabel_39 - caLabel_40 - caLabel_41 - caLabel_42 - caLabel_43 - caLabel_44 - caLabel_45 - caLabel_46 - caLabel_47 - caLabel_48 - caLineEdit_0 - caRelatedDisplay_0 - caRelatedDisplay_1 - caRelatedDisplay_2 - caRelatedDisplay_3 - caRelatedDisplay_4 - caRelatedDisplay_5 - caChoice_0 - caChoice_1 - caChoice_2 - caChoice_3 - caChoice_4 - caChoice_5 - caLineEdit_1 - caTextEntry_0 - caRelatedDisplay_6 - caRelatedDisplay_7 - caRelatedDisplay_8 - caRelatedDisplay_9 - caRelatedDisplay_10 - caRelatedDisplay_11 - caChoice_6 - caChoice_7 - caChoice_8 - caChoice_9 - caChoice_10 - caChoice_11 - caChoice_12 - caChoice_13 - caChoice_14 - caChoice_15 - caChoice_16 - caChoice_17 - caChoice_18 - caChoice_19 - caChoice_20 - caChoice_21 - caLineEdit_2 - caTextEntry_1 - caRelatedDisplay_12 - caRelatedDisplay_13 - caRelatedDisplay_14 - caRelatedDisplay_15 - caRelatedDisplay_16 - caRelatedDisplay_17 - caRelatedDisplay_18 - caRelatedDisplay_19 - caRelatedDisplay_20 - caRelatedDisplay_21 - caRelatedDisplay_22 - caRelatedDisplay_23 - caRelatedDisplay_24 - caRelatedDisplay_25 - caRelatedDisplay_26 - caRelatedDisplay_27 - caChoice_22 - caChoice_23 - caChoice_24 - caChoice_25 - caChoice_26 - caChoice_27 - caChoice_28 - caChoice_29 - caLineEdit_3 - caTextEntry_2 - caRelatedDisplay_28 - caRelatedDisplay_29 - caRelatedDisplay_30 - caRelatedDisplay_31 - caRelatedDisplay_32 - caRelatedDisplay_33 - caRelatedDisplay_34 - caRelatedDisplay_35 - caLineEdit_4 - caTextEntry_3 - caLineEdit_5 - caTextEntry_4 - caLineEdit_6 - caTextEntry_5 - caLineEdit_7 - caTextEntry_6 - caTextEntry_7 - caTextEntry_8 - caTextEntry_9 - caTextEntry_10 - caTextEntry_11 - caSlider_0 - caTextEntry_12 - caSlider_1 - caTextEntry_13 - caSlider_2 - caTextEntry_14 - caSlider_3 - caMenu_0 - caMenu_1 - caMenu_2 - caMenu_3 - caMenu_4 - caMenu_5 - caMenu_6 - caMenu_7 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSAuxBi_more.ui b/motorApp/op/ui/autoconvert/XPSAuxBi_more.ui deleted file mode 100644 index b0c2a153..00000000 --- a/motorApp/op/ui/autoconvert/XPSAuxBi_more.ui +++ /dev/null @@ -1,227 +0,0 @@ - - -MainWindow - - - - 140 - 349 - 180 - 100 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(P)$(R) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - -10 - 8 - 200 - 20 - - - - - - - 40 - 70 - 100 - 20 - - - - $(P)$(R).SCAN - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caMenu::Static - - - - - caGraphics::Circle - - - - 115 - 39 - 20 - 20 - - - - - 0 - 216 - 0 - - - - Filled - - - - 0 - 216 - 0 - - - - Solid - - - caGraphics::IfZero - - - $(P)$(R) - - - - - - 46 - 39 - 60 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R).VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - hexadecimal - - - caLineEdit::Static - - - - - caGraphics::Circle - - - - 115 - 39 - 20 - 20 - - - - - 253 - 0 - 0 - - - - Filled - - - - 253 - 0 - 0 - - - - Solid - - - caGraphics::IfNotZero - - - $(P)$(R) - - - caLabel_0 - caGraphics_0 - caGraphics_1 - caMenu_0 - caLineEdit_0 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSAuxTest.ui b/motorApp/op/ui/autoconvert/XPSAuxTest.ui deleted file mode 100644 index c090dc5d..00000000 --- a/motorApp/op/ui/autoconvert/XPSAuxTest.ui +++ /dev/null @@ -1,67 +0,0 @@ - - -MainWindow - - - - 839 - 49 - 150 - 100 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 17 - 39 - 110 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - XPSAux - - - Menu - - - XPS Auxilliary - - - XPSAux.adl - - - P=IOC:, R=XPSAux - - - false - - - caRelatedDisplay_0 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSExtra.ui b/motorApp/op/ui/autoconvert/XPSExtra.ui deleted file mode 100644 index 45d476b3..00000000 --- a/motorApp/op/ui/autoconvert/XPSExtra.ui +++ /dev/null @@ -1,368 +0,0 @@ - - -MainWindow - - - - 560 - 84 - 350 - 150 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - GPIO1 - - - ESimpleLabel::WidthAndHeight - - - - -87 - 97 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 159 - 42 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - IOC:m1READBACK.VAL - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 159 - 72 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - IOC:m1MIN_JERK_TIME - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Readback - - - ESimpleLabel::WidthAndHeight - - - - 73 - 42 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Min. jerk time - - - ESimpleLabel::WidthAndHeight - - - - 13 - 72 - 168 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 159 - 101 - 100 - 20 - - - - caLineEdit::WidthAndHeight - - - IOC:m1MAX_JERK_TIME - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Max. jerk time - - - ESimpleLabel::WidthAndHeight - - - - 13 - 101 - 168 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - XPS with standard EPICS records - - - ESimpleLabel::WidthAndHeight - - - - 11 - 11 - 372 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - caLabel_0 - caLabel_1 - caLabel_2 - caLabel_3 - caLabel_4 - caLineEdit_0 - caTextEntry_0 - caTextEntry_1 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSTest.ui b/motorApp/op/ui/autoconvert/XPSTest.ui deleted file mode 100644 index 6553a24b..00000000 --- a/motorApp/op/ui/autoconvert/XPSTest.ui +++ /dev/null @@ -1,233 +0,0 @@ - - -MainWindow - - - - 537 - 30 - 200 - 175 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 25 - 104 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Extra motor PVs - - - Menu - - - Motor 1;Motor 2 - - - XPSExtra.adl;XPSExtra.adl - - - P=IOC:, M1=m1;P=IOC:, M1=m2 - - - false;false - - - - - - 25 - 134 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Trajectory scan - - - Menu - - - XPS Trajectory Scan - - - trajectoryScan.adl - - - P=IOC:, R=traj1, TITLE=XPS_trajectory,M1=m1,M2=m2 - - - false - - - - - - 25 - 74 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Auxilliary I/O - - - Menu - - - XPS Auxilliary - - - XPSAux.adl - - - P=IOC:, R=XPSAux - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Newport XPS Test - - - ESimpleLabel::WidthAndHeight - - - - 6 - 11 - 240 - 25 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 25 - 44 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Motors - - - Menu - - - Motors - - - motor3x.adl - - - P=IOC:, M1=m1, M2=m2, M3=m3 - - - false - - - caLabel_0 - caRelatedDisplay_0 - caRelatedDisplay_1 - caRelatedDisplay_2 - caRelatedDisplay_3 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/XPSTop.ui b/motorApp/op/ui/autoconvert/XPSTop.ui deleted file mode 100644 index 0145a629..00000000 --- a/motorApp/op/ui/autoconvert/XPSTop.ui +++ /dev/null @@ -1,233 +0,0 @@ - - -MainWindow - - - - 833 - 53 - 200 - 175 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - - 25 - 104 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Extra motor PVs - - - Menu - - - Motor 1;Motor 2 - - - XPSExtra.adl;XPSExtra.adl - - - P=IOC:, M1=m1;P=IOC:, M1=m2 - - - false;false - - - - - - 25 - 134 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Profile move - - - Menu - - - XPS Profile Move - - - profileMove.adl - - - P=IOC:, R=Prof1:, TITLE=XPSProfileMove, M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8 - - - false - - - - - - 25 - 74 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Auxilliary I/O - - - Menu - - - XPS Auxilliary - - - XPSAux.adl - - - P=IOC:, R=XPSAux - - - false - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Newport XPS Test - - - ESimpleLabel::WidthAndHeight - - - - 6 - 11 - 240 - 25 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 25 - 44 - 150 - 25 - - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Motors - - - Menu - - - Motors - - - motor3x.adl - - - P=IOC:, M1=m1, M2=m2, M3=m3 - - - false - - - caLabel_0 - caRelatedDisplay_0 - caRelatedDisplay_1 - caRelatedDisplay_2 - caRelatedDisplay_3 - - - \ No newline at end of file diff --git a/motorApp/op/ui/autoconvert/profileMoveXPS.ui b/motorApp/op/ui/autoconvert/profileMoveXPS.ui deleted file mode 100644 index 90753d55..00000000 --- a/motorApp/op/ui/autoconvert/profileMoveXPS.ui +++ /dev/null @@ -1,4196 +0,0 @@ - - -MainWindow - - - - 194 - 194 - 800 - 400 - - - - - -QWidget#centralWidget {background: rgba(187, 187, 187, 255);} -QPushButton::menu-indicator {image: url(none.png); width: 0} - - - - - - - caGraphics::Rectangle - - - - 175 - 7 - 450 - 35 - - - - - 212 - 219 - 157 - - - - Filled - - - - 212 - 219 - 157 - - - - Solid - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - $(TITLE) - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 205 - 13 - 396 - 25 - - - - - - caGraphics::Rectangle - - - - 5 - 51 - 790 - 275 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 9 - 120 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M1).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 145 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M2).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 170 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M3).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 195 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M4).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 220 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M5).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 245 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M6).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 270 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M7).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 9 - 295 - 150 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(M8).DESC - - - - 0 - 0 - 0 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 586 - 58 - 102 - 263 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Velocity - - - ESimpleLabel::WidthAndHeight - - - - 12 - 33 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Maximum - - - ESimpleLabel::WidthAndHeight - - - - 17 - 9 - 84 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 12 - 137 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 162 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 187 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 62 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 87 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 112 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 0 - 100 - 261 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 12 - 237 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 212 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7MaxVelocity - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - - 691 - 58 - 102 - 263 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Accel. - - - ESimpleLabel::WidthAndHeight - - - - 16 - 33 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Maximum - - - ESimpleLabel::WidthAndHeight - - - - 11 - 9 - 84 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 6 - 137 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 162 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 187 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 62 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 87 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 112 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 0 - 100 - 261 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 6 - 237 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 6 - 212 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7MaxAcceleration - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - - 171 - 58 - 202 - 263 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - First - - - ESimpleLabel::WidthAndHeight - - - - 28 - 9 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Output - - - ESimpleLabel::WidthAndHeight - - - - 23 - 33 - 72 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - First - - - ESimpleLabel::WidthAndHeight - - - - 128 - 9 - 60 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Readback - - - ESimpleLabel::WidthAndHeight - - - - 113 - 33 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 102 - 137 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 137 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 162 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 162 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 187 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 187 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 62 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 62 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 87 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 87 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 112 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 112 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - caGraphics::Rectangle - - - - 0 - 0 - 200 - 261 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 102 - 237 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 237 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - 102 - 212 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7Readbacks - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 4 - 212 - 90 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7Positions - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - - 481 - 58 - 102 - 263 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Position - - - ESimpleLabel::WidthAndHeight - - - - 12 - 33 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Maximum - - - ESimpleLabel::WidthAndHeight - - - - 17 - 9 - 84 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 12 - 137 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 162 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 187 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 62 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 87 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 112 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 0 - 100 - 261 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 12 - 237 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 212 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7MaxPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - - 376 - 58 - 102 - 263 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Position - - - ESimpleLabel::WidthAndHeight - - - - 12 - 33 - 96 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Minimum - - - ESimpleLabel::WidthAndHeight - - - - 17 - 9 - 84 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 12 - 137 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M4MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 162 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M5MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 187 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M6MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 62 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M1MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 87 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M2MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 112 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M3MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - caGraphics::Rectangle - - - - 0 - 0 - 100 - 261 - - - - 2 - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Solid - - - - - - 12 - 237 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M8MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - 12 - 212 - 80 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)M7MinPosition - - - - 10 - 0 - 184 - - - - - 187 - 187 - 187 - - - - Qt::AlignAbsolute|Qt::AlignRight|Qt::AlignVCenter - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - decimal - - - caLineEdit::Static - - - - - - - 7 - 334 - 357 - 22 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - DT of 1st time element: - - - ESimpleLabel::WidthAndHeight - - - - 0 - 0 - 276 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 235 - 0 - 120 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)Times - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - - - 7 - 368 - 277 - 22 - - - - - - 155 - 0 - 120 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)GroupName - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - XPS group name: - - - ESimpleLabel::WidthAndHeight - - - - 0 - 0 - 180 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - 300 - 368 - 487 - 22 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - XPS trajectory file: - - - ESimpleLabel::WidthAndHeight - - - - 0 - 0 - 240 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 205 - 0 - 280 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)$(R)TrajectoryFile - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - caRectangle_0 - caLabel_0 - caRectangle_1 - caLabel_1 - caLabel_2 - caRectangle_2 - caFrame_0 - caLabel_3 - caLabel_4 - caRectangle_3 - caFrame_1 - caLabel_5 - caLabel_6 - caLabel_7 - caLabel_8 - caRectangle_4 - caFrame_2 - caLabel_9 - caLabel_10 - caRectangle_5 - caFrame_3 - caLabel_11 - caLabel_12 - caRectangle_6 - caFrame_4 - caLabel_13 - caFrame_5 - caLabel_14 - caFrame_6 - caLabel_15 - caFrame_7 - caLineEdit_0 - caLineEdit_1 - caLineEdit_2 - caLineEdit_3 - caLineEdit_4 - caLineEdit_5 - caLineEdit_6 - caLineEdit_7 - caLineEdit_8 - caLineEdit_9 - caLineEdit_10 - caLineEdit_11 - caLineEdit_12 - caLineEdit_13 - caLineEdit_14 - caLineEdit_15 - caLineEdit_16 - caLineEdit_17 - caLineEdit_18 - caLineEdit_19 - caLineEdit_20 - caLineEdit_21 - caLineEdit_22 - caLineEdit_23 - caLineEdit_24 - caTextEntry_0 - caLineEdit_25 - caTextEntry_1 - caLineEdit_26 - caTextEntry_2 - caLineEdit_27 - caTextEntry_3 - caLineEdit_28 - caTextEntry_4 - caLineEdit_29 - caTextEntry_5 - caLineEdit_30 - caTextEntry_6 - caLineEdit_31 - caTextEntry_7 - caLineEdit_32 - caLineEdit_33 - caLineEdit_34 - caLineEdit_35 - caLineEdit_36 - caLineEdit_37 - caLineEdit_38 - caLineEdit_39 - caLineEdit_40 - caLineEdit_41 - caLineEdit_42 - caLineEdit_43 - caLineEdit_44 - caLineEdit_45 - caLineEdit_46 - caLineEdit_47 - caTextEntry_8 - caTextEntry_9 - caTextEntry_10 - - - \ No newline at end of file diff --git a/motorExApp/WithAsyn/LdevNewport.dbd b/motorExApp/WithAsyn/LdevNewport.dbd deleted file mode 100644 index 4bf17a5c..00000000 --- a/motorExApp/WithAsyn/LdevNewport.dbd +++ /dev/null @@ -1,25 +0,0 @@ -# This is a partial, local copy of devNewport.dbd used to illustrate how *.dbd -# specification can be moved to the Makefile. - -device(motor,VME_IO,devMM3000,"MM3000") -device(motor,VME_IO,devMM4000,"MM4000") -device(motor,VME_IO,devPM500, "PM500") -device(motor,VME_IO,devESP300,"ESP300") -driver(drvMM3000) -driver(drvMM4000) -driver(drvPM500) -driver(drvESP300) -driver(motorXPS) -driver(motorMM4000) -registrar(NewportRegister) -registrar(XPSGatheringRegister) -registrar(XPSRegister) -registrar(XPSInterposeRegister) -registrar(drvXPSAsynAuxRegister) -#variable(devXPSC8Debug) -#variable(drvXPSC8Debug) -#variable(drvESP300debug) -#variable(drvMM3000debug) -#variable(drvMM4000debug) -#variable(drvPM500debug) - diff --git a/motorExApp/WithAsyn/LdevNewportTS.dbd b/motorExApp/WithAsyn/LdevNewportTS.dbd deleted file mode 100644 index e94aad8a..00000000 --- a/motorExApp/WithAsyn/LdevNewportTS.dbd +++ /dev/null @@ -1,6 +0,0 @@ -# This is a partial, local copy of devNewport.dbd used to illustrate how *.dbd -# specification can be moved to the Makefile. - -registrar(MM4005_trajectoryScanRegistrar) -#registrar(XPS_trajectoryScanRegistrar) - diff --git a/motorExApp/WithAsyn/Makefile b/motorExApp/WithAsyn/Makefile index 268cbfe1..4f80cdc5 100644 --- a/motorExApp/WithAsyn/Makefile +++ b/motorExApp/WithAsyn/Makefile @@ -17,9 +17,7 @@ COMMONDBDS += devImsMotor.dbd COMMONDBDS += devMclennanMotor.dbd COMMONDBDS += devMicos.dbd COMMONDBDS += devMicroMo.dbd -COMMONDBDS += devNewport.dbd ifdef SNCSEQ -COMMONDBDS += LdevNewportTS.dbd COMMONDBDS += devAerotechSeq.dbd endif COMMONDBDS += devPIMotor.dbd @@ -78,7 +76,6 @@ COMMONLIBS += MicroMo COMMONLIBS += PI COMMONLIBS += Acs COMMONLIBS += Ims -COMMONLIBS += Newport COMMONLIBS += softMotor COMMONLIBS += motorSimSupport COMMONLIBS += SmartMotor @@ -92,7 +89,7 @@ COMMONLIBS += ScriptMotor COMMONLIBS += lua endif -# Needed for Newport SNL programs +# Needed for SNL programs WithAsyn_LIBS += $(COMMONLIBS) WithAsyn_LIBS += asyn ifdef SNCSEQ @@ -113,7 +110,7 @@ ifdef IPAC WithAsynVx_LIBS += Ipac TyGSOctal endif WithAsynVx_LIBS += asyn -# Needed for Newport SNL programs +# Needed for SNL programs ifdef SNCSEQ ifeq (seq-2-1, $(findstring seq-2-1, $(SNCSEQ))) WithAsynVx_LIBS += seqDev seq pv