Download Development and optimization of graphic user interfaces (GUIs) for
Transcript
a multi-motions procedure. More than one motor can be moved at the same time. The command “GO all” is able to perform this action provided that the “NEW pos.” entries have been filled with right values. If only one new entry position is entered the command “GO all” is equivalent to the “GO” command for that motor. • The new low-level NICS motor interface is able to communicate with the OEM750X controller (see Chapter 6.3) in two different ways: through a direct serial connection (when the controller is linked directly with the serial port of NICS workstation) or by means of an IP socket (when the controller is linked to a port of the terminal server ETS8PS see Chapter 6.2). The interface also has an internal queue manager, which activates when the resetting procedures are launched. This algorithm is extremely useful when dealing with motor #7 whose resetting and/or recovering proceeds through a series of logical conditions. Finally each operation done using this new NICS motor interface is recorded in a local (rotational) log file (Rossetti E., 2008). 5.2.1 Interface encoder, absolute counter and historic log When the wheels are moving, the step-encoders from the controller may have negative values or values larger then $N$, the number of steps corresponding to a complete 360˚ round. This occurs for example, when passing through the zero position. To avoid confusion, the program uses the “interface encoders” X defined as: X =xi∗N 0≤ XN where x is the “step encoder” read from the controller and i is an integer number which is updated by the interface whenever necessary. The GUI should only display the value of X. All the positions stored in the configuration files motor*_pos.nics are measured in interface encoder units, i.e. are ≥0 and N . When targeting a new position the program reads the value X from the configuration file and computes the target value in stepencoders as x =X −i∗N . In parallel to the step-encoders information available from the controller, the interface should keep track of the total number of steps moved by each motor since the last reset, and update the “absolute step counter”'. This is useful for instance when deciding if it is convenient to perform a reset during a “passing through zero” operation. Its value should be displayed on the GUI. The interface also updates for each movement an historical log-file where minimal information of all the movements performed are stored. It could be also useful to maintain/update an historical step-counter which is the sum of all the movements performed since the first time the interface has been used. 47