From 0dbab4045bd71d375694039ba86c79224d1b5690 Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Wed, 22 May 2013 10:49:28 +1000 Subject: [PATCH] integrate Dingo Camera Server stuffs --- .../instrument/dingo/config/plc/plc.tcl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/site_ansto/instrument/dingo/config/plc/plc.tcl b/site_ansto/instrument/dingo/config/plc/plc.tcl index b3d685ba..bbb2fd6a 100644 --- a/site_ansto/instrument/dingo/config/plc/plc.tcl +++ b/site_ansto/instrument/dingo/config/plc/plc.tcl @@ -1,8 +1,21 @@ set sim_mode [SplitReply [plc_simulation]] -if {$sim_mode == "false"} { -# MakeAsyncQueue plc_chan SafetyPLC 137.157.204.79 31001 -# MakeSafetyPLC plc plc_chan 0 +#if {$sim_mode == "false"} { + MakeAsyncQueue plc_chan SafetyPLC 137.157.204.213 30000 + MakeSafetyPLC plc plc_chan 0 +#} + +proc shutter {args} { + set cmd "set shutter=$args\r\n" + plc_chan send $cmd } +proc focuslight {args} { + set cmd "set focuslight=$args\r\n" + plc_chan send $cmd +} + +publish shutter user +publish focuslight user + source $cfPath(plc)/plc_common_1.tcl