Commit Graph

130 Commits

Author SHA1 Message Date
Douglas Clowes
988cb87371 Fix typo 2014-03-21 11:49:27 +11:00
Douglas Clowes
acf9d75941 Change display of values for posit_count, motorhome, and legacy_fsm
For hdb and writeTree issues
2014-03-19 16:59:33 +11:00
Douglas Clowes
ef236ecb1b Refinements to motion reporting for motors 2014-03-13 16:00:24 +11:00
Douglas Clowes
0536c16843 Add motion reporting for driver run and ascillate commands 2014-03-13 12:15:58 +11:00
Douglas Clowes
5eec1a9cd5 Impliment motor "oscillate" and "status" commands and prefix "driver run" 2014-03-11 17:17:57 +11:00
Douglas Clowes
0a012cabc3 Fix possible buffer overruns 2014-03-03 17:04:31 +11:00
Ferdi Franceschini
f6ae3c62f7 SICS-719: Acknowledge errors when in protocol 2 or 3 2014-01-31 09:15:06 +11:00
Douglas Clowes
4069e71748 Add motor tracking on/off/clear/stats/save commands 2013-08-07 12:22:12 +10:00
Douglas Clowes
0ffc87e3d7 Allow motor poll rates to be adjusted without an absolute encoder 2013-08-06 11:39:40 +10:00
Douglas Clowes
59e5539d5e Make the old motor FSM into a Legacy_FSM and default to the new FSM 2013-08-02 10:47:48 +10:00
Douglas Clowes
88f788e9cc Add motor creep_factor and creep_substep and remove obsolete code 2013-08-02 09:59:50 +10:00
Douglas Clowes
ea0a9759e1 Add run, halt, error action commands 2013-08-02 09:55:59 +10:00
Douglas Clowes
2a7d0a0699 Add stepCount and moveTime to motor data 2013-08-02 09:55:59 +10:00
Douglas Clowes
627b840c38 Add min and max position on a motor move and output 2013-08-02 09:55:58 +10:00
Douglas Clowes
23f53b8a4c Break down the motor states further to make them even simpler 2013-08-02 09:55:58 +10:00
Douglas Clowes
4d933a6399 Make motor creep "single-step" one tenth steps-per-count 2013-08-02 09:55:58 +10:00
Douglas Clowes
e9a884fa30 Add some motor statistics and regression to calculate steps per unit 2013-08-02 09:55:58 +10:00
Douglas Clowes
1d18fbf646 Rework the motor end-of-motion tests when creeping 2013-08-02 09:55:57 +10:00
Douglas Clowes
1a64c0a4a9 Separate motor states for move, backlash and creep 2013-08-02 09:55:57 +10:00
Douglas Clowes
6c220b4b55 Move the motor status handling out of line to reduce clutter and promote reuse 2013-08-02 09:55:57 +10:00
Douglas Clowes
6e5c0730e3 Improve debug printing 2013-08-02 09:55:56 +10:00
Douglas Clowes
6187cb3d15 Remove some obsolete and inactive code 2013-08-02 09:55:56 +10:00
Douglas Clowes
746f43ccb8 Change some variable names for the sake of consistency 2013-08-02 09:55:56 +10:00
Douglas Clowes
eeb74517a8 Add some braces, add and improve comments to make code clearer, no functional changes 2013-08-02 09:55:56 +10:00
Douglas Clowes
ca779ddc36 revert the one-shot change 2013-08-02 09:55:55 +10:00
Douglas Clowes
7c0dfe437a SICS-632 Allocate a copy of the connection, for motor tracing, and free it at the end. 2013-07-08 15:53:59 +10:00
Douglas Clowes
a44cd3464d Add a disconnected state to the motor state machine, rename Unknown to Init 2013-07-08 15:53:54 +10:00
Douglas Clowes
4bc06cea76 SICS-501 Special one-shot move after changing direction for backlash 2013-07-08 15:53:46 +10:00
Douglas Clowes
b76cee0525 Add sending the motor name in config information to the fake motor 2013-07-01 13:38:22 +10:00
Ferdi Franceschini
357170a735 SICS-616 Removed obsolete setpos command from motor driver. 2013-05-31 09:55:10 +10:00
Douglas Clowes
7e0e068ee2 differentiate forward/reverse limit switches in 'crashed' log message 2013-05-31 09:35:52 +10:00
Ferdi Franceschini
0954c3bceb Fixed compile error, ‘struct __MoDriv’ has no m ember named ‘errMsg’ 2013-05-31 08:06:38 +10:00
Douglas Clowes
4a363d0e95 SICS-614 reallocate errMsg buffer each time it's used 2013-05-28 16:22:44 +10:00
Douglas Clowes
ba128520da Add motor runtime to motor stopped log message 2013-02-15 09:49:39 +11:00
Douglas Clowes
eb1d042440 set driver_status to HWIdle on HALT in motor Idle state 2013-02-06 10:27:00 +11:00
Douglas Clowes
fd064f3df9 revise logging and state trace
r3790 | dcl | 2012-11-13 13:38:25 +1100 (Tue, 13 Nov 2012) | 1 line
2012-11-15 17:41:39 +11:00
Douglas Clowes
a9fc20abee make poll rates configurable by adding motorPollSlow, motorPollFast and airPollTimer parameters
r3682 | dcl | 2012-07-26 15:48:38 +1000 (Thu, 26 Jul 2012) | 1 line
2012-11-15 17:35:00 +11:00
Douglas Clowes
5118d7b23e Add TCP address:port to displayed parameters for use in simulation
r3655 | dcl | 2012-07-19 14:57:03 +1000 (Thu, 19 Jul 2012) | 1 line
2012-11-15 17:33:50 +11:00
Douglas Clowes
f5537d7c9e Provide a way to configure a simulated motor if it identifies itself as being simulated
r3638 | dcl | 2012-07-11 15:11:41 +1000 (Wed, 11 Jul 2012) | 1 line
2012-11-15 17:32:44 +11:00
Douglas Clowes
66caf6916b Don't change anything on startup, defer settings until moving and then do each time
We don't want to change anything on the controller when we start SICS so we don't interfere with whatever else is talking to it. So don't command it during init.

We also want to send Speed, Accel and Decel on each move so we defer those until then.
r3622 | dcl | 2012-06-28 15:39:47 +1000 (Thu, 28 Jun 2012) | 5 lines
2012-11-15 17:31:44 +11:00
Douglas Clowes
2c4f45b573 Try to defer HWIdle notification until the motor is really idle
r3620 | dcl | 2012-06-27 15:11:04 +1000 (Wed, 27 Jun 2012) | 1 line
2012-11-15 17:31:39 +11:00
Douglas Clowes
eeac77f9ce Refactor the timer clearing; force timer clear on set; improve the tracing of timer operations.
r3616 | dcl | 2012-06-26 14:36:32 +1000 (Tue, 26 Jun 2012) | 1 line
2012-11-15 17:31:30 +11:00
Douglas Clowes
b10b1608b2 Creep last encoder count by steps-per-count/10 instead of one, for motors with large steps-per-count
r3544 | dcl | 2012-05-17 11:02:53 +1000 (Thu, 17 May 2012) | 1 line
2012-11-15 17:28:06 +11:00
Douglas Clowes
f22a6da843 Make the delay after turning the motor ON configurable to allow for motors with slow switch on (e.g. airpads) and default it to the old hard-coded value (200mSec).
r3331 | dcl | 2012-01-05 12:28:20 +1100 (Thu, 05 Jan 2012) | 1 line
2012-11-15 17:22:06 +11:00
Ferdi Franceschini
b58a6fdaf1 Tweak the resolver wrap around bias code to let us simply set a mask to
bias off the high bits on multiturn encoders because these bits can
increment if you unplug a resolver.

r3307 | ffr | 2011-12-02 12:49:54 +1100 (Fri, 02 Dec 2011) | 4 lines
2012-11-15 17:20:19 +11:00
Ferdi Franceschini
4707f319b9 Remove obsolete code
r3306 | ffr | 2011-12-02 12:47:19 +1100 (Fri, 02 Dec 2011) | 2 lines
2012-11-15 17:20:14 +11:00
Ferdi Franceschini
d778dd2bfe sicshipacaba.c
SICS-418 Make sure hnotify sends messages as hdbevents when using the
JSON protocl

site_ansto/instrument/config/hmm/hmm_object.tcl
Initialise the hmm object to make sure the read type is set.

nxscripts_common_1.tcl
Set the read type when saving the hmm data.

server_config.tcl
Fix the autosave command so that you can enable/disable autosave while
the histogram memory is running.

protocol.c
Reduce noise in log files when using the JSON protocol.  Don't log
messages generated during macro execution (ie within a TCL proc).

motor.c:MotorStatus
Abort the current operation, the scan command and batch files when a
motor object returns a hardware fault status value.

motor_dmc2280.c
set driver status to HWFault when the driver is in the error state.

r3251 | ffr | 2011-09-23 08:49:00 +1000 (Fri, 23 Sep 2011) | 25 lines
2012-11-15 17:16:12 +11:00
Ferdi Franceschini
8514dace59 motor_dmc2280.c
When a motor stops and power saving is enabled (ie motor left on) the driver should check for faults and then transition to the idle state.
r3134 | ffr | 2011-05-19 08:37:16 +1000 (Thu, 19 May 2011) | 2 lines
2012-11-15 17:12:44 +11:00
Ferdi Franceschini
3abd3effa2 Set detector y lower limit for Quokka
Improve precision of motor position calculation.

r2844 | ffr | 2009-12-11 12:39:12 +1100 (Fri, 11 Dec 2009) | 3 lines
2012-11-15 16:58:22 +11:00
Ferdi Franceschini
e36e9f1146 conman.c
Reduce log noise by setting iout = eInternal for macros.

servlog.c
Fixed timestamp in logfiles to get hours.

hmm_configuration_common_1.tcl
Added ML's mods to wombat config: ie BAT and FAT TABLE attributes and elements for multi-period acquisition and histo-streaming.
Fixed "failed lsearch" bug. It's more robust to test for a non-successful lsearch instead of a failed lsearch.

nxscripts_common_1.tcl
SICS-297 Fixed Saving data series in a scratch file overwrites earlier entries.

instdict_specification.tcl
Added "scobj" kind and "sct_indexed_motor" sics object type for script context controllers and and objects.

hipadaba_configuration_common.tcl
Added sct_indexed_motor sics obj type to ::hdb::sobjadd and scobj kind to ::hdb::add_node

sct_positmotor_common.tcl
Update the index SICS variable when updating the current index value to make sure that the position is saved in the data file.
You must now provide the hdb node_name when creating the sct posit motor.
mk_sct_positmotor now sets the "param" and "long_name" attributes on the posit motor object

util/utility.tcl
Added ::utility::set_sct_indexed_motor_attributes to set SICS object attributes required for generating hdb info for an SCT_POSIT_MOTOR

nxscript.c
Merge the ansto mod to putslab (rev1.7) which adds support for saving unbuffered data from the histmem.

sicshipadaba.c
This incorporates the patch made to CommandSetCallback in rev1.10 so it can just be copied as is (ie no merge required).
WARNING: There are changes to ListHdbNode to handle record separators which may affect us.
Disabled sending hdb command start and stop messages because they break gumtree

sicshdbfactory.c
Disabled sending hdb command start and stop messages because they break gumtree

hipadaba_configuration_common.tcl R2.4DEV
The sct_posit_motor case of ::hdb::sobjadd is only needed to call add_node with kind=scobj.

nxscripts_common_1.tcl R2.4DEV
Added ::nexus::scobj::sdsinfo
_gen_nxdict now skips nodes with data_type == "none"

new util/script_context_util.tcl R2.4DEV
Adds ::scobj::hinitprops command to initialise the hdb properties for script context object nodes.

sct_positmotor_common.tcl R2.4DEV
Use ::scobj::hinitprops utility command to initialise hdb properties on script context object parameter nodes.

dynstring.c
DynStringReplace should memcopy '\0', otherwise it can get the wrong length for iTextLen.
Added DynStringReplaceWithLen to allow initialising a dynstring with char arrays which contain null chars and
other non-ascii chars.  Useful for read and write buffers in script context.

ascon.c
AsconRead return NULL for noResponse and AsconFailed otherwise the "result" node gets set with a spurious empty value.

scriptcontext.c
SctActionHandler only set  the "result" node if there really is a reply.

sicsobj.c
Update from M.K.

site_ansto.c
Added galil and ordela hvps protocol handlers for scriptcontext.

motor_dmc2280.c
Allow home parameter to be outside of limits (for KOWARI)

hardsup/makefile
Added ordela HVPS protocol handler

hardsup/sct_orhvpsprot.c
New ordela HVPS protocol handler.  Retries on NAKs and re-orders pot channels (ie toggles lower two bits).

hardsup/sct_velselprot.c
Start velocity selector protocol handler.

hardsup/sct_galilprot.c
Completed galil protocol handler.

hipadaba_configuration_common.tcl
Add new style SICS objects to hdb tree.

instdict_specification.tcl
Added scobj to kind list and sct_motor to sics object list. (and some housekeeping)

hmm_configuration_common_1.tcl
Added ratemaps to simulation.  Fixe BAT_TABLE and added PERIOD_INDICES as per Mark Lesha's mods for multi-period acquisition.
ratemaps now return float.

sct_postimotor_common.tcl
Now setting properties on the posit motor object so that it can be automatically added to the hdb tree.

hrpd/config/motors/motor_configuration.tcl
Fixed simulated msd motor so that it's handle properly in the hdb layer.

sans/config/hmm/detector_ordela.tcl
Updated the ordela calibration script to use the new sct_orhvpsprop.c script context controller.

quokka_configuration.tcl
Deleted lines which set the hdb properties for script context posit motors.  This is now handled automatically as for other SICS objects.

utility.tcl
setpos now replaces the motor setpos subcommand.
Added functions to set script context object attributes and sct_posit motor attributes.
Created hparPath and hsibPath convenience commands for new-style SICS objects.

script_context_util.tcl
NEW! Adds hinitprops function to initialise the hdb properties for a script context object

r2758 | ffr | 2008-12-12 17:53:53 +1100 (Fri, 12 Dec 2008) | 113 lines
2012-11-15 16:56:43 +11:00