ProcessPositions Plugin¶
Note
In the plugin list (Info Dialog) the plugin is called Viper Process positions. From Viper 8.0.6 the plugin button of the shell is labelled Axis system or Achssystem, depending on the language; up to 8.0.5 it was always Axissystem.
Global settings¶
Configuration makproj: Opens a window in which the MAK project settings for the ProcessPositions plug-in can be customized.
Axis systems¶
The plugin manages the connected axes in the Axis System List. An axis system (AxisSystem) groups one or more axes that are referenced and moved together, for example the X and Y axis of a cross table. Each axis has an axis type that encapsulates the control of the respective controller. In commands, an axis is addressed by its full name <axis system>.<axis>, for example AxisSystem.X. The axis list is stored in the file Data\axisSystems.xml of the project.
Motor Details¶
The Axis System List dialog is opened via the main menu / ProPos / Motor Details.
The tree of axis systems and axes is shown on the left, the controls of the selected axis on the right.
Toolbar and buttons
+: Adds an axis system (Axissystem) or an axis to the selected axis system (Axis to selected axissystem).
-: Removes the selected entry.
Settings (wrench in the toolbar): Opens the settings of the selected axis system or of the selected axis.
Reference selected: References the selected axis system according to its reference sequence. The reference run runs in the background; meanwhile only Reference selected is locked. If it fails, a message is shown; the error is also written to the log.
Save: Saves the axis list. Changes to axis systems, axes and axis parameters are only applied permanently with this.
Open … (context menu in the tree): Opens the controls of the selected axis or axis system additionally in a window of its own, e.g. to watch several axes at the same time. If the window is already open, it is brought to the front.
Axis panel
Reference: References the axis. With Force Ref., the reference run is also performed if the axis is already referenced; with Synchron, the operation waits for the end of the movement.
Speed / Move: Test movement to the entered absolute position at the entered speed. The units are determined by the axis type, for Fullmo and Xenax axes µm and µm/s.
Cancel / Reset: Cancels the current movement or resets the error state of the axis.
Set Pos / Phys Pos / Temp: Set position, physical position and temperature of the controller. The temperature is only shown for axis types that provide it, for example Xenax axes with WarnTemperature greater than 0; otherwise the field stays empty.
Referenced / Inpos / Error: State indicators of the axis.
Settings (wrench above the state area): Opens the type-specific axis parameters, among others the StreamName.
Power on / off: Switches the motor power on or off.
Suspend Poll-Thread: Suspends the cyclic state polling, for example for diagnostics with a manufacturer tool.
State and state flags: State of the controller (Error, Referenced, InMotion, InPosition, VoltageEnabled; depending on the axis type further flags, such as limit switches as well as force and temperature states for Xenax axes).
Cmd / Arg / Send GET / Send CMD: Sends a command of the controller protocol directly to the axis and shows the response (diagnostics).
Creating an axis system¶
A new axis system is created via + / Axissystem. The AxisSystemSettings dialog opens; later it can be reached via Settings with the axis system selected.
Name: Name of the axis system, first part of the full axis name.
ForceReference: When referencing the axis system, all axes are referenced again, even if they are already referenced.
ReferenceSequence: Defines the movements (Movement) of the axis system and the order in which they are referenced. A movement is added with +, for example X; each axis of the system is later assigned to a movement. Position after Ref. and Speed optionally specify where the axis moves after referencing (NaN = no movement). The order is changed with the arrow buttons.
UI Settings: Display of the axis system in the axis overview: horizontal and vertical axis, background image in axis coordinates, colors for set, actual and global position as well as the movement history (Movement history snake).
Creating an axis¶
With the axis system selected, an axis is created via + / Axis to selected axissystem. First, the axis type is selected:
The figure shows an older version without AxisGioPythonScripts and GrblGCode.Axis.
Axis type |
Description |
|---|---|
|
Simulated axis without hardware, for example for tests and simulation mode. |
|
JennyScience axes with Xenax servo controller (LINAX, ROTAX, ELAX), controlled via a TCP/IP stream. |
|
Fullmo axes with MovingCap controller (for example flatTRACK), controlled via a TCP/IP stream. |
|
Axis that is created as a GInOut axis in the GInOut manager, for example a PLC axis with the Gefasoft standard handshake. |
|
Axes with Servida controller. |
|
Nanotec motors and their simulator. |
|
Axis whose actions (get state, motor power, reference, move, cancel) are carried out by GInOut Python scripts, for example for a controller without the Gefasoft standard handshake (see Axis via GIO Python scripts). |
|
Axes on a GRBL or grblHAL controller, controlled with G-code via a stream from the stream connection pool. |
|
Bistable valve or suction tool from the GInOut manager (Axes, cylinders and signal lights). These objects are created in the GInOut manager and only referenced here. |
After selecting the type, the axis appears in the tree; the list is saved with Save. With the axis selected, the general axis settings are edited via Settings in the toolbar:
Name: Name of the axis, second part of the full axis name.
Movement: Movement of the axis system that this axis performs (see ReferenceSequence of the axis system).
MovePositiveDirection: Direction in which the axis moves with increasing position values (Left2Right, Right2Left, Bottom2Top, Top2Bottom). The setting depends on the mounting position and is used for the display in the axis overview.
Position format string: .NET format string for the position display, for example
0or0.00.SortIndex: Order of the axis within the axis system.
Axis parameters¶
The type-specific parameters of an axis are edited via Settings in the axis panel (wrench above the state area). The following figures show the parameters of a Fullmo and a Xenax axis:
The most important parameters of the stream-based axis types FullMo.Axis and Xenax.Axis:
StreamName (Main): Name of the stream from the stream connection pool through which the axis is addressed. The stream must be created as ConClientSocket with the protocol ConProtDel and the delimiter
0x3E(>).SleepTimePollState (Main): Cycle time of the state polling in ms.
PositionMin / PositionMax (Position): Permissible position range in µm. Move commands outside the range are rejected; NaN means no limit.
DefaultSpeed (Position): Speed in µm/s that is used if a command does not specify a speed. For Fullmo axes, the value is rounded to a multiple of SpeedIncrement.
PositionFactor / PositionOffset (Position): Conversion between Viper.NET position and controller position:
Controller = (Viper + PositionOffset) * PositionFactor.PositionHysteresis (Position): Tolerance in µm within which the axis is considered to be in position.
ReferenceCommand (Position): Replaces the default reference command
REFof the controller. For Fullmo axes, for exampleREF35(current position as zero position),REF-18orREF-19(positive or negative mechanical end stop as zero position).RcvDelimiterCommand / RcvDelimiterGetter (COM, Fullmo only): Delimiter of the controller responses to commands or queries, default
62(>,0x3E). Must match the protocol of the stream.Timing: Timeouts in ms for sending commands, referencing, reaching the position (TimeoutInPos) and standstill (TimeoutNotInMotion) as well as the SettlingTime after reaching the position.
Additional parameters of the Xenax axis:
DynHwId (Main): ID under which the inputs and outputs of the Xenax controller are provided as dynamic hardware in the GInOut manager. Values less than or equal to 0 disable the provision.
SafetyInputIndicesS (Main): Indices of the safety inputs of the controller.
WarnTemperature / TemperatureChangedHysterese (Main): If WarnTemperature is greater than 0, the temperature is polled cyclically and a warning state is set when it is exceeded.
ReferenceDirection / ReferenceInvertDirPosition (Position): Direction of the reference run (Default, Positive, Negative).
Force (ForceFactor, UnitForceAxis, UnitForceWorld, InForceMinHighTimeMs, ForceCorrectionCurve): Parameters for the force mode of the axis.
Moving enable¶
Before every move and every reference run of an axis, the plugin checks the moving enable of the axis list. This allows the axes to be locked, for example while a safety door is open or the emergency stop has been triggered. The moving enable is set in the Motor Details dialog: a double click on the top node AxisSystemList opens the dialog AxisSystemListSettings with the group Moving enabled scripts and bits.
Inputbits: GInOut input bits (In bit), each with a message (Message). If one of the bits is not set, the move is rejected and the message of the bit is output.
Move / Reference: optionally one GInOut Python script each that additionally checks move commands or reference runs, for example as collision protection between several axes. Among other things, the script receives the axis name (
AxisName) and the target position (DesiredPosition). If it fails, for example by raising an exception, the move is rejected.
The moving enable only rejects new move commands; it does not stop a movement in progress. It does not replace a safety-related shutdown of the drives. Whether an axis has to be referenced again after its drive was shut down depends on the controller. Viper.NET does not reference on its own when the enable returns; when referencing takes place is described under Axis state and referencing.
Global positions and offsets¶
Positions and shifts that several position lists or commands share are maintained centrally (main menu / ProPos):
Global positions: named positions of the axes, stored in
globalPositions.xml. A position of a position list can take over a global position via Use global. The functionsGoToGlobalPositionandTeachGlobalPositionof the command interface CmdAxis move to global positions or teach them.Global position offsets: named relative shifts, stored in
globalOffsets.xml. In the column Offsets of a position, one or more offsets are added to the position. This way, a shift that affects several positions can be adjusted in one place.
Referencing without a station¶
If the project has no ProcessPositions station, the reference functions of the plugin reference the axis systems of the axis list directly:
The Reference button in the function panel of the process positions references all axis systems.
The functions
ReferenceandReferenceExof the command interface CmdProPos reference the given axis systems (axTableNames, empty = all).Referencealways references,ReferenceExwithforceReference=falseonly if not all axes are referenced or an axis reports an error. IfglobalPosOnResetis given, both then approach this global position.
Axes that are already referenced and free of errors only move again if ForceReference is set in the axis system (default, see settings of the axis system).
The global position GlobalPosOnReset from the plugin configuration only applies to the station; without a station it is not approached.
Warning
Up to Viper 8.0.6, these functions failed without a station and did not move any axis. As of 8.0.7, the axes perform their reference run and, if given, approach the global position passed. On machines without a station, check before the update that these movements are wanted and safe.
ProcessPositions Station¶
The ProcessPositions station connects a PLC via the digital standard handshake with axis sequences including image processing: on a trigger, it moves to the positions of a position list one after the other, evaluates images at the positions and reports the overall result. It is created in the Station editor as Process positions station with digital trigger handshake; one station per project is intended.
Sequence of an inspection
The PLC sets a command in CMD and sets TRIGGER. The command selects the position list in whose Commands it is entered (job type JobProPos, tab Positions of the job settings). The command
99is reserved and references the axes. If TYPE is greater than 0, the station first loads the type with this number.The station moves to the active positions of the list one after the other. If a tool group is assigned to a position, it waits until the axes have settled, starts the evaluation and waits for the image and the result.
With BUSY->LOW, the station reports IO if all positions were OK, NIO if at least one position was not OK, and ERROR for an error in the sequence, for example a failed reference run. In addition, the output data contain posResults with one character per Result Index of the positions:
1OK,0not OK, space not evaluated.
Axis state and referencing
The optional outputs referenced and movingEnabled continuously report to the PLC whether all axes are referenced and free of errors and whether the moving enable is given. Referencing takes place:
when the station is reset (input reset or reset in Viper.NET) if not all axes are referenced or an axis reports an error; always with ForceReferenceOnReset. Afterwards, the station moves to the global position GlobalPosOnReset if one is entered. Both settings are in the plugin configuration (Configuration makproj, see above).
with the command
99.before a sequence if AutoReference is switched on (default) and not all axes are referenced or an axis reports an error.
The station does not evaluate door, emergency stop and safety circuit itself; they lock the axes via the moving enable. When the enable returns, Viper.NET does not reference on its own: the PLC resets the station or sends the command 99. With AutoReference, referencing takes place before the next sequence at the latest if an axis has lost its reference.
Parameters
Besides the general settings of every station (handshake bits, input and output data), the station has the following parameters in the category 3 ProcessPositions Station:
AutoReference (default True): before a sequence, the axes are referenced if not all of them are referenced or an axis reports an error.
SleepAfterReference (default 500 ms): waiting time after a reference run via the command
99or AutoReference.TimeoutWaitImage / TimeoutWaitJobFin (default 1000 ms each): time limit for the image acquisition or for the end of the evaluation at a position, unless a value of its own greater than 0 is entered at the position (Timeout Image, Timeout job finished).
AxisSystemsXml: obsolete; the axis list is always stored in
axisSystems.xml(see Axis systems).