Integrating axes

The following shows how an axis (linear or rotary axis) is integrated into a Viper.NET project with the ProcessPositions plugin, tested and moved from within the vision job. The procedure is the same for all axis types that are addressed via a stream (TCP/IP or serial). Only the commissioning of the controller, the axis type and individual parameters are vendor-specific. A Fullmo linear axis and a JennyScience axis with Xenax controller serve as examples.

Prerequisites

  • The ProcessPositions license is available (Viper.NET Licensing).

  • The axis controller has been installed mechanically and electrically according to the manufacturer’s specifications and has been commissioned.

  • The controller can be reached via the network: The network adapter of the Viper.NET computer is in the same subnet as the controller (for example controller 192.168.2.150, PC 192.168.2.1, subnet mask 255.255.255.0). The connection can be checked with ping <IP of the controller>.

Activating the plugin

The ProcessPositions plugin is activated in the Info dialog on the Plugins tab (entry Process positions plugin or Viper Process positions, depending on the version). After Save, the project must be restarted.

../_images/plugin-config-editor.png

After the restart, the main menu contains the entry ProPos and, above Functions, the state entry Axis system (Axissystem up to Viper 8.0.5).

Creating the stream to the controller

Communication with the controller runs via a stream from the stream connection pool. The pool is opened in the Global settings on the Global settings tab via the Streamconnection pool button.

../_images/global-settings-streampool-cmditf.png

Note

For the test with the CommandInterfaceTool (see Moving the axis from the job), the Commandinterface Server must be enabled on the same page: enter a Port (for example 12345) and check UDP.

  1. Create a new stream with + and assign a name, for example FullMo or XenaxX. The stream is later assigned to the axis under this name.

    ../_images/stream-pool-new-stream.png
  2. Select ConClientSocket as Stream Type and enter the IP address of the controller under HostNameOrIp and the TCP port under Port (Fullmo and Xenax: 10001).

  3. Select ConProtDel as Protocol Type and enter the delimiter 0x3E (>) as DelimiterStr.

  4. Establish the connection with Apply stream & protocol - Start connection, then save the pool with Save and close the dialog with OK.

    ../_images/stream-pool-fullmo-settings.png

If add to statemenu is checked, the pool entry in the main menu shows the connection state. When the connection is established, the entry is green (Stream Pool List).

Creating the axis system and axis

The axes are configured in the Motor Details dialog (main menu / ProPos / Motor Details).

  1. Use + / Axissystem to create an axis system. In the AxisSystemSettings dialog, assign a name (for example AxisSystem) and create a movement in the ReferenceSequence with + (for example X). Confirm with OK.

  2. Select the axis system and use + / Axis to selected axissystem to create an axis. Select FullMo.Axis or Xenax.Axis as axis type and save the list with Save.

  3. Select the axis and use Settings in the toolbar to set the name (for example X), Movement (the movement created before) and MovePositiveDirection. Confirm with OK.

  4. Select the axis and open the axis parameters via Settings in the axis panel. Under StreamName, select the stream created in step 2. Enter PositionMin, PositionMax and DefaultSpeed according to the axis (values in µm and µm/s). Confirm with Ok and save the list again with Save.

The full name of the axis is now <axis system>.<axis>, in the example AxisSystem.X.

Note

To keep the axes from moving while a safety door is open or the emergency stop has been triggered, assign the corresponding input bits to the moving enable of the axis list. It rejects new move commands, but does not stop a movement in progress and does not replace a safety-related shutdown.

Referencing and testing the axis

After saving, the plugin establishes the connection to the axis. The axis can be operated directly in the Motor Details dialog:

  1. Switch on the motor power with Power on.

  2. Reference the axis with Reference. The Referenced state indicator then lights up green.

  3. Enter a speed under Speed and an absolute position under Move and trigger a test movement with Move. Check whether the axis moves in the expected direction; otherwise adjust MovePositiveDirection.

The state entry Axis system in the main menu shows the configured axes with their state:

../_images/state-menu-axissystem.png

A temperature follows the axis name only for axis types that read it from the controller, for example Xenax axes with WarnTemperature greater than 0. Fullmo axes do not provide a temperature. Viper up to 8.0.6 nevertheless shows 0 °C there (as in the image); this is not a measured value.

Moving the axis from the job

Command list of the image source

The simplest way to position an axis before an image acquisition is the command list of the image source. In the image source editor, the CmdAxisGoPos command is added and configured via Cmds before acqu.:

../_images/imagesource-cmds-before-acqu-gopos.png
  • AxisFullName: Full name of the axis, for example AxisSystem.X.

  • Position: Target position in µm.

  • Speed: Speed in µm/s. Alternatively, DefaultVelocityPercentage specifies the speed as a percentage of the DefaultSpeed of the axis.

  • Timeout: Time limit in ms; -1 uses the timeouts of the axis.

Via Cmds after acqu., the axis can be moved back to the start position after the image acquisition in the same way.

CommandInterfaceTool

Within a toolgroup item, the CommandInterfaceTool controls the axis via the CmdAxis command interface. To do so, enter CmdAxis as InterfaceName and the desired function as FunctionName, for example GoPos with the parameters axisFullName (AxisSystem.X), speed (µm/s) and position (µm). Further functions of CmdAxis include Reference, MotorPower, WaitInPos, GetPos, CheckPosition, GoPosMulti, Cancel as well as GoToGlobalPosition and TeachGlobalPosition for the global positions managed by the plugin.

Process positions

For sequences with several positions per inspection, where an image is acquired and evaluated at each position, the plugin provides the ProcessPositions station. The PLC selects a position list by command, starts it via the digital handshake and receives the overall result as well as the state of the axes (referenced, moving enable). Positions and shifts that several position lists share are maintained as global positions and offsets.

Example Fullmo

Fullmo axes (for example MovingCap flatTRACK) are controlled via the MovingCap controller over Ethernet. The manufacturer’s user documentation is available at https://movingcap.de/en/MovingCap-AnwenderDoku/.

Commissioning the controller

  1. Mechanical and electrical installation according to the manufacturer’s specifications for the respective axis type.

  2. Switch on the controller and configure the network. The default IP address of the controller is 192.168.2.150; the network adapter of the PC is set accordingly (for example 192.168.2.1 / 255.255.255.0) and the connection is checked with ping.

  3. Check the axis via the web interface of the controller (http://<IP of the controller>). In the Click&Run menu, the motor can be switched on (Power ON) and the axis can be moved absolutely or relatively (Move Absolute, Move Relative); the zero position is set in the Servo menu (Set Home).

    ../_images/fullmo-web-click-and-run.png

Settings in Viper.NET

  • Stream: ConClientSocket with the IP address of the controller and port 10001, protocol ConProtDel with DelimiterStr 0x3E.

  • Axis type: FullMo.Axis.

  • Axis parameters: StreamName of the created stream; RcvDelimiterCommand and RcvDelimiterGetter remain at 62 (>). DefaultSpeed in µm/s, for Fullmo axes a multiple of SpeedIncrement (default 1600); PositionMin and PositionMax according to the axis length in µm. The reference command can be adjusted via ReferenceCommand (REF35: current position as zero position, REF-18 / REF-19: positive / negative mechanical end stop as zero position).

  • Units: Viper.NET works in µm. The user unit of the controller (usr, configurable in the Servo menu under Gear & Axis Configuration) must match or must be converted via PositionFactor.

Note

If the network cable is unplugged on the PC side, the controller may no longer accept a new connection until it is restarted. Unplugging and replugging on the controller side does not help in this case.

Example JennyScience

JennyScience axes (LINAX, ROTAX, ELAX) are controlled via the Xenax servo controller over Ethernet.

Commissioning the controller

  1. Switch on the controller and configure the network. The IP address is printed on the type plate of the controller; the network adapter of the PC is set to the same subnet.

  2. Open the web interface of the controller in the browser and reference the axis. If an error code appears, the safety function (Safety) can be deactivated by clicking on the error code.

  3. Configure the axis for operation, in particular set the weight of the moved load on the slide according to the mounting position.

  4. Test the axis at moderate speed with the manual functions of the web interface (for example GoPos for an absolute position or RepRevers for a continuous movement). Then close the browser before Viper.NET establishes the connection.

Settings in Viper.NET

  • Stream: ConClientSocket with the IP address of the controller and port 10001, protocol ConProtDel with DelimiterStr 0x3E.

  • Axis type: Xenax.Axis.

  • Axis parameters: StreamName of the created stream; DefaultSpeed, PositionMin and PositionMax in µm and µm/s. Optionally, DynHwId provides the inputs and outputs of the controller as dynamic hardware in the GInOut manager, and WarnTemperature enables the temperature monitoring.

  • For Xenax axes, the axis panel in the Motor Details dialog shows additional state flags (limit switches, force mode, temperature) and allows the force mode and the recording via Force and Record.

../_images/motor-details-xenax.png

Troubleshooting

  • Pool entry not green: Check IP address, port and subnet (ping), consider the firewall. Many controllers allow only one TCP connection, so close the web interface and manufacturer tools. Com in the stream pool opens a test dialog through which commands can be sent directly.

  • Axis reports an error or does not respond: The delimiter 0x3E must match in the protocol of the stream (DelimiterStr) and in the axis parameters (RcvDelimiterCommand, RcvDelimiterGetter). Reset in the axis panel resets the error state.

  • Axis moves in the wrong direction: Check MovePositiveDirection; for Fullmo axes, adjust the reference command (ReferenceCommand) if necessary.

  • Position or speed are wrong: All values in Viper.NET are in µm and µm/s. Move commands outside PositionMin / PositionMax are rejected.

  • Fullmo controller no longer reachable: After an interruption of the network connection on the PC side, restart the controller.