diff --git a/config/config.properties b/config/config.properties index 894a2c1..42fa4dc 100644 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Thu Nov 28 14:39:08 CET 2019 +#Wed Jan 08 11:01:33 CET 2020 autoSaveScanData=true simulation=false commandExecutionEvents=false @@ -23,12 +23,12 @@ dataScanPreserveTypes=false logLevel=Fine dataScanFlushRecords=true logPath={logs}/{date}_{time} -dataLayout=default +dataLayout=table terminalEnabled=false notificationLevel=null terminalPort=3579 createSessionFiles=true versionTrackingLogin={context}/svcusr-hlapp_robot versionTrackingRemote=git@git.psi.ch\:tell/X10SA.git -dataProvider=h5 +dataProvider=txt saveCommandStatistics=true diff --git a/config/devices.properties b/config/devices.properties index 681cfba..c5eaf0e 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -1,14 +1,14 @@ -img=ch.psi.pshell.prosilica.Prosilica|204464 "PacketSize=1504;PixelFormat=Mono8;BinningX=1;BinningY=1;RegionX=290;RegionY=130;Width=1000;Height=1000;MulticastEnable=Off"||-200|false -gripper_cam=ch.psi.pshell.imaging.MjpegSource|http://axis-accc8ea5e463.psi.ch/axis-cgi/mjpg/video.cgi?camera=1 reopen||-200|false -monitoring_cam=ch.psi.pshell.imaging.MjpegSource|http://axis-accc8ea5e463.psi.ch/axis-cgi/mjpg/video.cgi?camera=2 reopen||-200| +#img=ch.psi.pshell.prosilica.Prosilica|204464 "PacketSize=1504;PixelFormat=Mono8;BinningX=1;BinningY=1;RegionX=290;RegionY=130;Width=1000;Height=1000;MulticastEnable=Off"||-200|false +#gripper_cam=ch.psi.pshell.imaging.MjpegSource|http://axis-accc8ea5e463.psi.ch/axis-cgi/mjpg/video.cgi?camera=1 reopen||-200|false +#monitoring_cam=ch.psi.pshell.imaging.MjpegSource|http://axis-accc8ea5e463.psi.ch/axis-cgi/mjpg/video.cgi?camera=2 reopen||-200| #top_cam=ch.psi.pshell.imaging.MjpegSource|http://axis-accc8ea5e463.psi.ch/axis-cgi/mjpg/video.cgi?camera=3 true||-200| #cam=ch.psi.pshell.epics.AreaDetector|MX-SAMCAM||| mscan_pin=ch.psi.pshell.serial.TcpDevice|mscan-tell10s-pin:2001||| mscan_pin_cmd=ch.psi.pshell.serial.TcpDevice|mscan-tell10s-pin:2003||| mscan_puck=ch.psi.pshell.serial.TcpDevice|mscan-tell10s-puck:2001||| mscan_puck_cmd=ch.psi.pshell.serial.TcpDevice|mscan-tell10s-puck:2003||| -ue=LaserUE|COM4|||true -puck_detection=ch.psi.mxsc.PuckDetection|tell10s-raspberrypi:5556||| +ue=LaserUE|COM4 25.0|||true +puck_detection=ch.psi.mxsc.PuckDetection|tell10s-raspberrypi:5556|||false wago=ch.psi.pshell.modbus.ModbusTCP|tell10s-wago:502||| led_ok_1=ch.psi.pshell.modbus.DigitalInput|wago 0||1000| led_ok_2=ch.psi.pshell.modbus.DigitalInput|wago 1||1000| diff --git a/config/plugins.properties b/config/plugins.properties index a3380ea..064b70c 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -1,6 +1,6 @@ +MXSC-1.12.0.jar=enabled Commands.java=disabled Recovery.java=disabled -MXSC-1.10.0.jar=enabled WagoPanel.java=enabled LaserUEPanel.java=enabled BarcodeReaderPanel.java=enabled diff --git a/config/settings.properties b/config/settings.properties index 27c26a3..c4961f2 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,4 +1,4 @@ -#Thu Dec 12 14:58:22 CET 2019 +#Wed Jan 08 14:29:12 CET 2020 dry_mount_counter=0 room_temperature_enabled=false pin_offset=0.0 diff --git a/plugins/LaserUE.java b/plugins/LaserUE.java index 37dd6ee..8538109 100644 --- a/plugins/LaserUE.java +++ b/plugins/LaserUE.java @@ -3,77 +3,85 @@ import ch.psi.pshell.device.Readable; import ch.psi.pshell.serial.SerialPortDevice; import ch.psi.pshell.serial.SerialPortDeviceConfig; import static ch.psi.utils.BitMask.*; +import ch.psi.utils.Convert; import ch.psi.utils.State; import java.io.IOException; /* * */ +public class LaserUE extends SerialPortDevice { -/** - * - */ -public class LaserUE extends SerialPortDevice{ final Readable readable; - static final double RANGE_MIN = 1.0; - static final double RANGE_MAX = 30.0; - public LaserUE(String name, String port) { + final double range; + + public LaserUE(String name, String port, double range) { super(name, port, 921600, SerialPortDeviceConfig.DataBits.DB_8, SerialPortDeviceConfig.StopBits.SB_1, SerialPortDeviceConfig.Parity.None); + this.range = range; this.setMode(Mode.FullDuplex); readable = new Readable() { @Override public Object read() throws IOException, InterruptedException { return take(); } + @Override - public String getName(){ - return LaserUE.this.getName()+"_readout"; + public String getName() { + return LaserUE.this.getName() + "_readout"; } }; } - + @Override - protected void doInitialize() throws IOException, InterruptedException{ + protected void doInitialize() throws IOException, InterruptedException { super.doInitialize(); //TODO: Start DAQ in ILD1320: http://www.micro-epsilon.com/download/manuals/man--optoNCDT-1320--en.pdf setState(State.Ready); write("OUTPUT RS422\n\r"); } - - public Readable getReadable(){ + + public Readable getReadable() { return readable; } - + int value = 0; int count = 0; - + @Override protected void onByte(int rx) { - int index = ((rx&BIT7) > 0) ? 2 : (((rx&BIT6) > 0) ? 1 : 0); - if (count==index){ - if (index ==0){ + int index = ((rx & BIT7) > 0) ? 2 : (((rx & BIT6) > 0) ? 1 : 0); + if (count == index) { + if (index == 0) { value = rx & 0x3F; count = 1; - } else if (index ==1){ - value = ((rx& 0x3F)<<6) + value; + } else if (index == 1) { + value = ((rx & 0x3F) << 6) + value; count = 2; - } else if (index ==2){ - value = ((rx& 0x0F)<<12) + value; - double val = ((double)value)/1000; - if ((valRANGE_MAX)){ + } else if (index == 2) { + value = ((rx & 0x0F) << 12) + value; + //double val = ((double)value)/1000; + double val = (0.01) * (102.0 * value / 65520.0 - 1) * range; + if ((val < 1.0) || (val > 2 * range)) { val = Double.NaN; + } else { + val = Convert.roundDouble(val, 3); } setCache(val); count = 0; } else { count = 0; } + } else { + count = 0; } - else{ - count = 0; - } - } + } - + public static void main(String[] args) throws Exception { + LaserUE l = new LaserUE("UE", "COM4", 25.0); + l.setMonitored(true); + l.initialize(); + Thread.sleep(10000); + l.close(); + } } diff --git a/plugins/MXSC-1.10.0.jar b/plugins/MXSC-1.12.0.jar similarity index 92% rename from plugins/MXSC-1.10.0.jar rename to plugins/MXSC-1.12.0.jar index 3d48840..0c1cbb7 100644 Binary files a/plugins/MXSC-1.10.0.jar and b/plugins/MXSC-1.12.0.jar differ diff --git a/plugins/MXSC-1.10.0 - Back.jar b/plugins/MXSC-1.13.0.jar similarity index 53% rename from plugins/MXSC-1.10.0 - Back.jar rename to plugins/MXSC-1.13.0.jar index 04ee834..acc10a9 100644 Binary files a/plugins/MXSC-1.10.0 - Back.jar and b/plugins/MXSC-1.13.0.jar differ diff --git a/script/devices/Hexiposi.py b/script/devices/Hexiposi.py index 147c1f6..1018306 100644 --- a/script/devices/Hexiposi.py +++ b/script/devices/Hexiposi.py @@ -11,8 +11,8 @@ class Hexiposi(DiscretePositionerBase): url = "http://" + url if not url.endswith(":"): url = url + ":" - self.url_set = url + str (self.PORT_SET)+ "/TellWeb/" #"/hexiposi/" - self.url_get = url + str (self.PORT_GET)+ "/TellWeb/" #"/hexiposi/" + self.url_set = url + str (self.PORT_SET)+ "/hexiposi/" #"/TellWeb/" + self.url_get = url + str (self.PORT_GET)+ "/hexiposi/" #"/TellWeb/" self.moved = True self.homing_state = State.Disabled self.rback = self.UNKNOWN_POSITION