diff --git a/scripts/shutter.cmd b/scripts/shutter.cmd index 45acf4d..161eac9 100644 --- a/scripts/shutter.cmd +++ b/scripts/shutter.cmd @@ -12,10 +12,10 @@ require s7plcFW # ) epicsEnvSet("SPS_REGISTER_NAME", "$(SPS_REGISTER_NAME=SPS-$(FETCH_DB))") -epicsEnvSet("SPS_FETCH_SIZE", "36") +epicsEnvSet("SPS_FETCH_SIZE", "164") epicsEnvSet("SPS_WRITE_SIZE", "2") -s7plcFWConfigure("$(SPS_REGISTER_NAME)", "$(SPS_IP)", "$(FETCH_PORT=2000),1,$(FETCH_DB),0,$(SPS_FETCH_SIZE)", "$(WRITE_PORT=2001),1,$(WRITE_DB=$(FETCH_DB)),0,$(SPS_WRITE_SIZE)", $(SPS_ENDIANNESS=1), $(SPS_RECEIVE_TIMEOUT=1000), $(SPS_RECEIVE_DELAY=200), 0) +s7plcFWConfigure("$(SPS_REGISTER_NAME)", "$(SPS_IP)", "$(FETCH_PORT=2000),1,$(FETCH_DB),2,$(SPS_FETCH_SIZE)", "$(WRITE_PORT=2001),1,$(WRITE_DB=$(FETCH_DB)),2,$(SPS_WRITE_SIZE)", $(SPS_ENDIANNESS=1), $(SPS_RECEIVE_TIMEOUT=1000), $(SPS_RECEIVE_DELAY=200), 0) # Provides Connection Status PVs dbLoadRecords("$(sinqSPS_DB)/sps_status.db") diff --git a/templates/shutter.substitutions b/templates/shutter.substitutions index 2d3e772..8b43e7f 100644 --- a/templates/shutter.substitutions +++ b/templates/shutter.substitutions @@ -2,21 +2,21 @@ file "$(sinqSPS_DB)/writebit.db" { pattern {OFFSET, BIT, BIT_NAME } -{2 , 7 , "OPEN-SHUTTER" } -{3 , 0 , "CLOSE-SHUTTER" } +{0 , 7 , "OPEN-SHUTTER" } +{1 , 0 , "CLOSE-SHUTTER" } } file "$(sinqSPS_DB)/readbit.db" { pattern {OFFSET, BIT, BIT_NAME } -{2 , 0 , "PSYS-OK" } -{2 , 1 , "SHUTTER-READY" } -{2 , 2 , "EMERGENCY-STOP"} -{2 , 3 , "NOT-LOCKED" } -{2 , 4 , "CLOSED" } -{2 , 5 , "OPEN" } -{2 , 6 , "REMOTE-OKAY" } +{0 , 0 , "PSYS-OK" } +{0 , 1 , "SHUTTER-READY" } +{0 , 2 , "EMERGENCY-STOP"} +{0 , 3 , "NOT-LOCKED" } +{0 , 4 , "CLOSED" } +{0 , 5 , "OPEN" } +{0 , 6 , "REMOTE-OKAY" } } # The way that the strings are currently implemented in the SPS, the first two @@ -27,10 +27,10 @@ file "$(sinqSPS_DB)/readstring.db" { pattern {OFFSET, LENGTH, STRING_NAME } -{6 , 24 , "PSYS-OK-TXT" } -{32 , 22 , "SHUTTER-READY" } -{56 , 30 , "EMERGENCY-STOP" } -{88 , 22 , "NOT-LOCKED" } -{110 , 19 , "OPEN" } -{134 , 32 , "REMOTE-ENABLED" } +{4 , 24 , "PSYS-OK-TXT" } +{30 , 22 , "SHUTTER-READY" } +{54 , 30 , "EMERGENCY-STOP" } +{86 , 22 , "NOT-LOCKED" } +{108 , 19 , "OPEN" } +{132 , 32 , "REMOTE-ENABLED" } }