PMCprimo Programming Manual
Home


You have called up the PMCprimo Programmieranleitung.
The online help is valid from firmware version 3.1.6 of the PMCprimo C.
Online help version: 1002926-03, 2014-09
Information that is particularly important is identified as follows:
DANGER!
This warning must be heeded! It warns of a hazardous situation that poses an immediate threat of serious injury and death and indicates preventive measures that can be taken.
WARNING!
This warning must be heeded! It warns of a hazardous situation that could lead to serious injury and death and indicates preventive measures that can be taken.
CAUTION!
This refers to a hazard that can lead to a less serious or minor injury plus material damage, and also provides information on preventive measures that can be taken.
NOTICE
This describes a situation in which the product or devices could be damaged and also provides information on preventive measures that can be taken. It also highlights areas within the text that are of particular importance.
INFORMATION
This gives advice on applications and provides information on special features.


Overview

Overview
Overview
Overview of online help
This online help describes how to set the parameters for the function blocks in accordance with DIN EN 61131-3 and how to use the commands in command language. Parameter setting and usage are described in the Reference.
The function blocks and commands are suitable for applications with the motion control systems PMCprimo:
PMCprimo DriveP, consisting of the servo amplifier PMCprotego D and the controller PMCprimo C
PMCprimo Drive3
PMCprimo 16+
Please also refer to the following documents from the range of motion control systems:
The online and ASCII help for the commissioning software PASmotion describes how to set the parameters for the servo amplifiers and controllers.
Guidelines regarding installation and environmental conditions can be found in the operating manual for the servo amplifier PMCprotego D and the motion controllers PMCprimo.
The configuration and programming software for the motion control devices can be found on the CD-ROM "Motion Control Tools":
–
CODESYS
Development environment in accordance with IEC 61131-3
–
PTerm
Terminal program: PTerm can be used to send commands directly to the hardware. It can also be used for firmware updates and for basic configuration of the motion controller.
–
PScope
Oscilloscope function: PScope is a PC-based oscilloscope with up to 4 channels. It can be used to record and visualise signals from controllers and servo amplifiers.
–
PMotion
Elliptical curve tool: PMotion is a tool for constructing elliptical curves.
The manuals for the Pilz products are available on the supplied CD-ROM "Documentation Motion Control".
The manual for CoDeSys is available in the respective software installation.
Motion control systems PMCprimo
PMCprimo products are motion controllers used to automate multi-axis motion sequences. The devices contain a PLC with the functionality of a logic and motion controller. Programming is universal in accordance with IEC 61131-3.
The motion controller integrates control and drive functions in one system that comprises hardware and software components.
The motion controller
generates set values for position and velocity
and
undertakes position control
for the connected servo amplifiers.
The following can be implemented as a result:
Speed axes
Positioning axes
Synchronisation axes (cam disks)
Path axes
Programming in accordance with IEC 61131-3
The function blocks for the motion controller are installed in conjunction with the IEC 61131-3 development environment CoDeSys. They are available in the library primo.lib.
Programming in command language
In addition to programming in accordance with IEC 61131-3, the motion controllers PMCprimo can also be operated via the terminal program PTerm. Commands are executed in command language and processed immediately by the controller. A large part of the IEC 61131-3 functions are also available with the commands in command language.


Safety

Safety
Safety
When configuring the drive please note that the values entered during commissioning or when operating the drive are used directly. To exclude hazardous situations therefore, you must comply with the following safety guidelines.
DANGER!
Uncontrollable plant states due to improper use of the software!
Depending on the application, serious injury or death may result.
Please note the following safety guidelines, therefore.
Use of qualified personnel
To avoid personal injury and material damage, only qualified, trained personnel should work on the devices. Qualified technical staff are those who are familiar with the transport, installation, commissioning, maintenance and operation of the device. They will be familiar with the relevant standards and regulations.
Only specialist staff with extensive knowledge of drive technology and control engineering should be permitted to program a running drive online.
Prior to commissioning
Prior to commissioning the machine manufacturer must produce a hazard analysis for the machine and take appropriate measures to ensure that unexpected movements do not cause injury to people or damage to equipment.
Prior to installation and commissioning, you should carefully read and follow the safety guidelines in the operating manuals for the connected devices. Personal injury and material damage may result if devices are handled incorrectly.
It is essential to comply with the technical details stated in the operating manuals of the connected devices and with the specifications on the devices themselves (type label and documentation).
Working with the software
The connected devices (motion controllers, servo amplifiers) are commissioned using the tools from PASmotion. The drive is controlled directly by the software on the PC. This function is not safety-related. The program can be interrupted or stopped unexpectedly. In the event of an error, the program is unable to stop motions that have already been initiated.
Data stored on data media is not protected from unintended changes by third parties. Data must be checked for accuracy before it is downloaded to the devices.
Requirements of the connected devices and plant
When commissioning, you must ensure that the devices do not present a risk to persons, plant or machinery. Appropriate protection and precautionary measures must be put in place.
Do not open or touch the units during operation.
Keep all covers and cabinet doors closed during operation.
Life-threatening voltages are present on the servo amplifiers. Check that all live connections are safely protected against contact.
The heat sink and front plate temperature on the amplifier may reach 80°C during operation. Check (measure) the temperature of the heat sink. Wait until the heat sink has cooled to 40°C before touching it.
Never unplug the electrical connections on the servo amplifier while voltage is applied. Residual charges in capacitors may still show hazardous values after the mains voltage is switched off (see operating manual for the respective device).
After disconnecting the servo amplifier from the mains voltages, wait at least eight minutes before touching any parts that carry voltage (e.g. contacts) or loosening the connections.
After disconnecting the servo amplifier from the mains voltages, for safety's sake, measure the voltage in the intermediate circuit and wait until the voltage has dropped below 40 VDC.
The relay output that signals that the servo amplifier is ready for operation (BTB) must be incorporated into the plant's safety circuit. The safety circuit must switch the mains contactor. This is the only way to guarantee monitoring of the servo amplifier.


Function blocks

Function blocks
Function blocks
This chapter describes the principle function and conventions of the function blocks for IEC 61131 programming.
Principle function
Naming the variable prefixes


Principle function

Function blocks [image] Principle function
Principle function
With only a few exceptions, all function blocks have at least one input and three outputs. There are also exceptions, which are described with the relevant function block.
:
Function blocks that provide commands for individual axes also have the two variables usiNode and usichannel:
:
Other inputs and outputs may also be added. These are listed in the descriptions provided with the function blocks.
Input interface
bExecute | Execute function
 | Data type: | BOOL
 | Value range: | TRUE: Starts the function of the block with a 0/1 pulse edge. bExecute must remain TRUE until the function is executed and this is signalled with bDone = TRUE. FALSE: The function is not executed
 | Default value: | FALSE
usiNode | Node number of the network subscriber that is to execute the function
 | Data type: | USINT
 | Value range: | 0: For PMCprimo C
usiChannel | Number of the axis that is to execute the function
 | Data type: | USINT
 | Value range: | 1 … n: Number of the axis, n depends on the setting in the CD command.
Output interface
bDone | Result
 | Data type: | BOOL
 | Value range: | TRUE: Function completed FALSE: Function is being executed or is not activated
 | Default value | FALSE
bError | Fault detection
 | Data type: | BOOL
 | Value range: | TRUE: Error detected FALSE: No error detected
 | Default value | FALSE
iErrorNumber | Issues detailed fault detection, see function block GetError
 | Data type: | INT
 | Value range: | INT
 | Default value | 0
Application of bExecute and bDone
The function of the block is executed when bExecute = TRUE and both bDone and bError = FALSE.
bExecute must remain TRUE until bDone or bError = TRUE.
The values of input variables on the function block are read in with the 0/1 edge at bExecute.
:
bError and iErrorNumber in the event of an error
bError = TRUE and iErrorNumber issue an error number if bExecute = TRUE at the time of an error.
:
Behaviour when cancelled by another function
bDone, bError and iErrorNumber have the value FALSE when the execution of the function is cancelled by another function.
:
Faulty application of bExecute
If the function is ended (included by an error) and bExecute = FALSE at that point, then neither bDone nor bError/ / iErrorNumber is set.
:


Naming variables

Function blocks [image] Naming variables
Naming variables
The naming of variables is based on the Hungarian notation.
The name of a variable, e.g. udiValue, consists of two parts:
A base name, the first letter of which is in upper case, e.g. Value. If the base name consists of several words, then the first letter of each word is in upper case, e.g. ControlWord.
A prefix before the base name, which is in lower case, e.g. udi, which corresponds to the data type of the variable.
Prefix | Meaning | Data type | Size [Bit] | Literals, value range
b | bool | BOOL | 1 | TRUE/FALSE
di | double integer | DINT | 32 | -2 147 483 648 …+2 147 483 647
i | integer | INT | 16 | -32 768 … +32 767
pdi | pointer double integer | POINTER TO DINT |  |
L | string | STRING |  |
udi | unsigned double integer | UDINT | 32 | 0 … 4 294 967 295
ui | unsigned integer | UINT | 16 | 0 … 65 535
usi | unsigned short integer | USINT | 8 | 0 … 255


Reference

Reference
Reference
This chapter contains the reference for the IEC 61131-3 function blocks and the commands in command language.
The function blocks are stored in directories in the library. If equivalent commands exist in command language, then these will be covered with the function blocks. Command language commands without an equivalent function block are filed thematically in the function block directories. Additional commands will be found in separate directories, where this has not been possible.
root
The root directory contains blocks that could not be assigned to any specific directory.
Auxiliary
Function blocks that define and set the analogue auxiliary output.
BusVariables
Function blocks that read and write bus variables to a PMCprimo.
Additional commands in command language
Display
Function blocks that feed back set and actual positions as well as other values from the controller.
Additional commands in command language
Drive
Function block for communication with the servo amplifier via the ASCII channel.
Encoder
Function blocks that set the encoder systems, e.g. the signal type (incremental, SSI) and the resolution.
Mapping
Function blocks for Master/Slave operation with the corresponding parameters.
Additional commands in command language
Network
Function blocks that read and write the SDO data. As a result it is possible to access the object directory of a CANopen device in the network. A servo amplifier can also be assigned to a PMCprimo axis.
Additional commands in command language
Output
Function blocks to define outputs that are processed directly by PMCprimo in 1 ms intervals, e.g. error outputs, reference outputs.
Additional commands in command language
Positioncontrol
Function blocks that set the position control, e.g. drag error limits, position control parameters.
Positioning
Function blocks for simple motion commands. Speeds, accelerations and motion profile paths are specified here.
Referencing
Function blocks for cyclic reference correction. A reference error is also corrected in the background without using the controller. This operating mode is activated and configured through calls.
Tension
Function blocks that set web tension control mode. Tension control mode is activated and the necessary control parameters are modified.
Wait
Function blocks for specific wait functions. For example, PMCprimo waits for a certain position before bDone is set to TRUE. This avoids time-consuming polling through the controller.
Additional commands in command language
Here you'll find some additional commands in command language, which do not correspond to any function block:
Input commands
Poll and link digital inputs
Program commands
Define and edit programs
Display commands
Display data, e.g. position, speed, lag distance
Variable
Set, change and read variable
Miscellaneous


Overview

Reference [image] Overview
Overview
The two overviews below assign the function blocks described in this online help to commands in command language and vice versa:
Function blocks → Command language
Command language → Function blocks


Function block --> Command language

Reference [image] Overview [image] Function block --> Command language
Function block --> Command language
Function block | Command language | Function
AbortMotor | AB | Stop motor, E-STOP
AcknowledgeAllErrors | PV3 | Reset all error variables
ActivateCANAnalogueInput | FI | Enable a subscriber's analogue inputs
ActivateCANAnalogueOutput | FO | Enable a subscriber's analogue outputs
ASCIIToDrive | QA | Open ASCII channel for servo amplifier
CalculateInitialRatio | CR | Calculate initial transmission ratio with analogue range distances
CANPositionControlDrive | PD | Define servo amplifier for transferring position values via CAN
ClearDriveFault | CF | Reset errors and warnings
CopyFileFromDevice | --- | Copy file from SD card
CopyFileToDevice | --- | Copy file to SD card
DefineAnalogueLimitErrorOutput | AE | Define error output for limit value exceeded at analogue input
DefineAuxiliaryOutput | AO | Define analogue output as auxiliary output
DefineBoundOverflowOutput | BO | Output pulse when cycle limit is exceeded
DefineMap | EM/NM | Define position mapping table
DefineMotorErrorOutput | DE | Define error output for errors on an axis
DefineOutputAlignmentMove | OA | Define output for signalling an alignment run
DefineOutsideWindowOutput | OW | Output for signalling when lag distance is too great
DefinePositionSnapshot | PS | Define digital input for a snapshot of the encoder
DefinePositionTriggerOutput | PO | Define output as electronic cam
DefineReferenceAcceptedOutput | RA | Output pulse when a reference signal is detected
DefineReferenceBackwardOutput | JB | Set output when reference error is corrected by braking
DefineReferenceForwardOutput | JF | Set output when reference error is corrected by accelerating
DefineReferenceInput | DR | Define input as reference input
DefineReferenceOutput | OR | Set output when reference error is corrected
DefineReferenceRejectOutput | RR | Set output in the event of reference error
DefineTimerOutput | TC | Define output for a timer or counter function
DefineVariableRemanent | $var>$Hx | Store variable in non-volatile memory
DefineVelocityOutput | VO | Set output for velocity range
DefineZeroMarkerInput | DZ | Define zero track of the encoder as reference input
DisplayActualPosition | DP | Display actual position
DisplayAnalogueInput | DA | Display analogue input
DisplayCanBusLoad | DT4/5 | Display current and maximum CAN bus load
DisplayCANDevices | HW0 | Display CAN devices
DisplayDemandPosition | DD | Display demand position
DisplayFollowingError | FE | Display lag distance
DisplayInputDiffTime | --- | Display time difference between two inputs
DisplayIOStateSafetyCard | --- | Display status information of safety card
DisplayMaxFollowingError | FE | Display or reset maximum lag distance
DisplayMaxVelocity | DV | Display or reset maximum velocity
DisplayPositionBound | SB | Display cycle length
DisplayPositionOverflowCounter | BC | Display overflow counter
DisplayReferenceError | DF | Display last reference error
DisplayReferenceErrorToCorrect | DG | Display actual reference error
DisplayReferenceLengthFalse | ZX | Display length of reference signal with FALSE state
DisplayReferenceLengthTrue | ZY | Display length of reference signal with TRUE state
DisplaySnapshotPosition | DS | Display stored snapshot of encoder
DisplayVelocity | DV | Display current or average velocity
DisplayVersionInformation | VN | Display information about version
DriveCommand | string | Send commands to servo amplifier
EnablePositionControl | PC | Enable position control loop
ExecuteAnalogueDistanceInit | XR | Initialise initial transmission ratio with analogue range distances
ExecuteInverseMapVirtual | XI | Query master position
ExecuteMap | XM | Activate position mapping table
ExecuteMapVirtual | XV | Query slave position
ExecuteSequence | XS | Call program in command language
GetBusVariable | $B | Read bus variable
GetCanSDO | QR | Read SDO
GetError | $Fn | Read error variable
GetMappedMasterBound | GM | Read current cycle length of slave axis
GetPrimo | --- | Read process data of a PMCprimo
GetStatus | $Sn | Read motor status variable
GetWrapAroundOffset | GW | Read offset of slave axis during zero crossing of master axis
GlobalOff | GF | Switch off all motors
GlobalStop | GS | Global stop
InitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
LengthOfAlignmentMove | XX | Read length of alignment run
LinkDeviceToChannel | PD | Define additional encoder for transferring position values via CAN
MapLinkSlaveToDifferentialMaster | NL | Define slave axis for a second master axis
MapLinkSlaveToMaster | ML | Define slave and master axis
Motiongenerator | --- | Calculate position mapping table
MotorOff | MO | Switch off motor
MoveConstantVelocity | VC | Travel at constant velocity
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
PR_TextOutput | PR | Show text on screen
PrimoCommand | --- | Execute command in command language
RebootSystem | RS1 | The motion controller executes a restart
ResetError | $Ft.n=0 | Reset error variable
ReSetReferencePositionAtOtherPosition | RK | Deactivate position for correcting a reference error on another axis
SetAbortDeceleration | XA | Set E-STOP braking ramp
SetAcceleration | SA | Set acceleration
SetAccelerationFeedForwardGain | KA | Set KA factor for acceleration gain
SetAlignmentAcceleration | AA | Set alignment acceleration
SetAnalogueControlMode | AM | Activate analogue control mode
SetAnalogueControlSetPoint | AC | Specify setpoint value for analogue control mode
SetAnalogueControlWord | AW | Set behaviour of analogue control mode
SetAnalogueDifferentialGain | AD | Set differential control gain for analogue control mode
SetAnalogueInputHighLimit | AH | Set upper limit for analogue input
SetAnalogueInputLowLimit | AL | Set lower limit for analogue input
SetAnalogueInputType | AT | Set type of value for analogue input
SetAnalogueIntegralGain | AI | Set integral gain for analogue control mode
SetAnalogueMasterRangeDistance | MM | Set analogue range distance for master
SetAnalogueProportionalGain | AP | Set proportional gain for analogue control mode
SetAnalogueRangeDistance | AR | Set analogue range distance
SetBacklashDistance | BL | Set backlash compensation
SetBusVariable | $B | Set bus variable
SetCanSDO | QS | Write SDO
SetClutchLength | CL | Set length for software coupling
SetClutchTime | CT | Set time for software coupling
SetClutchWindow | CI | Set start window for software coupling
SetConfigData | CD | Set operating parameters of the motion controller
SetControlWord | CW | Set switch-on behaviour
SetCopyAnalogueInputChannel | CA | Read analogue input of another axis
SetCreepDistance | SC | Set distance for creep speed
SetDeceleration | DC | Set deceleration ramp
SetEncoderFeedbackChannel | FC | Read input of an encoder from another axis
SetEncoderFilterTime | PT | Set filter for encoder
SetEncoderScaling | MS | Scale master position
SetEncoderTimeout | TO | Set monitoring of encoder signals
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error
SetFeedbackEncoder | FS | Select rotary encoder type
SetFilterOnReference | FR | Set filter for reference error
SetHighPositionLimit | LH | Set software end limit in plus direction
SetIntegralGain | KI | Set integral gain
SetLowPositionLimit | LL | Set software end limit in minus direction
SetMapAdjustmentVelocity | AV | Set alignment velocity
SetMapBaseAdvance | OM | Calculate phase displacement for master position offset
SetMapBaseAdvanceTimeConstant | BT | Average velocity for calculating phase displacement of master position
SetMapBaseOffset | MB | Set master position offset
SetMapLinkOptionsWord | LW | Set coupling between slave and master axis
SetMapOptionsWord | MW | Set position mapping
SetMapPositionTimeout | MT | Set monitoring time for master positions
SetMapScaleFromBounds | BR | Calculate transmission ratio
SetMaxPositionError | SE | Set drag error limit
SetMaxReferenceCorrection | SR | Set maximum value of a reference error correction
SetModbusClient | CD | Set parameters for Modbus Clients
SetModbusClient_FC1 | CD | Set parameters for Modbus Clients - Function Code FC 01 (Read Coils)
SetModbusClient_FC2 | CD | Set parameters for Modbus Clients - Function Code FC 02 (Read Discrete Input)
SetModbusClient_FC3 | CD | Set parameters for Modbus Clients - Function Code FC 03 (Read Holding Register)
SetModbusClient_FC4 | CD | Set parameters for Modbus Clients - Function Code FC 04 (Read Input Register)
SetModbusClient_FC15 | CD | Set parameters for Modbus Clients - Function Code FC 15 (Write Multiple Coils)
SetModbusClient_FC16 | CD | Set parameters for Modbus Clients - Function Code FC 16 (Write Multiple Registers)
SetModbusClient_FC23 | CD | Set parameters for Modbus Clients - Function Code FC 23 (Read/Write Multiple Registers)
SetMonitorOutputFunction | SF | Set functions for analogue auxiliary output
SetMonitorOutputGain | KM | Set amplification factor for analogue auxiliary output
SetMonitorOutputOffset | OM | Set offset for analogue auxiliary output
SetMoveOptionsWord | ZW | Preset positioning behaviour
SetNumberOfBits | NB | Set number of data bits on the SSI or CANopen encoder
SetPhaseAdvanceFactor | PA | Define output for phase displacement of an electronic cam
SetPositionBound | SB | Set cycle length
SetPositionCounter | ZC | Set position counter
SetPositionOutputHysteresis | PH | Define hysteresis for cam
SetPositionOverflowCounter | BC | Set overflow counter
SetProportionalGain | KP | Set proportional gain
SetProportionalGainScaled | KP | Proportional gain for high resolution encoder
SetReferenceAcceleration | RC | Set correction acceleration or path
SetReferenceAdvanceFactor | RN | Define phase displacement for reference signal
SetReferenceCorrectionVelocity | RV | Maximum velocity when correcting a reference error
SetReferenceErrorLimit | LR | Set reference error limit
SetReferenceFalseHighLimit | FH | Set upper limit for reference input FALSE
SetReferenceFalseLowLimit | FL | Set lower limit for reference input FALSE
SetReferenceFilterOptionWord | FW | Set reference filter
SetReferenceHoldoffTime | RH | Set debounce time or debounce distance for reference signal
SetReferenceMode | RM | Activate cyclical referencing
SetReferenceOffset | RF | Set reference offset
SetReferenceOptionsWord | RW | Preset reference behaviour
SetReferencePosition | RJ | Set position for reference error correction
SetReferencePositionAtOtherPosition | RK | Define position for reference error correction on another axis
SetReferenceRepeatLength | RL | Set reference cycle length
SetReferenceTimeout | RT | Monitor reference input
SetReferenceTrueHighLimit | ZH | Set upper limit for reference input TRUE
SetReferenceTrueLowLimit | ZL | Set lower limit for reference input TRUE
SetScaleMapping | SM | Set transmission ratio
SetSlaveMapOffset | MF | Set offset for slave position
SetSlowSpeed | SS | Set velocity for creep speed
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode
SetTimeoutForWindows | TI | Set monitoring time for target window
SetVelocity | SV | Set velocity
SetVelocityAveragingTime | VT | Set time period for calculating the average velocity
SetVelocityFeedForwardGain | KF | Set KF setpoint gain
SetVelocityOutputHysteresis | VH | Define hysteresis for velocity-dependent output
SetVirtualMotorMode | VM | Select virtual mode
SetWindow | SW | Set target window for position
StopMotor | ST | Stop command
StopMotorToPosition | ST | Stop motor at absolute position
TransferMapData | TM | Transfer position mapping table to axis
UndefineInput | UI | Delete definition of an input
UndefineOutput | UO | Delete definition of an output
UnlinkSlaveToMaster | UL | Cancel assignment of Slave to Master axis
WaitEndState | WE | End wait state
WaitForAbsolutePosition | WA | Wait loop until absolute position is achieved
WaitForBoundPosition | WB | Wait loop until cycle limit is achieved
WaitForRelativePosition | WR | Wait loop until relative position is achieved
WaitForStatusMotor | WS | Wait loop until motor status is detected


Command language --> Function block

Reference [image] Overview [image] Command language --> Function block
Command language --> Function block
Command language | Function block | Function
$B | GetBusVariable | Read bus variable
$B | SetBusVariable | Set bus variable
$Fn | GetError | Read error variable
$Ft.n=0 | ResetError | Reset error variable
$Sn | GetStatus | Read motor status variable
$var | --- | Display and use variable
$var= | --- | Assign variable
$var< | --- | Define trigger variable
$var>$Hx | DefineVariableRemanent | Store variable in non-volatile memory
?? | --- | Request help
AA | SetAlignmentAcceleration | Set alignment acceleration
AB | AbortMotor | Stop motor, E-STOP
AC | SetAnalogueControlSetPoint | Specify setpoint value for analogue control mode
AD | SetAnalogueDifferentialGain | Set differential control gain for analogue control mode
AE | DefineAnalogueLimitErrorOutput | Define error output for limit value exceeded at analogue input
AH | SetAnalogueInputHighLimit | Set upper limit for analogue input
AI | SetAnalogueIntegralGain | Set integral gain for analogue control mode
AL | SetAnalogueInputLowLimit | Set lower limit for analogue input
AM | SetAnalogueControlMode | Activate analogue control mode
AO | DefineAuxiliaryOutput | Define analogue output as auxiliary output
AP | SetAnalogueProportionalGain | Set proportional gain for analogue control mode
AR | SetAnalogueRangeDistance | Set analogue range distance
AS | --- | Define program for start-up
AT | SetAnalogueInputType | Set type of value for analogue input
AV | SetMapAdjustmentVelocity | Set alignment velocity
AW | SetAnalogueControlWord | Set behaviour of analogue control mode
AX | --- | Cancel command execution
OM | SetMapBaseAdvance | Calculate phase displacement for master position offset
BC | DisplayPositionOverflowCounter | Display overflow counter
BC | SetPositionOverflowCounter | Set overflow counter
BG | --- | Define input inhibit for group
BI | --- | Inhibit input function
BK | --- | Cancel program execution
BL | SetBacklashDistance | Set backlash compensation
BN | --- | Define input inhibit
BO | DefineBoundOverflowOutput | Output pulse when cycle limit is exceeded
BR | SetMapScaleFromBounds | Calculate transmission ratio
BT | SetMapBaseAdvanceTimeConstant | Average velocity for calculating phase displacement of master position
BV | --- | Inhibit trigger variable
CA | SetCopyAnalogueInputChannel | Read analogue input of another axis
CD | SetConfigData | Set operating parameters of the motion controller
CF | ClearDriveFault | Reset errors and warnings
CH | --- | Select axis
CI | SetClutchWindow | Set start window for software coupling
CL | SetClutchLength | Set length for software coupling
CN | --- | Record CAN trace
CO | --- | Reset output n in Byte g
CR | CalculateInitialRatio | Calculate initial transmission ratio with analogue range distances
CT | SetClutchTime | Set time for software coupling
CW | SetControlWord | Set switch-on behaviour
DA | DisplayAnalogueInput | Display analogue input
DB | --- | Set debounce time for inputs
DC | SetDeceleration | Set deceleration ramp
DD | DisplayDemandPosition | Display demand position
DE | DefineMotorErrorOutput | Define error output for errors on an axis
DF | DisplayReferenceError | Display last reference error
DG | DisplayReferenceErrorToCorrect | Display actual reference error
DI | --- | Define input function
DL | --- | Define limit switch input
DM | --- | Activate display mode
DO | --- | Deactivate display mode
DP | DisplayActualPosition | Display actual position
DR | DefineReferenceInput | Define input as reference input
DS | DisplaySnapshotPosition | Display stored snapshot of encoder
DT4/5 | DisplayCanBusLoad | Display current and maximum CAN bus load
DV[0] | DisplayVelocity | Display current or average velocity
DV[1,2] | DisplayMaxVelocity | Display or reset maximum velocity
DZ | DefineZeroMarkerInput | Define zero track of the encoder as reference input
EI | --- | Enable input function
EL | --- | Execute command if query is FALSE
EM/NM | DefineMap | Define position mapping table
EN | --- | Enable inputs by priority
ER | --- | End program loop
ES | --- | Enter program
EV | --- | Enable trigger variable
EW | SetErrorOptionsWord | Behaviour of the PMCprimo in the event of an error
FC | SetEncoderFeedbackChannel | Read input of an encoder from another axis
FE[0] | DisplayFollowingError | Display lag distance
FE[1,2] | DisplayMaxFollowingError | Display or reset maximum lag distance
FH | SetReferenceFalseHighLimit | Set upper limit for reference input FALSE
FI | ActivateCANAnalogueInput | Enable a subscriber's analogue inputs
FL | SetReferenceFalseLowLimit | Set lower limit for reference input FALSE
FM | --- | Display free memory
FO | ActivateCANAnalogueOutput | Enable a subscriber's analogue outputs
FR | SetFilterOnReference | Set filter for reference error
FS | SetFeedbackEncoder | Select rotary encoder type
FW | SetReferenceFilterOptionWord | Set reference filter
GA | --- | Global abort
GE | --- | Cancel all wait loops
GF | GlobalOff | Switch off all motors
GM | GetMappedMasterBound | Read current cycle length of slave axis
GS | GlobalStop | Global stop
GW | GetWrapAroundOffset | Read offset of slave axis during zero crossing of master axis
GX | --- | Cancel command execution on all axes
HW0 | DisplayCANDevices | Display CAN devices
IA | -- | Define variable array
IB | InitialisePositionBounds | Initialise position counter and determine cycle length
IF | --- | Execute command if query is TRUE
II | --- | Execute commands depending on input status
IN | InitialisePosition | Initialise position counter
IO | --- | Execute commands depending on output status
IT | --- | Execute commands depending on motor status
IX | --- | Query program status
JB | DefineReferenceBackwardOutput | Set output when reference error is corrected by braking
JF | DefineReferenceForwardOutput | Set output when reference error is corrected by accelerating
KA | SetAccelerationFeedForwardGain | Set KA factor for acceleration gain
KF | SetVelocityFeedForwardGain | Set KF setpoint gain
KI | SetIntegralGain | Set integral gain
KM | SetMonitorOutputGain | Set amplification factor for analogue auxiliary output
KPnn | SetProportionalGain | Set proportional gain
KPnn,mm | SetProportionalGainScales | Proportional gain for high resolution encoder
LA | --- | List data from the RAM of a PMCprimo
LB | --- | List values of all bus variables
LC | --- | List value of timer or counter
LE | --- | Show error messages again
LG | --- | Select language
LH | SetHighPositionLimit | Set software end limit in plus direction
LI | --- | Display input definition
LL | SetLowPositionLimit | Set software end limit in minus direction
LM | --- | List position mapping table
LO | --- | List definition of outputs
LOOP | --- | Continuous loop for program processing
LP | --- | Values of motion generator variables
LR | SetReferenceErrorLimit | Set reference error limit
LS | --- | List programs
LV | --- | List value of variables
LW | SetMapLinkOptionsWord | Set coupling between slave and master axis
MA | MoveToAbsolutePosition | Absolute positioning
MB | SetMapBaseOffset | Set master position offset
ME | --- | Define reaction program in the event of an axis error
MF | SetSlaveMapOffset | Set offset for slave position
MG | --- | Define input mask for group
MI | --- | Inhibit input function
ML | MapLinkSlaveToMaster | Define slave and master axis
MM | SetAnalogueMasterRangeDistance | Set analogue range distance for master
MN | --- | Define input mask
MO | MotorOff | Switch off motor
MR | MoveRelativePosition | Relative positioning
MS | SetEncoderScaling | Scale master position
MT | SetMapPositionTimeout | Set monitoring time for master positions
MV | --- | Inhibit trigger variable
MW | SetMapOptionsWord | Set position mapping
NB | SetNumberOfBits | Set number of data bits on the SSI or CANopen encoder
NL | MapLinkSlaveToDifferentialMaster | Define slave axis for a second master axis
NP | --- | List program number
NS | --- | End of program entry
NT | --- | List table number
OA | DefineOutputAlignmentMove | Define output for signalling an alignment run
OM | SetMonitorOutputOffset | Set offset for analogue auxiliary output
OR | DefineReferenceOutput | Set output when reference error is corrected
OW | DefineOutsideWindowOutput | Output for signalling when lag distance is too great
PA | SetPhaseAdvanceFactor | Define output for phase displacement of an electronic cam
PC | EnablePositionControl | Enable position control loop
PD | CANPositionControlDrive | Define servo amplifier for transferring position values via CAN
PD | LinkDeviceToChannel | Define additional encoder for transferring position values via CAN
PH | SetPositionOutputHysteresis | Define hysteresis for cam
PO | DefinePositionTriggerOutput | Define output as electronic cam
PR | PR_TextOutput | Show text on screen
PS | DefinePositionSnapshot | Define digital input for a snapshot of the encoder
PT | SetEncoderFilterTime | Set filter for encoder
PV3 | AcknowledgeAllErrors | Reset all error variables
QA | ASCIIToDrive | Open ASCII channel for servo amplifier
QR | GetCanSDO | Read SDO
QS | SetCanSDO | Write SDO
RA | DefineReferenceAcceptedOutput | Output pulse when a reference signal is detected
RC | SetReferenceAcceleration | Set correction acceleration or path
RD | --- | Reload data
RF | SetReferenceOffset | Set reference offset
RH | SetReferenceHoldoffTime | Set debounce time or debounce distance for reference signal
RI | --- | Show state of digital inputs of an input byte
RJ | SetReferencePosition | Set position for reference error correction
RK | ReSetReferencePositionAtOtherPosition | Deactivate position for correcting a reference error on another axis
RK | SetReferencePositionAtOtherPosition | Define position for reference error correction on another axis
RL | SetReferenceRepeatLength | Set reference cycle length
RM | SetReferenceMode | Activate cyclical referencing
RN | SetReferenceAdvanceFactor | Define phase displacement for reference signal
RO | --- | Read state of the outputs in group g
RP | --- | Repeat command line
RR | DefineReferenceRejectOutput | Set output in the event of reference error
RS1 | RebootSystem | The motion controller executes a restart
RT | SetReferenceTimeout | Monitor reference input
RV | SetReferenceCorrectionVelocity | Maximum velocity when correcting a reference error
RW | SetReferenceOptionsWord | Preset reference behaviour
SA | SetAcceleration | Set acceleration
SB | DisplayPositionBound | Display cycle length
SB | SetPositionBound | Set cycle length
SC | SetCreepDistance | Set distance for creep speed
SD | --- | Display IO state safety card
SE | SetMaxPositionError | Set drag error limit
SF | SetMonitorOutputFunction | Set functions for analogue auxiliary output
SK | --- | Display and set software key
SM | SetScaleMapping | Set transmission ratio
SO | --- | Set output n in Byte g
SP | --- | Save data
SR | SetMaxReferenceCorrection | Set maximum value of a reference error correction
SS | SetSlowSpeed | Set velocity for creep speed
ST | StopMotor | Stop command
ST | StopMotorToPosition | Stop motor at absolute position
string | DriveCommand | Send commands to servo amplifier
SV | SetVelocity | Set velocity
SW | SetWindow | Set target window for position
TC | DefineTimerOutput | Define output for a timer or counter function
TD | --- | Display last value of a recording channel
TF | --- | Set trigger edge for trace mode
TG | --- | Define enable input for timer, counter or cam
TH | --- | Set trigger channel for trace mode
TI | SetTimeoutForWindows | Set monitoring time for target window
TK | --- | Define input for timer or counter
TL | --- | Set trigger level for trace mode
TM | TransferMapData | Transfer position mapping table to axis
TO | SetEncoderTimeout | Set monitoring of encoder signals
TP | --- | Set pretrigger for trace mode
TR | --- | Enable trace mode
TT | --- | Set time base for trace mode
TW | --- | Preset trace mode
TZ | --- | Define reset input for timer or counter
UI | UndefineInput | Delete definition of an input
UL | UnlinkSlaveToMaster | Cancel assignment of Slave to Master axis
UO | UndefineOutput | Delete definition of an output
VC | MoveConstantVelocity | Travel at constant velocity
VH | SetVelocityOutputHysteresis | Define hysteresis for velocity-dependent output
VJ | SetSlowSpeedMode | Switch between standard and creep speed mode
VM | SetVirtualMotorMode | Select virtual mode
VN | DisplayVersionInformation | Display information about version
VO | DefineVelocityOutput | Set output for velocity range
VT | SetVelocityAveragingTime | Set time period for calculating the average velocity
VX | --- | Display trigger variable
WA | WaitForAbsolutePosition | Wait loop until absolute position is achieved
WB | WaitForBoundPosition | Wait loop until cycle limit is achieved
WC | --- | Wait loop until overflow counter is reached
WE | WaitEndState | End wait state
WF | --- | Wait loop until a reference signal is detected
WI | --- | Wait loop until a positive or negative input status is detected
WR | WaitForRelativePosition | Wait loop until relative position is achieved
WS | WaitForStatusMotor | Wait loop until motor status is detected
WT | --- | Time delay
WV | --- | Wait loop until variable is triggered
XA | SetAbortDeceleration | Set E-STOP braking ramp
XI | ExecuteInverseMapVirtual | Query master position
XM | ExecuteMap | Activate position mapping table
XP | --- | Call program in parallel
XR | ExecuteAnalogueDistanceInit | Initialise initial transmission ratio with analogue range distances
XS | ExecuteSequence | Call program in command language
XV | ExecuteMapVirtual | Query slave position
XX | LengthOfAlignmentMove | Read length of alignment run
ZC | SetPositionCounter | Set position counter
ZH | SetReferenceTrueHighLimit | Set upper limit for reference input TRUE
ZL | SetReferenceTrueLowLimit | Set lower limit for reference input TRUE
ZT | --- | List active programs
ZW | SetMoveOptionsWord | Preset positioning behaviour
ZX | DisplayReferenceLengthFalse | Display length of reference signal with FALSE state
ZY | DisplayReferenceLengthTrue | Display length of reference signal with TRUE state


root

Reference [image] root
root
On the top level of the library there are various function blocks that are not assigned to a directory.
DefineVariableRemanent: Store variable in non-volatile memory
ExecuteSequence: Call program in command language
GetPrimo: Read process data of a PMCprimo
PrimoCommand: Execute command in command language
RebootSystem: The motion controller executes a restart
SetConfigData: Set operating parameters of the motion controller


DefineVariableRemanent ($var>$Hx)

Reference [image] root [image] DefineVariableRemanent ($var>$Hx)
DefineVariableRemanent ($var>$Hx)
Store variable in non-volatile memory
Description
Library: root
This function stores a variable in the non-volatile memory (MRAM) of a PMCprimo.
Notes
Please note: Applications with IEC 61131-3 and in command language occupy different memory areas. One type of application cannot access memory areas of the other.
IEC 61131-3
–
When DefineVariableRemanent is called, diVariable is overwritten with the value in the MRAM. The MRAM is automatically updated if the variable changes.
–
A value stored in the MRAM is cancelled if DefineVariableRemanent is not called after a restart or reset.
Command language:
–
After a restart or reset, the variable is automatically assigned the value from the MRAM.
–
The value stored in the MRAM is cancelled by entering the command "$var >".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
iNumber | Storage location in the MRAM
 | Data type: | INT
 | Value range: | 1 … 1 000
diVariable | Variable that is stored in the MRAM
 | Data type: | DINT
 | Value range: | DINT
Output interface
bDone, bError and iErrorNumber see Function blocks
diVariable | Variable that is stored in the MRAM It is a VAR_IN_OUT type variable and so is also available on the output side of the FB. However, in the instance the variable is only stated on the input side.
 | Data type: | DINT
 | Value range: | DINT
Command language
$var>$Hx | Store variable in the MRAM
 | Value range for |
 | x: | see iNumber
 | var: | see diVariable


ExecuteSequence (XS)

Reference [image] root [image] ExecuteSequence (XS)
ExecuteSequence (XS)
Call program in command language
Description
Library: root
This function calls a program that is written in command language.
Notes
The program commands for command language are ESName and NS.
The program is run immediately when ExecuteSequence is called.
The program is aborted if an error occurs.
A program can then not be called again until it has been run in full, otherwise the following error message is triggered: "The program <Name> cannot be started as it is already running!".
Subprograms are executed consecutively.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
sName | Name of the program in command language
 | Data type: | STRING(80)
 | Value range: | 80 characters
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
XSName | Name of program
 | Value range for Name: | 80 characters
Linked functions
Function block | Command language | Function
--- | ESName | Enter program
--- | NS | End of program entry


GetPrimo_Vx_y_z

Reference [image] root [image] GetPrimo_Vx_y_z
GetPrimo_Vx_y_z
Read process data of a PMCprimo
Description
Library: Misc
This function reads the configuration and status from a PMCprimo C.
Notes
The function name in the block header contains the current version of the library. Example: Version 3.1.4 of the library would have the function name GetPrimo_V3_1_4.
The function block must be called in each project, otherwise an error is signalled.
GetPrimo is also used to test the version.
The inputs bReset… can be used to reset certain values and the error message.
Special feature of the input bExecute: The function block is active when bExecute=1.
The outputs are constantly updated.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute | Activate function
 | Data type: | BOOL
 | Value range: | 0: Function is inactive 1: Function is active, the outputs are continually updated Please note the other functionality of bExecute.
piModbusData | Pointer to an array with 2048 16 bit fixed point numbers
 | Data type: | POINTER TO ARRAY[0..2047] OF INT
 | Value range: | -32768 … 32767 2048 16 bit values from Modbus offset 1000 The referenced array can be used at another point to read the current data.
pdiModbusData | Pointer to an array with 2048 32 bit fixed point numbers
 | Data type: | POINTER TO ARRAY[0..2047] OF DINT
 | Value range: | ±2 147 483 647 2048 32 bit values from Modbus offset 10 000 The referenced array can be used at another point to read the current data.
bResetCycleTimeMax | Reset maximum PLC cycle time bCycleTimeMax
 | Data type: | BOOL
 | Value range: | 0: Do not reset maximum value 1: Reset maximum value
 | Default value: | 0
bResetInterruptTimeMax | Reset maximum interrupt time diInterruptTimeMax
 | Data type: | BOOL
 | Value range: | 0: Do not reset maximum value 1: Reset maximum value
 | Default value: | 0
bResetMaxLoadCan | Reset maximum CAN bus loads diMaxLoadCan1 and diMaxLoadCan2
 | Data type: | BOOL
 | Value range: | 0: Do not reset maximum values 1: Reset maximum values
 |  | 0
bResetActualError | Reset current error on motion controller
 | Data type: | BOOL
 | Value range: | 0: Do not reset error 1: Reset error
 |  | 0
Output interface
bDone | bExecute activated
 | Data type: | BOOL
 | Value range: | 0: Function is inactive 1: Function is active, the outputs are continually updated Please note the other functionality of bDone.
diCycleTime | Last PLC cycle time in µs
 | Data type: | DINT
 | Value range: | 0 … DINT
diCycleTimeMax | Longest PLC cycle time to date in µs
 | Data type: | DINT
 | Value range: | 0 … DINT
diInterruptTime | Duration of last run of interrupt routine in µs
 | Data type: | DINT
 | Value range: | 0 … DINT
diInterruptTimeMax | Longest duration of interrupt routine to date in µs
 | Data type: | DINT
 | Value range: | 0 … DINT
PrimoData | Status of axes
 | Data type: | ARRAY[1..60]OF STRUCT
 | Value range: | PrimoData is an array of a structure Array index: Number of axis Example: PrimoData[7].diActualPosition is the current actual position of axis 7
 | The structure contains the following data elements of the data type DINT:
 | PrimoData[x].diDemandPosition |  | Demand position of axis x in increments Data type: DINT Value range: DINT
 | PrimoData[x].diActualPosition |  | Actual position of axis x in increments Data type: DINT Value range: DINT
 | PrimoData[x].diFollowingError |  | Lag distance of the x axis in increments Data type: DINT Value range: DINT
 | PrimoData[x].diActualSpeed |  | Speed of the axis in increments/second Data type: DINT Value range: ±2 147 483 647
 | PrimoData[x].iActualError |  | Current error on the axis Data type: INT List of values that the variable can assume: see GetError table of error messages
 | PrimoData[x].iActualState |  | Current state of the axis Data type: INT List of values that the variable can assume: see GetStatus table of status messages
 | PrimoData[x].diAnalogueInput |  | Current value of the analogue input on the axis Data type: DINT Value range: ±2017, corresponds to ±10 V
 | PrimoData[x].iActualWaitState |  | State of the wait loop on the axis Data type: INT Key to bits: Bit 2: WaitForAbsolutePosition active Bit 3: WaitForRelativePosition active Bit 4: WF active Bit 5: WaitForBoundPosition active Bit 6: WC active
 | PrimoData[x].iReserved |  | Reserved Data type: INT
 | PrimoData[x].iReserved |  | Reserved Data type: DINT
ConfigData | Configuration data of the PMCprimo C
 | Data type: | STRUCT
 | Value range: | The structure contains all the operating parameters that can be set using SetConfigData. Example: ConfigData.wCycleTime_us contains the cycle time in µs, see SetConfigData
wCpuTemp | Current temperature of the CPU in °C
 | Data type: | WORD
 | Value range: | 0 … WORD
wCpuMaxTemp | Max. temperature since production in °C
 | Data type: | WORD
 | Value range: | 0 … WORD
wCpuMaxTempSinceSystemStart | Max. temperature since system start in °C
 | Data type: | WORD
 | Value range: | 0 … WORD
diTimeMapGen | Computing time of map generator in µs
 | Data type: | DINT
 | Value range: | 0 … DINT
diTimeSinceSystemStart | Time since system start in ms
 | Data type: | DINT
 | Value range: | 0 … DINT
diActualLoadCan1 | Current bus load of CAN1 as %
 | Data type: | DINT
 | Value range: | 0 … 100
diMaxLoadCan1 | Max. bus load of CAN1 as %
 | Data type: | DINT
 | Value range: | 0 … 100
diActualLoadCan2 | Current bus load of CAN2 as %
 | Data type: | DINT
 | Value range: | 0 … 100
diMaxLoadCan2 | Max. bus load of CAN2 as %
 | Data type: | DINT
 | Value range: | 0 … 100
iActualError | Current error on motion controller
 | Data type: | INT
 | Value range: | 0 … INT
Command language
In command language, the configuration data and status messages are distributed over several commands. The following table contains the assignment of the function block's input and output interface to the commands in command language.
bResetCycleTimeMax | DT9
bResetInterruptTimeMax | DT3
bResetMaxLoadCan | DT6
bResetAtual Error | $F0.0=0
diCycleTime | DT7
diCycleTimeMax | DT8
diInterruptTime | DT1
diInterruptTimeMax | DT2
PrimoData[x].diDemandPosition | DD
PrimoData[x].diActualPosition | DP
PrimoData[x].diFollowingError | FE
PrimoData[x].diActualSpeed | DV
PrimoData[x].iActualError | $F0.x
PrimoData[x].iActualState | $S0.x
PrimoData[x].diAnalogueInput | DA
PrimoData[x].iActualWaitState | $W0.x
ConfigData | CD
wCpuTemp | DT
wCpuMaxTemp | DT
wCpuMaxTempSinceSystemStart | DT
diTimeMapGen | DT
diTimeSinceSystemStart | DT
diActualLoadCAN1 | DT4
diMaxLoadCAN1 | DT5
diActualLoadCAN2 | DT4
diMaxLoadCAN2 | DT5
iActualError | $F0.0
Linked functions
Function block | Command language | Function
DisplayActualPosition | DP | Display actual position
DisplayAnalogueInput | DA | Display analogue input
DisplayDemandPosition | DD | Display demand position
DisplayFollowingError | FE | Display lag distance
DisplayVelocity | DV | Display current or average velocity
GetError | $F | Read error variable
GetStatus | $S | Read motor status variable
SetClutchTime | CT | Set time for software coupling


PrimoCommand

Reference [image] root [image] PrimoCommand
PrimoCommand
Execute command in command language
Description
Library: root
This function executes a command in command language.
Notes
The command in command language is entered as a string. Example: sCommand=MA 1000
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
sCommand | Execute command in command language
 | Data type: | STRING
 | Value range: | 80 characters
Output interface
PrimoCommand | Execution of command is ended
 | Data type: | BOOL
 | Value range: | TRUE: Command ended FALSE: Command is still being executed


RebootSystem (RS1)

Reference [image] root [image] RebootSystem (RS1)
RebootSystem (RS1)
The motion controller executes a restart
Description
Library: root
This function causes a restart of the motion controller.
Notes
A restart may be necessary if operating parameters have been changed (see SetConfigData).
All files and configurations will be reset to the status they had before they were last saved (see command SP in command language).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone see Function blocks
Command language
RS1
Cold start motion controller
Linked functions
Function block | Command language | Function
--- | SP | Save data


SetConfigData (CD)

Reference [image] root [image] SetConfigData (CD)
SetConfigData (CD)
Set operating parameters of the motion controller
Description
Library: Misc
This function sets the operating parameters of the motion controller.
Notes
bRebootNecessary signals that changes will only take effect after a restart.
SetConfigData can be used as an alternative to the function block SetModbusClient if only one Modbus Client is present.
The function block SetModbusClient must be used if multiple Modbus Clients are present. The number of Modbus Clients is entered in the parameter ConfigData.wNumberOfModbusClient. Parameters for the clients are then set using the function block SetModbusClient.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
ConfigData | Operating parameters of the motion controller
 | Data type: | ConfigData
The operating parameters are stored in the data structure of ConfigData as follows:
wCycleTime_us | Cycle time in µs
 | Data type: | WORD
 | Value range: | Permitted values: 25, 500, 1000
 | Default value: | 1000
wNumberOfChannels | Number of available axes
 | Data type: | WORD
 | Value range: | 1 … 60
 | Default value: | 32
wChannelForEncoder | Axis that is assigned to the encoder
 | Data type: | WORD
 | Value range: | 1 … 60
 | Default value: | 1
wCanCycleTime_ms | CAN cycle time (CAN1) in ms
 | Data type: | WORD
 | Value range: | Permitted values: 1, 2, 4, 8
 | Default value: | 4
wCanNodeAddr | CAN address of the motion controller
 | Data type: | WORD
 | Value range: | 1 … 50
 | Default value: | 50
wCan1Baudrate_kBit | CAN transmission rate (CAN1) in kBit
 | Data type: | WORD
 | Value range: | Permitted values: 20, 50, 100, 125, 250, 500, 800, 1000
 | Default value: | 1000
wCan2Baudrate_kBit | CAN transmission rate (CAN2) in kBit
 | Data type: | WORD
 | Value range: | Permitted values: 20, 50, 100, 125, 250, 500, 800, 1000
 | Default value: | 1000
wCan2CycleTime_ms | CAN cycle time (CAN2) in ms
 | Data type: | WORD
 | Value range: | Permitted values: 1, 2, 4, 8
 | Default value: | 4
wCanMode | CAN mode
 | Data type: | WORD
 | Value range: | 0 … 2: 0: Both CAN Masters 1: CAN1 Slave 2: CAN2 Slave
 | Default value: | 0
wSdCardAddr | Address of the servo amplifier whose SD card is to be used
 | Data type: | WORD
 | Value range: | 0 … 150
 | Default value: | 0
wNumberOfModbusClient | Number of Modbus Clients
 | Data type: | WORD
 | Value range: | 0 … 10: 0: No Modbus Client 1 … 9: Number of Modbus Clients With 2 Clients or more, set parameters using SetModbusClient
 | Default value: | 0
sModbusClientServerIPAddr | IP address of Modbus Server
 | Data type: | STRING(80)
 | Value range: | IP address in format XXX.XXX.XXX.XXX
diModbusClientCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diModbusClientPrimoReadOffset | Read offset of motion controller
 | Data type: | DINT
 | Value range: | 0 … 108, 1000 … 3048
 | Default value: | 0
diModbusClientServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diModbusClientNumberOfReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 108, 1000 … 3048
 | Default value: | 0
diModbusClientPrimoWriteOffset | Write offset of motion controller
 | Data type: | DINT
 | Value range: | 0 … 108, 1000 … 3048
 | Default value: | 0
diModbusClientServerWriteOffset | Write offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diModbusClientNumberOfWriteParameter | Number of parameters to be written
 | Data type: | DINT
 | Value range: | 0 … 108, 1000 … 3048
 | Default value: | 0
diReserved | Reserved for future changes
 | Data type: | ARRAY[20] OF DINT
 | Value range: | DINT
Output interface
bDone, bError and iErrorNumber see Function blocks
bRebootNecessary | Signals that a reset is required in order for changes to the operating parameters to be adopted. If necessary a restart will need to be carried out manually (see RebootSystem).
 | Value range: | TRUE: Restart required FALSE: Restart not required
Command language
CD
Set the operating parameters of the motion controller.
After executing the CD command, the terminal display switches to a menu.
The current configuration is listed, as follows:
A C T U A L C O N F I G U R A T I O N:
Operate Mode: STANDALONE |
(24) Cycle Time: | 1000 µs
( 4) Actual IP address: | 192.168.0.11
( 4) Actual Netmask: | 255.255.255.0
( 4) Actual Gateway: | 0.0.0.0
(12) Number of Channels: | 32
(27) Channel for encoder: | 1
( 8) CAN Cycle time: | 4 ms
( 9) CAN node address | 50
( 3) CAN1 baudrate: | 1000 kBit
(21) CAN2 baudrate: | 1000 kBit (equal CAN1)
(23) CAN2 cycle time: | 4ms (equal CAN1)
(22) CAN-mode: | CAN1: Master
 | CAN2: Master
(26) PMCprotego with SD-Card: | automatic
(11) PROFIBUS Address: | 0
( 5) PROFIBUS IN/OUT Length: | 0 (Words)
( 6) PROFIBUS Offset: | 0
(28) Number Of Modbus Client: | 2
(29) Modbus Client1 ServerIPaddr | 192.168.0.23
(29) Modbus Client1 CycleTime | 500 ms
(29) Modbus Client1 Primo ReadOffset | 0
(29) Modbus Client1 Server ReadOffset | 0
"Change Modbus Client1 number of read parameter 0 values?" | 20
(29) Modbus Client1 Primo WriteOffset | 0
(29) Modbus Client1 Server WriteOffset | 0
"Change Modbus Client1 number of write parameter 0 values?" | 20
"Change Modbus Client1 size of parameter 16 bit?" | 16
(29) Modbus Client1 port | 502
"Change Modbus Client1 unit identifier 1?" | 1
(29) Modbus Client1 Function Code | 0
(29) Modbus Client2 ServerIPaddr | 192.168.0.24
(29) Modbus Client2 CycleTime | 500 ms
(29) Modbus Client2 Primo ReadOffset | 0
(29) Modbus Client2 Server ReadOffset | 0
(29) Modbus Client2 number of read parameter | 20
(29) Modbus Client2 Primo WriteOffset | 0
(29) Modbus Client2 Server WriteOffset | 0
(29) Modbus Client2 number of write parameter | 0
(29) Modbus Client2 size of parameter (Bit) | 16
(29) Modbus Client2 port | 502
(29) Modbus Client2 unit identifier | 1
(29) Modbus Client2 Function Code | 0
The menu is then displayed. The number at the start of each line must be entered in order to call up the required menu.
The menu for entering the parameters looks as follows:
0: Exit menu
2: Delete application data
3: Change CAN1 baudrate
4: Change Ethernet
5: Change in/out length for Profibus
6: Change offset for Profibus
8: Set CAN Cycle time
9: Set CAN address
11: Change Profibus address
12: Change number of channels
21: Change CAN2 baudrate
22: Enable slave mode for CAN1/2
23: Set CAN2 cycle time
24: Change cycle time of system
26: Set address for PMCprotego with SD-Card
27: Change channel for encoder
28: Set number of ModbusClient
29: Change ModbusClient Parameter
Choice [Return; ESC exits menu]:
Enter the number of the menu (2 … 29) and confirm by pressing ENTER.
Settings
1
Exit menu
Exit the CD menu, alternatively use ESC.
2
Delete application data
Delete all runtime data, programs and 61131 applications
The command must be confirmed twice. A security prompt appears:
"Are you sure? Y/N"
–
Y: Runtime data is deleted
–
N: Runtime data is not deleted
3
Change CAN1 baudrate
Change the CAN transmission rate (CAN1) to kBit
The following prompt appears:
"CAN1 Baudrate (20/50/100/125/250/500/800/1000 kBit) 1000? "
–
Permitted values: 20, 50, 100, 125, 250 , 500, 800, 1000
–
An error message appears with any other values.
–
"1000?" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
4
Change Ethernet
Configure Ethernet interface
Prompt (The value in brackets is the current configuration.):
"New Netmask (255.255.255.0) ?"
Subnet mask of the Primo Ethernet interface
"New IP address (192.168.0.11) ?"
IP address of the Primo Ethernet interface
"Address of Gateway (0.0.0.0) ?"
IP address of the Gateway that uses the controller's Ethernet interface.
Any change to this parameter requires a restart of the PMCprimo C.
5
Change in/out length for Profibus
Length of the data field for Profibus in words
Prompt:
"PROFIBUS Change In/Out length in words (0) ?"
–
Permitted values: 1 … 108
–
"(0)" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
6
Change offset for Profibus
Profibus offset in words
Prompt:
"PROFIBUS Change In/Out Offset (0) ?"
–
Permitted values: 1 … 100
–
"(0)" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
8
Set CAN Cycle time
Set CAN cycle time for CAN1 (in ms)
Prompt:
"CAN Cycle time (1,2,4 or 8 ms) 4 ? "
–
Permitted values: 1, 2, 4, 8
–
An error message appears with any other values.
–
"4?" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
9
Set CAN address
Set CAN address of the PMCprimo C
Prompt:
"CAN node address 50 ? "
–
"50?" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
11
Change Profibus address
Set Profibus address of the PMCprimo
Prompt:
PROFIBUS New address (0) ?
–
Permitted values: 1 … 126
–
"(0)" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
12
Change number of channels
Define the number of channels that the PMCprimo provides.
Prompt:
"New number of channels (Max: 60 Act: 32) ? "
–
"Act: 32" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
21
Change CAN2 baudrate
Set CAN transmission rate (CAN2) in kBit
Prompt:
"CAN2 Baudrate (20/50/100/125/250/500/800/1000 kBit) 1000? "
–
Permitted values: 20, 50, 100, 125, 250, 500, 800, 1000
–
An error message appears with any other values.
–
"1000?" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
22
Enable slave mode for CAN1/2
Switch CAN1 or CAN2 to Slave mode
Prompt:
"CAN network mode (0: Master/1: CAN1 Slave/2: CAN2 Slave) (0) ? "
–
0: Both Masters
–
1: CAN1 is Slave
–
2: CAN2 is Slave
–
(0) is the current configuration in the above example.
23
Set CAN2 cycle time
Set CAN cycle time for CAN2 (in ms)
Prompt:
"CAN2 cycle time (1,2,4 or 8 ms) 4 ? "
–
Permitted values: 1, 2, 4, 8
–
An error message appears with any other values.
–
"4 ?" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
24
Change cycle time of system
Change cycle time of PMCprimo C in µs
Prompt:
"Cycle time (250, 500 or 1000 µs) 1000 ? "
–
Permitted values: 250, 500, 1000
–
An error message appears with any other values.
–
"1000?" is the current configuration in the above example.
26
Set address for PMCprotego with SD-Card
Address of the PMCprotego whose SD card is to be used
Prompt:
"Set address for PMCprotego with SD-Card?"
27
Change channel for encoder
Channel of the servo amplifier that is used for the local encoder
Prompt:
"Change channel for encoder ? (Act. channel: 1) "
–
Please note: The channel may not be greater than the number of configured channels (see menu item 12).
–
"(Act. channel: 1)" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C.
28
Set number of ModbusClient
Set the number of active Modbus Clients on the PMCprimo C
Prompt:
" Change number of Modbus-Client ? (2)"
–
Permitted values: 0 … 10
–
"(2)" is the current configuration in the above example.
Any change to this parameter requires a restart of the PMCprimo C
29
Change ModbusClient Parameter
Configure Modbus Client
Prompt:
The value at the end of the line - also in brackets - reflects the current configuration.
"New Modbus Client1 Server IP address (#) ?"
IP address of the Modbus Server
Permitted values: Format of the IP address xxx.xxx.xxx.xxx
Default value: #
"Change Modbus Client1 Cycle time 100 ms ?"
Cycle time of Modbus Client in ms
Permitted values: 1 … DINT
Default value: 100
"Change Modbus Client1 function code 0 (0 = automatic)?"
Modbus Function Code
0: automatic
!=0: self-defined
Permitted values: 0/1/2/3/4/15/16/23
Default value: 0
"Change Modbus Client1 size of parameter 16 bit?"
Size of Modbus parameters in bits
Permitted values: 1 … 32
Default value: 16
"Change Modbus Client1 Primo Read Offset 0 ?"
Read offset of PMCprimo
Permitted values: 0 … 108, 1000 … 3048
Default value: 0
"Change Modbus Client1 Server Read Offset 0 ?"
Read offset of Server
Permitted values: 1 … DINT
Default value: 0
"Change Modbus Client1 number of read parameter 0 values?"
Number of parameters to be read
Permitted values: 0 … 108, 1000 … 3048
Default value: 0
"Change Modbus Client1 Primo Write Offset 0 ?"
Write offset of PMCprimo
Permitted values: 0 … 108, 1000 … 3048
Default value: 0
"Change Modbus Client1 Server Write Offset 0 ?"
Write offset of Server
Permitted values: 1 … DINT
Default value: 0
"Change Modbus Client1 number of write parameter 0 values?"
Number of parameters to be written
Permitted values: 0 … 108, 1000 … 3048
Default value: 0
Change Modbus Client1 port 502?
Port of Modbus Client
Permitted values: 1 … INT
Default value: 502
"Change Modbus Client1 unit identifier 1?"
Modbus UnitIdentifier
Permitted values: 0 … USINT
Default value: 1
The configurations of all activated Modbus Clients are polled in succession. The number of the Modbus Client is displayed in the name of the parameter, e.g. Change Modbus Client2 Cycle Time..."
Any change to this parameter requires a restart of the PMCprimo C.
Each prompt can be confirmed with ENTER. The old value will be retained if it has not been changed.
The entry is cancelled using ESC. In this case you will jump back one level in the menu.
Linked functions
Function block | Command language | Function
RebootSystem | RS1 | The motion controller executes a restart
SetModbusClient | --- | Set parameters for Modbus Clients


Auxiliary

Reference [image] Auxiliary
Auxiliary
The Auxiliary directory contains function blocks, which can be used to define analogue outputs (±10 V) as auxiliary outputs. The auxiliary outputs can be used to output values from the controller or servo amplifier to an oscilloscope, for example.
The function SetMonitorOutputOffset can be used to control the speed, without position control. As a result, an axis can be moved more slowly or more quickly, depending on an analogue input.
The following illustration shows the relationship between the function blocks.
DefineAuxiliaryOutput: Define analogue output as auxiliary output
SetMonitorOutputFunction: Set functions for analogue auxiliary output
SetMonitorOutputGain: Set amplification factor for analogue auxiliary output
SetMonitorOutputOffset: Set offset for analogue auxiliary output


DefineAuxiliaryOutput (AO)

Reference [image] Auxiliary [image] DefineAuxiliaryOutput (AO)
DefineAuxiliaryOutput (AO)
Define analogue output as auxiliary output
Description
Library: Auxiliary
This function defines an analogue output as an auxiliary output.
Necessary settings in linked function blocks
Function of the analogue output is established with SetMonitorOutputFunction.
The position control loop of the axis is open (MotorOff) or the axis is operated virtually (SetVirtualMotorMode).
Notes
A voltage is generated at the auxiliary output, for example the current velocity.
On devices without analogue outputs, e.g. PMCprimo C, the analogue outputs of devices connected via CANopen are used (e.g. expansion cards of the servo amplifier PMCprotego D or PSSu modules). The outputs are enabled using the function ActivateCANAnalogueOutput on the CAN node.
usiOutput ! = 0 defines the analogue output as an auxiliary output on the stated axis.
usiOutput = 0 cancels the definition of the analogue output as an auxiliary output on the stated axis.
If usivalue != 0 is selected on the function SetMonitorOutputFunction, please note:
–
You cannot leave virtual mode.
–
The position control loop cannot be closed with EnablePositionControl.
With encoder types 19 to 26 (see SetFeedbackEncoder), the analogue output is not used during position control. In this case it is possible to also use the function DefineAuciliaryOutput while position control is active (see EnablePositionControl).
Command language only:
–
The current setting of AO can be transferred to a variable: $var=AO.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiOutput | Analogue output that is to be defined as an auxiliary output
 | Data type: | USINT
 | Value range: | 1 … Number of analogue outputs available
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AOn | Analogue output that is to be defined as an auxiliary output
 | Value range for n: | 1 … Number of analogue outputs available
 | Default value: | 0
Linked functions
Function block | Command language | Function
EnablePositionControl | PC | Enable position control loop
ActivateCANAnalogueOutput | FO | Enable a subscriber's analogue outputs
MotorOff | MO | Switch off motor
SetFeedbackEncoder | FS | Select rotary encoder type
SetMonitorOutputFunction | SF | Set functions for analogue auxiliary output
SetVirtualMotorMode | VM | Select virtual mode


SetMonitorOutputFunction (SF)

Reference [image] Auxiliary [image] SetMonitorOutputFunction (SF)
SetMonitorOutputFunction (SF)
Set functions for analogue auxiliary output
Description
Library: Auxiliary
This function sets the value that is to be output at the analogue auxiliary output.
Necessary settings in linked function blocks
Define analogue output as auxiliary output see DefineAuxiliaryOutput
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Value that is to be output at the analogue auxiliary output. Resolution (change the control point by 1) = 4.88 mV
 | Data type: | USINT
 | Value range: | 0 … nn
 | Default value: | 0
0 | No function
1 | Demand velocity Control point = (demand velocity · SetMonitorOutputGain · 15) / 1 000 000 + SetMonitorOutputOffset
2 | Actual velocity Control point = (actual velocity · SetMonitorOutputGain · 15) / 1 000 000 + SetMonitorOutputOffset
3 | Drag error Control point = (DisplayFollowingError · SetMonitorOutputGain · 4) / 1 000 + SetMonitorOutputOffset
4 | Velocity error Control point = ((actual velocity · demand velocity · SetMonitorOutputGain 15) / 1 000 000 + SetMonitorOutputOffset
5 | Absolute demand position Control point = (DisplayDemandPosition · SetMonitorOutputGain ·4) / 1 000 + SetMonitorOutputOffset
6 | Absolute actual position Control point = (DisplayActualPosition · SetMonitorOutputGain ·4) / 1 000 + SetMonitorOutputOffset
7 | Average actual velocity Control point = (DisplayVelocity · SetMonitorOutputGain ·15) / 1 000 000 + SetMonitorOutputOffset
8 | Velocity of master axis Control point = (Master velocity · SetMonitorOutputGain ·15) / 1 000 000 + SetMonitorOutputOffset
9 | Velocity of differential master axis Control point = ((velocity of differential master axis · SetMonitorOutputGain 15) / 1 000 000 + SetMonitorOutputOffset
10 | Setpoint tension control / torque control Control point = SetAnalogueControlSetPoint + SetMonitorOutputOffset
11 | Reference error Control point = (DisplayReferenceError · SetMonitorOutputGain ·4) / 1 000 + SetMonitorOutputOffset
12 | Snapshot of encoder signal Control point = (DisplaySnapshotPosition · SetMonitorOutputGain ·4) / 1 000 + SetMonitorOutputOffset
13 | Demand velocity including correction of reference error Control point = (velocity) · SetMonitorOutputGain · 15) / 1 000 000 + SetMonitorOutputOffset
14 | Velocity ratio Slave / Master Here we have the average velocities SetVelocityAveragingTime and SetMapBaseAdvanceTimeConstant. Control point = DisplayVelocity (Slave) · SetMonitorOutputGain / DisplayVelocity (Master) + SetMonitorOutputOffset
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SFnn | Value that is to be output at the analogue auxiliary output
 | Value range for nn: | 0 … 14, see usiValue
 | Default value: | 0
Linked functions
Function block | Command language | Function
DefineAuxiliaryOutput | AO | Define analogue output as auxiliary output
DisplayActualPosition | DP | Display actual position
DisplayDemandPosition | DD | Display demand position
DisplayFollowingError | FF | Display lag distance
DisplayReferenceError | DF | Display last reference error
DisplaySnapshotPosition | DS | Display stored snapshot of encoder
DisplayVelocity | DV | Display current or average velocity
SetAnalogueControlSetPoint | AC | Specify setpoint value for analogue control mode
SetMonitorOutputGain | KM | Set amplification factor for analogue auxiliary output
SetMonitorOutputOffset | OM | Set offset for analogue auxiliary output


SetMonitorOutputGain (KM)

Reference [image] Auxiliary [image] SetMonitorOutputGain (KM)
SetMonitorOutputGain (KM)
Set amplification factor for analogue auxiliary output
Description
Library: Auxiliary
This function sets the amplification factor of the analogue auxiliary output for a selected axis.
Notes
The function multiplies the value before it is output at the analogue auxiliary output by a factor diValue.
The sign can be inverted.
The analogue auxiliary output is not affected
–
by the factors of the control algorithm.
–
by the presettings of the control parameters (SetControlWord).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Amplification factor
 | Data type: | DINT
 | Value range: | +/- 65 535
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KM±nn | Amplification factor
 | Value range for nn: | +/- 65 535
 | Default value: | 1


SetMonitorOutputOffset (OM)

Reference [image] Auxiliary [image] SetMonitorOutputOffset (OM)
SetMonitorOutputOffset (OM)
Set offset for analogue auxiliary output
Description
Library: Auxiliary
This function sets an offset for the analogue auxiliary output of a selected axis.
Notes
The function adds a fixed voltage level diValue to the value before it is output at the analogue auxiliary output.
The sign can be inverted.
The offset is calculated as follows:
Device | Measuring range | Offset
Drive | -10V … +10 V | U[mV] = 1 mV x iValue
CAN-IO | -10V … +10 V | U [mV] = 0.305 ·iValue
CAN-IO | 0 … 20 mA | I[mA] = 0.610 µA x iValue
CAN-IO | 4 … 20 mA | I[mA] = 0.488 µA x iValue
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
iValue | Offset
 | Data type: | INT
 | Value range: | +/- 32 767
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
OM±nn | Offset
 | Value range for nn: | +/- 32 767
 | Default value: | 0


BusVariables

Reference [image] BusVariables
BusVariables
Bus variables form an interface to external devices. They are set via the Modbus, CANopen, PROFIBUS-Slave or Ethernet interface. The bus systems all access the same variables. The last transmission is decisive for the value of the bus variable, if there are various bus systems in the network.
GetBusVariable: Read bus variable
SetBusVariable: Set bus variable
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


GetBusVariable ($B)

Reference [image] BusVariables [image] GetBusVariable ($B)
GetBusVariable ($B)
Read bus variable
Description
Library: BusVariables
This function reads a predefined bus variable.
Necessary settings in linked function blocks
Set bus variable see SetBusVariable
Notes
108 bus variables are available. Bus variables 1 … 100 can be defined as trigger variables.
Variables 101 ... 108 are mapped to the virtual input banks 0.101 ... 0.108. For details of how to set the variables see SetBusVariable.
The inputs function in the same way as the CAN inputs. Corresponding outputs, such as those found on classic virtual inputs, are not available, as they are switched via the bus variable.
Command language only:
Variables 101 to 108 cannot be saved. Neither can they be defined as trigger variables. The address range of Modbus, CAN or Profibus is increased accordingly. The variables cannot be used directly as command parameters because they are not global.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
iNumber | Number of the bus variable that is to be read
 | Data type: | INT
 | Value range: | 1 … 108
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Current value of bus variable
 | Data type: | DINT
Command language
$Bn | Number of the bus variable that is to be read
 | Value range for n: | 1 … 108
Linked functions
Function block | Command language | Function
SetBusVariable | $B | Set bus variable


SetBusVariable ($B)

Reference [image] BusVariables [image] SetBusVariable ($B)
SetBusVariable ($B)
Set bus variable
Description
Library: BusVariable
This function sets a predefined bus variable.
Notes
108 bus variables are available. Bus variables 1 … 100 can be defined as trigger variables.
Variables 101 ... 108 are mapped to the virtual input banks 0.101 ... 0.108. All the inputs of the respective input bank are set when a value is assigned to a variable. Example: $B101=0x13 sets bits 0, 1 and 4 of input bank 0.101 to 1; the other bits are set to 0.
The inputs function in the same way as the CAN inputs. Corresponding outputs, such as those found on classic virtual inputs, are not available, as they are switched via the bus variable.
Command language only:
Variables 101 to 108 cannot be saved. Neither can they be defined as trigger variables. The address range of Modbus, CAN or Profibus is increased accordingly. The variables cannot be used directly as command parameters because they are not global.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
iNumber | Number of the bus variable to which a value is to be assigned
 | Data type: | INT
 | Value range: | 1 … 108
diValue | Value to which the bus variable is to be set
 | Data type: | DINT
 | Value range: | 16 Bit at 1 … 100 8 Bit at 101 … 108
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
$Bn=x | Number n of the bus variable to which a value x is to be assigned
 | Value range for n: | 1 … 108
 | Value range for x: | 16 Bit at 1 … 100 8 Bit at 101 … 108


Additional commands in command language

Reference [image] BusVariables [image] Additional commands in command language
Additional commands in command language
LB: List values of all bus variables


LB

Reference [image] BusVariables [image] Additional commands in command language [image] LB
LB
List values of all bus variables
Description
This command lists all 108 bus variables and their values.
Notes
For further information on bus variables see $B
Command language
LB
Show bus variables with value
Linked functions
Command language | Function
$B | Set bus variable
$B | Read bus variable


Display

Reference [image] Display
Display
The Display directory mainly comprises function blocks that read values from the motion controller and display them on the terminal.
Read and display position:
DisplayActualPosition: Display actual position
DisplayDemandPosition: Display demand position
Display values of inputs:
DisplayAnalogueInput: Display analogue input
DisplayInputDiffTime: Display time difference between two inputs
Display properties of CAN bus:
DisplayCanBusLoad: Display current and maximum CAN bus load
DisplayCANDevices: Display CAN devices
Display difference between demand value and actual value:
DisplayFollowing Error: Display lag distance
DisplayMaxFollowingError: Display or reset maximum lag distance
Display status information:
DisplayIOStateSafetyCard: Display status information of safety card
DisplayVersionInformation: Display information about version
Display parameters of reference signal:
DisplayPositionBound: Display cycle length
DisplayPositionOverflowCounter: Display overflow counter
DisplayReferenceError: Display last reference error
DisplayReferenceErrorToCorrect: Display actual reference error
DisplayReferenceLengthFalse: Display length of reference signal with FALSE state
DisplayReferenceLengthTrue: Display length of reference signal with TRUE state
Display velocity:
DisplaySnapshotPosition: Display stored snapshot of encoder
DisplayVelocity: Display current or average velocity
DisplayMaxVelocity: Display or reset maximum velocity
SetVelocityAveragingTime: Set time period for calculating the average velocity
Display text:
PR_TextOutput: Show text on screen
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


DisplayActualPosition (DP)

Reference [image] Display [image] DisplayActualPosition (DP)
DisplayActualPosition (DP)
Display actual position
Description
Library: Display
This function reads the current actual position of the selected axis in increments.
Notes
If a value between 21 and 26 is set in SetFeedbackEncoder, please note: the demand position is transmitted. The actual position does not change if the state MotorOff is set.
Command language only:
The actual position can also be read continuously with the command DM.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read the actual position of the selected axis in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
DP
Read the actual position of the selected axis in increments
Linked functions
Function block | Command language | Function
SetFeedbackEncoder | FS | Select rotary encoder type
--- | DM | Activate display mode


DisplayAnalogueInput (DA)

Reference [image] Display [image] DisplayAnalogueInput (DA)
DisplayAnalogueInput (DA)
Display analogue input
Description
Library: Display
This function reads the actual value of the analogue input on the selected axis.
Notes
The PMCprimo C does not have an analogue input. 2 other analogue inputs are available if the expansion card PosI/O-Monitor is used.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read the actual value of the analogue input on the selected axis
 | Data type: | DINT
 | Value range: | +/- 2047, corresponds to a measuring range of +/- 10 V
 | Default value | 0
Command language
DAnn | Read the actual value of the analogue input on the selected axis
 | Value range for nn: | +/- 2047, corresponds to a measuring range of +/- 10 V
 | Default value: | 0
Linked functions
Function block | Command language | Function
ActivateCANAnalogueInput | FI | Enable a subscriber's analogue inputs


DisplayCanBusLoad (DT4/5)

Reference [image] Display [image] DisplayCanBusLoad (DT4/5)
DisplayCanBusLoad (DT4/5)
Display current and maximum CAN bus load
Description
Library: Display
This function establishes the current and maximum bus load of the two CAN networks as a percentage.
Notes
Command language only:
–
The current bus load is established using the command DT4 and is displayed in the terminal program PTerm.
–
The maximum bus load is established using the command DT5 and is displayed in the terminal program PTerm.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diActualLoadCan1 | Read current bus load CAN 1 as %
diActualLoadCan2 | Read current bus load CAN 2 as %
diMaxLoadCan1 | Read maximum bus load CAN 1 as %
diMaxLoadCan2 | Read maximum bus load CAN 2 as %
 | Data type: | DINT
 | Value range: | 0 … 100
Command language
DTn | Read current and maximum bus load
 | Value range for n: | 4: Read current bus load CAN 1 and 2 as % 5: Read maximum bus load CAN 1 and 2 as %


DisplayCANDevices (HW0)

Reference [image] Display [image] DisplayCANDevices (HW0)
DisplayCANDevices (HW0)
Display CAN devices
Description
Library: Display
This function establishes all the connected CAN devices and lists them.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
uiNumber | Number of connected CAN devices
 | Data type: | UINT
 | Value range: | 0 … 50
psCANHardware | Data from the connected CAN devices as text string. The number of entries for the array is stated with uiNumber.
 | Data type: | ARRAY[1..50] OF STRING(200)
 | Value range: | String with max. 200 characters
Command language
HW0
Data from the connected CAN devices as text string.


DisplayDemandPosition (DD)

Reference [image] Display [image] DisplayDemandPosition (DD)
DisplayDemandPosition (DD)
Display demand position
Description
Library: Display
This function reads the current demand position of the selected axis in increments.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read the demand position of the selected axis in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
DD
Read the demand position of the selected axis in increments


DisplayFollowingError (FE[0])

Reference [image] Display [image] DisplayFollowingError (FE[0])
DisplayFollowingError (FE[0])
Display lag distance
Description
Library: Display
This function reads the lag distance of the selected axis in increments.
Notes
The lag distance is the difference between the actual position and the demand position of the axis.
Command language only:
The current lag distance can be assigned to a variable with the command FE[0].
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read the lag distance of the selected axis in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
FE[0]
Read the lag distance of the selected axis in increments


DisplayInputDiffTime

Reference [image] Display [image] DisplayInputDiffTime
DisplayInputDiffTime
Display time difference between two inputs
Description
Library: Display
This function measures the time difference between defined pulse edges from two input signals and reads it out.
Notes
Pulse edges:
–
Input 1: usiPolarity1
–
Input 2: usiPolarity2
Time = Input 1 (usiInput1) - Input 2 (usiInput2)
The value becomes negative if usiInput2 is triggered before usiInput1.
Measurement of pulse duration The same input signal must be applied to usiInput1 and usiInput2. usiPolarity1 and usiPolarity2 must be set differently.
The inputs of a device are grouped into bytes:
–
usiBank: Refers to an input byte (byte address)
–
usiInput: Refers to a specific input of a byte defined with usiBank (bit address)
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
usiBank1 | Input signal 1: Input byte
 | Data type: | USINT
 | Value range: | 1 … n: Depends on the system; each group can have up to 8 inputs
usiInput1 | Input signal 1: Number of the input within a byte
 | Data type: | USINT
 | Value range: | 1 … 8: Depends on the system; if there are more than 8 inputs, a new group must be defined with usiBank
usiPolarity1 | Input signal 1: Pulse edge of the input signal, at which the trigger will occur
 | Data type: | USINT
 | Value range: | 0: - (falling edge) 1: + (rising edge)
usiBank2 | Input signal 2: Input byte
 | Data type: | USINT
 | Value range: | 1 … n: Depends on the system; each group can have up to 8 inputs
usiInput2 | Input signal 2: Number of the input within a byte
 | Data type: | USINT
 | Value range: | 1 … 8: Depends on the system; if there are more than 8 inputs, a new group must be defined with usiBank
usiPolarity2 | Input signal 2: Pulse edge of the input signal, at which the trigger will occur
 | Data type: | USINT
 | Value range: | 0: - (falling edge) 1: + (rising edge)
Output interface
bDone, bError and iErrorNumber see Function blocks
diMilliSeconds | Time difference between the two inputs in milliseconds
 | Data type: | DINT
 | Value range: | 0 … DINT
diNanoSeconds | Time difference between the two inputs in nanoseconds
 | Data type: | DINT
 | Value range: | 0 … DINT


DisplayIOStateSafetyCard

Reference [image] Display [image] DisplayIOStateSafetyCard
DisplayIOStateSafetyCard
Display status information of safety card
Description
Library: Display
This function reads status information from the safety card.
Notes
The function is available on the safety cards
–
PMCprotego S1
–
PMCprotego S2
–
PMCprotego S1-2
–
PMCprotego S2-2
The status information is updated by the safety card each millisecond.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | I/O status register: Input and output status and the way in which the deceleration ramp on the safety card PMCprotego S is controlled
 | Data type: | DINT
 | Value range: | Bit 31 … Bit 0 (see the outputs below for a description of the individual bits)
All the following outputs on the function block are of the BOOL data type. The individual bits of the I/O status register from diValue (Bit XX31 … Bit 0) have a separate output.
bSS1 | Bit 0 | Input "SS1 Activate" = "1" signal
bI0 | Bit 1 | Input "I0" = "1" signal
bI1 | Bit 2 | Input "I1" = "1" signal
bI2 | Bit 3 | Input "I2" = "1" signal
bI3 | Bit 4 | Input "I3" = "1" signal
bI4 | Bit 5 | Input "I4" = "1" signal
bI5 | Bit 6 | Input "I5" = "1" signal
bI6 | Bit 7 | Input "I6" = "1" signal
bReady | Bit 8 | The "Ready" output = "1" signal
bSTO_Ack | Bit 9 | The "STO Acknowledge" output = "1" signal
bO0 | Bit 10 | The "O0" output = "1" signal
bO1 | Bit 11 | The "O1" output = "1" signal
bO2 | Bit 12 | The "O2" output = "1" signal
bO3 | Bit 13 | The "O3" output = "1" signal
bReserve | Bit 14 | Reserved
bSTO | Bit 15 | The "STO/SIL3" output = "1" signal
bReset | Bit 16 | Input "SS1 SIL3/Reset" = "1" signal
bReserved3_2 | Bit 17 | Reserved
bReserved3_3 | Bit 18 | Reserved
bReserved3_4 | Bit 19 | Reserved
bReserved3_5 | Bit 20 | Reserved
bReserved3_6 | Bit 21 | Reserved
bReserved3_7 | Bit 22 | Reserved
bReserved3_8 | Bit 23 | Reserved
bReserved4_1 | Bit 24 | Reserved
bReserved4_2 | Bit 25 | Reserved
bReserved4_3 | Bit 26 | Reserved
bReserved4_4 | Bit 27 | Reserved
bReserved4_5 | Bit 28 | Reserved
bSS2_RampCtrl | Bit 29 | Safety card configuration: Controlled braking after SS2 is triggered TRUE: Controller-activated FALSE: Drive-activated
bSS1_RampCtrl | Bit 30 | Safety card configuration: Controlled braking after SS2 is triggered TRUE: Controller-activated FALSE: Drive-activated
bSS1_Intern | Bit 31 | Safety card configuration: E-STOP braking ramp after SS1 is triggered TRUE: Activated FALSE: not activated


DisplayMaxFollowingError (FE[1,2])

Reference [image] Display [image] DisplayMaxFollowingError (FE[1,2])
DisplayMaxFollowingError (FE[1,2])
Display or reset maximum lag distance
Description
Library: Display
This function reads the maximum lag distance occurring since the last reset. This function can be used to set a sensible drag error limit.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bReset | Display or reset lag distance
 | Data type: | BOOL
 | Value range: | 0: The stored maximum lag distance is displayed at diValue 1: The stored maximum lag distance is set to "0"
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Maximum lag distance in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
FEn | Display or reset lag distance
 | Value range for n: | 1: The stored maximum lag distance is displayed at the terminal 2: The stored maximum lag distance is set to "0"


DisplayMaxVelocity (DV[1,2])

Reference [image] Display [image] DisplayMaxVelocity (DV[1,2])
DisplayMaxVelocity (DV[1,2])
Display or reset maximum velocity
Description
Library: Display
This function reads the maximum velocity in increments/second.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bReset | Display or reset maximum velocity
 | Data type: | BOOL
 | Value range: | 0: The stored maximum velocity is displayed at diValue 1: The stored maximum velocity is set to "0"
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Maximum velocity in increments/second
 | Data type: | DINT
 | Value range: | ±2 147 483 647
Command language
DVn | Display or reset maximum velocity
 | Value range for n: | 1: The stored maximum velocity is displayed at the terminal 2: The stored maximum velocity is set to "0"


DisplayPositionBound (SB)

Reference [image] Display [image] DisplayPositionBound (SB)
DisplayPositionBound (SB)
Display cycle length
Description
Library: Display
This function reads the cycle length that is currently set.
Notes
Use the function SetPositionBound when the cycle length is to be set.
Command language only:
–
The SB command (without value nn) displays the cycle length.
–
The SBnn commands sets the cycle length to the value stated with nn.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read cycle length (in increments)
 | Data type: | DINT
 | Value range: | 1 … 2 000 000 000
Command language
SBnn | Read and set cycle length (in increments) SB with stated value nn: Set cycle length SB without stated value nn: Read cycle time
 | Value range for nn: | 1 … 2 000 000 000


DisplayPositionOverflowCounter (BC)

Reference [image] Display [image] DisplayPositionOverflowCounter (BC)
DisplayPositionOverflowCounter (BC)
Display overflow counter
Description
Library: Display
This function reads the overflow counter.
Notes
The overflow counter counts the number of times the cycle lengths are exceeded. The value is incremented when the cycle length is exceeded in a positive direction. The value is decremented when the cycle length is exceeded in a negative direction.
Use the function SetPositionOverflowCounter when the overflow counter is to be set to a specific value (in increments).
Command language only:
–
The BC command (without value nn) displays the overflow counter.
–
The BCnn commands sets the overflow counter to the value stated with nn.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read value of overflow counter (number of times the cycle length is exceeded)
 | Data type: | DINT
 | Value range: | ±2 147 483 647
Command language
BC±nn | Read and set value of overflow counter (number of times the cycle length is exceeded) BC with stated value nn: Set overflow counter BC without stated value nn, the overflow counter is read.
 | Value range for nn: | ±2 000 000 000
 | Default value: | 0


DisplayReferenceError (DF)

Reference [image] Display [image] DisplayReferenceError (DF)
DisplayReferenceError (DF)
Display last reference error
Description
Library: Display
This function reads the last reference error of the selected axis.
Notes
Please note, if Bit 2 of SetReferenceFilterOptionWord is set: The value is only updated by the DF command if it is within the filter limits (see SetMaxReferenceCorrection).
Command language only:
Please note, if Bit 2 of the FW command is set: The value is only updated by the DF command if it is within the filter limits (see SR command)
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read last reference error (in increments)
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
DF | Read last reference error (in increments)
 | Value range | ±2 000 000 000
Linked functions
Function block | Command language | Function
SetMaxReferenceCorrection | SR | Set maximum value of a reference error correction
SetReferenceFilterOptionWord | FW | Set reference filter


DisplayReferenceErrorToCorrect (DG)

Reference [image] Display [image] DisplayReferenceErrorToCorrect (DG)
DisplayReferenceErrorToCorrect (DG)
Display actual reference error
Description
Library: Display
This function reads the actual reference error that is to be corrected.
Notes
The reference error that is to be corrected is also read and displayed when SetReferenceFilterOptionWord Bit 0=0 is set. In this case the reference error will not be corrected.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Reference error that will be corrected in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
DG | Reference error that will be corrected in increments
 | Value range: | ±2 000 000 000
Linked functions
Function block | Command language | Function
SetReferenceFilterOptionWord | FW | Set reference filter


DisplayReferenceLengthFalse (ZX)

Reference [image] Display [image] DisplayReferenceLengthFalse (ZX)
DisplayReferenceLengthFalse (ZX)
Display length of reference signal with FALSE state
Description
Library: Display
This function reads the length for which the reference signal had a FALSE state.
Necessary settings in linked function blocks
For details of how to activate the function see SetReferenceFilterOptionWord
Set debounce time or debounce distance for reference signal see SetReferenceHoldoffTime
Notes
The value will only be read if Bit 0 of the function SetReferenceFilterOptionWord is set to "1". SetReferenceFilterOptionWord returns "0" if Bit 0 of the function SetReferenceFilterOptionWord is set to "0".
The edge to be detected is changed internally in order to measure the length of the reference signal. The time between the pulse edges is a minimum debounce time, which is set using SetReferenceHoldoffTime.
Signals cannot be detected if they are shorter than the debounce time or <1 ms.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read length of reference signal with FALSE state
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
ZXnn | Read length of reference signal with FALSE state
 | Value range for nn: | ±2 000 000 000
Linked functions
Function block | Command language | Function
SetReferenceFilterOptionWord | ZX | Set reference filter
SetReferenceHoldoffTime | RH | Set debounce time or debounce distance for reference signal


DisplayReferenceLengthTrue (ZY)

Reference [image] Display [image] DisplayReferenceLengthTrue (ZY)
DisplayReferenceLengthTrue (ZY)
Display length of reference signal with TRUE state
Description
Library: Display
This function reads the length for which the reference signal had a TRUE state.
Necessary settings in linked function blocks
For details of how to activate the function see SetReferenceFilterOptionWord
Set debounce time or debounce distance for reference signal see SetReferenceHoldoffTime
Notes
The value will only be read out if Bit 0 of the function SetReferenceFilterOptionWord is set to "1". SetReferenceFilterOptionWord returns "0" if Bit 0 of the function SetReferenceFilterOptionWord is set to "0".
The edge to be detected is changed internally in order to measure the length of the reference signal. The time between the pulse edges is a minimum debounce time, which is set using SetReferenceHoldoffTime.
Signals cannot be detected if they are shorter than the debounce time or <1 ms.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read length of reference signal with TRUE state
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
ZXnn | Read length of reference signal with FALSE state
 | Value range for nn: | ±2 000 000 000
Linked functions
Function block | Command language | Function
SetReferenceFilterOptionWord | ZX | Set reference filter
SetReferenceHoldoffTime | RH | Set debounce time or debounce distance for reference signal


DisplaySnapshotPosition (DS)

Reference [image] Display [image] DisplaySnapshotPosition (DS)
DisplaySnapshotPosition (DS)
Display stored snapshot of encoder
Description
Library: Display
This function reads the last value to be stored in the snapshot of the encoder in increments.
Necessary settings in linked function blocks
Activate cyclical referencing see SetReferenceMode
Define digital input for a snapshot of the encoder see DefinePositionSnapshot
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Read snapshot of encoder (in increments)
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
DS | Read snapshot of encoder (in increments)
 | Value range: | ±2 000 000 000
Linked functions
Function block | Command language | Function
DefinePositionSnapshot | PS | Define digital input for a snapshot of the encoder
SetReferenceMode | RM | Activate cyclical referencing


DisplayVelocity (DV[0])

Reference [image] Display [image] DisplayVelocity (DV[0])
DisplayVelocity (DV[0])
Display current or average velocity
Description
Library: Display
This function reads the current or average velocity of the selected axis.
Necessary settings in linked function blocks
Set time period for calculating the average velocity see SetVelocityAveragingTime
Notes
The SetVelocityAveragingTime function is used to set a time period. DisplayVelocity shows the average velocity over this period.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Display current or average velocity (in increments)
 | Data type: | DINT
 | Value range: | ±2 147 483 647
Command language
DV[0] | Display current or average velocity (in increments)
 | Value range: | ±2 147 483 647
Linked functions
Function block | Command language | Function
SetVelocityAveragingTime | VT | Set time period for calculating the average velocity


DisplayVersionInformation (VN)

Reference [image] Display [image] DisplayVersionInformation (VN)
DisplayVersionInformation (VN)
Display information about version
Description
Library: Display
This function reads information about the hardware and software as well as the version of a motion controller PMCprimo.
Notes
Command language only:
The VN command can be assigned to a variable ($var=VN).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
iDevicetyp | Hardware detection
 | Data type: |  | INT
 | Value range: |  | 0 … INT
 |  |  | 7: PMCprimo C
bMotionKey | Software for dynamic curve calculation installed? Dynamic curve calculation can be enabled with SK.
 | Data type: |  | BOOL
 | Value range: |  | TRUE: Dynamic curve calculation installed FALSE: Dynamic curve calculation not installed
bCNCKey | Software for path interpolation installed? Path interpolation can be enabled with SK.
 | Data type: |  | BOOL
 | Value range: |  | TRUE: Path interpolation installed FALSE: Path interpolation not installed
usiChannels | Number of available axes
 | Data type: |  | USINT
 | Value range: |  | 0 … 60
uiVersNumber | Software version
 | Data type: |  |
 | Value range: |  | 100 … 999 The software version is returned as a 3-digit decimal figure. Each digit corresponds to a digit in the version number. Example: Version v3.1.2 corresponds to the decimal figure 312
usiVersTyp | Version type
 | Data type: |  | USINT
 | Value range: |  | 0 … 2 0: Release version 1: Beta version 2: Test version
usiVersTypeCycle | Cycle number, subversion for beta or test version
 | Data type: |  | USINT
 | Value range: |  | 0 … 255
udiMatNr | Order number
 | Data type: |  | UDINT
 | Value range: |  | 0 … UDINT
SVersion | String that combines all outputs within 32 Bits
 | Data type: |  | STRING
 | Value range: |  | 32 Bit
 | Structure of SVersion:
 | 32 Bits with 8 Half-Bytes: 0x12345678
 | Half-Byte 1: | Hardware detection, corresponds to Devicetyp
 | Half-Byte 2: | Software version uiVersNumber 1st digit
 | Half-Byte 3: | Software version uiVersNumber 2nd digit
 | Half-Byte 4: | Software version uiVersNumber 3rd digit
 | Half-Byte 5: | Version type, corresponds to uiVersType
 | Half-Byte 6 and 7: | Path interpolation installed, corresponds to usiVersTypeCycle
 | Half-Byte 8: | Bit 0: Dynamic curve calculation installed, corresponds to bMotionKey Bit 1: Reserved Bit 2: IEC 61131-3 programming Bit 3: Corresponds to bCNCKey
Command language
VNn | Read information about hardware and software
 | Value range for n: | n = No value (VN): Is equivalent to VN0 n = 0: Returns string with 32 Bits like SVersion in the function block (see above) n = 1: Outputs a detailed list on PTerm Example:
 | Version | 3.1.2 Feb 6 2013 11:30:17
 | Material Number: | 680055
 | Serial Number: | 111
 | Product Version: | 1.0
 | HW-Version: | UNDEF
 | PriBoLo: | v02.01
 | FPGA Driver: | v02.15
 | FPGA-File CAN/CAN: | v02.01.00
 | BSP-Version: | v01.02
 | HW-Type: | PMCprimo C 1300MHz CAN/CAN
 | HW-Revision: | 2
 | CPU-Family: | 0x006 Model:0x26 SteppingID:0x1
 | BIOS creation date: | 07/06/2012
 | MRAMData: | Ver:004 Size:524288 Reserved:160300
 | MAC primo: | 00:02:48:40:A1:15
 | MAC COM module: | 02:00:50:69:6C:7A
Linked functions
Function block | Command language | Function
--- | SK | Read software key


PR_TextOutput (PR)

Reference [image] Display [image] PR_TextOutput (PR)
PR_TextOutput (PR)
Show text on screen
Description
Library: Display
This function outputs an ASCII character string on the terminal.
Notes
IEC 61131-3 function block only:
Length of text max. 200 characters
Command language only:
–
Length of text max. 80 characters
–
A line break is inserted automatically at the end of the text.
–
A manual line break is inserted using the command PR'.
–
The text must be framed in inverted commas. Example: PR'This is a text'
–
A total of 800 PR commands are possible within programs.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
bStartCR_LF | Line break before the text
 | Data type: | BOOL
 | Value range: | TRUE: Line break before the text FALSE: No line break before the text
sText | ASCII character string to be output
 | Data type | STRING
 | Value range: | max. 200 characters
bEndCR_LF | Line break after the text
 | Data type: | BOOL
 | Value range: | TRUE: Line break after the text FALSE: No line break after the text
Command language
PR'Text' | ASCII character string to be output PR'': Manual line break
 | Value range for Text': | max. 80 characters


SetVelocityAveragingTime (VT)

Reference [image] Display [image] SetVelocityAveragingTime (VT)
SetVelocityAveragingTime (VT)
Set time period for calculating the average velocity
Description
Library: Display
This function sets a time period for determining the average velocity of a selected axis.
Notes
The time period specified by SetVelocityAveragingTime is used by the function blocks
–
DisplayVelocity for determining the average velocity
–
SetPhaseAdvanceFactor for calculating the phase displacement on electronic cams
When uiValue = 1 (default value in ms), no average velocity is determined.
DisplayVelocity shows the average velocity in the terminal program PTerm.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Set time period for determining the average velocity (in ms)
 | Data type: | UINT
 | Value range: | 1 … 10 000
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
VTn | Set time period for determining the average velocity (in ms)
 | Value range for n: | 1 … 10 000
 | Default value: | 1
Linked functions
Function block | Command language | Function
DisplayVelocity | DV | Display current or average velocity
SetPhaseAdvanceFactor | PA | Define output for phase displacement of an electronic cam


Additional commands in command language

Reference [image] Display [image] Additional commands in command language
Additional commands in command language
DM: Activate display mode
DO: Deactivate display mode
FM: Display free memory
LA: List data from the RAM of a PMCprimo
LC: List value of timer or counter
LE: Show error messages again


DM

Reference [image] Display [image] Additional commands in command language [image] DM
DM
Activate display mode
Description
This command activates display mode on the PMCprimo.
Notes
Values are output to the terminal
–
continuously, if DM0 is set. The interval between lines is 100 ms. The output is ended with DO.
–
n times, if DMn is set. The interval between lines is 1 ms.
Command language
DM[nn] | Activate display mode
 | Value range for nn: | 0: Continuous output every 100 ms 1 … 2 000 000 000 nn lines are output, interval between lines: 1 ms
 | Default value: | 0
 | Display on the terminal:
 |  | D: Demand position
 |  | P: Actual position
 |  | E: Lag distance
 |  | T: Time base in ms
 | Example output on the terminal:
 | D=0000918 P=0000918 E=+0000000 T=0000001
Linked functions
Command language | Function
DO | Deactivate display mode


DO

Reference [image] Display [image] Additional commands in command language [image] DO
DO
Deactivate display mode
Description
This command deactivates display mode DM and advanced display mode TR.
Notes
The axis is selected using the CH command.
Command language
DO
Deactivate display mode DM
Linked functions
Command language | Function
CH | Select axis
DM | Activate display mode
TR | Enable trace mode


FM

Reference [image] Display [image] Additional commands in command language [image] FM
FM
Display free memory
Description
This command displays the free memory.
Command language
FM | Display free memory
 | Display on the terminal:
 |  | Free RAM and Flash memory in kBytes
 | Example: |
 | 0.1: fm 0.1: Free RAM memory 36491 of 53448 kBytes Free Flash memory 3994419 of 4027056 kBytes


LA

Reference [image] Display [image] Additional commands in command language [image] LA
LA
List data from the RAM of a PMCprimo
Description
This command reads all the data from the RAM of a PMCprimo and displays it on the terminal.
Notes
This enables a full data backup of a PMCprimo. After the command is called, the data is also displayed on the terminal.
The SP command can be used to download the data to a motion controller.
The command also saves the parameters from connected servo amplifiers. They are saved in a program with a predefined name:
–
Name of program: DRIVE_PARA_n
–
n: Address of network subscriber
The program is called in order to download parameters to a servo amplifier.
LA can be cancelled at any time using ESC.
Command language
LA[n] | Read RAM
 | Value range for n: | 0: Read all 1: Read program without variables 2: Read variables 3: Read data from Flash memory 4: Read data from Flash memory in Motorola S-Record format. The format is suitable for downloading to the controller with the SP4 command. 5: Read data again when booting
 |  | 6: As 0; however, of the configuration data, only data that differs from the default value is output
Linked functions
Command language | Function
SP | Save data


LC

Reference [image] Display [image] Additional commands in command language [image] LC
LC
List value of timer or counter
Description
This command outputs the value of an output's timer or counter to the terminal.
Necessary settings in linked functions
For details of how to define the input for the timer or counter, see TK
Command language
LCg:n
Display value of the timer or counter output
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.
Linked functions
Command language | Function
TK | Define input for timer or counter


LE

Reference [image] Display [image] Additional commands in command language [image] LE
LE
Show error messages again
Description
This command outputs the most recent error messages to the terminal again.
Notes
The error messages are stored in non-volatile memory. They are also available after a restart.
Restarts, even those caused by a watchdog, are entered in the error list.
Command language
LEn | Show error messages again
 | Value range for n: | 0: Last 10 error messages since the device is in operation (volatile) 1: Last 100 error messages (non-volatile)


Drive

Reference [image] Drive
Drive
ASCIIToDrive: Open ASCII channel for servo amplifier
ClearDriveFault: Reset errors and warnings
DriveCommand: Send commands to servo amplifier


ASCIIToDrive (QA)

Reference [image] Drive [image] ASCIIToDrive (QA)
ASCIIToDrive (QA)
Open ASCII channel for servo amplifier
Description
Library: Drive
This function opens an ASCII channel to a servo amplifier. This enables commands to be entered in command language (see DriveCommand).
Notes
The parameter usiCanNetwork must always be set to "0". The motion controller PMC Primo C has only one logical CAN network.
The function ASCIIToDrive is axis-specific (usiChannel).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiCanNetwork | CAN network, must always be set to 0
 | Data type: | USINT
 | Value range: | 0
usiCanNode | CAN address of servo amplifier
 | Data type: | USINT
 | Value range: | 1 … 49: Address range for CANopen devices 51 … 150: Address range for SafetyNet devices
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
QAt | Opens an ASCII channel to a servo amplifier, enables commands to be entered
 | Value range for t: | 1 … 49: Address range for CANopen devices 51 … 150: Address range for SafetyNet devices
Linked functions
Function block | Command language | Function
DriveCommand | string | Send commands to servo amplifier


ClearDriveFault (CF)

Reference [image] Drive [image] ClearDriveFault (CF)
ClearDriveFault (CF)
Reset errors and warnings
Description
Library: Drive
This function resets all faults and warnings on a servo amplifier.
Notes
This function is axis-specific (parameters usiChannel and usiNode). The servo amplifier is mapped with CANPositionControlDrive.
The system waits until the servo amplifier is ready for operation again, if resetting the fault has triggered a restart.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CF
Resets all faults and warnings on a servo amplifier
Linked functions
Function block | Command language | Function
CANPositionControlDrive | PD | Define servo amplifier for transferring position values via CAN


DriveCommand (string)

Reference [image] Drive [image] DriveCommand (string)
DriveCommand (string)
Send commands to servo amplifier
Description
Library: Drive
This function is used to send commands in command language to a servo amplifier. The servo amplifier then executes the command.
Necessary settings in linked function blocks
Open ASCII channel for servo amplifier see ASCIIToDrive
Notes
Messages from the servo amplifier are written in the parameter diValue. An error is registered if an expected message fails to arrive.
A floating point value sent by the servo amplifier is multiplied by 1000. That way the value can be stored in diValue without losing the decimal places. Three decimal places are retained using this procedure.
Example: The GV command returns the floating point value "2.1". It is stored in diValue as "2100". Of course this mechanism only comes into effect if a floating point value is actually expected.
Command language only:
–
Messages from the servo amplifier are sent to PTerm. An error is registered if an expected message fails to arrive.
–
A command in command language is entered in inverted commas.
–
A command can be assigned to a variable.
–
When saving with the SP command, all drive parameters are stored as a program with the following name: DRIVE_t (t: CAN address of servo amplifier)
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sCommand | Send command to a servo amplifier in command language
 | Data type: | STRING(80)
 | Value range: | 80 characters
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Return value from servo amplifier
 | Data type: | DINT
Command language
"string" | Send command to a servo amplifier in command language
 | Value range for "string": | 80 characters
 | Default value: | 0
Linked functions
Function block | Command language | Function
ASCIIToDrive | QA | Open ASCII channel for servo amplifier


Encoder

Reference [image] Encoder
Encoder
DefineZeroMarkerInput: Define zero track of the encoder as reference input
SetEncoderFeedbackChannel: Read input of an encoder from another axis
SetEncoderFilterTime: Set filter for encoder
SetEncoderScaling: Scale master position
SetEncoderTimeout: Set monitoring of encoder signals
SetFeedbackEncoder: Select rotary encoder type
SetNumberOfBits: Set number of data bits on the SSI or CANopen encoder


DefineZeroMarkerInput (DZ)

Reference [image] Encoder [image] DefineZeroMarkerInput (DZ)
DefineZeroMarkerInput (DZ)
Define zero track of the encoder as reference input
Description
Library: Encoder
This function defines the zero track of the encoder as the reference input.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiDefine | Defines the zero track of the encoder as the reference input
 | Data type: | USINT
 | Value range: | 0: Zero track of the encoder not defined as the reference input 1: Zero track of the encoder defined as the reference input
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
DZn | Defines the zero track of the encoder as the reference input
 | Value range for n: | 0: Zero track of the encoder not defined as the reference input 1: Zero track of the encoder defined as the reference input
 | Default value: | 0


SetEncoderFeedbackChannel (FC)

Reference [image] Encoder [image] SetEncoderFeedbackChannel (FC)
SetEncoderFeedbackChannel (FC)
Read input of an encoder from another axis
Description
Library: Encoder
This function reads the input of an encoder on another axis.
Notes
usiNode / usiChannel indicates the axis that is to use the encoder of another axis.
usiValue defines the axis whose encoder will be used.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Diverts the input on an encoder to another axis
 | Data type: | USINT
 | Value range: | 0: Removes an existing diversion 1 … n: Number of the axis that is assigned to the encoder
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FCnn | Diverts the input on an encoder to another axis
 | Value range for nn: | 0 … 60: Number of the axis that is assigned to the encoder
 | Default value: | 0
Linked functions
Function block | Command language | Function
DefineReferenceInput | DR | Define input as reference input
DefineZeroMarkerInput | DZ | Define zero track of the encoder as reference input


SetEncoderFilterTime (PT)

Reference [image] Encoder [image] SetEncoderFilterTime (PT)
SetEncoderFilterTime (PT)
Set filter for encoder
Description
Library: Encoder
This function averages the signals received from an encoder over a period that is to be defined.
Notes
The function is used to smooth turbulent encoder signals.
–
Example: The torque peak on the master axis also affects the slave axis. This effect can be removed or at least reduced by the filter.
The function can only be used on an open loop axis.
Please note: On an open loop axis, reaction times to changes in velocity are extended due to averaging. The averaged position also has a static offset.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Sets a filter time in ms, through which the encoder signals are averaged
 | Data type: | USINT
 | Value range: | 0 … 10 000 ms
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PTnn | Sets a filter time in ms, through which the encoder signals are averaged
 | Value range for nn: | 0 … 10 000 ms


SetEncoderScaling (MS)

Reference [image] Encoder [image] SetEncoderScaling (MS)
SetEncoderScaling (MS)
Scale master position
Description
Library: Encoder
This function scales the master position. The master position is multiplied by the factor 2n.
Necessary settings in linked function blocks
Set filter for encoder see SetEncoderFilterTime
Notes
This function only makes sense if the position of the master is averaged using the function SetEncoderFilterTime, otherwise the positional changes are too great.
In conjunction with the function SetEncoderFilterTime, the resolution of the measuring system is increased. This procedure is used if the slave axis with a high transmission ratio is to follow the master axis. With a ratio of 10:1, for each increment that the master axis moves, the slave axis would need to move 10 increments. The consequence would be increased motor noise and higher temperatures. This effect is reduced by lowering the transmission ratio when the position is averaged and scaled.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Scales the position of the master axis by multiplying by the factor 2n, n=usiValue
 | Data type: | USINT
 | Value range: | 0: Switched off 1 … 8
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MSnn | Scales the position of the master axis by multiplying by the factor 2n
 | Value range for n: | 0: Switched off 1 … 8
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetEncoderFilterTime | PT | Set filter for encoder


SetEncoderTimeout (TO)

Reference [image] Encoder [image] SetEncoderTimeout (TO)
SetEncoderTimeout (TO)
Set monitoring of encoder signals
Description
Library: Encoder
This function sets a monitoring function for the encoder signals.
Necessary settings in linked function blocks
Set Bit 6 of SetControlWord
Notes
Bit 6 of SetControlWord determines whether a monitoring time or a monitoring path is to be defined (see input interface)
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Sets a value for monitoring the encoder signal
 | Data type: | UINT
 | Value range: | 1 … 2 000 000 ms or increments
 | Default value | 500
 | Bit 6 of SetControlWord | 0: Once a movement has started, PMCprimo C must receive an encoder signal within the set monitoring time. PMCprimo C switches off the controller enable (power to the motor is removed) if an encoder signal is not received before the monitoring time has elapsed. 1: Once a movement has started, PMCprimo C must receive an encoder signal within the set path (set point specification). PMCprimo C switches off the controller enable (power to the motor is removed) if an encoder signal is not received before the monitoring path has elapsed.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
TOnn | Sets a value for monitoring the encoder signal
 | Value range for nn: | 1 … 2 000 000 ms or increments
 | Default value: | 500
 | Bit 6 of CW | 0: Once a movement has started, PMCprimo C must receive an encoder signal within the set monitoring time. PMCprimo C switches off the controller enable (power to the motor is removed) if an encoder signal is not received before the monitoring time has elapsed. 1: Once a movement has started, PMCprimo C must receive an encoder signal within the set path (set point specification). PMCprimo C switches off the controller enable (power to the motor is removed) if an encoder signal is not received before the monitoring path has elapsed.
Linked functions
Function block | Command language | Function
SetControlWord | CW | Set switch-on behaviour


SetFeedbackEncoder (FS)

Reference [image] Encoder [image] SetFeedbackEncoder (FS)
SetFeedbackEncoder (FS)
Select rotary encoder type
Description
Library: Encoder
This function sets the encoder system for each axis.
Necessary settings in linked function blocks
Set number of data bits on the SSI or CANopen encoder see SetNumberOfBits
Set direction of rotation see Bit 5 SetControlWord
Define servo amplifier for transferring position values via CAN see CANPositionControlDrive
Notes
Encoder systems that can be set:
–
Incremental encoder (usiValue=0 … 2 and 28)
–
Encoder with SSI interface (usiValue=5 … 8)
–
Encoder with CANopen interface (usiValue=9 … 10)
Setpoints can be transmitted via CANopen:
Control is possible with a PMCprimo C or servo amplifier. The following operating modes are available:
–
usiValue=19, 20: Transmission of speed setpoint values to the servo amplifier. Position control is undertaken by the PMCprimo C.
–
usiValue=21 … 27: Transmission of position setpoint values to the servo amplifier. Position control is undertaken by the servo amplifier.
Please note: "syncsrc 3" must be set on the servo amplifiers PMCprotego or PMCtendoDD5, if it has been selected using CANPositionControlDrive.
usiValue=21 … 27: The demand position is sent via the CAN network. Position control is undertaken by the servo amplifier and not the PMCprimo C.
usiValue=21, 22, 24 and 25: The servo amplifier's latch function can be activated. The commands IN1MODE (input 1) or IN2MODE (input 2) must be set to 26 on the servo amplifier. The reference sensor is connected to the digital input on the servo amplifier. However, it's essential to note that these settings must be saved and then the servo amplifier cold started (SAVE and COLDSTART commands).
usiValue=21, 22: Referencing is fully supported. See the following functions
–
InitialisePosition
–
SetReferenceMode
–
SetReferenceOptionsWord
–
SetReferenceOptionWord
–
SetReferenceFalseHighLimit
–
SetReferenceFalseLowLimit
–
SetReferenceTrueHighLimit
–
SetReferenceTrueLowLimit.
The commands DefineZeroMarkerInput and DefineReferenceInput may not be used. The servo amplifiers do not signal anything back, so a reference input cannot be defined on the PMCPrimo C. The references are recorded automatically.
usiValue=24 … 26 works in a similar way to usiValue=21 … 23:
–
The servo amplifier's internal position control loop is used. The reference function using the commands “IN1MODE 26” or “IN2MODE 26” is also possible.
–
The drag error and actual current are also downloaded for diagnostic purposes. In order to downloaded the correct value, the commands "PGEARI“ and "PGEARO" are automatically set to 1 048 576 (with PRBASE=20) or 65 536 (with PRBASE=16). The maximum drag error (PEMAX) must be adapted in accordance with the required drag error limit. This setting increases the bus load. So if the output of the drag error or the actual current is no longer needed, the setting should be switched back to usiValue= 21 … 23.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Set encoder type and operating mode
 | Data type: | USINT
 | Value range: | 1 … 35
 | Default value | 0
0 | Incremental encoder, quadruple pulse evaluation
1 | Incremental encoder, double pulse evaluation
2 | Incremental encoder, single pulse evaluation
3 … 4 | Reserved
5 | Encoder with SSI interface, relative position, binary code, 300 kHz
6 | Encoder with SSI interface, relative position, gray code, 300 kHz
7 | Encoder with SSI interface, absolute position, binary code, 300 kHz
8 | Encoder with SSI interface, absolute position, gray code, 300 kHz
9 | Encoder with CANopen interface, relative position
10 | Encoder with CANopen interface, absolute position
11 … 18 | Reserved
19 | Servo amplifier, rotational speed via CANopen, relative evaluation with transmission of actual position and actual current (select servo amplifier using CANPositionControlDrive)
20 | Servo amplifier, rotational speed via CANopen, absolute evaluation with transmission of actual position and actual current (select servo amplifier using CANPositionControlDrive)
21 | Servo amplifier, demand position via CANopen, relative evaluation, positive reference signal (select servo amplifier using CANPositionControlDrive)
22 | Servo amplifier, demand position via CANopen, relative evaluation, negative reference signal (select servo amplifier using CANPositionControlDrive)
23 | Servo amplifier, demand position via CANopen, absolute evaluation, offset set via SetReferenceOffset (select servo amplifier using CANPositionControlDrive)
24 | Servo amplifier, demand position via CANopen, relative evaluation, positive reference signal with transmission of drag error and actual current. (Select servo amplifier using CANPositionControlDrive)
25 | Servo amplifier, demand position via CANopen, relative evaluation, negative reference signal with transmission of drag error and actual current. (Select servo amplifier using CANPositionControlDrive)
26 | Servo amplifier, demand position via CANopen, absolute evaluation, offset setting via SetReferenceOffset with transmission of drag error and actual current. (Select servo amplifier using CANPositionControlDrive)
27 | Servo amplifier, only demand position via CANopen. This setting is suitable for devices from third party manufacturers that support "Interpolate Position Mode" in accordance with DS402 (select servo amplifier using CANPositionControlDrive)
28 | Incremental encoder, quadruple pulse evaluation, relative position via CANopen. (Select servo amplifier using CANPositionControlDrive)
29 | Mode for asynchronous motors, the servo amplifier receives a speed setpoint value, no actual values are expected in return Setting with PMCprotego or PMCtendo DD5: "PGEARI:=4096" and "STOPMODE:=0"
30 | Servo amplifier, demand position and actual position via CANopen, relative evaluation, positive reference signal (select servo amplifier using CANPositionControlDrive)
31 | Servo amplifier, demand position and actual position via CANopen, relative evaluation, negative reference signal (select servo amplifier using CANPositionControlDrive)
32 | Servo amplifier, demand position and actual position via CANopen, absolute evaluation, set offset via SetReferenceOffset (select servo amplifier using CANPositionControlDrive)
33 | Servo amplifier, demand position, actual position and current via CANopen, relative evaluation, positive reference signal (select servo amplifier using CANPositionControlDrive)
34 | Servo amplifier, demand position, actual position and current via CANopen, relative evaluation, negative reference signal (select servo amplifier using CANPositionControlDrive)
35 | Servo amplifier, demand position, actual position and current via CANopen, absolute evaluation, set offset via SetReferenceOffset (select servo amplifier using CANPositionControlDrive)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FSnn | Set encoder type and operating mode
 | Value range for nn: | 1 … 35 (see usiValue on function block)
 | Default value: | 0
Linked functions
Function block | Command language | Function
CANPositionControlDrive | PD | Define servo amplifier for transferring position values via CAN
DefineReferenceInput | DR | Define input as reference input
DefineZeroMarkerInput | DZ | Define zero track of the encoder as reference input
EnablePositionControl | PC | Enable position control loop
InitialisePosition | IN | Initialise position counter
SetControlWord | CW | Set switch-on behaviour
SetNumberOfBits | NB | Set number of data bits on the SSI or CANopen encoder
SetReferenceFalseHighLimit | FH | Set upper limit for reference input FALSE
SetReferenceFalseLowLimit | FL | Set lower limit for reference input FALSE
SetReferenceFilterOptionWord | FW | Set reference filter
SetReferenceMode | RM | Activate cyclical referencing
SetReferenceOffset | RF | Set reference offset
SetReferenceOptionsWord | RW | Preset reference behaviour
SetReferenceTrueHighLimit | ZH | Set upper limit for reference input TRUE
SetReferenceTrueLowLimit | ZL | Set lower limit for reference input TRUE


SetNumberOfBits (NB)

Reference [image] Encoder [image] SetNumberOfBits (NB)
SetNumberOfBits (NB)
Set number of data bits on the SSI or CANopen encoder
Description
Library: Encoder
This function defines the number of data bits on encoders with SSI and CANopen interface.
Notes
Single-turn encoders up to 12 Bit and multi-turn encoders up to 32 Bit can be used.
Please note the following when transferring position values from and to the servo amplifier (SetFeedbackEncoder, usiValue=19 … 27):
The last 12 Bits of the value in usiValue are reserved for the number of revolutions. The remaining bits indicate the resolution per revolution.
Example: When usiValue=28, the resolution of the motor is 65 536 increments per revolution.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Number of data bits
 | Data type: | USINT
 | Value range: | 12 … 32
 | Default value | 24
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
NBnn | Number of data bits
 | Value range for nn: | 12 … 32
 | Default value: | 24
Linked functions
Function block | Command language | Function
SetFeedbackEncoder | FS | Select rotary encoder type


Mapping

Reference [image] Mapping
Mapping
DefineMap: Define position mapping table
ExecuteInverseMapVirtual: Query master position
ExecuteMap: Activate position mapping table
ExecuteMapVirtual: Query slave position
GetMappedMasterBound: Read current cycle length of slave axis
GetWrapAroundOffset: Read offset of slave axis during zero crossing of master axis
LengthOfAlignmentMove: Read length of alignment run
MapLinkSlaveToDifferentialMaster: Define slave axis for a second master axis
MapLinkSlaveToMaster: Define slave and master axis
Motiongenerator: Calculate position mapping table
SetAlignmentAcceleration: Set alignment acceleration
SetClutchLength: Set length for software coupling
SetClutchTime: Set time for software coupling
SetClutchWindow: Set start window for software coupling
SetMapAdjustmentVelocity: Set alignment velocity
SetMapBaseAdvance: Calculate phase displacement for master position offset
SetMapBaseAdvanceTimeConstant: Average velocity for calculating phase displacement of master position
SetMapBaseOffset: Set master position offset
SetMapLinkOptionsWord: Set coupling between slave and master axis
SetMapOptionsWord: Set position mapping
SetMapPositionTimeout: Set monitoring time for master positions
SetMapScaleFromBounds: Calculate transmission ratio
SetPositionBound: Set cycle length
SetPositionOverflowCounter: Set overflow counter
SetScaleMapping: Set transmission ratio
SetSlaveMapOffset: Set offset for slave position
TransferMapData: Transfer position mapping table to axis
UnlinkSlaveToMaster: Cancel assignment of Slave to Master axis
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


DefineMap (EM/NM)

Reference [image] Mapping [image] DefineMap (EM/NM)
DefineMap (EM/NM)
Define position mapping table
Description
Library: Mapping
This function creates a table, which maps the positions of master and slave to each other.
Notes
The table contains
–
The cycle length of the master,
–
Value pairs, which map a master position to a slave position.
The table consists of at least two value pairs:
–
Slave position at master position "0"
–
Slave position at the end of the master's cycle
Example:
–
Cycle length of master diMasterBound=1000
–
Number of slave positions iSteps=5
–
Slave positions: 0,100,340,480,600, i.e. pdiSlavepos=0,100,340,480,600
The number of arrays in pdiSlavepos must match that in iSteps
–
Position mapping table:
The master positions are divided linearly between 0 and 1000.
Master | Slave
0 | 0
250 | 100
500 | 340
750 | 480
1000 | 600
Command language only:
–
EM is used to create the position mapping table, NM to complete it.
–
The table is created in a dialogue box:
1. Enter ENName: The entry is started. Name is the name of the table.
2. Enter Cycle length of master
3. Enter Number of values
4. Enter slave positions, each value, starting with the slave position when the master position = 0, complete with ENTER
4. Close table with NM
–
A table is deleted as follows:
1. Enter ENName: Name is the name of the table. The following prompt appears: Cycle length of master.
2. End entries with NM. The table is deleted.
–
To display a position mapping table, see LM.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
diMasterBound | Cycle length of master in increments
 | Data type: | DINT
 | Value range: | 1 … 2 000 000 000
iSteps | Number of slave positions
 | Data type: | INT
 | Value range: | 2 … 65 536
pdiSlavepos | List containing the position values of the slave in increments
 | Data type: | POINTER TO DINT
 | Value range: | ±2 000 000 000 for each element in the ARRAY
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
EMName | Name of position mapping table
 | Value range for Name: | String with maximum 80 characters The other entries are made in a dialogue box (see above under "Notes").
NM | Complete entry and save table.


ExecuteInverseMapVirtual (XI)

Reference [image] Mapping [image] ExecuteInverseMapVirtual (XI)
ExecuteInverseMapVirtual (XI)
Query master position
Description
Library: Mapping
This function determines the master position at a specified slave position.
Necessary settings in linked function blocks
Activate position mapping table see ExecuteMap
Transfer position mapping table to axis see TransferMapData
Define slave and master axis see MapLinkSlaveToMaster
If an offset needs to be considered, please also refer to:
Set offset for slave position see SetSlaveMapOffset
Set master position offset see SetMapBaseOffset
Notes
The first master position is output, if several master positions are available.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
diPosition | Slave position at which the corresponding master position is determined, in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Master position in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
XIName, nn | Poll master position at a specified slave position
 | Value range for |
 | Name: | Name of position mapping table 80 characters
 | nn:: | Slave position in increments ±2 000 000 000
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
MapLinkSlaveToMaster | ML | Define slave and master axis
SetMapBaseOffset | MB | Set master position offset
SetSlaveMapOffset | MF | Set offset for slave position
TransferMapData | TM | Transfer position mapping table to axis


ExecuteMap (XM)

Reference [image] Mapping [image] ExecuteMap (XM)
ExecuteMap (XM)
Activate position mapping table
Description
Library: Mapping
This function activates a position mapping on the slave axis.
Necessary settings in linked function blocks
The following functions must be activated before running ExecuteMap:
1.
Define slave and master axis see MapLinkSlaveToMaster
2.
Transfer position mapping table to axis see TransferMapData
Notes
The position of the master axis is automatically forwarded from the controller to the slave axis, if the axes have been connected.
The positions can be mapped while the axes are stationary or when moving.
–
Activate when master axis is stationary:
SetMapOptionsWord Bit 1=0: The slave axis moves at SetVelocity to the position mapped for it according to the position of the master axis.
SetMapOptionsWord Bit 1=1: When software coupling is active, the slave axis is stationary until the master axis is in the position that corresponds to position mapping and then engages. The velocity of the master axis should be averaged usingSetMapBaseAdvanceTimeConstant.
If the master is moving at a velocity less than or equal to 500 increments/s, the slave axis engages even without software coupling.
–
Activate when master axis is moving:
To activate position mapping, SetMapOptionsWord Bit 1=1 must be set.
The stop and abort commands deactivate a position mapping.
Linear position mapping is already pre-defined by the name LINEAR. LINEAR position mapping is used specifically for executing transmission ratios using SetScaleMapping (see diagram).
When tension control mode is activated, the execution of ExecuteMap (see SetAnalogueControlMode) is influenced by SetAnalogueControlWord Bit 4 and 5.
Command language only:
–
Active position mapping is registered on the terminal with an "X" on the selected slave axis.
–
If Name is not stated, the position table that is currently active is output.
–
If the XM command is used in a command line (multiple commands in one line), all subsequent commands will only be executed once the slave axis is aligned or the slave access has engaged with the master axis.
–
XM may be assigned to a variable. The variable’s current table number is transferred. 0xFFFF is transferred if position mapping is inactive.
Diagram
Position mapping between master and slave axis:
slave position: Position of slave axis
master position: Position of master axis
SetScaleMapping 1:1: Transmission ratio 1:1, set using SetScaleMapping
non-linear: Non-linear position mapping
SetScaleMapping 1:2: Transmission ratio 1:2, set using SetScaleMapping
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
XM[Name] | Activate position mapping on the slave axis
 | Value range for Name: | Name of position mapping table 80 characters
Linked functions
Function block | Command language | Function
MapLinkSlaveToMaster | ML | Define slave and master axis
SetAnalogueControlMode | AM | Activate analogue control mode
SetAnalogueControlWord | AW | Set behaviour of analogue control mode
SetMapBaseAdvanceTimeConstant | BT | Average velocity for calculating phase displacement of master position
SetMapOptionsWord | MW | Set position mapping
SetScaleMapping | SM | Set transmission ratio
SetVelocity | SV | Set velocity
TransferMapData | TM | Transfer position mapping table to axis


ExecuteMapVirtual (XV)

Reference [image] Mapping [image] ExecuteMapVirtual (XV)
ExecuteMapVirtual (XV)
Query slave position
Description
Library: Mapping
This function determines the slave position at a specified master position.
Necessary settings in linked function blocks
Activate position mapping table see ExecuteMap
Transfer position mapping table to axis see TransferMapData
Define slave and master axis see MapLinkSlaveToMaster
If an offset needs to be considered, please also refer to:
Set offset for slave position see SetSlaveMapOffset
Set master position offset see SetMapBaseOffset
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
diPosition | Master position at which the corresponding slave position is determined, in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Slave position in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
XVName, nn | Poll slave position at a specified master position
 | Value range for |
 | Name: | Name of position mapping table
 | nn: | Master position in increments ±2 000 000 000
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
MapLinkSlaveToMaster | ML | Define slave and master axis
SetMapBaseOffset | MB | Set master position offset
SetSlaveMapOffset | MF | Set offset for slave position
TransferMapData | TM | Transfer position mapping table to axis


GetMappedMasterBound (GM)

Reference [image] Mapping [image] GetMappedMasterBound (GM)
GetMappedMasterBound (GM)
Read current cycle length of slave axis
Description
Library: Mapping
This function reads the current cycle length of a slave axis.
Notes
The output diValue depends on SetMapOptionsWord Bit 7
–
Bit 7:=1 and position mapping is activated: The cycle length of the slave is adapted to the position mapping table and transmission ratio. The value of the output diValue is calculated.
–
Bit 7:=0 or position mapping is not activated: diValue outputs the value that is set using SetPositionBound.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Current cycle length of the slave axis in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
GM | Current cycle length of the slave axis in increments
 | Value range: | 0 … 2 000 000 000
Linked functions
Function block | Command language | Function
MapLinkSlaveToMaster | ML | Define slave and master axis
SetMapBaseOffset | MB | Set master position offset
SetMapOptionsWord | MW | Set position mapping
SetPositionBound | SB | Set cycle length
SetScaleMapping | SM | Set transmission ratio
SetSlaveMapOffset | MF | Set offset for slave position


GetWrapAroundOffset (GW)

Reference [image] Mapping [image] GetWrapAroundOffset (GW)
GetWrapAroundOffset (GW)
Read offset of slave axis during zero crossing of master axis
Description
Library: Mapping
This function reads the offset of the slave axis during zero crossing of the master axis.
Notes
The offset SetMapBaseOffset of the master position and the offset SetSlaveMapOffset of the slave position are not taken into account.
There is no drift if diValue remains constant over this period. Potential discrepancies can be corrected if SetMapOptionsWord Bit 7 is set. The value of the output is calculated and is valid when position mapping has been activated. The position mapping table must be checked if a correction cannot be made in this way.
In the simplest scenario, diValue=0 or ± cycle length if the cycle lengths of the master and slave axis are the same.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Offset of slave axis in increments
 | Data type: | DINT
 | Value range: | 0 … DINT
Command language
GW | Offset of slave axis in increments
 | Value range: | 0 … 2 000 000 000
Linked functions
Function block | Command language | Function
SetMapBaseOffset | MB | Set master position offset
SetMapOptionsWord | MW | Set position mapping
SetSlaveMapOffset | MF | Set offset for slave position


LengthOfAlignmentMove (XX)

Reference [image] Mapping [image] LengthOfAlignmentMove (XX)
LengthOfAlignmentMove (XX)
Read length of alignment run
Description
Library: Mapping
This function determines the value for a necessary alignment run.
Necessary settings in linked function blocks
Software coupling is not activated see SetMapOptionsWord Bit 0:=0
Transfer position mapping table to axis see TransferMapData
Define slave and master axis see MapLinkSlaveToMaster
Notes
The function determines the value diValue of the necessary alignment run for the position mapping table sMapName. As a result it enables the alignment run to be checked before running ExecuteMap.
LengthOfAlignmentMove must be executed on the slave axis.
Application: Alignment run through execution of MoveRelativePosition.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
Output interface
diValue | Determined alignment run in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
bDone, bError and iErrorNumber see Function blocks
Command language
XXName | Name of position mapping table
 | Value range for Name: | 80 characters
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
MapLinkSlaveToMaster | ML | Define slave and master axis
MoveRelativePosition | MR | Relative positioning
SetMapOptionsWord | MW | Set position mapping
TransferMapData | TM | Transfer position mapping table to axis


MapLinkSlaveToDifferentialMaster (NL)

Reference [image] Mapping [image] MapLinkSlaveToDifferentialMaster (NL)
MapLinkSlaveToDifferentialMaster (NL)
Define slave axis for a second master axis
Description
Library: Mapping
This function maps a second master axis to a slave axis.
Notes
The function must be executed before position mapping.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiLinkNode | Node number of network subscriber that is to act as the second master axis
 | Data type: | USINT
 | Value range: | 0: Only one subscriber 1 … n: System-dependent
usiLinkChannel | Number of the axis that is to act as the second master axis
 | Data type: | USINT
 | Value range: | 1 … n: System-dependent
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
NLt.n | Map slave axis to a second master axis
 | Value range for |
 | t: | Node number of network subscriber that is to act as the second master axis 0: Only one subscriber 1 … n: System-dependent
 | n: | Number of the axis that is to act as the second master axis 1 … n: System-dependent


MapLinkSlaveToMaster (ML)

Reference [image] Mapping [image] MapLinkSlaveToMaster (ML)
MapLinkSlaveToMaster (ML)
Define slave and master axis
Description
Library: Mapping
This function maps a master axis (usiLinkNode, usiLinkChannel) to a slave axis (usiNode, usiChannel).
Notes
The function must be executed before position mapping.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiLinkNode | Node number of network subscriber that is to act as the master axis
 | Data type: | USINT
 | Value range: | 0: Only one subscriber 1 … n: System-dependent
usiLinkChannel | Number of the axis that is to act as the master axis
 | Data type: | USINT
 | Value range: | 1 … n: System-dependent
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MLt.n | Map slave axis to a second master axis
 | Value range for |
 | t: | Node number of network subscriber that is to act as the master axis 0: Only one subscriber 1 … n: System-dependent
 | n: | Number of the axis that is to act as the master axis 1 … n: System-dependent


Motion generator

Reference [image] Mapping [image] Motion generator
Motion generator
Calculate position mapping table
Description
Library: Mapping
This function calculates a position mapping table. Numerous mathematical functions (segment types) are available for the course of the curve between the table values (segment).
Notes
A position mapping table is simple to create using the Pilz PMotion tool. PMotion is opened by double-clicking on the function block. Once the table has been created, the parameters of the function block or the variables in command language are automatically assigned by PMotion.
INFORMATION
Information on the motion generator, a detailed description of the mathematical functions and applications can be found in the PMotion operating manual.
Command language only:
The variable assignment should preferably be embedded in a program (see ES, NS). The position mapping table can then be generated by calling the program (see XS).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
sMapName | Name of mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
iSteps | Number of calculated values that the mapping table contains
 | Data type | INT
 | Value range: | 2 … 100 000
iNumberElements | Number of segments
 | Data type: | USINT
 | Value range: | 1 … 100
The following parameters apply per segment. The values form an array. The segment itself is described by the array index. x:=0 corresponds to the first segment x:=1 corresponds to the second segment … x:=n corresponds to the nth segment |  |
pdiMasterpos[x] | Master position at the start of the segment
 | Data type: | ARRAY OF DINT
 | Value range: | ±2 000 000 000
pdiSlavepos[x] | Slave position at the start of the segment
 | Data type: | ARRAY OF DINT
 | Value range: | ±2 000 000 000
pdiFunction[x] | Mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed
pdiValuesA[x] | Value A, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesB[x] | Value B, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesC[x] | Value C, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesW[x] | Value W, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesX[x] | Value X, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesY[x] | Value Y, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
pdiValuesZ[x] | Value Z, may not be needed depending on the mathematical function
 | Data type: | ARRAY OF DINT
 | Value range: | 32 Bit signed depending on function
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
$MSTART | Start command
 | Value range: | 1: Start
$MNAME | Name of mapping table
 | Value range: | 80 characters
$MNPT | Number of calculated values that should be contained in the mapping table
 | Value range: | 2 … 100 000
The number of segments does not need to be stated. It is defined by the number of assigned variables. x:=0 corresponds to the first segment x:=1 corresponds to the second segment … x:=n corresponds to the nth segment |  |
$MMx | Master position at the start of the segment
 | Value range for x: | ±2 000 000 000
$MSx | Slave position at the start of the segment
 | Value range for x: | ±2 000 000 000
$MFx | Mathematical function
 | Value range for x: | 32 Bit signed
$MAx | Value A, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MBx | Value B, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MCx | Value C, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MWx | Value W, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MXx | Value X, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MYx | Value Y, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
$MZx | Value Z, may not be needed depending on the mathematical function
 | Value range for x: | 32 Bit signed depending on function
Linked functions
Function block | Command language | Function
--- | ES | Enter program
--- | NS | End of program entry
ExecuteSequence | XS | Call program in command language


SetAlignmentAcceleration (AA)

Reference [image] Mapping [image] SetAlignmentAcceleration (AA)
SetAlignmentAcceleration (AA)
Set alignment acceleration
Description
Library: Mapping
This function defines an acceleration ramp until the alignment velocity SetMapAdjustmentVelocity is reached.
Notes
The function is applied when a new demand position results from the use of the following values:
–
Offset of the master position: SetMapBaseOffset
–
Offset of the slave position: SetSlaveMapOffset
–
Transmission ratio of master to slave axis SetScaleMapping
It is accelerated quickly when udiAcceleration:=0.
The lowest acceleration that can be set is udiAcceleration:=1000.
The function is set on the slave axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiAcceleration | Acceleration in increments/s2
 | Data type: | UDINT
 | Value range: | 0 and 1000 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AAnn | Acceleration in increments/s2
 | Value range for nn: | 0 and 1000 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetMapAdjustmentVelocity | AV | Set alignment velocity
SetMapBaseOffset | MB | Set master position offset
SetScaleMapping | SM | Set transmission ratio
SetSlaveMapOffset | MF | Set offset for slave position


SetClutchLength (CL)

Reference [image] Mapping [image] SetClutchLength (CL)
SetClutchLength (CL)
Set length for software coupling
Description
Library: Mapping
This function defines a distance for the master axis, within which the slave axis must have engaged.
Necessary settings in linked function blocks
Software coupling is activated see SetMapOptionsWord Bit 0:=1
Execute coupling with the set clutch length, see SetMapOptionsWord Bit 5:=1.
Notes
This function is designed for connecting the slave axis to a moving master axis. It operates as a mechanical fixed point coupling, which engages with exact precision while moving. The slave axis waits until the master axis reaches the synchronisation position.
Please note: usiNode and usiChannel refer to the slave axis; the stated distance udiValue applies to the master axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Length of software coupling in increments
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CLn | Length of software coupling in increments
 | Value range for n: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetMapOptionsWord | MW | Set position mapping


SetClutchTime (CT)

Reference [image] Mapping [image] SetClutchTime (CT)
SetClutchTime (CT)
Set time for software coupling
Description
Library: Mapping
This function defines a time, within which the slave axis must have engaged with the master axis.
Necessary settings in linked function blocks
Software coupling is activated see SetMapOptionsWord Bit 0:=1
Execute coupling with the set clutch time, see SetMapOptionsWord Bit 5:=0.
Notes
This function defines the time for the acceleration ramp (see diagram).
This function is designed for connecting the slave axis to a moving master axis. It operates as a mechanical fixed point coupling, which engages with exact precision while moving. The slave axis waits until the master axis reaches the synchronisation position.
Diagram
Software coupling with SetClutchTime
v: Velocity
t: Time
v master: Velocity of master axis
v slave: Velocity of slave axis
t1: Start of clutch time SetClutchTime
t2: Once the clutch time SetClutchTime has elapsed, master and slave will run synchronously
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiClutchtime | Time of software coupling in milliseconds
 | Data type: | UDINT
 | Value range: | 1 … 20 000
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CTn | Time of software coupling in milliseconds
 | Value range for n: | 1 … 20 000
 | Default value: | 1
Linked functions
Function block | Command language | Function
SetMapOptionsWord | MW | Set position mapping


SetClutchWindow (CI)

Reference [image] Mapping [image] SetClutchWindow (CI)
SetClutchWindow (CI)
Set start window for software coupling
Description
Library: Mapping
This function defines a start window for the software coupling.
Notes
The function depends on the state of the master axis and the mapping type:
The master axis is stationary, uiValue does not equal 0
–
Correction path is less than uiValue:
An alignment run is always executed.
SetMapOptionsWord Bit 0 is not taken into account.
–
Correction path is greater than uiValue:
SetMapOptionsWord Bit 0=1: Software coupling,
SetMapOptionsWord Bit 0=0: No software coupling, slave axis moves to demand position
SetMapOptionsWord Bit 2 and 3 are taken into account.
–
The master axis is moving:
SetClutchWindow is not taken into account. SetMapOptionsWord Bit 0 comes back into force.
SetClutchWindow is not taken into account during
–
Velocity mapping (SetMapOptionsWord Bit 4:=1) and
–
Tension control mode.
–
SetMapOptionsWord Bit 2 and 3 are not taken into account.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Start window in increments
 | Data type: | UINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CIn | Start window in increments
 | Value range for n: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetMapOptionsWord | MW | Set position mapping


SetMapAdjustmentVelocity (AV)

Reference [image] Mapping [image] SetMapAdjustmentVelocity (AV)
SetMapAdjustmentVelocity (AV)
Set alignment velocity
Description
Library: Mapping
This function limits the alignment velocity during an alignment run.
Notes
The function is applied when a new demand position results from the use of the following values:
–
Offset of the master position: SetMapBaseOffset
–
Offset of the slave position: SetSlaveMapOffset
–
Transmission ratio of master to slave axis SetScaleMapping
A change in position due to these values is not adjusted with a dramatic setpoint change, if udiPercent≠0.
The alignment velocity is stated as a percentage of the current demand velocity.
Examples:
–
usiPercent=100: The alignment velocity is 0 … 2 times the demand velocity
–
usiPercent=10: The alignment velocity is 0.9 … 1.1 times the demand velocity
The alignment is executed at creep velocity SetSlowSpeedif the current demand velocity is 0.
usiPercent is specified on the slave axis.
Command language only:
The parameter x enables percentage values of less than 1. In this case the parameter n is multiplied by 0.1X. Examples:
–
n=5, x=1: 5% · (0.11)=5% · 0.1=0.5%
–
n=12, x=3: 12% · (0.13)=12% · 0.001=0.012%
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiPercent | Factor as %
 | Data type: | USINT
 | Value range: | 0 … 200
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AVn,[x]n | Factor as % and multiplier
 | Value range for |
 | n: | Factor as % 0 … 200
 | x: | Multiplier 0.1X 0 … 6
Linked functions
Function block | Command language | Function
SetMapBaseOffset | MB | Set master position offset
SetScaleMapping | SM | Set transmission ratio
SetSlaveMapOffset | MF | Set offset for slave position
SetSlowSpeed | SS | Set velocity for creep speed


SetMapBaseAdvance (BA)

Reference [image] Mapping [image] SetMapBaseAdvance (BA)
SetMapBaseAdvance (BA)
Calculate phase displacement for master position offset
Description
Library: Mapping
This function creates a velocity-dependent phase displacement for the master position offset SetMapBaseOffset.
Necessary settings in linked function blocks
Set master position offset, see SetMapBaseOffset
Notes
Calculation of phase displacement:
Offset phase displacement = (Velocity of master axis / 256) · (diPhase / 256). Unit for velocity of master axis: Increments/second.
Examples:
Velocity of master axis = 10 000 increments/second, diPhase = 200, of which the offset phase displacement = 30 increments
The velocity of the master axis is averaged usingSetMapBaseAdvanceTimeConstant.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diPhase | Factor for calculating the phase displacement
 | Data type: | DINT
 | Value range: | 0 … 2 000 000 000 Value of 1 corresponds to 15.625 µs Example: Value of 64 corresponds to 1 ms
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BAn | Factor for calculating the phase displacement
 | Value range for n: | 0 … 2 000 000 000 Value of 1 corresponds to 15.625 µs Example: Value of 64 corresponds to 1 ms
Linked functions
Function block | Command language | Function
SetMapBaseAdvanceTimeConstant | BT | Average velocity for calculating phase displacement of master position
SetMapBaseOffset | MB | Set master position offset


SetMapBaseAdvanceTimeConstant (BT)

Reference [image] Mapping [image] SetMapBaseAdvanceTimeConstant (BT)
SetMapBaseAdvanceTimeConstant (BT)
Average velocity for calculating phase displacement of master position
Description
Library: Mapping
This function determines the average velocity over a time period.
Necessary settings in linked function blocks
Calculate phase displacement for master position offset see SetMapBaseAdvance
Notes
The average velocity is used to calculate the phase displacement of a master position offset.
If uiValue=1, no average velocity is calculated.
The function comes into effect when SetMapBaseAdvance is used.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Time in milliseconds during which the velocity is averaged.
 | Data type: | UINT
 | Value range: | 1 … 10 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BTn | Time in milliseconds during which the velocity is averaged.
 | Value range for n: | 1 … 10 000
Linked functions
Function block | Command language | Function
SetMapBaseAdvance | OM | Calculate phase displacement for master position offset


SetMapBaseOffset (MB)

Reference [image] Mapping [image] SetMapBaseOffset (MB)
SetMapBaseOffset (MB)
Set master position offset
Description
Library: Mapping
This function defines an offset for the position of the master axis.
Notes
The position mapping table normally begins with the zero position of the master and slave. The offset moves the position of the master axis by diValue.
diValue value is subtracted from the position of the master axis before the position is entered in the mapping.
Position mapping is executed using the alignment velocity SetMapAdjustmentVelocity and the alignment acceleration SetAlignmentAcceleration, if the offset diValue changes during processing of a position mapping.
Diagram
Offset of the master position
slave position: Position of slave axis
master position: Position of master axis
SetMapBaseOffset: Offset of the master position
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Offset of the master position in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MB±nn | Offset of the master position in increments
 | Value range for nn: | ±2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetAlignmentAcceleration | AA | Set alignment acceleration
SetMapAdjustmentVelocity | AV | Set alignment velocity


SetMapLinkOptionsWord (LW)

Reference [image] Mapping [image] SetMapLinkOptionsWord (LW)
SetMapLinkOptionsWord (LW)
Set coupling between slave and master axis
Description
Library: Mapping
This function sets the options for the connection between slave and master axis.
Notes
Bits 4 to 6 are used to set whether the sum or the difference of the positions of two masters is to be used as the demand position. The second master axis is defined with MapLinkSlaveToDifferentialMaster.
SetMapLinkOptionsWord is used on the slave axis. The block must be set before the definition as slave axis (MapLinkSlaveToMaster).
Command language only:
–
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit. This bit retains its current value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Set coupling between slave and master axis
 | Data type: | USINT
 | Value range: | 8 Bit Bit 7 … Bit 0
 | Default value: | 0000 0000
 | Bit 0 | Determines whether the slave axis is to follow the demand values or the actual values of the master axis. 0: Slave axis follows the demand positions of the master axis 1: Slave axis follows the actual positions of the master axis
 | Bit 1 | Determines whether a reference error correction is to be executed on the master or the slave 0: Execute reference error correction on the master (if physically present) 1: Execute reference error correction on the slave
 | Bit 2 | During velocity mapping, limits the velocity of the slave to a maximum (SetVelocity) and a minimum (SetSlowSpeed). The definitions for direction in SetMapOptionsWord Bit 2 and 3 are taken into account. 0: Velocity restriction is disabled if SetMapOptionsWord Bit 4:=1. 1: Velocity restriction is enabled if SetMapOptionsWord Bit 4:=1.
 | Bit 3 | Determines whether it is possible to engage while the master is moving, without software coupling. This only makes sense if the moving master specifies standstill for the slave, otherwise the slave would drop out with a drag error. 0: Slave does not engage without software coupling while the master is moving 1: Slave always engages while the master is moving
 | Bit 4 | Determines whether the value selected with Bit 5 (difference or sum of the master positions) defines the demand position of the slave axis 0: Disabled 1: Difference or sum of two independent master positions determines the demand position of the slave axis
 | Bit 5 | Determines whether the demand position of the slave axis is defined by the sum or the difference of the master positions 0: Master positions are added 1: Position of the 2nd master axis is subtracted from the position of the 1st master axis
 | Bit 6 | Determines whether the sign for the demand position of the slave axis is negated. Prerequisite: Bit 4=1, Bit 5=0 or 1 0: Sign is not negated 1: Sign is negated
 | Bit 7 | Limits the acceleration and deceleration ramp to the maximum values (SetAcceleration and SetDeceleration) if velocity mapping is active (SetMapOptionsWord, Bit 4:=1) 0: Restriction inactive 1: Restriction active
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
LWbb | Set coupling between slave and master axis
 | Value range for bb: | 8 Bit Bit 7 … Bit 0 see usiControlword
 | Default value: | 0000 0000
Linked functions
Function block | Command language | Function
MapLinkSlaveToDifferentialMaster | NL | Define slave axis for a second master axis
MapLinkSlaveToMaster | ML | Define slave and master axis
SetAcceleration | SA | Set acceleration
SetDeceleration | DC | Set deceleration ramp
SetMapOptionsWord | MW | Set position mapping
SetSlowSpeed | SS | Set velocity for creep speed
SetVelocity | SV | Set velocity


SetMapOptionsWord (MW)

Reference [image] Mapping [image] SetMapOptionsWord (MW)
SetMapOptionsWord (MW)
Set position mapping
Description
Library: Mapping
This function sets the behaviour of position mapping on the slave axis.
Notes
Please note the special case when Bit 0 and Bit 2 are set simultaneously:
The slave engages immediately. The resulting slave offset is stored in SetSlaveMapOffset. The offset can be adjusted later using SetSlaveMapOffset diValue:=0.
Command language only:
–
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit. This bit retains its current value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiControlword | Behaviour of position mapping
 | Data type: | USINT
 | Value range: | 16 Bit Bit 15 … Bit 0
 | Default value: | 0000 0000 0000 0000
 | Bit 0 | Determines the behaviour of the slave axis when position mapping is active 0: Software coupling inactive. The slave axis moves to the demand position when position mapping is active. 1: Software coupling active. The slave axis waits until the master axis assumes the corresponding position. Then it accelerates to the required velocity within the set time (SetClutchTime) or the set distance (SetClutchLength). As a result it complies with the position mapping. Position mapping can also be activated without software coupling if the velocities are mapped using SetMapOptionsWord Bit 4=1. For this the master velocity must be lower than 500 increments/s.
 | Bit 1 | Determines whether a required alignment movement is dependent or independent of the set cycle length. 0: The cycle length has no influence on an alignment movement. 1: The cycle length is taken into account on an alignment movement. The shorter alignment run is always selected. Example: Axis position -10000 increments, cycle length 10000 increments. With SetMapBaseOffset+20000, the alignment movement is 0 increments when Bit1:=1.
 | Bit 2 | Determines whether the demand position is only approached in the direction defined with Bit 3 when a position mapping is activated. 0: Direction for approaching the demand position is not defined. 1: Direction for approaching the demand position is defined with Bit 3. If a start window is defined for the software coupling (SetClutchWindow), this bit is ignored for the alignment run.
 | Bit 3 | Determines the approach direction towards the demand position, if position mapping is active and Bit 2:=1. 0: The corrective movement is executed in a positive direction. 1: The corrective movement is executed in a negative direction.
 | Bit 4 | Determines the mapping between positions or velocities. Velocity mapping makes sense if absolute position mapping has no significance. 0: Position mapping 1: Velocity mapping During velocity mapping, the master velocity can be averaged using SetMapBaseAdvanceTimeConstant. This will lessen any disturbances on the master. Velocity mapping can be ended by stopping at a position. SetMapOptionsWord Bit6 is ignored in this case. The alignment acceleration SetAlignmentAcceleration is also active during velocity mapping if the transmission ratio is changed using SetScaleMapping.
 | Bit 5 | Determines whether coupling is engaged using a coupling time SetClutchTime or a coupling length SetClutchLength. 0: Coupling engaged with the coupling time SetClutchTime 1: Coupling engaged with the coupling length SetClutchLength
 | Bit 6 | Determines the velocity at which coupling is disengaged to an absolute (MoveToAbsolutePosition) or relative (MoveRelativePosition) position. 0: Disengage at current slave velocity 1: Disengage at SetVelocity. The disengagement with StopMotorToPosition takes into account the mapping table that is being left. The gradient of the deceleration ramp is determined by SetClutchLength, even if Bit 5:=0.
 | Bit 7 | Activates automatic cycle length correction. The cycle length of the slave is specified automatically, based on the slave position at the master cycle limit and the transmission ratio. The current cycle length can be output using GetMappedMasterBound. The cycle length can be corrected automatically if the axis moves with position mapping. To do this, the specified cycle length SetPositionBound is multiplied by the transmission ratio SetScaleMapping. A reference sensor is no longer necessary with uneven gear ratios. Example: SetPositionBound udiValue:=4096, SetScaleMapping udicounter:=1, udiDivider:=3 => 4096 / 3 = 1365.33 The cycle length would be 1365.33. This would result in a drift of one increment for every three pulses with a constant forward movement. The cycle length is now set to 1365 for two pulses and to 1366 for one pulse, thereby avoiding the drift. 0: Automatic cycle length correction disabled 1: Automatic cycle length correction enabled
 | Bit 8 | Determines whether the current cycle length of the master axis (SetPositionBound) or the master's SetPositionBound value from the mapping table is to be used when calculating the setpoint for the slave axis. The SetPositionBound value from the mapping table should be used if the master's cycle length is changed and the mapping table is active. 0: Cycle length of the master axis is the SetPositionBound value on the master axis 1: Cycle length of the master axis is the value from the mapping table
 | Bit 9 | Activates automatic switching of the mapping table If ExecuteMap is set, the switch to the new mapping table will not occur immediately. This will only happen when the master has reached its cycle limit. 0: Automatic switching of the mapping table at the master cycle limit is disabled 1: Automatic switching of the mapping table at the master cycle limit is enabled
 | Bit 10 … 15 | Reserved
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MWbb | Behaviour of position mapping
 | Value range for bb: | 16 Bit Bit 15 … Bit 0 see uiControlword
 | Default value | 0000 0000 0000 0000
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
GetMappedMasterBound | GM | Read current cycle length of slave axis
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetAlignmentAcceleration | AA | Set alignment acceleration
SetClutchLength | CL | Set length for software coupling
SetClutchTime | CT | Set time for software coupling
SetClutchWindow | CI | Set start window for software coupling
SetMapBaseAdvanceTimeConstant | BT | Average velocity for calculating phase displacement of master position
SetMapBaseOffset | MB | Set master position offset
SetPositionBound | SB | Set cycle length
SetScaleMapping | SM | Set transmission ratio
SetSlaveMapOffset | MF | Set offset for slave position
SetVelocity | SV | Set velocity
StopMotorToPosition | ST | Stop motor at absolute position


SetMapPositionTimeout (MT)

Reference [image] Mapping [image] SetMapPositionTimeout (MT)
SetMapPositionTimeout (MT)
Set monitoring time for master positions
Description
Library: Mapping
This function sets a monitoring time for transferring the master positions via CANopen.
Notes
If no master positions are received within the monitoring time, an error message is issued and the motor is shut down.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Monitoring time in ms
 | Data type: | UINT
 | Value range: | 0 … 1 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MTn | Monitoring time in ms
 | Value range for n: | 0 … 1 000


SetMapScaleFromBounds (BR)

Reference [image] Mapping [image] SetMapScaleFromBounds (BR)
SetMapScaleFromBounds (BR)
Calculate transmission ratio
Description
Library: Mapping
This function calculates the transmission ratio SetScaleMapping from the cycle lengths SetPositionBound of the master and slave axis.
Notes
Calculation:
Transmission ratio = SetPositionBound Master / SetPositionBound Slave
The calculated transmission ratio is automatically adopted from SetScaleMapping.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BR
Calculate transmission ratio
Linked functions
Function block | Command language | Function
SetPositionBound | SB | Set cycle length
SetScaleMapping | SM | Set transmission ratio


SetPositionBound (SB)

Reference [image] Mapping [image] SetPositionBound (SB)
SetPositionBound (SB)
Set cycle length
Description
Library: Mapping
This function defines a cycle length. It is used as the limit value for an absolute position.
Notes
The position counter is set to zero when it reaches the value udiValue.
The overflow counter SetPositionOverflowCounter counts the number of times the cycle length is exceeded.
Application: The size of the reference position is usually used for the limit of the absolute position. This makes it easier to monitor the reference signals continually. It is also easier to make the necessary corrections.
Command language only:
The WC command can be used to wait for a specific counter status.
Diagram
Typical application: cyclical or rotational movement, in which only the position within one rotation or one cycle is important. Positional details outside of the selected cycle length are possible at any time on travel commands; however, the current position at the end of the movement can never be greater than the cycle length.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Cycle length in increments
 | Data type: | UDINT
 | Value range: | 1 … 2 000 000 000
 | Default value: | 4 194 304
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SBnn | Cycle length in increments
 | Value range for nn: | 1 … 2 000 000 000
 | Default value: | 4 194 304
Linked functions
Function block | Command language | Function
SetPositionOverflowCounter | BC | Set overflow counter
--- | WC | Wait loop until overflow counter is reached


SetPositionOverflowCounter (BC)

Reference [image] Mapping [image] SetPositionOverflowCounter (BC)
SetPositionOverflowCounter (BC)
Set overflow counter
Description
Library: Mapping
This function sets the overflow counter to the value diCounter.
Notes
The overflow counter counts the number of times the cycle length set using SetPositionBound is exceeded.
The counter is
–
Incremented when the cycle length is exceeded in a positive direction.
–
Decremented when the cycle length is exceeded in a negative direction.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diCounter | Cycle length overflow counter
 | Data type: | DINT
 | Value range: | ±2 147 483 647
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BC±nn | Cycle length overflow counter
 | Value range for nn: | ±2 147 483 647
Linked functions
Function block | Command language | Function
SetPositionBound | SB | Set cycle length


SetScaleMapping (SM)

Reference [image] Mapping [image] SetScaleMapping (SM)
SetScaleMapping (SM)
Set transmission ratio
Description
Library: Mapping
This function sets the transmission ratio between the master and slave axis.
Notes
The transmission ratio is set on the slave axis.
The absolute position of the slave axis is multiplied by udiCounter and divided by udiDivider.
Position mapping is executed using the alignment velocity SetMapAdjustmentVelocity and the alignment acceleration SetAlignmentAcceleration, if the transmission ratio SetScaleMapping changes during processing of a position mapping.
Command language only:
The current transmission ratio is displayed on the terminal when the SM command is set without stating n,m.
Diagram
Position mappings between master and slave axis:
slave position: Position of slave axis
master position: Position of master axis
SetScaleMapping 1:1: Transmission ratio 1:1
SetScaleMapping 1:2: Transmission ratio 1:2
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiCounter | Offset of the master position in increments
 | Data type: | UDINT
 | Value range: | 0 … 400 000
udiDivider | Divisor of the slave position in increments
 | Data type: | UDINT
 | Value range: | 1 … 400 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SMn,m | Transmission ratio
 | Value range for n: | Offset of the master position in increments 0 … 400 000
 | Value range for m: | Divisor of the slave position in increments 1 … 400 000
Linked functions
Function block | Command language | Function
SetAlignmentAcceleration | AA | Set alignment acceleration
SetMapAdjustmentVelocity | AV | Set alignment velocity


SetSlaveMapOffset (MF)

Reference [image] Mapping [image] SetSlaveMapOffset (MF)
SetSlaveMapOffset (MF)
Set offset for slave position
Description
Library: Mapping
This function defines an offset for the position of the slave axis.
Notes
The position mapping table normally begins with the zero position of the master and slave. The offset moves the position of the slave axis by diValue.
diValue value is added to the position of the slave axis before the position is entered in the mapping.
Position mapping is executed using the alignment velocity SetMapAdjustmentVelocity and the alignment acceleration SetAlignmentAcceleration, if the offset diValue changes during processing of a position mapping.
Diagram
Offset of the slave position
slave position: Position of slave axis
master position: Position of master axis
SetSlaveMapOffset: Offset of the slave position
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Offset of the slave position in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MF±nn | Offset of the slave position in increments
 | Value range for nn: | ±2 000 000 000
 | Default value | 0
Linked functions
Function block | Command language | Function
SetAlignmentAcceleration | AA | Set alignment acceleration
SetMapAdjustmentVelocity | AV | Set alignment velocity


TransferMapData (TM)

Reference [image] Mapping [image] TransferMapData (TM)
TransferMapData (TM)
Transfer position mapping table to axis
Description
Library: Mapping
This function transfers a position mapping table to an axis.
Notes
The position mapping table that is saved in a PMCprimo must be transferred to the axis again when necessary, e.g. when it has been recreated by the motion generator.
Command language only:
–
If Name is not stated, the position mapping tables that have already been transferred will be output at the terminal.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
sMapName | Name of position mapping table
 | Data type: | STRING(80)
 | Value range: | 80 characters
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
TM[Name] | Transfer position mapping table to the axis
 | Value range for Name: | Name of position mapping table 80 characters


UnlinkSlaveToMaster (UL)

Reference [image] Mapping [image] UnlinkSlaveToMaster (UL)
UnlinkSlaveToMaster (UL)
Cancel assignment of Slave to Master axis
Description
Library: Mapping
This function cancels the mapping of a slave to a master axis.
Notes
The slave axis definition must be cancelled before the axis can be mapped to another master axis as slave axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
UL
Cancel assignment of Slave to Master axis


Additional commands in command language

Reference [image] Mapping [image] Additional commands in command language
Additional commands in command language
LM: List position mapping table
LP: Values of motion generator variables
NT: List table number


LM

Reference [image] Mapping [image] Additional commands in command language [image] LM
LM
List position mapping table
Description
This command reads values from position mapping tables.
Necessary settings in linked functions
Define position mapping table see EM
Notes
An overview of the existing position mapping tables is listed if LM is used without any other parameters.
The values of a position mapping table are listed when the command is used in the form LMName. Name is the name of the table.
n slave positions are listed when the command is used in the form LMName,n. The last value is the slave position at the end of the master's cycle. Interim values are calculated linearly.
Example: The cycle length of the master is 1000. The position mapping table map01 contains the three slave positions 0, 250, 500. When LMmap01,6 is called, the following 6 values are returned: 0, 100, 200, 300, 400, 500.
Command language
LM[Name,n] | Read position mapping tables
 | Value range for |
 | Name: | Name of position mapping table string, 80 characters
 | n: | Number of slave positions listed 1 … 10 000
Linked functions
Command language | Function
EM | Define position mapping table


LP

Reference [image] Mapping [image] Additional commands in command language [image] LP
LP
Values of motion generator variables
Description
This command lists the following variables:
The variables defined for the internal motion generator
$MMSB and $MSSB
Notes
For more detailed information see "PMCprimo Motion Generator PMotion User Manual"
Command language
LP
List of all motion generator variables


NT

Reference [image] Mapping [image] Additional commands in command language [image] NT
NT
List table number
Description
This command lists the number of the position mapping table Name.
Notes
The table number is an internal number (address) assigned by the compiler. It enables the start of a position mapping.
For example, this command can be used to assign the table number and therefore the table of a variable.
Command language
NTName | List table number
 | Value range for Name: | string


Network

Reference [image] Network
Network
ActivateCANAnalogueInput: Enable a subscriber's analogue inputs
ActivateCANAnalogueOutput: Enable a subscriber's analogue outputs
CANPositionControlDrive: Define servo amplifier for transferring position values via CAN
CopyFileFromDevice: Copy file from SD card
GetCanSDO: Read SDO
LinkDeviceToChannel: Define additional encoder for transferring position values via CAN
SetCanSDO: Write SDO
SetModbusClient: Set parameters for Modbus Clients
The Modbus function code is selected automatically when SetModbusClient is used. If a specific function code needs to be executed, then select one of the following function blocks:
SetModbusClient_FC1: Set parameters for Modbus Clients - Function Code FC 01 (Read Coils)
SetModbusClient_FC2: Set parameters for Modbus Clients - Function Code FC 02 (Read Discrete Input)
SetModbusClient_FC3: Set parameters for Modbus Clients - Function Code FC 03 (Read Holding Register)
SetModbusClient_FC4: Set parameters for Modbus Clients - Function Code FC 04 (Read Input Register)
SetModbusClient_FC15: Set parameters for Modbus Clients - Function Code FC 15 (Write Multiple Coils)
SetModbusClient_FC16: Set parameters for Modbus Clients - Function Code FC 16 (Write Multiple Registers)
SetModbusClient_FC23: Set parameters for Modbus Clients - Function Code FC 23 (Read/Write Multiple Registers)
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


ActivateCANAnalogueInput (FI)

Reference [image] Network [image] ActivateCANAnalogueInput (FI)
ActivateCANAnalogueInput (FI)
Enable a subscriber's analogue inputs
Description
Library: Network
This function enables or disables all the analogue inputs of a selected network subscriber.
Notes
Enabled analogue inputs place load on the CAN bus, so only enable the analogue inputs that you actually need.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
usiCANAdddr | CAN address (node number) of the network subscriber, whose analogue inputs are to be disabled or enabled
 | Data type: | USINT
 | Value range: | 1 … 49: CANopen devices 51 … 150: SafetyNet devices
bActivate | Enable or disable the analogue inputs
 | Data type: | BOOL
 | Value range: | 0: Inputs disabled 1: Inputs enabled
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FIt,n | Enable or disable the analogue inputs of a selected network subscriber
 | Value range for t: | 1 … 49: CANopen devices 51 … 150: SafetyNet devices
 | Value range for n: | 0: Inputs disabled 1: Inputs enabled If no value is stated for n, the current status of a network subscriber's analogue inputs is displayed.


ActivateCANAnalogueOutput (FO)

Reference [image] Network [image] ActivateCANAnalogueOutput (FO)
ActivateCANAnalogueOutput (FO)
Enable a subscriber's analogue outputs
Description
Library: Network
This function enables or disables all the analogue outputs of a selected network subscriber.
Notes
Enabled analogue outputs place load on the CAN bus, so only enable the analogue outputs that you actually need.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
usiCANAdddr | CAN address (node number) of the network subscriber, whose analogue outputs are to be disabled or enabled
 | Data type: | USINT
 | Value range: | 1 … 49: CANopen devices 51 … 150: SafetyNet devices
bActivate | Enable or disable the analogue outputs
 | Data type: | BOOL
 | Value range: | 0: Outputs disabled 1: Outputs enabled
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FOt,n | Enable or disable the analogue outputs of a selected network subscriber
 | Value range for t: | 1 … 49: CANopen devices 51 … 150: SafetyNet devices
 | Value range for n: | 0: Outputs disabled 1: Outputs enabled If no value is stated for n, the current status of a network subscriber's analogue outputs is displayed.


CANPositionControlDrive (PD)

Reference [image] Network [image] CANPositionControlDrive (PD)
CANPositionControlDrive (PD)
Define servo amplifier for transferring position values via CAN
Description
Library: Network
This function defines a CAN device that is used to transfer position values. The device may be a servo amplifier or a CAN encoder.
Necessary settings in linked function blocks
Set the encoder type so that position values are transferred via CANopen or SafetyNet: see usiValue=19 … 27 from SetFeedbackEncoder
Notes
The maximum number of CAN devices that can be connected depends on the cycle time and the transmission rate. For details of how to set the cycle time see SetConfigData.
Cycle time in ms | Max. number of servo amplifiers 500 kBit per CANopen | Max. number of servo amplifiers 1 MBit per CANopen
1 | 2 | 4
2 | 4 | 8
4 | 8 | 16
8 | 16 | 32
With 2 CAN networks, a maximum of 49 CAN devices can be connected.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiCanNode | CAN address (node number) of servo amplifier
 | Data type: | USINT
 | Value range: | 0: Cancels the definition and disconnects 1 … 49: CANopen devices 51 … 150: SafetyNet devices
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PDt | CAN address (node number) of servo amplifier
 | Value range for t: | 0: Cancels the definition and disconnects 1 … 49: CANopen devices 51 … 150: SafetyNet devices
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller
SetFeedbackEncoder | FS | Select rotary encoder type


CopyFileFromDevice

Reference [image] Network [image] CopyFileFromDevice
CopyFileFromDevice
Copy file from SD card
Description
Library: Network
This function copies a file from the SD card of a PMCprotego D into the Flash memory of the PMCprimo C.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
usiAddr | CAN address (node number) of the servo amplifier, from whose SD card a file is to be copied
 | Data type: | USINT
 | Value range: | USINT
sName | Name of the file to be copied
 | Data type: | STRING(80)
Output interface
bDone, bError and iErrorNumber see Function blocks


CopyFileToDevice

Reference [image] Network [image] CopyFileToDevice
CopyFileToDevice
Copy file to SD card
Description
Library: Network
This function copies a file from the Flash memory of a PMCprimo C to the SD card of a PMCprotego D.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
usiAddr | CAN address (node number) of the servo amplifier, to whose SD card a file is to be copied
 | Data type: | USINT
 | Value range: | USINT
sName | Name of the file to be copied
 | Data type: | STRING(80)
Output interface
bDone, bError and iErrorNumber see Function blocks


GetCanSDO (QR)

Reference [image] Network [image] GetCanSDO (QR)
GetCanSDO (QR)
Read SDO
Description
Library: Network
This function accesses the object directory of a CAN device via the SDO. This enables actual values to be read, for example.
Notes
Details of how to configure the parameters can be found in the instruction manual for the network subscriber.
The value that is read can be assigned to a variable.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
usiCanNetwork
CAN network that contains the device.
This parameter is no longer used from Version 2.0 and so must always be set to 0.
 | Data type: | USINT
 | Value range: | 0
usiCanNode | CAN address (node number) of the device from which the SDO is to be read
 | Data type: | USINT
 | Value range: | 1 … 49: CANopen devices 51 … 150: SafetyNet devices
uiIndex | Index of the object directory
 | Data type: | UINT
 | Value range: | 0 … USINT
usiSubindex | Subindex for access to the object directory
 | Data type: | USINT
 | Value range: | 0 … USINT
usiBytes | Number of bytes
 | Data type: | USINT
 | Value range: | 1 … 4 The number of bytes must match the object directory of the CAN device.
Output interface
bDone, bError and iErrorNumber see Function blocks
diValue | Value that has been read
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Command language
QRt,i,s,c | Read SDO
 | Value ranges |
 | for t: for i: for s: for c: | see usiCanNode see uiIndex see usiSubindex see usiBytes


LinkDeviceToChannel (PD)

Reference [image] Network [image] LinkDeviceToChannel (PD)
LinkDeviceToChannel (PD)
Define additional encoder for transferring position values via CAN
Description
Library: Network
This function links a CAN encoder to an axis for the transfer of position values.
Necessary settings in linked function blocks
Set the encoder type so that position values are transferred via CANopen or SafetyNet: see usiValue=19 … 27 from SetFeedbackEncoder
Notes
The maximum number of CAN devices that can be connected depends on the cycle time and the transmission rate. For details of how to set the cycle time see SetConfigData.
Cycle time in ms | Max. number of servo amplifiers 500kBit per CANopen | Max. number of servo amplifiers 1 MBit per CANopen
1 | 2 | 4
2 | 4 | 8
4 | 8 | 16
8 | 16 | 32
With 2 CAN networks, a maximum of 49 CAN devices can be connected.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiNetworkNode | CAN address (node number) of servo amplifier
 | Data type: | USINT
 | Value range: | 0: Cancels the definition and disconnects 1 … 49: CANopen devices 51 … 150: SafetyNet devices
usiIndex | Number of the encoder input on the addressed device Multiple encoders with the same CAN address (e.g. PSSu module)
 | Data type: | USINT
 | Value range: | 0 … USINT
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PDt,x | Links a CAN encoder to an axis for the transfer of position values
 | Value range for t: | see usiNetworkNode
 | Value range for n: | see usiIndex
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller
SetFeedbackEncoder | FS | Select rotary encoder type


SetCanSDO (QS)

Reference [image] Network [image] SetCanSDO (QS)
SetCanSDO (QS)
Write SDO
Description
Library: Network
This function accesses the object directory of a CAN device via the SDO. For example, this enables setpoint values to be written and the device to be configured.
Notes
Details of how to configure the parameters can be found in the instruction manual for the network subscriber.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
usiCanNetwork | CAN network that contains the device. This parameter is no longer used from Version 2.0 and so must always be set to 0.
 | Data type: | USINT
 | Value range: | 0
usiCanNode | CAN address (node number) of the device from which the SDO is to be read
 | Data type: | USINT
 | Value range: | 1 … 50: CANopen devices 51 … 150: SafetyNet devices
uiIndex | Index of the object directory
 | Data type: | UINT
 | Value range: | 0 … USINT
usiSubindex | Subindex for access to the object directory
 | Data type: | USINT
 | Value range: | 0 … USINT
usiBytes | Number of bytes
 | Data type: | USINT
 | Value range: | 1 … 4 The number of bytes must match the object directory of the CAN device.
diValue | Value to be written
 | Data type: | DINT
 | Value range: | 0 … DINT
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
QSt,i,s,c,n | Write SDO
 | Value range |
 | for t: for i: for s: for c: for n: | see usiCanNode see uiIndex see usiSubindex see usiBytes see diValue


SetModbusClient

Reference [image] Network [image] SetModbusClient
SetModbusClient
Set parameters for Modbus Clients
Description
Library: Network
This function sets parameters for several Modbus Clients.
The Modbus function code is selected automatically when SetModbusClient is used. If a specific function code needs to be executed, then select one of the following function blocks:
SetModbusClient_FC1: Set parameters for Modbus Clients - Function Code FC 01 (Read Coils)
SetModbusClient_FC2: Set parameters for Modbus Clients - Function Code FC 02 (Read Discrete Input)
SetModbusClient_FC3: Set parameters for Modbus Clients - Function Code FC 03 (Read Holding Register)
SetModbusClient_FC4: Set parameters for Modbus Clients - Function Code FC 04 (Read Input Register)
SetModbusClient_FC15: Set parameters for Modbus Clients - Function Code FC 15 (Write Multiple Coils)
SetModbusClient_FC16: Set parameters for Modbus Clients - Function Code FC 16 (Write Multiple Registers)
SetModbusClient_FC23: Set parameters for Modbus Clients - Function Code FC 23 (Read/Write Multiple Registers)
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoWriteOffset | Write offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerWriteOffset | Write offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberOfWriteParameter | Number of parameters to be written
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diSizeOfParameter | Size of Modbus parameters in bits
 | Data type: | DINT
 | Value range: | 1 … 32
 | Default value: | 16
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC1

Reference [image] Network [image] SetModbusClient_FC1
SetModbusClient_FC1
Set parameters for Modbus Clients - Function Code FC 01 (Read Coils)
Description
Library: Network
The connection Client uses Function Code FC 01 to read bit data, e.g. digital inputs.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC2

Reference [image] Network [image] SetModbusClient_FC2
SetModbusClient_FC2
Set parameters for Modbus Clients - Function Code FC 02 (Read Discrete Input)
Description
Library: Network
The connection Client uses Function Code FC 02 to read individual bits in a discrete memory area.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC3

Reference [image] Network [image] SetModbusClient_FC3
SetModbusClient_FC3
Set parameters for Modbus Clients - Function Code FC 03 (Read Holding Register)
Description
Library: Network
The connection Client uses Function Code FC 03 to read up to 125 words from the "Multiple Registers" memory area.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC4

Reference [image] Network [image] SetModbusClient_FC4
SetModbusClient_FC4
Set parameters for Modbus Clients - Function Code FC 04 (Read Input Register)
Description
Library: Network
The connection Client uses Function Code FC 04 to read up to 125 words from the "Input" memory area.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC15

Reference [image] Network [image] SetModbusClient_FC15
SetModbusClient_FC15
Set parameters for Modbus Clients - Function Code FC 15 (Write Multiple Coils)
Description
Library: Network
The connection Client uses Function Code FC 15 to write up to 8000 bits into the "Multiple Registers" memory area.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoWriteOffset | Write offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerWriteOffset | Write offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberOfWriteParameter | Number of parameters to be written
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC16

Reference [image] Network [image] SetModbusClient_FC16
SetModbusClient_FC16
Set parameters for Modbus Clients - Function Code FC 16 (Write Multiple Registers)
Description
Library: Network
The connection Client uses Function Code FC 16 to write up to 100 words into the "Multiple Registers" memory area.
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoWriteOffset | Write offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerWriteOffset | Write offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberOfWriteParameter | Number of parameters to be written
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


SetModbusClient_FC23

Reference [image] Network [image] SetModbusClient_FC23
SetModbusClient_FC23
Set parameters for Modbus Clients - Function Code FC 23 (Read/Write Multiple Registers)
Description
Library: Network
The connection Client uses Function Code FC 23 to write multiple words from or into the "Multiple Registers" memory area:
Read up to 125 words
Write up to 100 words
Necessary settings in linked function blocks
Configuration of PMCprimo: State number of Clients using ConfigData.wNumberOfModbusClient, see SetConfigData. Only the Clients that are set here can be configured.
Notes
With n Servers, the function must be executed n-times using the consecutive number uiNr. Numbering starts at 1.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
uiNr | Number of the Modbus Client to be configured
 | Data type: | USINT
 | Value range: | 1 … 10
sIPAddr | IP address of the (external) Modbus Server to which the Client is to link
 | Data type: | STRING(16)
 | Value range: | Format: xxx.xxx.xxx.xxx
diCycleTime_ms | Cycle time of Modbus Client in ms
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 100
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoReadOffset | Read offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerReadOffset | Read offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberofReadParameter | Number of parameters to be read
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPrimoWriteOffset | Write offset of PMCprimo
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diServerWriteOffset | Write offset of server
 | Data type: | DINT
 | Value range: | 1 … DINT
 | Default value: | 0
diNumberOfWriteParameter | Number of parameters to be written
 | Data type: | DINT
 | Value range: | 0 … 100, 1000 … 3048
 | Default value: | 0
diPort | Port number of Modbus Client
 | Data type: | DINT
 | Value range: | 0 … DINT
 | Default value: | 502
usUnitIdentifier | The input is needed for a Modbus Gateway. It is not evaluated for a Modbus TCP connection.
 | Data type: | USINT
 | Value range: | 0 … USINT
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
bActive | State of link
 | Data type: | BOOL
 | Value range: | 0. Link to Modbus Client disabled 1: Link to Modbus Client enabled
Command language
see CD
Linked functions
Function block | Command language | Function
SetConfigData | CD | Set operating parameters of the motion controller


Additional commands in command language

Reference [image] Network [image] Additional commands in command language
Additional commands in command language
CN: Record CAN trace


CN

Reference [image] Network [image] Additional commands in command language [image] CN
CN
Record CAN trace
Description
This command records a CAN trace.
Notes
If a CAN trace is to be made of the bus scan, please note:
–
Enter CN1 and save with SP
The bus scan will then be traced when the PMCprimo is restarted. After booting, the trace can be displayed using CN2.
Execute CN0 and SP if the bus scan is no longer required after the supply voltage is switched on.
Command language
CNnn[X1,X2] | Record CAN trace
 | Value range for |
 | nn: | CAN trace modes 0: Disable CAN trace recording and delete recorded CAN traces 1: Start CAN trace recording, additional parameters are possible with X1 and X2 2: Display recorded CAN trace on PTerm 3: Delete recorded CAN traces and restart recording. 4: Start continuous recording with ring memory, additional parameters are possible with X1 and X2 5: Stop continuous recording with nn:=4
 |  | Default value: 0
 | X1: | Selection of CAN network
 |  | - 0: Record all CAN networks - 1: Record CAN1 - 2: Record CAN2
 |  | Default value: 1
 | X2: | Filter is specified on a CAN address
 |  | - 0: No filter active - 1 ... 127: Passthrough filter for the stated node number
 |  | Default value: 0
Linked functions
Command language | Function
SP | Save data


Output

Reference [image] Output
Output
The Output directory comprises function blocks, which assign specific functions to digital inputs and outputs.
%Q: Assign output address, set and reset outputs
These definitions are axis-related.
DefineAnalogueLimitErrorOutput: Define error output for limit value exceeded at analogue input
DefineBoundOverflowOutput: Output pulse when cycle limit is exceeded
DefineMotorErrorOutput: Define error output for errors on an axis
DefineOutputAlignmentMove: Define output for signalling an alignment run
DefineOutsideWindowOutput: Output for signalling when lag distance is too great
DefinePositionTriggerOutput: Define output as electronic cam
DefineReferenceAcceptedOutput: Output pulse when a reference signal is detected
DefineReferenceBackwardOutput: Set output when reference error is corrected by braking
DefineReferenceForwardOutput: Set output when reference error is corrected by accelerating
DefineReferenceOutput: Set output when reference error is corrected
DefineReferenceRejectOutput: Set output in the event of reference error
DefineTimerOutput: Define output for a timer or counter function
DefineVelocityOutput: Set output for velocity range
SetPhaseAdvanceFactor: Define output for phase displacement of an electronic cam
SetPositionOutputHysteresis: Define hysteresis for cam
SetVelocityOutputHysteresis: Define hysteresis for velocity-dependent output
UndefineOutput: Delete definition of an output
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


%Q

Reference [image] Output [image] %Q
%Q
Assign output address, set and reset outputs
Description
By stating %Q and an output, an address is assigned to this output. The addresses can be assigned to variables, for example. Above all it can be used to set and reset outputs.
Notes
Outputs must always be represented as direct variables with the prefix %Q.
Syntax: %Q<Width><Name of output>
Width:
–
X: Bit
–
B: Byte (8 Bit)
–
W: Word (16 Bit)
–
D: Double Word (32 Bit)
Examples:
–
%QX7.5: Output bit 7.5
–
%QB7: Output byte 7
–
Variable mapping: ivar AT %QW0: WORD
–
Alternatively the addresses can be used directly like variables on outputs:


DefineAnalogueLimitErrorOutput (AE)

Reference [image] Output [image] DefineAnalogueLimitErrorOutput (AE)
DefineAnalogueLimitErrorOutput (AE)
Define error output for limit value exceeded at analogue input
Description
Library: Output
This function defines a digital output, which signals when an analogue input exceeds the limit value.
Necessary settings in linked function blocks
Set upper limit value see SetAnalogueInputHighLimit
Set lower limit value see SetAnalogueInputLowLimit
Notes
The error output is set when the value of an analogue input violates a limit value.
The error output changes state if the value of the analogue input returns within the permitted range.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AEg:n±
Define digital output as error output
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
SetAnalogueInputHighLimit | AH | Set upper limit for analogue input
SetAnalogueInputLowLimit | AL | Set lower limit for analogue input
UndefineOutput | UO | Delete definition of an output


DefineBoundOverflowOutput (BO)

Reference [image] Output [image] DefineBoundOverflowOutput (BO)
DefineBoundOverflowOutput (BO)
Output pulse when cycle limit is exceeded
Description
Library: Output
This function triggers a pulse at a PMCprimo C output if the cycle limit is exceeded.
Necessary settings in linked function blocks
If necessary: Define output for a timer or counter function see DefineTimerOutput
Notes
The pulse duration is 1 ms. The pulse can be extended using DefineTimerOutput.
The pulse must be extended if the output is defined on a CAN device. With a cycle time of 1 ms, we recommend that the pulse edge is extended by at least 5 ms.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BOg:n±
Define digital output as pulse output
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
DefineTimerOutput | TC | Define output for a timer or counter function
UndefineOutput | UO | Delete definition of an output


DefineMotorErrorOutput (DE)

Reference [image] Output [image] DefineMotorErrorOutput (DE)
DefineMotorErrorOutput (DE)
Define error output for errors on an axis
Description
Library: Output
This function defines a digital output, which signals errors on an axis.
Notes
The digital output is reset if the position control loop is reactivated using EnablePositionControl.
The error output is set with the following errors:
–
Drag error limit exceeded, SetMaxPositionError
–
Monitoring time or monitoring path exceeded, SetEncoderTimeout
–
Motor position outside the software end limits SetLowPositionLimit and SetHighPositionLimit
–
Error on axes, which can be cleared using SetErrorOptionsWord
–
Software limit switch exceeded, command language DL command
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
DEg:n±
Define digital output for signalling an axis error
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
--- | DL | Define limit switch input
EnablePositionControl | PC | Enable position control loop
SetEncoderTimeout | TO | Set monitoring of encoder signals
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error
SetHighPositionLimit | LH | Set software end limit in plus direction
SetLowPositionLimit | LL | Set software end limit in minus direction
SetMaximumPositionError | SE | Set drag error limit
UndefineOutput | UO | Delete definition of an output


DefineOutputAlignmentMove (OA)

Reference [image] Output [image] DefineOutputAlignmentMove (OA)
DefineOutputAlignmentMove (OA)
Define output for signalling an alignment run
Description
Library: Output
This function defines a digital output, which signals "Alignment run active".
Notes
The function can be used to signal "Alignment run active" while position mapping between master and slave axis is active, see SetMapBaseOffset, SetSlaveMapOffset, SetScaleMapping, for example.
An alignment run during the coupling of two axes is not taken into account and the output is not set.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
OAg:n±
Define digital output for signalling "Alignment run active"
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
SetMapBaseOffset | MB | Set master position offset
SetSlaveMapOffset | MF | Set offset for slave position
SetScaleMapping | SM | Set transmission ratio
UndefineOutput | UO | Delete definition of an output


DefineOutsideWindowOutput (OW)

Reference [image] Output [image] DefineOutsideWindowOutput (OW)
DefineOutsideWindowOutput (OW)
Output for signalling when lag distance is too great
Description
Library: Output
This function defines a digital output, which signals "Lag distance greater than target window".
Necessary settings in linked function blocks
Set target window for position see SetWindow
Notes
The function can also be used for signalling
–
that the position is inside the target window
–
to issue a warning before reaching the drag error limit defined in SetMaximumPositionError.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
OWg:n±
Define digital output for signalling "Lag distance greater than target window".
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
SetMaximumPositionError | SE | Set drag error limit
SetWindow | SW | Set target window for position
UndefineOutput | UO | Delete definition of an output


DefinePositionTriggerOutput (PO)

Reference [image] Output [image] DefinePositionTriggerOutput (PO)
DefinePositionTriggerOutput (PO)
Define output as electronic cam
Description
Library: Output
This function defines a digital output as an electronic cam.
Notes
Depending on the set logic, the output is "0" or "1" when the position lies between diPosition1 and diPosition2.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±[X1,X2]" is not set.
–
An enable input for a cam can also be defined using TG.
Diagram
Electronic cam with signal level 0 between the positions 500 and 800:
Electronic cam with signal level 1, negative direction of travel, cycle length 1000:
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
diPosition1 | Start position of the positioning range, in which the cam is to be active
 | Data type: | DINT
 | Value range: | ± 2 000 000 000
diPosition2 | End position of the positioning range, in which the cam is to be active
 | Data type: | DINT
 | Value range: | ± 2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
POg:n±[X1,X2]
Define digital output as electronic cam
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
for X1: | see diPosition1
for X2: | see diPosition2
Linked functions
Function block | Command language | Function
SetPhaseAdvanceFactor | PA | Define output for phase displacement of an electronic cam
SetPositionOutputHysteresis | PH | Define hysteresis for cam
UndefineOutput | UO | Delete definition of an output


DefineReferenceAcceptedOutput (RA)

Reference [image] Output [image] DefineReferenceAcceptedOutput (RA)
DefineReferenceAcceptedOutput (RA)
Output pulse when a reference signal is detected
Description
Library: Output
This function activates a pulse at a digital output when a valid reference signal has been detected.
Necessary settings in linked function blocks
If necessary, extend the pulse duration, see DefineTimerOutput.
Notes
For example, the function can be used in conjunction with the following function blocks, to identify the length of a product as good:
–
SetReferenceTrueHighLimit
–
SetReferenceTrueLowLimit
–
SetReferenceFalseHighLimit
–
SetReferenceFalseLowLimit
The pulse duration is 1 ms.
The pulse must be extended if the output is defined on a CAN device. With a cycle time of 1 ms, we recommend that the pulse edge is extended by at least 5 ms.
A pulse is also activated if the following initialisation functions are executed:
–
InitialisePosition
–
InitialisePositionBounds
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RAg:n±
Define digital output as pulsed output, signals a valid reference signal
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
DefineTimerOutput | TC | Define output for a timer or counter function
InitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
SetReferenceFalseHighLimit | FH | Set upper limit for reference input FALSE
SetReferenceFalseLowLimit | FL | Set lower limit for reference input FALSE
SetReferenceTrueHighLimit | ZH | Set upper limit for reference input TRUE
SetReferenceTrueLowLimit | ZL | Set lower limit for reference input TRUE


DefineReferenceBackwardOutput (JB)

Reference [image] Output [image] DefineReferenceBackwardOutput (JB)
DefineReferenceBackwardOutput (JB)
Set output when reference error is corrected by braking
Description
Library: Output
This function sets a digital output when the reference error correction is executed against the travel direction.
Notes
The axis must be slower during reference error correction to enable the defined output to be set to TRUE.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
JBg:n[±]
Set digital output when reference error is corrected by braking.
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
UndefineOutput | UO | Delete definition of an output


DefineReferenceForwardOutput (JF)

Reference [image] Output [image] DefineReferenceForwardOutput (JF)
DefineReferenceForwardOutput (JF)
Set output when reference error is corrected by accelerating
Description
Library: Output
This function sets a digital output when the reference error correction is executed in the travel direction.
Notes
The axis must be faster during reference error correction to enable the defined output to be set to TRUE.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
JFg:n[±]
Set digital output when reference error is corrected by accelerating.
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
UndefineOutput | UO | Delete definition of an output


DefineReferenceOutput (OR)

Reference [image] Output [image] DefineReferenceOutput (OR)
DefineReferenceOutput (OR)
Set output when reference error is corrected
Description
Library: Output
This function sets a digital output when the reference error correction is executed.
Notes
The output is switched for 1 ms when a reference signal is detected and no reference error is present.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ORg:n[±]
Set digital output when correcting the reference error
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
UndefineOutput | UO | Delete definition of an output


DefineReferenceRejectOutput (RR)

Reference [image] Output [image] DefineReferenceRejectOutput (RR)
DefineReferenceRejectOutput (RR)
Set output in the event of reference error
Description
Library: Output
This function sets a digital output when a reference error is detected.
Necessary settings in linked function blocks
Set maximum correction value for the reference error, see SetMaxReferenceCorrection
Notes
Each reference signal is used to measure a reference error. The reference error is compared with the limit defined through SetMaxReferenceCorrection:
–
Reference error ≤ Limit value in SetMaxReferenceCorrection: Digital output is not set
–
Reference error > Limit value in SetMaxReferenceCorrection: Digital output is set
The level of the output is maintained until the reference signal is recorded again.
Application:
The function enables quality statements in the form of "good" or "poor". For example, the front edge of a part on a conveyor is measured with a photo cell. The measured value is used in conjunction with the value of SetMaxReferenceCorrection in order to switch a switch.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RRnn
Set digital output in the event of reference error
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
SetMaxReferenceCorrection | SR | Set maximum value of a reference error correction
UndefineOutput | UO | Delete definition of an output


DefineTimerOutput (TC)

Reference [image] Output [image] DefineTimerOutput (TC)
DefineTimerOutput (TC)
Define output for a timer or counter function
Description
Library: Output
This function defines a digital output for a timer or counter function.
Notes
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is set with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
usiBank
Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
 | Default value: |
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
diValue
Set timer or counter value, depending on the mode usiModus
Data type:
DINT
Value range:
usiMode:=0 … 7: 0 … 65 535
usiMode:=8: 0 … 31
usiModus
Sets the mode
Data type:
USINT
Value range:
Mode 0 … 3: In all counter modes, the counter is incremented or decremented each time the defined output on PMCprimo is set or an output function sets the output to TRUE. The output is not physically set to the value usiPolarity until the internal counter has reached the value usiValue (up counter) or has counted from the defined value to 0 (down counter).
The first counting edge sets the output to TRUE and the counter to the start value.
Output and counter are reset if the counter reaches its end value.
0
One shot up counter
Counting begins at 0 and ends with the stated counter value.
1
Cyclical up counter
Counting begins at 0 and ends with the stated counter value.
2
One shot down counter
Counting begins with the stated counter value and ends at 0.
3
Cyclical down counter
Counting begins with the stated counter value and ends at 0.
Mode 4 … 6: In all modes, the timer runs when the defined output on PMCprimo is set or an output function sets the output to TRUE. The output is not physically set to the value usiPolarity until the internal timer has reached the value usiValue.
The first counting edge sets the output to TRUE and the timer to the start value.
The timer is incremented every millisecond.
Output and timer are reset if the timer reaches its end value.
4
One shot timer
When the output is set once, the procedure only starts again from the beginning if the output has been reset using CO.
5
Cyclical timer
The output switches state if the timer reaches its end value. The timer starts with its start value again.
6
One shot timer with restart
If PMCprimo sets the output while the timer is running, the timer starts counting from the beginning again.
7
Pulse edge extension
The usiPolarity is extended by diValue · 1 ms:
usiPolarity:=0 : Falling edge
usiPolarity:=1 : Rising edge
The function can be used to extend pulses on output functions.
8
Shift register
The counter operates as a shift register up to a maximum value of 31 Bit.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
TCg:n[±,X1,X2] | Define timer or counter output
 | Value range: |
 | g: | see usiBank
 | n: | see usiOutput
 | ±: | see usiPolarity
 | X1: | see diValue
 | X2: | see usiModus
Linked functions
Function block | Command language | Function
UndefineOutput | UO | Delete definition of an output
%Q | CO | Reset output
%Q | SO | Set output


DefineVelocityOutput (VO)

Reference [image] Output [image] DefineVelocityOutput (VO)
DefineVelocityOutput (VO)
Set output for velocity range
Description
Library: Output
This function sets a digital output when the velocity is within a defined range.
Notes
Please note: diSpeed1 must be < diSpeed2.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The logic state of the output ("1" or "0") is defined with usiPolarity.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diSpeed1 | Start velocity of the velocity range
 | Data type: | DINT
 | Value range: | ±40 000 000
diSpeed1 | End velocity of the velocity range
 | Data type: | DINT
 | Value range: | ±40 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
usiPolarity | Polarity of output signal
 | Data type: | USINT
 | Value range: | 0: - (negative signal) 1: + (positive signal)
Command language
VOg:n[±,X1,X2]
Set digital output for velocity range
Value range for |
g: | see usiBank
n: | see usiOutput
±: | see usiPolarity
Value range for X1: | Start velocity of the velocity range ±40 000 000
Value range for X1: | Start velocity of the velocity range ±40 000 000
Linked functions
Function block | Command language | Function
UndefineOutput | UO | Delete definition of an output


SetPhaseAdvanceFactor (PA)

Reference [image] Output [image] SetPhaseAdvanceFactor (PA)
SetPhaseAdvanceFactor (PA)
Define output for phase displacement of an electronic cam
Description
Library: Output
This function adds a phase displacement to the electronic cam of an axis and sends the signal to a digital output.
Necessary settings in linked function blocks
Set time period for calculating the average velocity see SetVelocityAveragingTime
Notes
Calculation of phase displacement:
Phase displacement = (demand velocity/256) * (diValue/256)
The average demand velocity is used for the calculation. This is determined via the time period set using SetVelocityAveragingTime.
Example:
With a velocity of 20 000 increments/second and when diValue = 500, phase displacement is = 153.
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
The definition of the output can be deactivated using UndefineOutput.
Command language only:
–
The output is deactivated if the option "±" is not set.
Diagram
Electronic cam without velocity-dependent phase displacement:
Electronic cam with velocity-dependent phase displacement: Velocity v = 1000 Incr./s, uiValue = 2560
Electronic cam with velocity-dependent phase displacement: Velocity v = 5000 Incr./s, uiValue = 2560
PA: Phase displacement
position: Position
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
diValue | Phase displacement in seconds
 | Data type: | DINT
 | Value range: | 0 … 65 535
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PAg:n,X
Define output for phase displacement of an electronic cam
Value range for |
g: | see usiBank
n: | see usiOutput
Value range for X: | Phase displacement in seconds 0 … 65 535
Default value: | 0
Linked functions
Function block | Command language | Function
SetVelocityAveragingTime | VT | Set time period for calculating the average velocity
UndefineOutput | UO | Delete definition of an output


SetPositionOutputHysteresis (PH)

Reference [image] Output [image] SetPositionOutputHysteresis (PH)
SetPositionOutputHysteresis (PH)
Define hysteresis for cam
Description
Library: Output
This function defines a hysteresis for both switching points in the function DefinePositionTriggerOutput.
Necessary settings in linked function blocks
Define output as electronic cam see DefinePositionTriggerOutput
Notes
The hysteresis means that fluctuations in the cam switching point when approaching in a positive or negative direction do not cause the output to constantly switch.
The value set using udiValue is either added to or subtracted from the cam position, depending on the sign.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value of hysteresis
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PHnn | Value of hysteresis
 | Value range for nn: | ±2 000 000 000
Linked functions
Function block | Command language | Function
DefinePositionTriggerOutput | PO | Define output as electronic cam


SetVelocityOutputHysteresis (VH)

Reference [image] Output [image] SetVelocityOutputHysteresis (VH)
SetVelocityOutputHysteresis (VH)
Define hysteresis for velocity-dependent output
Description
Library: Output
This function defines a hysteresis for both switching points in the function DefineVelocityOutput.
Necessary settings in linked function blocks
Set output for velocity range see DefineVelocityOutput
Notes
The hysteresis means that the digital output defined using DefineVelocityOutput does not constantly switch on and off if there are small fluctuations around the upper or lower limit of the velocity.
The value set using udiValue is either added to or subtracted from the velocity, depending on the sign.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value of hysteresis
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
VHnn | Value of hysteresis
 | Value range for nn: | ±2 000 000 000
Linked functions
Function block | Command language | Function
DefineVelocityOutput | VO | Set output for velocity range


UndefineOutput (UO)

Reference [image] Output [image] UndefineOutput (UO)
UndefineOutput (UO)
Delete definition of an output
Description
Library: Output
This function deletes the definition of an output.
Notes
The outputs of a device are grouped into bytes:
–
usiBank: Refers to an output byte (byte address)
–
usiOutput: Refers to a specific output of a byte defined with usiBank (bit address)
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
Command language only:
A function can also be deselected with the definition command by entering the definition command without "±", e.g. "POg:n".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
usiBank | Output byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 outputs
usiOutput | Number of the output within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 outputs, a new group must be defined wit usiBank
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
UOt:g:n
Delete definition of an output
Value range for |
t: | see usiNode
g: | see usiBank
n: | see usiOutput


Additional commands in command language

Reference [image] Output [image] Additional commands in command language
Additional commands in command language
CO: Reset output n in Byte g
LO: List definition of outputs
RO: Read state of the outputs in group g
SO: Set output n in Byte g


CO

Reference [image] Output [image] Additional commands in command language [image] CO
CO
Reset output n in Byte g
Description
This command sets the selected output to the logical signal state "0".
Notes
The command does not affect outputs that have a defined function.
All outputs of the byte [t.]g are set to the signal state "0" if n is not stated.
All the outputs available in the system are set to the signal state "0" if no parameter is set.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
CO[[t.]g[:n]] | Reset output n in Byte g
 | Value range for
t:
Address (node number) of the device containing the output
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.


LO

Reference [image] Output [image] Additional commands in command language [image] LO
LO
List definition of outputs
Description
This command displays all definitions of the outputs for the selected byte.
Command language
LO[t.]g | List definition of outputs
 | Value range for
t:
Address (node number) of the device containing the output
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
List of output definitions:
0.3> | LO1<CR> | Display all output definitions for output byte 1.
# Outputs 0.1 |  | Outputs 1 to 8
0.1:1 | undef | Output free
0.1:2 | undef | Output free
0.1:3 | undef | Output free
0.1:4 | undef | Output free
0.1:5 | - PO3>500<1000 | Electronic cam, axis 3: Signal level 0 from 500 to 1000 increments.
0.1:6 | + DE2 | Error output: Signal level 1 in the event of an error at axis 2.
0.1:7 | + BO4 | Pulsed output with signal level 1 at the cycle limit of axis 4.
0.1:8 | - AE1 | Analogue input limit error output, axis 1.
0.3> |  |
Linked functions
Command language | Function
AE | Define error output for limit value exceeded at analogue input
BO | Output pulse when cycle limit is exceeded
DE | Define error output for errors on an axis
PO | Define output as electronic cam


RO

Reference [image] Output [image] Additional commands in command language [image] RO
RO
Read state of the outputs in group g
Description
This command displays the state of the outputs on Byte g.
Notes
The outputs from Byte 1 will be displayed if g is not stated.
Command language
RO[[t.]g] | Read state of the outputs in group g
 | Value range for
t:
Address (node number) of the device containing the output
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
Example output: Outputs 2, 3 and 6 have the signal state "1"; the others have the signal state "0".
0.1> | RO1<CR> | Display the state of the inputs on Byte 1 of the PMCprimo C.
1 2 3 4 5 6 7 8 |
0 1 1 0 0 1 0 0 |  | Display the logical signal states of outputs 1-8.
0.1> |  |


SO

Reference [image] Output [image] Additional commands in command language [image] SO
SO
Set output n in Byte g
Description
This command sets the selected output to the logical signal state "1".
Notes
The command does not affect outputs that have a defined function.
All outputs of the byte [t.]g are set to the signal state "1" if n is not stated.
All the outputs available in the system are set to the signal state "0" if no parameter is set.
Parameters X1 and X2 can be used to set the outputs n to X1 in accordance with the bit pattern of X2. The command assigns the output bytes with any combination of signal levels "0" and "1"
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
SO[[t.]g[:n]][X1,X2] |
 | Value range for
t:
Address (node number) of the device containing the output
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
 | Where X1 and X2 are stated, n defines the first output in the range defined with n and X1.
X1: | Defines the last output in the range defined with n and X1 1 … 8
X2: | Bit pattern to which the outputs in the range defined with n and X1 are set 0 … 256
Example 1:
0.1> so0.1:2,4,0x7<CR> | Writes 1 to outputs 2 to 4 of output byte 1.
0.1> ro1 |
0.1> |
# Outputs 0.1 |
8 7 6 5 4 3 2 1 0 0 0 0 1 1 1 0 |
Example 2:
0.1> SO1:3<CR> | Output 3 of byte 1 is set to the logical signal state 1.
0.1> |
Example 3:
0.1> SO1<CR> | All outputs of byte 1 are set to the logical signal state 1.
0.1> |
0.1> SO<CR> | All outputs are set. Prerequisite: The outputs are not defined a function.


Positioncontrol

Reference [image] Positioncontrol
Positioncontrol
The Positioncontrol directory mainly comprises function blocks that set parameters for the position control algorithm.
Enable position control loop
EnablePositionControl
Parameters for the control algorithm
SetProportionalGain: Set proportional gain
SetProportionalGainScaled: Proportional gain for high resolution encoder
SetIntegralGain: Set integral gain
SetVelocityFeedForwardGain: Set KF setpoint gain
SetAccelerationFeedForwardGain: Set KA factor for acceleration gain
Definitions of the encoder count direction, the velocity profile and the sign for the setpoint output.
SetControlWord
Behaviour of the motion controller in the event of an error
SetErrorOptionsWord
Setting the limit values and drag error limit
SetHighPositionLimit: Set software end limit in plus direction
SetLowPositionLimit: Set software end limit in minus direction
SetMaxPositionError: Set drag error limit
SetWindow: Set target window for position
SetTimeoutForWindow: Set monitoring time for target window
Setting the position counter
SetPositionCounter
Defining a virtual axis
SetVirtualMotorMode
Functions for shutting down the motor
GlobalOff: Switch off all motors
GlobalStop: Global stop
MotorOff: Switch off motor


EnablePositionControl (PC)

Reference [image] Positioncontrol [image] EnablePositionControl (PC)
EnablePositionControl (PC)
Enable position control loop
Description
Library: Positioncontrol
This function activates the motor’s position control.
Notes
Position control is disabled if an error occurs on the motor. Power is no longer applied to the motor.
When position control is enabled, the PMCprimo signals the character ">" to the terminal program via the Ethernet interface.
The following warning messages are triggered if the drive has activated a limit switch and the motor is to be shut down:
–
"Controller warning: The NSTOP limit switch has been activated and the motor switched off! (468)"
–
"Controller warning: The PSTOP limit switch has been activated and the motor switched off! (469)"
When a drive is in an "Error" state, please note: a reset is performed automatically before the enable.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PC
Enable position control of the motor


GlobalOff (GF)

Reference [image] Positioncontrol [image] GlobalOff (GF)
GlobalOff (GF)
Switch off all motors
Description
Library: Positioncontrol
All motors are shut down.
Notes
The function GlobalOff affects all axes.
The function MotorOff affects only one axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
GF
All motors are shut down.
Linked functions
Function block | Command language | Function
MotorOff | MO | Switch off motor


GlobalStop (GS)

Reference [image] Positioncontrol [image] GlobalStop (GS)
GlobalStop (GS)
Global stop
Description
Library: Positioncontrol
This function triggers the deceleration ramps defined using SetDeceleration for all axes.
Notes
This function affects all axes. In contrast, the function StopMotor affects only a selected axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
GS
Stop all axes.
Linked functions
Function block | Command language | Function
SetDeceleration | DC | Set deceleration ramp
StopMotor | ST | Stop command


MotorOff (MO)

Reference [image] Positioncontrol [image] MotorOff (MO)
MotorOff (MO)
Switch off motor
Description
Library: Positioncontrol
This function switches off the controller enable. Power to the motor is removed (torque-free).
Notes
Position control is no longer enabled. All other functions, such as evaluation of the encoder signals, are maintained. This applies to encoder types in SetFeedbackEncoder up to 20 and from 30.
The motor remains in the current position when the controller enable is reactivated using EnablePositionControl.
The function MotorOff is an alternative stop command to StopMotor or StopMotorToPosition. In contrast to these commands, however, the motor is not brought to a stop using a defined deceleration ramp. Instead it runs down torque-free.
Please note that with the function GlobalOff, the function MotorOff can be executed simultaneously for all axes.
The following applies for the default setting STOPMODE= 1 in the commissioning software: on a PMCprotego D or PMCtendo DD5, the axis brakes for as long as there is power in the intermediate circuit
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MO
Switches the controller enable off and removes power to the motor (torque-free)
Linked functions
Function block | Command language | Function
EnablePositionControl | PC | Enable position control loop


SetAccelerationFeedForwardGain (KA)

Reference [image] Positioncontrol [image] SetAccelerationFeedForwardGain (KA)
SetAccelerationFeedForwardGain (KA)
Set KA factor for acceleration gain
Description
Library: Positioncontrol
This function is used to set the KA factor for the controller's acceleration gain.
Notes
The acceleration gain improves the control behaviour by means of an additive setpoint.
The acceleration gain reduces speed errors (drag errors) during acceleration, particularly when the acceleration has been set high. The effect of the KA factor, for example, is that the torque is proportional to the necessary demand acceleration.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Value for KA factor of the acceleration gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KAnn | Value for KA factor of the acceleration gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetIntegralGain | KI | Set integral gain
SetProportionalGain | KP | Set proportional gain
SetVelocityFeedForwardGain | KF | Set KF setpoint gain


SetControlWord (CW)

Reference [image] Positioncontrol [image] SetControlWord (CW)
SetControlWord (CW)
Set switch-on behaviour
Description
Library: Positioncontrol
This function determines
The encoder’s count direction.
The velocity profile for motion commands.
The sign for the setpoint output.
CAUTION!
Risk from the motor changing direction during commissioning!
When the position control loop is closed, a change in the encoder's count direction or the sign for the setpoint output can lead to hazardous situations, which can result in physical injuries or material damage.
The encoder’s count direction and the sign for the setpoint output may only be changed when the position control loop is open. The inversion of these functions simplifies commissioning of the drive and enables the travel direction to be adapted quickly.
Notes
Command language only:
–
The value that is currently set is output via Telnet, if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Set switch-on behaviour
 | Data type: | USINT
 | Value range: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0001 0000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CWbb | Set switch-on behaviour
 | Value range for bb: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0001 0000
 | Example: | CW010XX10X
Settings
Bit 0 | Abort program in the event of a motor error
 | 0: | Axis-related programs that are waiting for a motion command to be run are aborted
 | 1: | Axis-related programs are not aborted
Bit 1 | Store positions in non volatile memory (MRAM)
 | 0: | Positions are not stored in MRAM.
 | 1: | The current position is permanently held in MRAM. If the MRAM is to read in the last position on power-up, the bit must be set in the start-up program. Please note: A start-up program can only be defined in command language. If the axis is in a negative position, it will still be negative after switching on and off.
CAUTION!
Incorrect feedback on position due to faulty command string!
Please note that Bit 1 may not be set until all functions that influence the position are set. If Bit 1 is set too early, the position read from the RAM may be incorrect. Failure to comply may lead to hazardous situations, which can result in physical injuries or material damage.
Set the functions SetFeedbackEncoder, SetNumberOfBits, SetEncoderScaling, DisplayPositionBound before you set Bit 1.
Bit 2: | Velocity profile for acceleration and braking for the functions MoveToAbsolutePosition, MoveRelativePosition, MoveConstantVelocity and StopMotorToPosition
 | 0: | Trapezoidal velocity profile
 | 1: | Sinusoidal velocity profile
Bit 3: | Behaviour in the event of a motor error
 | 0: | Axis is switched off immediately (MotorOff function)
 | 1: | Axis brakes with the E-STOP deceleration ramp SetAbortDeceleration (after AbortMotor function) and then switches off the motor.
Bit 4: | Sign for the setpoint output
 | 0: | Setpoint sign is normal, i.e. the setpoint sign is negative if the encoder counts in a negative direction.
 | 1: | Setpoint sign is inverted, i.e. the setpoint sign is positive if the encoder counts in a positive direction.
Bit 5: | Encoder’s count direction
 | 0: | Count direction is normal, i.e. the position counter on the PMCprimo C counts in a positive direction if Track B follows Track A.
 | 1: | Count direction is inverted, i.e. the position counter on the PMCprimo C counts in a negative direction if Track B follows Track A.
Bit 6: | Behaviour of the function when monitoring the encoder (see SetEncoderTimeout)
 | 0: | The function SetEncoderTimeout defines a monitoring time, within which an encoder signal is expected.
 | 1: | The function SetEncoderTimeout defines a length, within which an encoder signal is expected.
Bit 7: | Defines whether the KI factor is always active or only active at standstill
 | 0: | The KI factor is always active.
 | 1: | The KI factor is only active at standstill.
Linked functions
Function block | Command language | Function
AbortMotor | AB | Stop motor, E-STOP
DisplayPositionBound | SB | Display cycle length
MotorOff | MO | Switch off motor
MoveConstantVelocity | VC | Travel at constant velocity
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetEncoderTimeout | TO | Set monitoring of encoder signals
SetFeedbackEncoder | FS | Select rotary encoder type
SetEncoderScaling | MS | Scale master position
SetIntegralGain | KI | Set integral gain
SetNumberOfBits | NB | Set number of data bits on the SSI or CANopen encoder
StopMotor | ST | Stop command


SetErrorOptionsWord (EW)

Reference [image] Positioncontrol [image] SetErrorOptionsWord (EW)
SetErrorOptionsWord (EW)
Behaviour of the PMCprimo in the event of an error
Description
Library: Positioncontrol
This function determines the behaviour of the motion controller PMC in the event of an error.
Notes
Command language only:
–
The value that is currently set is output via Telnet, if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Set behaviour of the PMCprimo in the event of an error
 | Data type: | USINT
 | Value range: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0001 0000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
EWbb | Set behaviour of the PMCprimo C in the event of an error
 | Value range for bb | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0001 0000
 | Example: | EW010XX10X
Settings
Bit 0 | Monitoring time for reference inputs is exceeded (see also SetReferenceTimeout)
 | 0: | Issues a message in the event of an error
 | 1: | Issues a message in the event of an error and switches off the controller enable
Bit 1 | A reference signal is outside the permitted range (see also SetReferenceErrorLimit)
 | 0: | Issues a message in the event of an error
 | 1: | Issues a message in the event of an error and switches off the controller enable
Bit 2 | Reference signal is detected before an existing reference error has been adjusted
 | 0: | Issues a message in the event of an error
 | 1: | Issues a message in the event of an error and switches off the controller enable
Bit 3 | Maximum permitted limit value at an analogue input is exceeded
 | 0: | Issues a message in the event of an error
 | 1: | Issues a message in the event of an error and switches off the controller enable
Bit 4 | Suppression of the error message "Reference error limit exceeded" (see also SetReferenceTimeout), if Bit 0 is set to "0".
 | 0: | Error message is displayed
 | 1: | Error message is not displayed
Bit 5 | Suppression of the error message "Reference error limit exceeded" (see also SetReferenceErrorLimit), if Bit 1 is set to "0".
 | 0: | Error message is displayed
 | 1: | Error message is not displayed
Bit 6 | Suppression of the error message "Reference signal detected before the existing reference was completely adjusted", if Bit 2 is set to "0".
 | 0: | Error message is displayed
 | 1: | Error message is not displayed
Bit 7 | Suppression of the error message "Analogue input limit exceeded" (see SetAnalogueInputHighLimit and SetAnalogueInputLowLimit), if Bit 3 is set to "0".
 | 0: | Error message is displayed
 | 1: | Error message is not displayed
Linked functions
Function block | Command language | Function
SetAnalogueInputHighLimit | AH | Set upper limit for analogue input
SetAnalogueInputLowLimit | AL | Set lower limit for analogue input
SetReferenceErrorLimit | LR | Set reference error limit
SetReferenceTimeout | RT | Monitor reference input


SetHighPositionLimit (LH)

Reference [image] Positioncontrol [image] SetHighPositionLimit (LH)
SetHighPositionLimit (LH)
Set software end limit in plus direction
Description
Library: Positioncontrol
This function sets the software end limit in the positive direction.
Notes
The PMCprimo C only starts a positioning movement if the target position is within the software end limit.
The PMCprimo C switches off the controller enable if the software end limit is reached. Power to the motor is removed.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Set the value of the software end limit in the positive direction (in increments)
 | Data type: | DINT
 | Value range: | +/- 2 000 000 000
 | Default value: | + 2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
LHnn | Set the value of the software end limit in the positive direction (in increments)
 | Value range for nn: | +/- 2 000 000 000
 | Default value: | + 2 000 000 000


SetIntegralGain (KI)

Reference [image] Positioncontrol [image] SetIntegralGain (KI)
SetIntegralGain (KI)
Set integral gain
Description
Library: Positioncontrol
This function sets the integral gain of the control algorithm.
Notes
The integral gain affects the time integration of the drag error. It is used when positional deviation is constant due to fluctuating loads and this needs to be compensated.
The drag error is added together due to integration. As a result, the axis can travel beyond the target position. This problem is known as "wind-up".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set integral gain KI
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KInn | Set integral gain KI
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0


SetLowPositionLimit (LL)

Reference [image] Positioncontrol [image] SetLowPositionLimit (LL)
SetLowPositionLimit (LL)
Set software end limit in minus direction
Description
Library: Positioncontrol
This function sets the software end limit in the negative direction.
Notes
The PMCprimo C only starts a positioning movement if the target position is within the software end limit.
The PMCprimo C switches off the controller enable if the software end limit is reached. Power to the motor is removed.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Set the value of the software end limit in the negative direction (in increments)
 | Data type: | DINT
 | Value range: | +/- 2 000 000 000
 | Default value: | - 2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
LLnn | Set the value of the software end limit in the negative direction (in increments)
 | Value range for nn: | +/- 2 000 000 000
 | Default value: | - 2 000 000 000


SetMaxPositionError (SE)

Reference [image] Positioncontrol [image] SetMaxPositionError (SE)
SetMaxPositionError (SE)
Set drag error limit
Description
Library: Positioncontrol
This function defines the maximum permitted position deviation.
Notes
The following action is executed when Bit 3 = 1 is set in SetControlWord: When the drag error limit is exceeded, the axis is braked to standstill and the controller enable is switched off. Power to the motor is removed.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Maximum permitted position deviation in increments
 | Data type: | UINT
 | Value range: | 1 … 2 000 000 000
 | Default value: | 1000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SEnn | Maximum permitted position deviation in increments
 | Value range for nn: | 1 … 2 000 000 000
 | Default value: | 1000
Linked functions
Function block | Command language | Function
SetControlWord | CW | Set switch-on behaviour


SetPositionCounter (ZC)

Reference [image] Positioncontrol [image] SetPositionCounter (ZC)
SetPositionCounter (ZC)
Set position counter
Description
Library: Positioncontrol
This function sets the position counter to the stated value, if no absolute position has been selected.
Notes
Command language only:
The position counter is set to zero if no value has been stated for ZC.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Set value of the position counter (in increments)
 | Data type: | DINT
 | Value range: | +/- 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ZCnn | Set value of the position counter (in increments)
 | Value range for nn: | +/- 2 000 000 000


SetProportionalGain (KP)

Reference [image] Positioncontrol [image] SetProportionalGain (KP)
SetProportionalGain (KP)
Set proportional gain
Description
Library: Positioncontrol
This function sets the proportional gain of the control algorithm.
Necessary settings in linked function blocks
Set number of data bits on the SSI or CANopen encoder see SetNumberOfBits
Notes
A higher proportional gain enables a short reaction time and precise position control. However, the proportional gain should be set just high enough so that an overshoot is not created.
The proportional gain also depends on the number of data bits on the encoder. This is set using SetNumberOfBits. The proportional gain must be changed if SetNumberOfBits is changed.
Only integers can be set using udiGain. To set a more precise proportional gain for high resolution encoders, see the function block SetProportionalGainScaled.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set proportional gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KPnn | Set proportional gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetNumberOfBits | NB | Set number of data bits on the SSI or CANopen encoder


SetProportionalGainScaled (KP)

Reference [image] Positioncontrol [image] SetProportionalGainScaled (KP)
SetProportionalGainScaled (KP)
Proportional gain for high resolution encoder
Description
Library: Positioncontrol
This function sets the proportional gain of the control algorithm for use with high resolution encoders.
Necessary settings in linked function blocks
Set number of data bits on the SSI or CANopen encoder see SetNumberOfBits
Notes
The function block replaces SetProportionalGain, which is retained for compatibility reasons.
Compared with SetProportionalGain, a more precise value for the proportional gain can be selected.
Values <1 are also possible for the proportional gain = udiGainFactor / udiGainDivisor.
A higher proportional gain enables a short reaction time and precise position control. However, the proportional gain should be set just high enough so that an overshoot is not created.
The proportional gain also depends on the number of data bits on the encoder. This is set using SetNumberOfBits. The proportional gain must be changed if SetNumberOfBits is changed.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGainFactor | Dividend for calculating the proportional gain
 | Data type: | UDINT
 | Value range | 0 … 2 000 000 000
 | Default value: | 0
udiGainDivisor | Divisor for calculating the proportional gain
 | Data type: | UDINT
 | Value range | 0 … 2 000 000 000
 | Default value: | 1
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KPnn,mm | Proportional gain = nn / mm
 | Value range for nn: | 0 … 2 000 000 000
 | Value range for mm: | 0 … 2 000 000 000
Linked functions
Function block | Command language | Function
SetNumberOfBits | NB | Set number of data bits on the SSI or CANopen encoder
SetProportionalGain | KP | Set proportional gain


SetTimeoutForWindow (TI)

Reference [image] Positioncontrol [image] SetTimeoutForWindow (TI)
SetTimeoutForWindow (TI)
Set monitoring time for target window
Description
Library: Positioncontrol
This function defines a delay time between reaching the target position and examining the target position through a target window.
Necessary settings in linked function blocks
Set target window for position see SetWindow
Notes
Examination of the target window defined using SetWindows will not become active until the target position has been reached and the time set using uiValue has elapsed.
The positioning commands MoveRelativePosition and MoveToAbsolutePosition are not completed until the delay time SetTimeoutForWindow has elapsed. Please note: A subsequent motion command is only possible once the delay time has elapsed.
Diagram
In the diagram below, a delay time of 200 ms is set after the target position is reached. Once the time has elapsed the controller signals that the target position has been reached. Only at this point can a new motion command start.
actual speed = Istgeschwindigkeit
set speed = Sollgeschwindigkeit
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Delay time in ms
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
TInn | Delay time in ms
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetWindow | SW | Set target window for position


SetVelocityFeedForwardGain (KF)

Reference [image] Positioncontrol [image] SetVelocityFeedForwardGain (KF)
SetVelocityFeedForwardGain (KF)
Set KF setpoint gain
Description
Library: Positioncontrol
This function sets the KF setpoint gain of the control algorithm.
Notes
The setpoint gain (velocity gain) improves the control behaviour. The effect of the speed gain is that the position error (lag distance) is approximately zero at constant velocity. The actual position will equal the demand position if all disturbance variables are controlled.
Recommendation for default settings:
–
PMCtendoDD4: udiGain=3750
–
PMCprotego or PMCtendoDD5: udiGain=4465
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set KF setpoint gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
KFnn | Set KF setpoint gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0


SetVirtualMotorMode (VM)

Reference [image] Positioncontrol [image] SetVirtualMotorMode (VM)
SetVirtualMotorMode (VM)
Select virtual mode
Description
Library: Positioncontrol
This function declares an axis as a virtual axis.
Necessary settings in linked function blocks
Disable position control loop see EnablePositionControl (PC)
Notes
In virtual mode an axis has no motor and no encoder.
The actual position is calculated internally from the demand position.
Virtual mode is applied
–
when testing functions and programs, without a connected machine.
–
when simulating a master axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiMode | Define virtual axis
 | Data type: | USINT
 | Value range: | 0: The axis is a real axis. An externally connected encoder signals the actual position of the axis.
 |  | 1: The axis is a virtual axis. The actual position of the virtual axis is simulated. No drive is enabled. The motor remains without power.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
VMn | Define virtual axis
 | Value range for n: | 0: The axis is a real axis. An externally connected encoder signals the actual position of the axis.
 |  | 1: The axis is a virtual axis. The actual position of the virtual axis is simulated. No drive is enabled. The motor remains without power.
Linked functions
Function block | Command language | Function
EnablePositionControl | PC | Enable position control loop


SetWindow (SW)

Reference [image] Positioncontrol [image] SetWindow (SW)
SetWindow (SW)
Set target window for position
Description
Library: Positioncontrol
This function defines a target window for position monitoring.
Notes
The PMCprimo signals that the target position has been reached when the actual position of the axis is within the target window after braking.
The PMCprimo signals an error if the actual position is not within the target window following an axis movement.
SetWindow is only used by MoveRelativePosition and MoveToAbsolutePosition.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiWindow | Set target window in increments
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 100
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SWnn | Set target window in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 100
Linked functions
Function block | Command language | Function
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning


Positioning

Reference [image] Positioning
Positioning
The Positioning directory comprises function blocks that are used to set motion profiles. Motion profiles are defined by
Velocity
Acceleration
Position
The following functions are available:
SetMoveOptionsWord: Preset positioning behaviour
Velocity
–
SetVelocity: Set velocity
–
SetSlowSpeed: Set velocity for creep speed
–
MoveConstantVelocity: Travel at constant velocity
–
SetSlowSpeedMode: Switch between standard and creep speed mode
Acceleration
–
SetAcceleration: Set acceleration
–
SetDeceleration: Set deceleration ramp
–
SetAbortDeceleration: Set E-STOP braking ramp
Position
–
MoveToAbsolutePosition: Absolute positioning
–
MoveRelativePosition: Relative positioning
–
SetCreepDistance: Set distance for creep speed
–
SetBacklashDistance: Set backlash compensation
–
InitialisePosition: Initialise position counter
–
InitialisePositionBounds: Initialise position counter and determine cycle length
Functions to stop the movement
–
StopMotor: Stop command
–
AbortMotor: Stop motor, E-STOP
–
StopMotorToPosition: Stop motor at absolute position
The directory also contains function blocks for error messages and status messages
–
GetError: Read error variable
–
GetStatus: Read motor status variable
–
ResetError: Reset error variable
–
AcknowledgeAllErrors: Reset all error variables


AbortMotor (AB)

Reference [image] Positioning [image] AbortMotor (AB)
AbortMotor (AB)
Stop motor, E-STOP
Description
Library: Positioning
This function triggers the emergency stop deceleration ramp defined using SetAbortDeceleration.
Necessary settings in linked function blocks
Set E-STOP braking ramp see SetAbortDeceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
The function only affects the axis selected using the variable usiChannel. In contrast, the GlobalStop function affects all axes with the deceleration ramp SetDeceleratiion.
The function can be applied with any movement.
The controller signals an "S" to the Ethernet interface when executing the function.
Command language only:
–
GA is an abort command, which affects all axes with the deceleration ramp AX.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AB
Triggers the emergency stop ramp defined using XA
Linked functions
Function block | Command language | Function
SetControlWord | CW | Set switch-on behaviour
SetAbortDeceleration | XA | Set E-STOP braking ramp
--- | GA | Global abort


AcknowledgeAllErrors (PV3)

Reference [image] Positioning [image] AcknowledgeAllErrors (PV3)
AcknowledgeAllErrors (PV3)
Reset all error variables
Description
Library: Positioning
This function resets the error variables of all axes and acknowledges all existing errors in the PVIS visualisation device.
Notes
The function works in the same way as the function block ResetError, although this is limited to a selected axis. Neither does ResetError affect the error entries in PVIS.
Diagram
Schematic representation
Input interface
bExecute see Function blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PV3
The error variables of all axes are reset.


GetError ($Ft.n)

Reference [image] Positioning [image] GetError ($Ft.n)
GetError ($Ft.n)
Read error variable
Description
Library: Positioning
The error variable for the selected axis is read.
Notes
The last error number from the host, CAN, map generator and compiler is stored in the error variable $F0.0 (usiNode = 0, usiChannel = 0).
No error number is generated for $F0.0 (usiNode = 0, usiChannel =0) if a user program is already running or is unavailable when GetError is requested, otherwise continuous loops can result when $F0.0 is defined as a trigger variable.
The error variables can also be read with the CoDeSys block GetPrimo.
Command language only:
The error variable can also be assigned a value. In this case the instruction is $Ft.n=value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Error number
 | Data type: | DINT
 | Value range: | 0 … DINT
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
$Fn | Value of the error variables for the selected axis (last error number)
 | Value range for n: | Number of axis
Linked functions
Function block | Command language | Function
ResetError | $Fn=0 | Reset error variable
GetPrimo | --- | Read process data of a PMCprimo
Error messages
Code | Description
0 | No error
1 | Cannot start the user program because the maximum number of running processes has been reached
3 | Axis %A: The "MA" command has been started although the motor is not active
4 | Axis %A: Target position is outside the programmed software end limit
5 | Axis %A: The software end limit has been passed in the plus direction
6 | Axis %A: The software end limit has been passed in the minus direction!
7 | Axis %A: The "MA" command has been started although the motor is already executing a travel command
8 | Axis %A: The "MR" command has been started although the motor is not active
9 | Axis %A: The "MR" command has been started although the motor is already executing a travel command
10 | Axis %A: The "VC" command has been started although the motor is not active
11 | Axis %A: The "VC" command has been started although the motor is already executing a travel command
12 | User program %V, line %Z: Division by zero
14 | Cannot start the user program because the data stack is full
15 | Map calculation has been started although a map calculation is already being executed
18 | Cannot execute map generator because the variable $MNAME is not defined
19 | Cannot execute map generator because the variable $MNPT is not defined or is 0
20 | "WV" command for variable %V has been started although it is already being executed for this variable
21 | Input I%G:%U is used in the "TK" command although it is not defined as a counter input
22 | Input I%G:%U is used in the "TG" command although it is not defined as an enable input
23 | Cannot start the user program because there is insufficient RAM
24 | Drag error
25 | Cannot start the "TZ" command because input I%G:%U already has another function
27 | Cannot start user program %P because it is already running
28 | Positioning error
29 | Change in position did not occur within the time set with the "TO" command
30 | Encoder signal is outside the permitted range
31 | Axis %A: The "XM" command has been started although the motor is not active
34 | PMCprimo is overloaded
35 | Cannot start user program %P because it is not available
36 | Axis %A: The "BR" command has been started although the "ML" command has not previously been executed
37 | Measured reference error is greater than the reference error limit selected using the "LR" command
38 | Could not correct the measured reference error in one cycle
39 | Monitoring time for the reference signal has elapsed
40 | Axis %A: Reference error has been reduced to the value selected using the "SR" command
42 | Speed assignment is impossible because the map is not linear
52 | Output O%G:%U has already been defined as an error output using the "DE" command
53 | Output O%G:%U has already been defined as an electronic cam using the "PO" command
54 | Output O%G:%U has already been defined as a pulse at the cycle limit using the "BO" command
56 | Axis %A: Limit switch has been detected
57 | Input I%G:%U has already been defined
59 | At least 2 pairs of values must be defined for map generation
60 | Map generator: Variable $MS%V has not been defined
61 | Map generator: Variable $MX%V has the wrong value
62 | Map generator: Variable $MY%V has the wrong value
63 | Axis %A: Target position is outside the programmed software end limit
64 | Map generator: Variable has not been defined
65 | Internal error (error code: %0P)
66 | Axis %A: Parameter value %Z is not permitted for the %B command
67 | Axis %A: The "ML" command has been started although mapping is active on the axis
68 | Map generator: Variable $MM%Z is less than its preceding value
69 | Input I%G:%U has already been assigned another function
70 | Cannot use the "TG" command to define input I%G:%U as an enable input
71 | Cannot use the "TK" command to define input I%G:%U as a counter input
72 | Axis %A: Defined simultaneously as master and slave using the "ML" command
74 | Change in position did not occur within the time set with the "MT" command
75 | Internal error (error code: %0P)
76 | Axis %A: The "PC" command has been started although the "AO" command is already being executed
77 | Cannot use the "AE" command to define output O%G:%U as an analogue auxiliary output because it is already defined as an analogue auxiliary output
79 | Input I%G:%U is not a fast input
81 | Axis %A: The "IN" or "IB" command has been started although no reference signal has been defined using the "DZ" or "DR" command
82 | Axis %A: The "IB" command has been started although the "PC" command has not previously been executed on virtual axis %A
83 | Axis %A: The "LW" command has been started after the slave axis was assigned using the "ML" command
84 | Cannot use the "CO" and "SO" command to switch output O%G:%U manually because it has already been defined
85 | Output O%G:%U has already been defined as a reference output using the "RR" command
86 | Cannot use the "AE" command to define output O%G:%U as an analogue auxiliary output because it is already defined as an analogue auxiliary output
88 | Output O%G:%U has already been defined as a reference error correction using the "OR" command
89 | Axis %A: Cannot define the input as a fast input because it has already been defined as a reference signal using the "DZ" command.
90 | Input I%G:%U has already been defined as a torque receiver using the "PS" command
91 | Input I%G:%U has already been defined as a reference input using the "DR" command
93 | Fast input I%G%U is not defined as a torque receiver
94 | Fast input I%G%U is not defined as a reference input
95 | Output O%G:%U has already been defined as a "pulsed output during reference signal"
96 | Axis %A: The upper limit of the parameter from the "SV" command has been exceeded due to the "IP" command
97 | Axis %A: The upper limit of the parameter from the "SV" command has been exceeded during creep mode due to the "IP" command
98 | Axis %A: The lower limit of the parameter from the "SV" command has been exceeded due to the "IP" command
99 | Axis %A: The "XR" command has been started although the motor is not active
100 | Axis %A: The "XR" command has been started although the motor is already executing a travel command
101 | Map generator: Variable $MF%Z has not been defined
102 | Map generator: Variable $MW%Z has not been defined
103 | Map generator: Variable $MA%Z has not been defined
104 | Map generator: Variable $MZ%Z has not been defined
105 | Map generator: Variable $MX%Z has not been defined
106 | Map generator: Variable $MY%Z has not been defined
107 | Map generator: Variable $MX%Z is greater than $MY%Z
108 | Map generator: Variable $MB%Z has not been defined
109 | Map generator: Variable $MC%Z has not been defined
110 | Map generator: Segment no. %Z, sum of the variables $MA%Z, $MB%Z and $MC%Z is not 100%
114 | Output O%G:%U has already been defined as a pulsed output using the "JF" command
115 | Axis %A: Initialisation of the transmission ratio using the "XR" command has been cancelled
116 | "GETBUSVARIABLE" block: Bus variable is outside the permitted value range
117 | Value for analogue input is below the lower limit value
118 | Upper limit value for analogue input has been exceeded
119 | Axis %A: The "XV" command has been executed before the "ML" command
122 | Axis %A: Cannot activate the "PC" command for position control while the "IN" command is active
123 | Axis %A: Cannot define the analogue auxiliary output using the "AO" command because position control is active with the "PC" command
125 | Axis %A: The transmission ratio of the parameter from the "SM" command was incremented via the "IP" command, while the "XM" command was inactive
126 | Cannot start user program %P because it is not available
129 | Parameter %Z is not within the shift register’s value range for the "TC" command
130 | Axis %A: The "FC" command has been started although the position control loop was switched on
131 | Axis %A: The "VM" command has been started although the position control loop was switched on
132 | Axis %A: The "XM" command has been started while the master was travelling, although Bit 0 of the parameter from the "MW" command is set to 0
134 | Axis %A: Wait loop for the absolute position is already active
135 | Axis %A: Wait loop for the relative position is already active
136 | Axis %A: Wait loop for the reference input is already active
137 | Axis %A: Wait loop for the cycle limit is already active
138 | Axis %A: Wait loop for the overflow counter is already active
139 | Axis %A: Real mode has been selected via the "VM" command
140 | Cannot transfer position table %M using the "TM" command because the table is not available
141 | Axis %A: Cycle length of the master axis is longer than defined in the position table
142 | Axis %N.%A is not available
143 | User program: Variable has not been defined
144 | Input I%G:%U: Invalid Node-ID used
145 | Input I%G:%U: No user program defined
146 | Axis %A: A fast input has already been defined
149 | Too many master axes in the CAN network
150 | Axis %A: The "UL" command has been started although the "XM" command (position control) is already being executed
151 | Axis %A: The "XM" command has been started although the "ML" command has not previously been executed
153 | User program has been deleted due to an invalid checksum
162 | Mode %Z is not permitted for the "TC" command
163 | Counter value %Z is not permitted for the "TC" command
171 | Axis %A: The "XM" command has been started while Bit 5 of the parameter from the "LW" command is set to 1 and the "NL" command is undefined
172 | Heat sink temperature has exceeded the permitted value
173 | Intermediate circuit voltage has exceeded the permitted value
174 | Motor encoder is faulty
175 | Intermediate circuit voltage has fallen below the permitted value
176 | Motor temperature has exceeded the permitted value
177 | 24 VDC supply voltage is faulty
178 | Motor speed has exceeded the permitted value
179 | Data memory or checksum is invalid
180 | Data memory or checksum is invalid
181 | Motor brake is faulty
182 | There is no motor phase available
183 | Heat sink temperature has exceeded the permitted value
184 | Error caused by power element
185 | Average current load of I2tmax exceeded
186 | One or two of the mains voltage phases are not available
187 | A/D converter faulty
188 | External brake resistor is faulty
189 | One of the mains voltage phases is not available
190 | Internal error: System software
191 | Average current load of I2tmax exceeded
192 | Brake resistor power has been exceeded
193 | Error caused by expansion card
194 | One of the mains voltage phases is not available
195 | Data in the EEPROM and Hiperface encoder is different on power up
196 | Expansion card on the PMCprimo is not working
197 | No hardware enable is available
198 | CAN bus: Safety cable broken
199 | Internal error (error code: %0P)
200 | Internal error (error code: %0P)
201 | CAN bus: Safety cable broken
202 | 12 VDC supply voltage for CAN Bus is not available
203 | Internal error (error code: %0P)
204 | Internal error (error code: %0P)
205 | CAN bus has been switched off after too many errors
206 | Internal error (error code: %0P)
207 | CAN bus: Communication error
209 | CAN bus: Invalid address used for SDO telegram
210 | CAN bus: Error caused by device after sending an SDO telegram
211 | Internal error (error code: %0P)
212 | CAN bus has been switched off after too many errors
213 | Internal error (error code: %0P)
214 | Firmware versions of host and node %N do not match
215 | Axis %A, CAN bus, network subscriber %N: Servo amplifier cannot be activated
216 | Axis %A, CAN bus, network subscriber %N: Servo amplifier cannot be deactivated
217 | Axis %A: Cannot execute the "PD" command
218 | CAN bus: Error node %Z
219 | Data loss in battery-buffered memory
220 | No battery-buffered memory available
221 | Axis %A: The "XM" command has been started although the "TM" command has not previously been executed
223 | Axis %A: A variable was transferred to a position table while the "XM" command was inactive
224 | Error caused by servo amplifier
226 | Internal error (error code: %0P)
229 | Error while saving using the "SP" command
230 | Axis %A: Too many reference signals received while reference error correction was active
231 | The buffered reference positions have been deleted due to the change in the direction of rotation
233 | Output O%G:%U has already been defined as a speed-dependent output
234 | Too many commands have been executed simultaneously in the user program
236 | Cannot define the output on CAN subscriber %N
237 | The "TD" command has been started although the "TR" command for advanced display mode has not previously been executed
238 | Output O%G:%U has already been defined for "monitoring the drag error"
239 | Axis %A: The "ID" command has been started although the motor is not active
240 | Axis %A: Parameter value %Z is not permitted for the %B command if Bit 4 of the parameter from the "RW" command is set
241 | Axis %A: Parameter value %Z is not permitted for the %B command if Bit 4 of the parameter from the "RW" command is not set
242 | Axis %A: Parameter value %Z is not permitted for the %B command if Bit 6 of the parameter from the "RW" command is set
243 | Axis %A: Parameter value %Z is not permitted for the %B command if Bit 6 of the parameter from the "RW" command is not set
244 | Axis %A: Parameter value is not permitted for the "RC" command if Bit 6 of the parameter from the "RW" command is set to "0"
245 | Axis %A: Parameter value is not permitted for the "RV" command if Bit 4 of the parameter from the "RW" command is set to "0"
246 | Axis %A: Parameter from the "RW" command: If Bit 6 = "1", then Bit 4 automatically = "1". As a result, the parameter from the "RV" command is used as a path for reference error compensation.
248 | Axis %A: Command has been started although the "QA" command has not previously been executed
249 | Axis %A: Difference between actual and set speed has exceeded the value set using the VCOMM parameter
250 | Unpermitted access to a non-defined element from array %V
251 | Invalid parameter %Z has been transferred to the %B command
252 | Axis %A: %B command with %Z parameter has already been defined on another axis
254 | Too many commands have been executed simultaneously in the user program
255 | Battery is depleted
256 | Axis %A: Start interlock has been activated although the power element was enabled
257 | Earth fault
260 | Axis %A: The "XM" command has been started although the motor is already executing a travel command
261 | The "QA0:m" command has been executed on a node axis
262 | Axis %A: Cannot use the %B command to define analogue output %Z because it is not available
273 | Axis %A: Cannot execute the "PD" command because the firmware does not support this function
274 | Axis %A: Cannot start the command because the node is not a servo amplifier
275 | Axis %A: Cannot start the command because the node is not a servo amplifier
276 | If retain variables are used in the PLC application, variables from the PMCprimo cannot be stored in the battery-buffered memory at the same time
277 | Axis %A: The upper limit of the parameter from the "SM" command has been exceeded due to the "IP" command
278 | Cannot modify LINEAR position table
279 | Axis %A: %B command has been started although the interpolator for the CNC application is being executed
280 | Axis %A: The "ZC" command has been started although absolute position evaluation is active
282 | Error caused by CAN module: %V
283 | Axis %A: The "XI" command has been started although the "ML" command has not previously been executed
285 | "XI" command: For the master position scan, a slave position has been specified that does not exist in the position table
286 | Cannot use the "SO" or "CO" command to set output O%G:%U because it is already being used in the PLC user program
287 | Axis %A: The "PC" command has been started although the servo amplifier is not ready for operation
288 | PSSu CAN module %Z, node %Y: Configuration error
289 | PSSu CAN module %Z, node %Y: Module or configuration is not supported
290 | PSSu CAN module, node %Z: Too many input modules or invalid module arrangement
291 | PSSu CAN module, node %Z: Too many output modules or invalid module arrangement
292 | PSSu CAN module, node %Z: Too many analogue input modules used
293 | PSSu CAN module, node %Z: Too many analogue output modules used
294 | PSSu CAN module, node %Z: Error caused by digital ST input module
295 | PSSu CAN module, node %Z: Error caused by digital ST output module
296 | PSSu CAN module, node %Z: Error caused by analogue ST input module
297 | PSSu CAN module, node %Z: Error caused by analogue ST output module
298 | PSSu CAN module, node %Z: Error caused by digital FS input and output module
299 | PSSu CAN module, node %Z: Module does not support node guarding and is not monitored
300 | Axis %A: Servo amplifier cannot be "enabled"
301 | Axis %A: Servo amplifier cannot be "disabled"
302 | Error in the firmware’s version description
303 | Internal error: Motion generator (status %Z)
304 | No safety card found with the stated serial number
305 | Error caused by safety card: Configuration data check sum
306 | Error caused by safety card: Timeout
307 | Configuration data for safety card invalid
308 | No safety card detected or position control not yet active
309 | Error when measuring bus load
310 | Error caused by safety card: SS2 – Monitoring of standstill position
311 | Error caused by safety card: SOS – Monitoring of standstill position
312 | Error caused by safety card: SLS - Monitoring of safely limited speed
313 | Error caused by safety card: SSR – Monitoring of speed range
314 | Error caused by safety card: SDI – Monitoring of direction of rotation
315 | Error caused by safety card: SBT - Monitoring of standstill position (motor brake)
316 | Error caused by safety card: SBT - Monitoring of standstill position (external brake)
317 | Error caused by safety card: SBT – Monitoring of motor current
318 | Error caused by safety card: SBT – Monitoring of motor current
319 | Error caused by safety card: SBT – Monitoring of motor current
320 | Error caused by safety card: SBT – Monitoring of motor current
321 | Error caused by safety card: SBT – Safety function SBC not configured
322 | Error caused by safety card: SBT – Test period elapsed
323 | Error caused by safety card: Input test "SS1 Activate"
324 | Error caused by safety card: Input test X30-2
325 | Error caused by safety card: Input test X30-3
326 | Error caused by safety card: Input test X30-4
327 | Error caused by safety card: Input test X30-12
328 | Error caused by safety card: Input test X30-13
329 | Error caused by safety card: Input test X30-14
330 | Error caused by safety card: Input test X30-15
331 | Error caused by safety card: Output test "STO Acknowledge"
332 | Error caused by safety card: Output test X30-6
333 | Error caused by safety card: Output test X30-7
334 | Error caused by safety card: Output test X30-8
335 | Error caused by safety card: Output test X30-9
336 | Error caused by safety card: Output test "Ready"
337 | Internal error on the safety card / system software
338 | Error caused by safety card: Output test "SIL3 STO"
339 | Internal safety card error: Supply voltage 24 V DC
340 | Error caused by safety card
341 | Reserve / 341
342 | Error caused by safety card
343-348 | Internal safety card error
349 | Reserved
350-355 | Internal safety card error
355 | Reserved
356 | Internal safety card error
357 | Error caused by safety card: Invalid number of motor poles
358 | Error caused by safety card: Invalid motor type
359 | Error caused by safety card: Configuration data and input status do not match
360-380 | Internal safety card error
381 | Reserve / 381
382 | Internal safety card error
383 | Reserved
384 | Reserved
385 | Internal safety card error
386 | Error caused by safety card: Configuration data download
387 | Error caused by safety card: Configuration data upload
388 | Error caused by safety card: Firmware update
389 | Error caused by safety card: CRC calculation when downloading the configuration data
390 | Internal safety card error: CRC calculation
391 | Internal safety card error: CRC calculation when updating the firmware
392 | Error caused by safety card: Serial number when downloading the configuration data
393 | Error caused by safety card: Device version when downloading the configuration data
394 | Error caused by safety card: Device type when downloading the configuration data
395 | Error caused by safety card: Device version on start-up
396-405 | Internal safety card error
406 | Error caused by safety card: On node %Z, SS1 or E-STOP brake is configured as drive-activated
407 | Error caused by safety card: On node %Z, SS2 is configured as drive-activated
408 | Cannot use the "OA" command to define output O%G:%U as a pulsed output during alignment run because it is already defined as a pulsed output during alignment run
409 | Error caused by safety card: Evaluation of current signal
410 | Error caused by safety card: Evaluation of current signal
411-434 | Internal safety card error
435 | Error caused by safety card: Output SBC+ does not switch off
436 | Error caused by safety card: Output SBC- does not switch off
437 | Internal safety card error
438 | Error caused by safety card: Safe pulse disabler interrupted (STO, STO SIL3)
439 | Internal safety card error
440 | Error caused by safety card: Output stage (STO SIL3) does not switch off
441 | Error caused by safety card: Output stage was interrupted during "cyclical RUN"
443 | Internal safety card error
444 | Internal safety card error
445 | Error caused by safety card: SS2 – Monitoring of deceleration ramp
446 | Error caused by safety card: STO SIL3 interrupted
447 | Internal safety card error
448 | Error caused by safety card: Encoder signal (external encoder)
449 | Error caused by safety card: Encoder signal (sign of set value for speed)
450-456 | Internal safety card error
457 | Error caused by safety card: Incorrect number of characters in the serial number
458 | Error caused by safety card: Encoder signal – drag error
460 | Error caused by safety card: SBT – Brake test aborted
461 | Error caused by safety card: SS1 – Monitoring of deceleration ramp
462 | Error caused by safety card: Download of SD card aborted
463 | Error caused by safety card: Input test “SS1 SIL3/Reset”
464 | Error caused by safety card: SSR – Limit value’s tolerance range exceeded
465 | Error caused by safety card: SLS – Period length below the tolerance range
466 | Error caused by safety card: SLS – Limit value’s tolerance range exceeded
467 | Error caused by safety card: SSR – Period length below the tolerance range
497 | Error caused by safety card: SDI - Monitoring of direction of rotation right
498 | Error caused by safety card: SDI - Monitoring in both directions of rotation is not permitted
513 | Error caused by safety card: SLI – Standstill threshold exceeded
514 | Error caused by safety card: SLI – Monitoring of safe increment
515 | Error caused by safety card: SLI - Monitoring of safely limited speed
516 | Error caused by safety card: SLI – Monitoring of standstill position
517 | Error caused by safety card: SLP – Monitoring of safe absolution position
518 | Error caused by safety card: SLP - Monitoring of safely limited speed
519 | Internal safety card error
520 | Internal safety card error
521 | Error caused by safety card: Position jump of external encoder
522 | Error caused by safety card: Absolute position of external encoder not feasible
523 | Internal safety card error
524 | Internal safety card error
525 | Internal safety card error
526 | Error caused by safety card: Subsequent error
527 | Reserved
528 | Internal error on the safety card / synchronisation current offset
529 | Reserved
530 | Error caused by safety card: Unknown device type in configuration data
531 | Error caused by safety card: Unknown device version in configuration data
532 | Error caused by safety card: CRC alignment via configuration data
533-543 | Internal safety card error
546 | Error caused by safety card: Motor brake
547 | Internal safety card error


GetStatus ($St.n)

Reference [image] Positioning [image] GetStatus ($St.n)
GetStatus ($St.n)
Read motor status variable
Description
Library: Positioning
The status variable for the selected axis is read.
Notes
This function returns the status variable for the selected axis.
The status variable contains the current motor status.
There is a separate, pre-defined status variable for each axis.
The node number is stated using usiNode = 0.
The axis number is stated using usiChannel.
The status variables can also be read with the CoDeSys block GetPrimo.
Command language only:
–
The status variable can also be assigned a value. In this case the comand is $St.n = value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Read value of status variables
 | Data type: | DINT
 | Value range: | 0 … DINT
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
$S[t.]n | Read value of status variables
 | Value range for |
 | t: | 0: With PMCprimo C
 | n: | 1 … x: Number of axis (see settings with the CD command)
Linked functions
Function block | Command language | Function
GetPrimo | --- | Read process data of a PMCprimo
Status messages
Code | Description
0 | Position control loop closed (EnablePositionControl)
8 | Position control loop open, motor switched off (MotorOff)
66 | Axis waits for coupling at the start of a position mapping (ExecuteMap)
67 | Coupling is executed at the start of a position mapping (C)
68 | Alignment movement is executed for starting a position mapping (A)
128 | Interpolator for the CNC application is active (N)
256 | Continuous positioning or velocity control is executed (MoveConstantVelocity)
512 | Positioning command is executed (MoveToAbsolutePosition, MoveRelativePosition)
2048 | Position mapping (= Map) active (ExecuteMap)
4096 | Stop command is executed (StopMotor)
8192 | Initialising is running (InitialisePosition, InitialisePositionBounds)


InitialisePosition (IN)

Reference [image] Positioning [image] InitialisePosition (IN)
InitialisePosition (IN)
Initialise position counter
Description
Library: Positioning
The motor accelerates and travels at constant velocity until a reference signal is detected. The position counter is set to the value defined using SetReferenceOffset and the motor is braked.
Necessary settings in linked function blocks
Set acceleration see SetAcceleration
Set velocity see SetVelocity
Set deceleration ramp see SetDeceleration
Set reference offset see SetReferenceOffset
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
Behaviour after the reference signal is detected:
–
The position counter is set to the value defined using SetReferenceOffset when the reference signal is detected.
–
SetReferenceOffsetWord Bit 3 is used to determine whether or not the motor is to return to the zero position.
–
SetMoveOptionsWord (Bit 2 and 3) is used to determine the direction of travel to the zero position.
An initialisation can also be used when the position control loop is open. The controller then waits for a reference signal.
The controller signals an "I" to the Ethernet interface when executing the function.
Command language only: The calling user program is ended when an initialisation is ended with an error.
Diagram
The motor waits for a reference signal in positive direction and then returns to the reference signal
v: Velocity
t: Time
A: Return to reference signal
reference signal: Reference signal
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bDirection | Determine the search direction of the axis
 | Data type: | BOOL
 | Value range: | TRUE: positive direction of rotation
 |  | FALSE: negative direction of rotation
Travel is in a positive direction if no parameter is stated
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
IN± | Execute command
 | Value range | +: positive direction of rotation
 |  | -: negative direction of rotation
Travel is in a positive direction if no parameter is stated
Linked functions
Function block | Command language | Function
SetAcceleration | SA | Set acceleration
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp
SetMoveOptionsWord | ZW | Preset positioning behaviour
SetReferenceOffset | RF | Set reference offset
SetReferenceOptionsWord | RW | Preset reference behaviour
SetVelocity | SV | Set velocity


InitialisePositionBounds (IB)

Reference [image] Positioning [image] InitialisePositionBounds (IB)
InitialisePositionBounds (IB)
Initialise position counter and determine cycle length
Description
Library: Positioning
The function block detects a reference signal (see also InitialisePosition) and determines the cycle length of the machine. The motor accelerates to demand velocity until a reference signal is detected. The motor then travels at constant velocity until the reference signal is detected a second time. The position counter is set to the value defined using SetReferenceOffset and the motor is braked. The distance between two reference signals is the cycle length and is entered in SetPositionBound.
Necessary settings in linked function blocks
Set acceleration see SetAcceleration
Set velocity see SetVelocity
Set deceleration ramp see SetDeceleration
Set reference offset see SetReferenceOffset
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
Behaviour after the reference signal is detected:
–
The position counter is set to the value defined using SetReferenceOffset when the reference signal is detected for the second time.
–
SetReferenceOffsetWord Bit 3 is used to determine whether or not the motor is to return to the zero position.
–
SetMoveOptionsWord (Bit 2 and 3) is used to determine the direction of travel to the zero position.
–
SetPositionBound is set to the value of the cycle length.
An initialisation can also be used when the position control loop is open. The controller then waits for a reference signal.
The controller signals an "I" to the Ethernet interface when executing the function.
Command language only:
–
The calling user program is ended when an initialisation is ended with an error.
–
The IB command can be assigned to a variable (e.g.: $VAR = IB). In this case, the command IB is executed normally. The cycle length is stored in the variables (e.g.: $VAR) and not in SB. SB is not changed in the process!
Diagram
Initialisation of position and cycle length
v: Velocity
t: Time
reference signal: Reference signal
A: Return to reference signal
tcyc: Cycle time
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bDirection | Determine the search direction of the axis
 | Data type: | BOOL
 | Value range: | TRUE: positive direction of rotation
 |  | FALSE: negative direction of rotation
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
IB± | Execute command
 | Value range | +: positive direction of rotation
 |  | -: negative direction of rotation
Linked functions
Function block | Command language | Function
SetAcceleration | SA | Set acceleration
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp
SetMoveOptionsWord | ZW | Preset positioning behaviour
SetPositionBound | SB | Set cycle length
SetReferenceOffset | RF | Set reference offset
SetReferenceOptionsWord | RW | Preset reference behaviour
SetVelocity | SV | Set velocity


MoveConstantVelocity (VC)

Reference [image] Positioning [image] MoveConstantVelocity (VC)
MoveConstantVelocity (VC)
Travel at constant velocity
Description
Library: Positioning
The motor travels at constant velocity.
Necessary settings in linked function blocks
Set velocity see SetVelocity
Set acceleration see SetAcceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
Travel commands can only be executed when the position controller is active.
A creep speed can be specified with SetSlowSpeed. SetSlowSpeedMode switches between creep speed (SetSlowSpeed) and standard velocity (SetVelocity).
During execution of MoveConstantVelocity, values on the following function blocks can be changed:
–
SetAcceleration
–
SetVelocity
–
SetSlowSpeed
Please note: If the value of SetAcceleration is changed during execution of MoveConstantVelocity, the change will take effect immediately.
The controller signals a "V" to the Ethernet interface when executing the function.
Command language only:
If values are transferred via a variable (e.g. "SV $var1"), the value is not automatically reset if the variable is changed. The command must be recalled (e.g. call "SV $var1" again) if the variable is changed.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bDirection | Determine travel direction of axis
 | Data type: | BOOL
 | Value range: | TRUE: positive direction of rotation
 |  | FALSE: negative direction of rotation
 | Travel is in a positive direction if no parameter is stated.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
VC± | Start continuous positioning
 | Value range: | +: positive direction of rotation
 |  | -: negative direction of rotation
 | Travel is in a positive direction if no parameter is stated.
Linked functions
Function block | Command language | Function
SetAcceleration | SA | Set acceleration
SetControlWord | CW | Set switch-on behaviour
SetMapOptionsWord | MW | Set position mapping
SetSlowSpeed | SS | Set velocity for creep speed
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode
SetVelocity | SV | Set velocity


MoveRelativePosition (MR)

Reference [image] Positioning [image] MoveRelativePosition (MR)
MoveRelativePosition (MR)
Relative positioning
Description
Library: Positioning
The motor moves from the start position towards the target position by the increments set using diValue.
Necessary settings in linked function blocks
Set velocity see SetVelocity
Set acceleration see SetAcceleration
Set deceleration ramp see SetDeceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
Travel commands can only be executed when the position controller is active.
The velocity set using SetVelocity may not be achieved if the distance to travel is too short. In this case the velocity profile is triangular instead of trapezoidal.
A creep speed can be specified with SetSlowSpeed. SetSlowSpeedMode switches between creep speed (SetSlowSpeed) and standard velocity (SetVelocity).
During execution of MoveRelativePosition, values on the following function blocks can be changed:
–
SetAcceleration
–
SetDeceleration
–
SetVelocity
–
SetSlowSpeed
Please note: Changed values on SetAcceleration, SetVelocity and SetDeceleration will only come into effect the next time MoveRelativePosition is called.
Before executing a travel command, the target position is checked for compliance with the software end limits (function blocks SetLowPositionLimit and SetHighPositionLimit). The travel command is not executed if the target position is outside the software end limits. The controller signals the error "Target position is outside the software end limit".
If you are using the function for round axes, see also the block SetPositionBound.
A position mapping/map execution can be ended using MoveRelativePosition.
The controller signals an "M" to the Ethernet interface when executing the function.
Command language only:
If values are transferred via a variable (e.g. "MR $var1"), the value is not automatically reset if the variable is changed. The command must be recalled (e.g. call "MR $var1" again) if the variable is changed.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Relative target position in increments
 | Data type: | DINT
 | Value range: | -2 000 000 000 … +2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MRnn | The motor moves from the start position towards the target position by nn increments.
 | Value range for nn: | -2 000 000 000 … +2 000 000 000
Linked functions
Function block | Command language | Function
SetAcceleration | SA | Set acceleration
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp
SetHighPositionLimit | LH | Set software end limit in plus direction
SetLowPositionLimit | LL | Set software end limit in minus direction
SetMapOptionsWord | MW | Set position mapping
SetPositionBound | SB | Set cycle length
SetSlowSpeed | SS | Set velocity for creep speed
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode
SetVelocity | SV | Set velocity
SetWindow | SW | Set target window for position


MoveToAbsolutePosition (MA)

Reference [image] Positioning [image] MoveToAbsolutePosition (MA)
MoveToAbsolutePosition (MA)
Absolute positioning
Description
Library: Positioning
The motor travels to the absolute target position diValue.
Necessary settings in linked function blocks
Set velocity see SetVelocity
Set acceleration see SetAcceleration
Set deceleration ramp see SetDeceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
Travel commands can only be executed when the position controller is active.
The velocity set using SetVelocity may not be achieved if the distance to travel is too short. In this case the velocity profile is triangular instead of trapezoidal.
SetSlowSpeed can be used to specify a creep speed for the velocity. SetSlowSpeedMode switches between creep speed (SetSlowSpeed) and normal velocity (SetVelocity).
During execution of MoveToAbsolutePosition, values on the following function blocks can be changed:
–
SetAcceleration
–
SetDeceleration
–
SetVelocity
–
SetSlowSpeed
Please note: Changed values on SetAcceleration, SetVelocity and SetDeceleration will only come into effect the next time MovetoAbsolutePosition is called.
Before executing a travel command, the target position is checked for compliance with the software end limits (function blocks SetLowPositionLimit and SetHighPositionLimit). The travel command is not executed if the target position is outside the software end limits. The controller signals the error "Target position is outside the software end limit".
If you are using the function for round axes, see also the block SetPositionBound.
It is possible to end a current motion command (e.g. ExecuteMap, MoveConstantVelocity) using the command MoveToAbsolutePosition. See also
–
SetMapOptionsWord, Bit 6
–
SetMoveOptionsWord, Bit 1-3
The controller signals an "M" to the Ethernet interface when executing the function.
Command language only:
If values are transferred via a variable (e.g. "MA $var1"), the value is not automatically reset if the variable is changed. The command must be recalled (e.g. call "MA $var1" again) if the variable is changed.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Absolute target position in increments
 | Data type: | DINT
 | Value range: | -2 000 000 000 … +2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MAnn | Absolute target position in nn increments
 | Value range for nn: | -2 000 000 000 … +2 000 000 000
Linked functions
Function block | Command language | Function
SetAcceleration | SA | Set acceleration
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp
SetHighPositionLimit | LH | Set software end limit in plus direction
SetLowPositionLimit | LL | Set software end limit in minus direction
SetMapOptionsWord | MW | Set position mapping
SetMoveOptionsWord | ZW | Preset positioning behaviour
SetPositionBound | SB | Set cycle length
SetSlowSpeed | SS | Set velocity for creep speed
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode
SetVelocity | SV | Set velocity
SetWindow | SW | Set target window for position


ResetError ($Ft.n=0)

Reference [image] Positioning [image] ResetError ($Ft.n=0)
ResetError ($Ft.n=0)
Reset error variable
Description
Library: Positioning
The error variable on the selected axis is reset.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
$Ft.n | The error variable on the selected axis (last error number) is reset.
 | Value range for n: | 1 … 60: Number of axis (can be set using CD command)
 | Value range for t: | 0: PMCprimo C
Linked functions
Function block | Command language | Function
GetError | $Ft.n | Read error variable


SetAbortDeceleration (XA)

Reference [image] Positioning [image] SetAbortDeceleration (XA)
SetAbortDeceleration (XA)
Set E-STOP braking ramp
Description
Library: Positioning
This function is called with an emergency stop from AbortMotor. The motor brakes with the deceleration ramp set using udiValue in increments/second2.
Notes
The value for the deceleration ramp can be changed at any time, including during travel.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value for the deceleration ramp in increments/second2
 | Data type: | UDINT
 | Value range: | 1 000 … 2 000 000 000
 | Default value: | 1 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
XAnn | Value for the deceleration ramp in increments/second2
 | Value range for nn: | 1 000 … 2 000 000 000
 | Default value: | 1 000 000
Linked functions
Function block | Command language | Function
AbortMotor | AB | Stop motor, E-STOP


SetAcceleration (SA)

Reference [image] Positioning [image] SetAcceleration (SA)
SetAcceleration (SA)
Set acceleration
Description
Library: Positioning
The motor accelerates with the value set using udiValue in increments/second2.
Notes
The acceleration ramp can be changed at any time, including during travel (exceptions: during execution of MoveRelativePosition and MoveToAbsolutePosition). Please note: Changed values for the acceleration ramp will only come into effect the next time the function blocks are called.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
The deceleration ramp is used by the function blocks
–
MoveToAbsolutePosition
–
MoveRelativePosition
–
InitialisePosition
–
InitialisePositionBounds
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value for the acceleration in increments/seconds2
 | Data type: | UDINT
 | Value range: | 1 000 … 2 000 000 000
 | Default value: | 100 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SAnn | Set parameters for acceleration in increments/second2
 | Value range for nn: | 1 000 … 2 000 000 000
 | Default value: | 100 000
Linked functions
Function block | Command language | Function
IntitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
MoveConstantVelocity | VC | Travel at constant velocity
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning


SetBacklashDistance (BL)

Reference [image] Positioning [image] SetBacklashDistance (BL)
SetBacklashDistance (BL)
Set backlash compensation
Description
Library: Positioning
This function compensates errors that may arise during positioning due to mechanical backlash. Each time the motor’s direction of rotation changes, nn increments are added to the specifications in MoveRelativePosition or MoveToAbsolutePosition.
Notes
The function is only effective with the positioning commands MoveRelativePosition and MoveToAbsolutePosition.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
Diagram
set value: Sollwert
actual value: Istwert
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Value for the backlash compensation in increments
 | Data type: | UINT
 | Value range: | 0 … 65 535
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
BLnn | Value for the backlash compensation in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning


SetCreepDistance (SC)

Reference [image] Positioning [image] SetCreepDistance (SC)
SetCreepDistance (SC)
Set distance for creep speed
Description
Library: Positioning
After travelling at standard velocity (SetVelocity), a positioning operation (absolute or relative) is ended using creep speed.
Necessary settings in linked function blocks
Switch between standard and creep speed mode see SetSlowSpeedMode
Set velocity for creep speed see SetSlowSpeed
Absolute positioning see MoveToAbsolutePosition or Relative positioning see MoveRelativePosition
Notes
The function is used to approach the target position slowly.
Creep speed is used to travel the distance before reaching the target position, set using uiValue.
The function can only be used by the following positioning commands:
–
MoveRelativePosition
–
MoveToAbsolutePosition
usiValue = 0 (standard velocity) must be activated in the function block SetSlowSpeedMode.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiValue | Distance for creep speed in increments
 | Data type: | UINT
 | Value range: | 0 … 65 535
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SCnn | Distance for creep speed in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetSlowSpeed | SS | Set velocity for creep speed
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode


SetDeceleration (DC)

Reference [image] Positioning [image] SetDeceleration (DC)
SetDeceleration (DC)
Set deceleration ramp
Description
Library: Positioning
This function brakes the motor with the deceleration ramp set using udiValue in increments/second2.
Notes
The deceleration ramp can be changed at any time, including during travel. Please note: On function blocks that use the deceleration ramp, changed values for the deceleration ramp will only come into effect the next time they are called.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
The deceleration ramp is used by the function blocks
–
StopMotor
–
MoveToAbsolutePosition
–
MoveRelativePosition
–
InitialisePosition
–
InitialisePositionBounds
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value for the deceleration ramp in increments/second2
 | Data type: | UDINT
 | Value range: | 1 000 … 2 000 000 000
 | Default value: | 100 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
DCnn | Value for the deceleration ramp in increments/second2
 | Value range for nn: | 1 000 … 2 000 000 000
 | Default value: | 100 000
Linked functions
Function block | Command language | Function
InitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
StopMotor | ST | Stop command


SetMoveOptionsWord (ZW)

Reference [image] Positioning [image] SetMoveOptionsWord (ZW)
SetMoveOptionsWord (ZW)
Preset positioning behaviour
Description
Library: Positioning
This function determines the behaviour of the controller during positioning commands. 8 bits are available.
Notes
Command language only:
–
A wildcard "X" can also be stated for each bit. This bit retains its current value.
–
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Presetting for positioning behaviour
 | Data type: | USINT
 | Value range: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0000 0000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ZWbb | Presetting for positioning behaviour
 | Value range for bb: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0000 0000
Settings
Bit 0 | Sign for the position counter
 | 0: | Position counter negative and positive
 | 1: | Position counter positive
Bit 1 | Influence of cycle length on positioning commands
 | 0: | The cycle length set using SetPositionBound (SB) does not influence the positioning commands
 | 1 | With absolute positioning MoveToAbsolutePosition, the cycle length is taken into account. The axis travels to the position within the cycle limit that corresponds to the absolute position.
Bit 2 | The approach direction of absolute demand positions to a round axis is taken into account. Bit 3 determines whether the approach direction is positive or negative.
 | 0: | Approach direction not defined
 | 1: | Approach direction is defined in Bit 3
Bit 3 | The approach direction of the demand position with absolute positioning on a round axis is defined when Bit 2 = 1 is set.
 | 0: | Positive approach direction
 | 1: | Negative approach direction
Bit 4 | Travel with absolute positioning MoveToAbsolutePosition is defined when Bit 1 = 1 and the distance is a multiple of the cycle length.
 | 0: | Distance SetPositionBound is not travelled
 | 1: | Distance SetPositionBound is travelled
Bit 5 | The cycle length set using SetPositionBound when executing WaitForAbsolutePosition is taken into account.
 | 0: | Do not take cycle length into account
 | 1: | Take cycle length into account
 | Example: SB10000 WA12000 Waiting at position 2000 or -8000 (12000%10000 = 2000). WA-12000 Waiting at position 8000 or -2000 (-12000%10000 + 10000 = 8000) The wait command is standardised at the cycle length. This ensures that the command is ended during a cycle. The possibility of WaitForAbsolutePosition (WA) waiting indefinitely is excluded, e.g. if WA has been started with WA-12000 and the axis travels in a positive direction.
Bit 6 | Reserved
Bit 7 | The cycle length can be corrected automatically if the axis moves with position mapping.
 | 0: | Automatic cycle length correction disabled
 | 1: | Automatic cycle length correction enabled
 | The cycle length specified using SetPositionBound is multiplied by the transmission ratio SetScaleMapping. A reference sensor is no longer necessary with uneven gear ratios. Example: SB4096; SM1,3 The cycle length would be 1365.33. This would result in a drift of one increment for every three pulses with a constant forward movement. The cycle length is now 1365 increments for two pulses and 1366 for one pulse. Drift is avoided. The calculated cycle length can be checked using GetMappedMasterBound.
Linked functions
Function block | Command language | Function
GetMappedMasterBound | GM | Read current cycle length of slave axis
MoveToAbsolutePosition | MA | Absolute positioning
SetPositionBound | SB | Set cycle length
SetScaleMapping | SM | Set transmission ratio
WaitForAbsolutePosition | WA | Wait loop until absolute position is achieved


SetSlowSpeed (SS)

Reference [image] Positioning [image] SetSlowSpeed (SS)
SetSlowSpeed (SS)
Set velocity for creep speed
Description
Library: Positioning
This function specifies a creep speed. It is stated in increments/s using udiValue.
Necessary settings in linked function blocks
Enable creep speed see SetSlowSpeedMode
Notes
The creep speed SetSlowSpeed must be less than the standard velocity SetVelocity.
The transition from SetVelocity to SetSlowSpeed is travelled with the acceleration SetAcceleration.
Application in SetReferenceCorrectionVelocity: A reference error is adjusted during a reference alignment run at the speed of SetSlowSpeed, when the axis should actually be at standstill.
Creep speed is also used when aligning SetMapBaseOffset, SetSlaveMapOffset and SetScaleMapping when the master is stationary.
Command language only:
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value for the velocity in increments/second
 | Data type: | UDINT
 | Value range: | 0 … 40 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SSnn | Value for the velocity in increments/second
 | Value range for nn: | 0 … 40 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetMapBaseOffset | MB | Set master position offset
SetSlaveMapOffset | MF | Set offset for slave position
SetScaleMapping | SM | Set transmission ratio
SetSlowSpeedMode | VJ | Switch between standard and creep speed mode
SetVelocity | SV | Set velocity


SetSlowSpeedMode (VJ)

Reference [image] Positioning [image] SetSlowSpeedMode (VJ)
SetSlowSpeedMode (VJ)
Switch between standard and creep speed mode
Description
Library: Positioning
This function determines whether travel is at standard velocity or creep speed.
Necessary settings in linked function blocks
Set velocity see SetVelocity
Set velocity for creep speed see SetSlowSpeed
Notes
When switching speeds during the active positioning commands MoveToAbsolutePosition and MoveRelativePosition please note: the creep speed must always be less than the standard velocity.
Command language only:
The value that is currently set is output on the serial interface if no parameter has been stated.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Switches between standard velocity and creep speed
 | Data type: | USINT
 | Value range: | 0: Standard velocity 1: Creep speed
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
VJn | Switches between standard velocity and creep speed
 | Value range of n: | 0: Standard velocity 1: Creep speed
 | Default value: | 0
Linked functions
Function block | Command language | Function
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetSlowSpeed | SS | Set velocity for creep speed
SetVelocity | SV | Set velocity


SetVelocity (SV)

Reference [image] Positioning [image] SetVelocity (SV)
SetVelocity (SV)
Set velocity
Description
Library: Positioning
This function specifies a default velocity. It is stated in increments/s using udiValue.
Necessary settings in linked function blocks
Set acceleration see SetAcceleration
Notes
The value for the deceleration ramp can be changed at any time, including during travel. The velocity is also adjusted when braking with the value stated in SetAcceleration.
Command language only: The value that is currently set is output on the Ethernet interface if no parameter has been stated.
The velocity is used by the function blocks
–
SetAcceleration
–
SetDeceleration
–
MoveConstantVelocity
–
MoveToAbsolutePosition
–
MoveRelativePosition
–
InitialisePosition
–
InitialisePositionBounds
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Value for the velocity in increments/second
 | Data type: | UDINT
 | Value range: | 0 … 40 000 000
 | Default value: | 20 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SVnn | Value for the velocity in increments/second
 | Value range for nn: | 0 … 40 000 000
 | Default value: | 20 000 increments/second
Linked functions
Function block | Command language | Function
InitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
MoveConstantVelocity | VC | Travel at constant velocity
MoveRelativePosition | MR | Relative positioning
MoveToAbsolutePosition | MA | Absolute positioning
SetAcceleration | SA | Set acceleration
SetDeceleration | DC | Set deceleration ramp


StopMotor (ST)

Reference [image] Positioning [image] StopMotor (ST)
StopMotor (ST)
Stop command
Description
Library: Positioning
This function immediately triggers the deceleration ramp defined using SetDeceleration.
Necessary settings in linked function blocks
Set deceleration ramp see SetDeceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
The function stops the motor without stating a target position. A stop command with target position is StopMotorToPosition.
The function only affects the axis selected using the variable usiChannel. The GlobalStop function is a stop command that affects all axes.
The function can be applied with any movement.
The controller signals an "S" to the Ethernet interface when executing the function.
Command language only:
The ST command can also be provided with stated value of nn. In this case the motor stops at the position nn (see StopMotorToPosition (ST)).
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ST
Triggers the deceleration ramp defined using DC.
Linked functions
Function block | Command language | Function
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp


StopMotorToPosition (STnn)

Reference [image] Positioning [image] StopMotorToPosition (STnn)
StopMotorToPosition (STnn)
Stop motor at absolute position
Description
Library: Positioning
This function brakes the motor up to a specified target position (standstill). The deceleration ramp is defined using SetDeceleration.
Necessary settings in linked function blocks
Set deceleration ramp see SetDeceleration
Trapezoidal or sinusoidal velocity profile see SetControlWord
Notes
The command can be applied with any movement.
Master and slave axis position mappings can be ended using StopMotorToPosition if the disengagement is to be at a precise position.
Please note:
–
Master and slave axis position mappings are ended when the deceleration ramp starts. The deceleration ramp is linear. It also depends on the settings in the commands SetClutchLength and SetClutchTime.
–
If the master stops in the meantime, the slave continues braking. In this case, the slave's travel may be longer than specified by the master.
The controller signals an "C" to the Ethernet interface when executing the function.
The "C" signal is maintained if the target position cannot be reached, e.g.
–
when a negative target position is specified, although travel is in a positive direction.
–
when a slave cannot reach the target position of the function StopMotorToPosition when position mapping is running.
Diagram
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diPosition | Target position in increments
 | Data type: | DINT
 | Value range: | -2 000 000 000 … +2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
STnn | Triggers the deceleration ramp defined using DC. If a value nn is not stated, the motor stops without a target position.
 | Value range for nn: | -2 000 000 000 …+2 000 000 000
Linked functions
Function block | Command language | Function
SetClutchLength | CL | Set length for software coupling
SetClutchTime | CT | Set time for software coupling
SetControlWord | CW | Set switch-on behaviour
SetDeceleration | DC | Set deceleration ramp
SetMapOptionsWord | MW | Set position mapping


Referencing

Reference [image] Referencing
Referencing
DefinePositionSnapshot: Define digital input for a snapshot of the encoder
DefineReferenceInput: Define input as reference input
ReSetReferencePositionAtOtherPosition: Deactivate position for correcting a reference error on another axis
SetFilterOnReference: Set filter for reference error
SetMaxReferenceCorrection: Set maximum value of a reference error correction
SetReferenceAcceleration: Set correction acceleration or path
SetReferenceAdvanceFactor: Define phase displacement for reference signal
SetReferenceCorrectionVelocity: Maximum velocity when correcting a reference error
SetReferenceErrorLimit: Set reference error limit
SetReferenceFalseHighLimit: Set upper limit for reference input FALSE
SetReferenceFalseLowLimit: Set lower limit for reference input FALSE
SetReferenceFilterOptionWord: Set reference filter
SetReferenceHoldoffTime: Set debounce time or debounce distance for reference signal
SetReferenceMode: Activate cyclical referencing
SetReferenceOffset: Set reference offset
SetReferenceOptionsWord: Preset reference behaviour
SetReferencePosition: Set position for reference error correction
SetReferencePositionAtOtherPosition: Define position for reference error correction on another axis
SetReferenceRepeatLength: Set reference cycle length
SetReferenceTimeout: Monitor reference input
SetReferenceTrueHighLimit: Set upper limit for reference input TRUE
SetReferenceTrueLowLimit: Set lower limit for reference input TRUE
UndefineInput: Delete definition of an input


DefinePositionSnapshot (PS)

Reference [image] Referencing [image] DefinePositionSnapshot (PS)
DefinePositionSnapshot (PS)
Define digital input for a snapshot of the encoder
Description
Library: Referencing
This function defines a digital input for the snapshot of an encoder signal on the selected axis.
Necessary settings in linked function blocks
Activate cyclical referencing see SetReferenceMode
Notes
Only fast inputs on a PMCprimo C can be used.
The value of the encoder signal snapshot is not affected by an offset set using SetReferenceOffset.
The application of DefinePositionSnapshot generates an error if a reference signal has already been defined for the axis using DefineReferenceInput or DefineZeroMarkerInput.
The value is read using DisplaySnapshotPosition.
The inputs of a device are grouped into bytes:
–
usiBank: Refers to an input byte (byte address)
–
usiInput: Refers to a specific input of a byte defined with usiBank (bit address)
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
The direction of movement at the snapshot is set using the input interface usiPolarity.
The definition of the input can be deactivated using UndefineInput.
Command language only:
–
The input is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Input byte
 | Data type: | USINT
 | Value range: | 1: PMCprimo C
usInput | Number of the input within a byte
 | Data type: | USINT
 | Value range: | 1 … 6: PMCprimo C 1 … 8: PMCprimo MC
usiPolarity | Polarity of the input signal to define the direction of movement
 | Data type: | USINT
 | Value range: | 0: - (negative) 1: + (positive)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
PSg:n±
Define digital input for a snapshot of the encoder
Value range for |
g: | see usiBank
n: | see usiInput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
DefineReferenceInput | DR | Define input as reference input
DefineZeroMarkerInput | DZ | Define zero track of the encoder as reference input
DisplaySnapshotPosition | DS | Display stored snapshot of encoder
SetReferenceMode | RM | Activate cyclical referencing


DefineReferenceInput (DR)

Reference [image] Referencing [image] DefineReferenceInput (DR)
DefineReferenceInput (DR)
Define input as reference input
Description
Library: Referencing
This function defines a digital input as reference input for the stated axis.
Necessary settings in linked function blocks
Activate cyclical referencing see SetReferenceMode
Notes
The axis may also be virtual.
The inputs of a device are grouped into bytes:
–
usiBank: Refers to an input byte (byte address)
–
usiInput: Refers to a specific input of a byte defined with usiBank (bit address)
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
usiPolarity defines the pulse edge that is to be evaluated
The definition of the input can be deactivated using UndefineInput.
Command language only:
–
The input is deactivated if the option "±" is not set.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiBank | Input byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 inputs
usiInput | Number of the input within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 inputs, a new group must be defined wit usiBank
usiPolarity | Set pulse edge
 | Data type: | USINT
 | Value range: | 0: Falling edge (-) 1: Rising edge (+)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
DR[g:]n±
Define input as reference input
Value range for |
g: | see usiBank
n: | see usiInput
±: | see usiPolarity
Linked functions
Function block | Command language | Function
SetReferenceMode | RM | Activate cyclical referencing
UndefineInput | UI | Delete definition of an input


ReSetReferencePositionAtOtherPosition (RKn)

Reference [image] Referencing [image] ReSetReferencePositionAtOtherPosition (RKn)
ReSetReferencePositionAtOtherPosition (RKn)
Deactivate position for correcting a reference error on another axis
Description
Library: Referencing
The effect of this function is to cancel the correction of a reference error on another axis.
Necessary settings in linked function blocks
Correction of a reference error on the other axis see SetReferencePositionToOtherPosition
Notes
Command language only:
The current configuration of the selected axis is displayed if no parameter is set with RK.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
bExecute see Function blocks
usiNode | Node number of the network subscriber for the axis on which the position diPosition (see SetReferencePositionAtOtherPosition) must be achieved before reference error correction is started
 | Value range: | 0: Must always be stated
usiChannel | Number of the axis on which the position diPosition (see SetReferencePositionAtOtherPosition) must be achieved before reference error correction is started
 | Value range: | 1 … n: Number of the axis, n depends on the setting in the CD command.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RKn | Number of axis
 | Value range for n: | see usiChannel
Linked functions
Function block | Command language | Function
SetReferencePositionAtOtherPosition | RKn.p | Define position for reference error correction on another axis


SetFilterOnReference (FR)

Reference [image] Referencing [image] SetFilterOnReference (FR)
SetFilterOnReference (FR)
Set filter for reference error
Description
Library: Referencing
This function sets a filter for a reference error.
Notes
The controller ignores reference errors that are greater than the value set using udiValue.
The function can be used to filter out reference signals that are outside the expected permitted range.
udiValue:=0: No filter is active. The value can therefore also be used to delete a filter.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Reference errors that are greater than the set value are ignored (in increments)
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FRnn | Reference errors that are greater than the set value are ignored (in increments)
 | Value range for nn: | 0 … 2 000 000 000


SetMaxReferenceCorrection (SR)

Reference [image] Referencing [image] SetMaxReferenceCorrection (SR)
SetMaxReferenceCorrection (SR)
Set maximum value of a reference error correction
Description
Library: Referencing
This function limits the value of the reference error that is corrected on the motor to the value udiValue.
Notes
This function also enables cyclical referencing, if the reference signals do not match the set cycle length.
The controller calculates the reference error when it detects a reference signal. The reference error is the difference between the zero point defined by the reference signal
–
and the zero position
–
or the cycle length defined using SetPositionBound.
The reference error on the motor is offset if it is within udiValue or the defined SetReferenceRepeatLength. Prerequisite: SetReferenceOptionsWord Bit 0:=1.
The reaction to a reference error depends on SetReferenceOptionsWord Bit 1, if the reference error is outside udiValue:
–
SetReferenceOptionsWord Bit 1:=0: The reference error is not offset and corrected on the motor. The error message "Reference error limit has been exceeded!" is not triggered.
–
SetReferenceOptionsWord Bit 1:=1: udiValue is used as the maximum error and is corrected on the motor. The error message "Reference error reduced to the maximum value!" is triggered!"
The error message "Reference error limit has been exceeded!" is triggered when the limit value set for the reference error using SetReferenceErrorLimit has been exceeded. SetErrorOptionsWord Bit 1 is used to set whether the motor is then to be shut down.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Reference error to be ignored in increments
 | Data type | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
SRnn | Reference error to be ignored in increments
 | Value range for nn: | 0 … 2 000 000 000
Linked functions
Function block | Command language | Function
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error
SetPositionBound | SB | Set cycle length
SetReferenceErrorLimit | LR | Set reference error limit
SetReferenceOptionsWord | RW | Preset reference behaviour
SetReferenceRepeatLength | RL | Set reference cycle length


SetReferenceAcceleration (RC)

Reference [image] Referencing [image] SetReferenceAcceleration (RC)
SetReferenceAcceleration (RC)
Set correction acceleration or path
Description
Library: Referencing
This function defines an acceleration ramp for achieving correction velocity. An acceleration path can also be specified as an alternative.
Necessary settings in linked function blocks
Maximum velocity when correcting a reference error see SetReferenceCorrectionVelocity
Notes
Offsetting a reference error results a new demand position for the slave axis.
The function must be used on the slave axis.
udiValue:=0: The correction velocity is achieved as quickly as possible. The acceleration is one step.
SetReferenceOptionsWord Bit 6:=1: udiValue is used to specify the acceleration path the axis would cover if there were no error to correct.
SetReferenceOptionsWord Bit 6:=1 → 0: A warning is triggered if udiValue:=1 … 1000 is set. The value is automatically set to "0".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | SetReferenceOptionsWord Bit 6:=0: Correction acceleration in increments/s2 SetReferenceOptionsWord Bit 6:=1: Acceleration path in increments
 | Data type | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RCn | RW Bit 6:=0: Correction acceleration in increments/s2 RW Bit 6:=1: Acceleration path in increments
 | Value range for n: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetReferenceCorrectionVelocity | RV | Maximum velocity when correcting a reference error
SetReferenceOptionsWord | RW | Preset reference behaviour


SetReferenceAdvanceFactor (RN)

Reference [image] Referencing [image] SetReferenceAdvanceFactor (RN)
SetReferenceAdvanceFactor (RN)
Define phase displacement for reference signal
Description
Library: Referencing
This function adds a velocity-dependent phase displacement to the axis reference signal.
Necessary settings in linked function blocks
Calculate average velocity see DisplayVelocity
Set time period for calculating the average velocity see SetVelocityAveragingTime
Notes
Calculation of phase displacement:
Phase displacement of reference signal = (demand velocity / 256) * (diValue / 256)
The average demand velocity is used for the calculation. This is determined via the time period set using SetVelocityAveragingTime.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Phase displacement in seconds
 | Data type: | DINT
 | Value range: | ±2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RNnn | Phase displacement in seconds
 | Value range for nn: | ±2 000 000 000
Linked functions
Function block | Command language | Function
DisplayVelocity | DV | Display current or average velocity
SetVelocityAveragingTime | VT | Set time period for calculating the average velocity


SetReferenceCorrectionVelocity (RV)

Reference [image] Referencing [image] SetReferenceCorrectionVelocity (RV)
SetReferenceCorrectionVelocity (RV)
Maximum velocity when correcting a reference error
Description
Library: Referencing
This function defines a maximum velocity for the reference error correction. An actual path can also be specified as an alternative.
Notes
The value udiValue limits the maximum velocity during the reference error correction.
udiValue:=0: The reference error correction is implemented as a step function.
The following formula applies:
Change in velocity = current velocity * SetReferenceCorrectionVelocity / 100
The reference error correction is implemented at creep speed (see SetSlowSpeed) if a reference error has been detected at a stationary axis.
The error "Could not correct the reference error in one cycle" is returned if the motion controller detects a reference signal before an existing reference error could be offset. This error can occur if the change in velocity (SetReferenceAcceleration) is too low and the cycle lengths are very short.
In the event of an error, the controller shuts down the motor if SetErrorOptionsWord Bit 2=1 is set.
SetReferenceOptionsWord Bit 4:=1: udiValue is used to specify a path for the reference error correction. This includes the actual path, without correction. In this way, the reference error correction is distributed on a defined, optimum path.
The overall path udiValue and acceleration path SetReferenceAcceleration are specified during this operation. These are used to calculate the required acceleration and velocity for the reference error correction DisplayReferenceError (see also the diagram below).
Diagram
Reference error correction with velocity factor specified:
Key:
reference error: Reference error
reference signal: Reference signal
tcycle: Theoretical cycle length
Reference error correction with path specified:
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Adjustment velocity or actual path
 | Data type: | UDINT
 | Value range: | SetReferenceOptionsWord Bit 4:=0: Maximum adjustment velocity as % of the demand velocity: 0 … 200 SetReferenceOptionsWord Bit 4:=1: Actual path without correction in increments: 0 … 2 000 000 000
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RVn | Adjustment velocity or actual path
 | Value range for n: | RW Bit 4:=0: Maximum adjustment velocity as % of the demand velocity: 0 … 200 RW Bit 4:=1: Actual path without correction in increments: 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
DisplayReferenceError | DF | Display last reference error
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error
SetReferenceAcceleration | RC | Set correction acceleration or path
SetReferenceOptionsWord | RW | Preset reference behaviour
SetSlowSpeed | SS | Set velocity for creep speed


SetReferenceErrorLimit (LR)

Reference [image] Referencing [image] SetReferenceErrorLimit (LR)
SetReferenceErrorLimit (LR)
Set reference error limit
Description
Library: Referencing
This function sets a reference error limit.
Notes
The error message "Reference error limit has been exceeded!" is returned if the reference error is greater than the value set using udiValue.
SetErrorOptionsWord Bit 1:=1: It is also possible to specify that the motor switches off.
SetReferenceErrorLimit is independent of SetMaxReferenceCorrection and SetFilterOnReference.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Reference error limit in increments
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
LRnn | Reference error limit in increments
 | Value range for nn: | 0 … 2 000 000 000
Linked functions
Function block | Command language | Function
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error


SetReferenceFalseHighLimit (FH)

Reference [image] Referencing [image] SetReferenceFalseHighLimit (FH)
SetReferenceFalseHighLimit (FH)
Set upper limit for reference input FALSE
Description
Library: Referencing
This function limits the path length of a reference input in conjunction with the following function blocks:
SetReferenceFalseLowLimit
SetReferenceTrueHighLimit
SetReferenceTrueLowLimit
Necessary settings in linked function blocks
Define input as reference input see DefineReferenceInput
Notes
The motion controller only evaluates a signal at the reference input if it is detected within specified limits:
–
SetReferenceFalseLowLimit ≤ Path length DisplayReferenceLengthFalse=FALSE ≤ SetReferenceFalseHighLimit
–
SetReferenceTrueLowLimit ≤ Path length DisplayReferenceLengthTrue=TRUE ≤ SetReferenceTrueHighLimit
usiPolarity defines the pulse edge that is to be evaluated in DefineReferenceInput. The meaning alternates with TRUE and FALSE.
FALSE is not checked if udiValue=0 on SetReferenceFalseHighLimit and SetReferenceFalseLowLimit.
TRUE is not checked if udiValue=0 on SetReferenceTrueHighLimit and SetReferenceTrueLowLimit.
No check is carried out if all four inputs = 0.
The functions blocks are used to enable a valid reference signal to be filtered from a multitude of reference detection signals. This feature is particularly suitable for pressure measurements and recording tasks.
The motion controller detects a valid reference signal only when it switches from TRUE to FALSE. However, the reference error for initialisation and cyclical referencing is detected with a rising edge (switching from FALSE to TRUE).
Diagram
Limit values for evaluation of the reference signal
FL: SetReferenceFalseLowLimit
FH: SetReferenceFalseHighLimit
ZL: SetReferenceTrueLowLimit
ZH: SetReferenceTrueHighLimit
ZX: DisplayReferenceLengthFalse
ZY: DisplayReferenceLengthTrue
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Set upper limit for reference input to FALSE, in increments
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FHnn | Set upper limit for reference input to FALSE, in increments
 | Value range for nn: | ±2 000 000 000
 | Default value | 0
Linked functions
Function block | Command language | Function
DefineReferenceInput | DR | Define input as reference input
DisplayReferenceLengthFalse | ZX | Display length of reference signal with FALSE state
DisplayReferenceLengthTrue | ZY | Display length of reference signal with TRUE state


SetReferenceFalseLowLimit (FL)

Reference [image] Referencing [image] SetReferenceFalseLowLimit (FL)
SetReferenceFalseLowLimit (FL)
Set lower limit for reference input FALSE
Description
Library: Referencing
see SetReferenceFalseHighLimit
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Set lower limit for reference input to FALSE, in increments
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FLnn | Set lower limit for reference input to FALSE, in increments
 | Value range for nn: | ±2 000 000 000
 | Default value | 0


SetReferenceFilterOptionWord (FW)

Reference [image] Referencing [image] SetReferenceFilterOptionWord (FW)
SetReferenceFilterOptionWord (FW)
Set reference filter
Description
Library: Referencing
This function sets the options for a reference filter on the PMCprimo C.
Notes
Command language only:
–
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit, instead of choosing between "0" or "1". This bit retains its current value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Configuration parameter for reference filter
 | Data type: | USINT
 | Value range: | 8 Bit: Bit 7 … Bit 0
 | Default value: | 0000 0000
 | Bit 0 | Activates the function blocks SetReferenceFalseHighLimit, SetReferenceFalseLowLimit, SetReferenceTrueHighLimit, SetReferenceTrueLowLimit 0: not activated 1: Activated
 | Bit 1 | Determines the reference position SetReferencePosition 0: Reference position SetReferencePosition relative to reference signal 1: Use reference position SetReferencePosition as absolute position
 | Bit 2 | Defines the display of the reference errorDisplayReferenceError 0: DisplayReferenceError displays the reference error 1: DisplayReferenceError does not display the reference error
 | Bit 3 | Functionality of the debounce time SetReferenceHoldoffTime 0: Value of SetReferenceHoldoffTime is evaluated as a time 1: Value of SetReferenceHoldoffTime is evaluated in increments. A further reference signal is ignored if the distance between the last signal and the current signal is less than the debounce time.
 | Bit 4 | Monitoring of the reference signal 0: Monitoring with timeout (SetReferenceTimeout) for round axis. 1: Monitoring with timeout (SetReferenceTimeout) for linear axis. If the current position moves away from the range SetReferenceOffset + SetFilterOnReference to SetReferenceOffset - SetFilterOnReference, the monitoring counter is increased and, if necessary, an error is returned. The monitoring counter is increased and, if necessary, an error is returned if the current position moves away from the range SetReferenceOffset ± SetFilterOnReference.
 | Bit 5 | Distance for reference error correction
 |  | 0: Fixed distance for reference error correction 1: Variable distance for reference error correction and fixed distance for correction-free zone
 |  | SB: |  | Cycle length
 |  | SB-RV: |  | Fixed distance for correction-free zone
 |  | RV: |  | Maximum distance for reference error correction
 |  | DF: |  | Reference error
 |  | RV-DF |  | Variable distance for reference error correction
 | Bit 6 | Debounce time or debounce distance (SetReferenceHoldoffTime) affects DisplayReferenceLengthTrue or DisplayReferenceLengthFalse 0: Affects DisplayReferenceLengthFalse, if reference filter is active 1: Affects DisplayReferenceLengthTrue, if reference filter is active
 | Bit 7 | Special filter function for reference signal: The debounce distance SetReferenceHoldoffTime (SetReferenceOptionWord, Bit 3:=1) is effective from the falling edge of the reference signal. The reference signal is detected when the debounce distance is complete. It is restarted by another falling edge during the course of the debounce distance. The falling edge is detected if SetReferenceOptionWord, Bit 0:=1 and the signal length "high" is defined with SetReferenceTrueLowLimit and SetReferenceTrueHighLimit. 0: Special filter function is inactive 1: Special filter function is active
 |  | ZH: | Upper limit for reference input TRUE
 |  | ZL: | Lower limit for reference input TRUE
 |  | ZY: | Length of reference signal with TRUE state
 |  | ZX: | Length of reference signal with FALSE state
 |  | RH: | Debounce time for reference signal
 |  | reference | Reference signal
 |  | reference true | Valid reference signal
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
FWbb | Configuration parameter for reference filter
 | Value range for bb: | 8 Bit see usiControlword
 |  | Example: FW010XX10X
 | Default value | 0000 0000
Linked functions
Function block | Command language | Function
SetFilterOnReference | FR | Set filter for reference error
SetReferenceFalseHighLimit | FH | Set upper limit for reference input FALSE
SetReferenceFalseLowLimit | FL | Set lower limit for reference input FALSE
SetReferenceHoldoffTime | RH | Set debounce time or debounce distance for reference signal
DisplayReferenceLengthFalse | ZX | Display length of reference signal with FALSE state
DisplayReferenceLengthTrue | ZY | Display length of reference signal with TRUE state
SetReferenceOffset | RF | Set reference offset
SetReferencePosition | RJ | Set position for reference error correction
SetReferenceTimeout | RF | Monitor reference input
SetReferenceTrueHighLimit | ZH | Set upper limit for reference input TRUE
SetReferenceTrueLowLimit | ZL | Set lower limit for reference input TRUE


SetReferenceHoldoffTime (RH)

Reference [image] Referencing [image] SetReferenceHoldoffTime (RH)
SetReferenceHoldoffTime (RH)
Set debounce time or debounce distance for reference signal
Description
Library: Referencing
This function sets a value for a debounce time or debounce distance.
Necessary settings in linked function blocks
Set whether a debounce time or debounce distance will be used in udiValue, see SetReferenceFilterOptionWord, Bit 3
Notes
If udiValue is evaluated as a distance, please note: A further signal is ignored if the distance between the last signal and the current signal is less than udiValue. As the distance always remains the same, bouncing signals that are based on the velocity can be filtered out better.
A debounce time is only effective when reacting to the rising edge of the actual reference signal.
When SetReferenceFilterOptionWord, Bit 0=1, please note: SetReferenceFilterOptionWord, Bit 6, is used to determine whether the debounce time or debounce distance affects DisplayReferenceLengthFalse or DisplayReferenceLengthTrue.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Debounce time or debounce distance
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000 Depends on the setting in SetReferenceFilterOptionWord:, Bit 3 Bit 3 = 0: Debounce time in ms Bit 3 = 1: Debounce distance in increments
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RHnn | Debounce time or debounce distance
 | Value range for nn: | 0 … 2 000 000 000 Depends on the setting in FW, Bit 3 Bit 3 = 0: Debounce time in ms Bit 3 = 1: Debounce distance in increments
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetReferenceFilterOptionWord: | FW | Set reference filter
DisplayReferenceLengthFalse | ZX | Display length of reference signal with FALSE state
DisplayReferenceLengthTrue | ZY | Display length of reference signal with TRUE state


SetReferenceMode (RM)

Reference [image] Referencing [image] SetReferenceMode (RM)
SetReferenceMode (RM)
Activate cyclical referencing
Description
Library: Referencing
This function registers the values from the following function blocks in each cycle (defined with SetPositionBound):
Zero track DefineZeroMarkerInput
Reference signal (defined at input DefineReferenceInput)
Snapshot of encoder position (defined at inputDefinePositionSnapshot)
Necessary settings in linked function blocks
Set cycle length see SetPositionBound
Define zero track of the encoder as reference input see DefineZeroMarkerInput
Define input as reference input see DefineReferenceInput
Define digital input for a snapshot of the encoder see DefinePositionSnapshot
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Referencing mode
 | Data type: | USINT
 | Value range: | 0: Cyclical referencing not activated 1: Cyclical referencing activated
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RMn | Referencing mode
 | Value range for n: | 0: Cyclical referencing not activated 1: Cyclical referencing activated
 | Default value: | 0
Linked functions
Function block | Command language | Function
DefinePositionSnapshot | PS | Define digital input for a snapshot of the encoder
DefineReferenceInput | DR | Define input as reference input
DefineZeroMarkerInput | DZ | Define zero track of the encoder as reference input
SetPositionBound | SB | Set cycle length


SetReferenceOffset (RF)

Reference [image] Referencing [image] SetReferenceOffset (RF)
SetReferenceOffset (RF)
Set reference offset
Description
Library: Referencing
This function sets a reference offset.
Notes
diValue:=0: The position of the reference signal is the absolute position 0.
diValue!=0: The position of the reference signal is the absolute position diValue. The reference error correction is started at an offset to the reference signal of diValue increments.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Reference offset in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RFnn | Reference offset in increments
 | Value range for nn: | ±2 000 000 000
 | Default value: | 0


SetReferenceOptionsWord (RW)

Reference [image] Referencing [image] SetReferenceOptionsWord (RW)
SetReferenceOptionsWord (RW)
Preset reference behaviour
Description
Library: Referencing
This function uses 8 bits to set the reference behaviour of a PMCprimo C.
Notes
Command language only
–
The value that is currently set is output on the Ethernet interface if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit, instead of "0" or "1". This bit retains its current value.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Set reference behaviour
 | Data type: | USINT
 | Value range: | 8 Bit Bit 7 … Bit 0
 | Default value: | 0000 0000
 | Bit 0 | Activates cyclical referencing, if cyclical referencing is also activated in SetReferenceMode. 0: Cyclical referencing not activated 1: Cyclical referencing not activated
 | Bit 1 | Determines the reaction of the controller if the reference error to be corrected is greater than the permitted maximum value for reference error correction (SetMaxReferenceCorrection). 0: The controller ignores a reference error if it is greater than the maximum value. Only reference signals less than the maximum value for reference error correction (SetMaxReferenceCorrection) are evaluated and corrected. 1: The controller runs a reference error correction with the permitted maximum value and returns an error. The reaction (e.g. motor OFF) can be determined in a user program (in command language with the ME command).
 | Bit 2 | Activates a permitted position for correcting a reference error (SetReferencePosition). 0: The correction is made as soon as a reference input is detected. 1: The correction is only started at the position defined using SetReferencePosition.
 | Bit 3 | Prevents any movement back to the reference signal during initialisation through InitialisePosition 0: Movement back to the reference signal is executed during initialisation. 1: No movement back to the reference signal is executed during initialisation.
 | Bit 4 | Determines the functionality of SetReferenceCorrectionVelocity. 0: SetReferenceCorrectionVelocity determines the velocity for reference error correction. 1: SetReferenceCorrectionVelocity determines the path for reference error correction. The path is the actual path, without correction. The reference error is distributed on a defined, optimum path. SetReferenceCorrectionVelocity udiValue > 200: A warning is issued when switching Bit 4 from "0" to "1". udiValue must be < 200. udiValue is automatically set to 100 Bit 6 must be set if Bit 4 = 1. If this is not the case, a warning is issued and Bit 6 is set automatically.
 | Bit 5 | Determines whether a reference error correction is displayed only or is executed on the motor. This bit does not affect a slave axis during active position mapping. This bit has no effect on a slave axis during active position mapping because in this case, every reference error is corrected on the slave axis. 0: Motor position and position indicator are corrected. 1: Only the position indicator is corrected.
 | Bit 6 | Determines the functionality of SetReferenceAcceleration. 0: SetReferenceAcceleration determines the acceleration for the reference alignment run. 1: SetReferenceAcceleration determines the acceleration path that the axis would cover without an alignment run. It is adjusted in one leap to SetReferenceCorrectionVelocity if udiValue = 0. When udiValue=1 … 1000 from SetReferenceAcceleration: A warning is issued when switching Bit 6 from "1" to "0". udiValue must be >1000. udiValue is automatically set to 0.
 | Bit 7 | Corrects the position counter when a reference signal has been detected. 0: The controller searches for the shortest path for correcting the reference error. It will either be corrected at Position 0 or at the end of the cycle limit. The prefix of the reference error determines the direction of the alignment. 1: The controller corrects the reference error to the value 0. The sign for the reference error is negative.
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RWbb | Set reference behaviour
 | Value range for bb: | 8 Bit Bit 7 … Bit 0 see usiControlword
 | Default value: | 0000 0000
Linked functions
Function block | Command language | Function
InitialisePosition | IN | Initialise position counter
SetMaxReferenceCorrection | SR | Set maximum value of a reference error correction
SetReferenceAcceleration | RC | Set correction acceleration or path
SetReferenceCorrectionVelocity | RV | Maximum velocity when correcting a reference error
SetReferenceMode | RM | Activate cyclical referencing
SetReferencePosition | RJ | Set position for reference error correction
--- | ME | Define reaction program in the event of an axis error


SetReferencePosition (RJ)

Reference [image] Referencing [image] SetReferencePosition (RJ)
SetReferencePosition (RJ)
Set position for reference error correction
Description
Library: Referencing
This function defines the position within the cycle limits at which a PMCprimo C may correct a stored reference error.
Necessary settings in linked function blocks
Activate so that the function can be executed, see Bit 2 SetReferenceOptionsWord
Select whether the position is to be absolute or relative, see Bit 1 SetReferenceFilterOptionWord
Notes
diValue=0: The reference error correction is executed immediately.
Execution of the reference error correction is displaced by n cycles if the value diValue is n times greater than the cycle length (SetPositionBound) or the reference cycle length (SetReferenceRepeatLength).
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Position in increments, at which a reference error is corrected.
 | Data type. | DINT
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RJnn | Position in increments, at which a reference error is corrected.
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetPositionBound | SB | Set cycle length
SetReferenceFilterOptionWord | FW | Set reference filter
SetReferenceOptionsWord | RW | Preset reference behaviour
SetReferenceRepeatLength | RL | Set reference cycle length


SetReferencePositionAtOtherPosition (RK)

Reference [image] Referencing [image] SetReferencePositionAtOtherPosition (RK)
SetReferencePositionAtOtherPosition (RK)
Define position for reference error correction on another axis
Description
Library: Referencing
The effect of this function is to start the correction of a reference error on the current axis (usiNode, usiChannel) if the position diPosition of the other axis (usiAtNode, usiAtChannel) has been reached.
Notes
The position defined using SetReferencePosition is no longer effective when SetReferencePositionAtOtherPosition is used.
Command language only:
–
If RK has no parameters, the configuration of the axis currently selected is output.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiAtNode | Node number of the network subscriber, on which diPosition must be achieved in order to start the reference error correction.
 | Data type: | USINT
 | Value range: | 0: Always "0" on a PMCprimo C
usiAtChannel | Number of the axis, on which diPosition must be achieved in order to start the reference error correction.
 | Data type: | USINT
 | Value range: | 0 … n
diPosition | Position in increments, at which reference error correction is to be started
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RKn.p | Position in increments, at which reference error correction is to be started
 | Value range for |
 | n: | see usiAtChannel
 | p: | ±2 000 000 000
Linked functions
Function block | Command language | Function
SetReferencePosition | RJ | Set position for reference error correction


SetReferenceRepeatLength (RL)

Reference [image] Referencing [image] SetReferenceRepeatLength (RL)
SetReferenceRepeatLength (RL)
Set reference cycle length
Description
Library: Referencing
This function determines a reference cycle length. The reference cycle length indicates the position at which the PMCprimo expects a reference signal.
Notes
If a reference cycle length is not stated, PMCprimo will expect a reference signal at the cycle limit (set using SetPositionBound).
Example:
Machine's cycle length: 10 000 increments
Reference cycle length: 2500 increments
A PMCprimo corrects a reference error 4 times within the machine’s cycle length.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Reference cycle length in increments
 | Data type: | udiValue
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RLnn | Reference cycle length in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetPositionBound | SB | Set cycle length


SetReferenceTimeout (RT)

Reference [image] Referencing [image] SetReferenceTimeout (RT)
SetReferenceTimeout (RT)
Monitor reference input
Description
Library: Referencing
This function activates monitoring for the reference signals. It defines the number of reference signals that are ignored.
Notes
Once monitoring has elapsed, the motion controller signals "The monitoring time for the reference signal has elapsed!"
SetErrorOptionsWord Bit 0:=1: The motion controller switches off the controller enable. Power to the motor is removed.
SetReferenceTimeout can also monitor the initialisation (InitialisePosition, InitialisePositionBounds).
SetReferenceTimeout only monitors reference signals that are not already filtered out by SetFilterOnReference.
SetReferenceFilterOptionWord Bit 4:=1 and a reference filter SetFilterOnReference is active:
The monitoring counter is increased if the position moves completely over the area SetReferenceOffset + SetFilterOnReference to SetReferenceOffset - SetFilterOnReference . When the counter status is usiValue, the error "The monitoring time for the reference signal has elapsed!" is returned.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Number of reference signals that are ignored
 | Data type: | USINT
 | Value range: | 0 … 255
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
RTnn | Number of reference signals that are ignored
 | Value range for nn: | 0 … 255
Linked functions
Function block | Command language | Function
InitialisePosition | IN | Initialise position counter
InitialisePositionBounds | IB | Initialise position counter and determine cycle length
SetErrorOptionsWord | EW | Behaviour of the PMCprimo in the event of an error
SetFillterOnReference | FR | Set filter for reference error
SetReferenceFilterOptionWord | FW | Set reference filter
SetReferenceOffset | RF | Set reference offset


SetReferenceTrueHighLimit (ZH)

Reference [image] Referencing [image] SetReferenceTrueHighLimit (ZH)
SetReferenceTrueHighLimit (ZH)
Set upper limit for reference input TRUE
Description
Library: Referencing
see SetReferenceFalseHighLimit
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Set upper limit for reference input to TRUE, in increments
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ZHnn | Set upper limit for reference input to TRUE, in increments
 | Value range for nn: | ±2 000 000 000
 | Default value | 0


SetReferenceTrueLowLimit (ZL)

Reference [image] Referencing [image] SetReferenceTrueLowLimit (ZL)
SetReferenceTrueLowLimit (ZL)
Set lower limit for reference input TRUE
Description
Library: Referencing
see SetReferenceFalseHighLimit
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiValue | Set lower limit for reference input to TRUE, in increments
 | Data type: | UDINT
 | Value range: | ±2 000 000 000
 | Default value | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ZLnn | Set lower limit for reference input to TRUE, in increments
 | Value range for nn: | ±2 000 000 000
 | Default value | 0


UndefineInput (UI)

Reference [image] Referencing [image] UndefineInput (UI)
UndefineInput (UI)
Delete definition of an input
Description
Library: Referencing
This function deletes the definition of an input.
Notes
The inputs of a device are grouped into bytes:
–
usiBank: Refers to an input byte (byte address)
–
usiInput: Refers to a specific input of a byte defined with usiBank (bit address)
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute and usiNode see Function blocks
usiBank | Input byte
 | Data type: | USINT
 | Value range: | 1 … n, depends on the system; each group can have up to 8 inputs
usiInput | Number of the input within a byte
 | Data type: | USINT
 | Value range: | 1 … 8, depends on the system; if there are more than 8 inputs, a new group must be defined wit usiBank
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
UIt:g:n | Delete definition of an input
 | Value range for |
 | t: | see usiNode
 | g: | see usiBank
 | n: | see usiInput


Tension

Reference [image] Tension
Tension
CalculateInitialRatio: Calculate initial transmission ratio with analogue range distances
ExecuteAnalogueDistanceInit: Initialise initial transmission ratio with analogue range distances
SetAnalogueControlMode: Activate analogue control mode
SetAnalogueControlSetPoint: Specify setpoint value for analogue control mode
SetAnalogueControlWord: Set behaviour of analogue control mode
SetAnalogueDifferentialGain: Set differential control gain for analogue control mode
SetAnalogueInputHighLimit: Set upper limit for analogue input
SetAnalogueInputLowLimit: Set lower limit for analogue input
SetAnalogueInputType: Set type of value for analogue input
SetAnalogueIntegralGain: Set integral gain for analogue control mode
SetAnalogueMasterRangeDistance: Set analogue range distance for master
SetAnalogueProportionalGain: Set proportional gain for analogue control mode
SetAnalogueRangeDistance: Set analogue range distance
SetCopyAnalogueInputChannel: Read analogue input of another axis


CalculateInitialRatio (CR)

Reference [image] Tension [image] CalculateInitialRatio (CR)
CalculateInitialRatio (CR)
Calculate initial transmission ratio with analogue range distances
Description
Library: Tension
This function calculates the initial transmission ratio from SetAnalogueRangeDistance and SetAnalogueMasterRangeDistance.
Notes
Transmission ratio= SetAnalogueRangeDistance (Slave) / SetAnalogueMasterRangeDistance (Master)
SetScaleMapping automatically uses the calculated transmission ratio.
ExecuteMap automatically measures the analogue range distances on both axes when automatic measuring is enabled for master and slave.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CR
Calculate initial transmission ratio
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
SetAnalogueMasterRangeDistance | MM | Set analogue range distance for master
SetAnalogueRangeDistance | AR | Set analogue range distance
SetScaleMapping | SM | Set transmission ratio


ExecuteAnalogueDistanceInit (XR)

Reference [image] Tension [image] ExecuteAnalogueDistanceInit (XR)
ExecuteAnalogueDistanceInit (XR)
Initialise initial transmission ratio with analogue range distances
Description
Library: Tension
This function initialises the recording of the transmission ratio with analogue range distances manually.
Notes
Procedure:
1.
The axis moves at SetSlowSpeed in the approach direction of the tension control setpoint value.
2.
An analogue limit value is exceeded. The position is stored and the axis stops.
3.
The axis moves in the opposite direction.
4.
An analogue limit value is exceeded. The position is stored.
The distance between the two analogue limit values is stored:
–
SetAnalogueRangeDistance for the slave
–
SetAnalogueMasterRangeDistance for the master
The function is always executed on the slave axis.
The master axis is initialised if MapLinkSlaveToMaster has previously been executed.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiMasterSlave | Select the axis to be initialised
 | Data type: | USINT
 | Value range: | 0: Master axis is initialised 1: Slave axis is initialised
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
XRn | Select the axis to be initialised
 | Value range for n: | 0: Master axis is initialised 1: Slave axis is initialised
Linked functions
Function block | Command language | Function
CalculateInitialRatio | CR | Calculate initial transmission ratio with analogue range distances
MapLinkSlaveToMaster | ML | Define slave and master axis
SetAnalogueMasterRangeDistance | MM | Set analogue range distance for master
SetAnalogueRangeDistance | AR | Set analogue range distance
SetSlowSpeed | SS | Set velocity for creep speed


SetAnalogueControlMode (AM)

Reference [image] Tension [image] SetAnalogueControlMode (AM)
SetAnalogueControlMode (AM)
Activate analogue control mode
Description
Library: Tension
This function activates analogue control mode (tension control mode).
Necessary settings in linked function blocks
Set behaviour of analogue control mode see SetAnalogueControlWord
Notes
Analogue control mode can be enabled and disabled at any time.
If analogue control mode is enabled, various actions are defined using SetAnalogueControlWord if position mapping is activated using ExecuteMap.
SetMapOptionsWord Bit 0, 1 and 4: The bits are forced set to "1" if analogue control mode is enabled. This is essential for software coupling and the velocity ratios in the tension control loop.
SetAnalogueControlWord Bit 4 or Bit 5=1: The motion controller initialises the transmission ratio automatically. Only then is position mapping activated for tension control mode.
The motion controller measures the positions at which the limit values for the analogue input are above or below the limit values by moving the master/slave axis.. The transmission ratio that is formed as a result provides a good estimate when tension control mode is activated. The specified transmission ratio is achieved more quickly than is possible using the preset values in SetScaleMapping. This is especially true when the machine is not starting out from its start position.
Example: Winding and unwinding
Normally the machine will start with a full or empty reel. The initial transmission ratio is specified through SetScaleMapping. Any restart following an interruption is a soft start, as it uses the last transmission ratio to be determined. However, if the machine is started with partly wound or unwound reels of an unknown diameter, the specified value SetScaleMapping will be unsuitable for the new reel diameter. Due to this automatic initialisation of the transmission ratio at the start of tension control mode, the machine can be started without the tension control loop swinging greatly from the preset value SetScaleMapping to the currently required transmission ratio.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiMode | Activate analogue control mode
 | Data type | USINT
 | Value range: | 0: Analogue control mode is not activated 1: Analogue control mode is activated
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AMn | Activate analogue control mode
 | Value range for n: | 0: Analogue control mode is not activated 1: Analogue control mode is activated
 | Default value: | 0
Linked functions
Function block | Command language | Function
ExecuteMap | XM | Activate position mapping table
SetAnalogueControlWord | AW | Set behaviour of analogue control mode
SetMapOptionsWord | MW | Set position mapping
SetScaleMapping | SM | Set transmission ratio


SetAnalogueControlSetPoint (AC)

Reference [image] Tension [image] SetAnalogueControlSetPoint (AC)
SetAnalogueControlSetPoint (AC)
Specify setpoint value for analogue control mode
Description
Library: Tension
This function specifies the setpoint value for analogue control mode.
Notes
The control deviation is the difference between the setpoint value SetAnalogueControlSetPoint and the actual value measured at the analogue input.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diSetPoint | Setpoint value for analogue control mode The unit depends on the setting in SetAnalogueInputType.
 | Data type: | DINT
 | Value range: | 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ACnn | Setpoint value for analogue control mode The unit depends on the setting in AT.
 | Value range for nn: | 2 000 000 000
 | Default value: | 0
Linked functions
Function block | Command language | Function
SetAnalogueInputType | AT | Set type of value for analogue input


SetAnalogueControlWord (AW)

Reference [image] Tension [image] SetAnalogueControlWord (AW)
SetAnalogueControlWord (AW)
Set behaviour of analogue control mode
Description
Library: Tension
This function defines the behaviour of the analogue control mode.
Notes
Command language only:
–
The value that is currently set is output via the Ethernet interface if no parameter has been stated.
–
A wildcard "X" can also be stated for each bit. A current value ("0" or "1") is retained as a result.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiControlword | Set behaviour of analogue control mode
 | Data type: | USINT
 | Value range: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0000 0000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AWbb | Set behaviour of analogue control mode
 | Value range for bb: | Bit 7 (MSB) … Bit 0 (LSB) von 0 … 1111 1111
 | Default value: | 0000 0000
 | Example: | CW010XX10X
Settings
Bit 0 | Behaviour of the slave axis when position mapping is activated using ExecuteMap
 | 0: | The slave axis switches immediately to active position mapping and achieves the transmission ratio specified through tension control. The software coupling time SetClutchTime is used in the process.
 | 1: | The slave axis travels at creep speed SetSlowSpeed. Position mapping is activated when the web tension reaches its setpoint value.
Bit 1 | Reserved
Bit 2 | Determines the mode of operation of the integral gain The web tension depends on the movement of the master and slave axis because the control loop output is determined by the velocity ratio of both axes. It is possible to control the velocity ratio if the slave and master axis are stationary. In this case it is necessary to disable the integral gain to prevent a large web tension distance from accumulating, causing a step response when starting the motor.
 | 0: | Integral gain disabled
 | 1: | Integral gain enabled
Bit 3 | Transmission ratio when tension control mode is activated
 | 0: | Initial transmission ratio is the value SetScaleMapping
 | 1: | Initial transmission ratio is the current transmission ratio, i.e. normally this is the transmission ratio before the slave was last stopped
Bit 4 | Enables automatic initialisation between the upper and lower limit value of the slave axis when position mapping is activated with tension control mode (see SetAnalogueRangeDistance and ExecuteAnalogueDistanceInit)
 | 0: | Automatic initialisation of the transmission ratio with the upper and lower limit value of the slave axis is not enabled
 | 1: | Automatic initialisation of the transmission ratio with the upper and lower limit value of the slave axis is enabled
Bit 5 | Enables automatic initialisation between the upper and lower limit value of the master axis when position mapping is activated with tension control mode (see SetAnalogueRangeDistance and ExecuteAnalogueDistanceInit)
 | 0: | Automatic initialisation of the transmission ratio with the upper and lower limit value of the master axis is not enabled
 | 1: | Automatic initialisation of the transmission ratio with the upper and lower limit value of the master axis is enabled
Bit 6 | Approach direction of the web tension setpoint value, if Bit 0 is set to "1" and tension control mode is enabled
 | 0: | Approach direction has the same sign as the web tension distance.
 | 1: | Approach direction has the opposite sign to the web tension distance.
Bit 7 | Sign for analogue control mode
 | 0: | The setpoint value is increased if the control deviation (web tension distance) rises.
 | 1: | The setpoint value is reduced if the control deviation (web tension distance) rises.
Linked functions
Function block | Command language | Function
ExecuteAnalogueDistanceInit | XR | Initialise initial transmission ratio with analogue range distances
ExecuteMap | XM | Activate position mapping table
SetAnalogueRangeDistance | AR | Set analogue range distance
SetClutchTime | CT | Set time for software coupling
SetScaleMapping | SM | Set transmission ratio
SetSlowSpeed | SS | Set velocity for creep speed


SetAnalogueDifferentialGain (AD)

Reference [image] Tension [image] SetAnalogueDifferentialGain (AD)
SetAnalogueDifferentialGain (AD)
Set differential control gain for analogue control mode
Description
Library: Tension
This function sets the differential control gain for the algorithm for analogue control mode.
Notes
The differential control gain has a proportional effect on the rate of change of the control deviation. It has a dampening effect where there are rapid changes in the control deviation.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set differential control gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ADnn | Set differential control gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0


SetAnalogueInputHighLimit (AH)

Reference [image] Tension [image] SetAnalogueInputHighLimit (AH)
SetAnalogueInputHighLimit (AH)
Set upper limit for analogue input
Description
Library: Tension
This function defines an upper limit for the analogue input.
Notes
The error reaction when an upper limit is exceeded depends on SetErrorOptionWord Bit 3=1. Exceeding the upper limit is evaluated as "MOTOR OFF".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diLimit | Upper limit The unit depends on the setting in SetAnalogueInputType.
 | Data type: | DINT
 | Value range: | 32 Bit signed
 | Default value | +2000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AHnn | Upper limit The unit depends on the setting in AT.
 | Value range for nn: | 32 Bit signed
 | Default value: | +2000
Linked functions
Function block | Command language | Function
SetAnalogueInputType | AT | Set type of value for analogue input


SetAnalogueInputLowLimit (AL)

Reference [image] Tension [image] SetAnalogueInputLowLimit (AL)
SetAnalogueInputLowLimit (AL)
Set lower limit for analogue input
Description
Library: Tension
This function defines a lower limit for the analogue input.
Notes
The error reaction when a value falls below the lower limit depends on SetErrorOptionWord Bit 3=1. Falling below the lower limit is evaluated as "MOTOR OFF".
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diLimit | Lower limit The unit depends on the setting in SetAnalogueInputType.
 | Data type: | DINT
 | Value range: | 32 Bit signed
 | Default value | -2000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ALnn | Lower limit The unit depends on the setting in AT.
 | Value range for nn: | -32 Bit signed
 | Default value: | -2000
Linked functions
Function block | Command language | Function
SetAnalogueInputType | AT | Set type of value for analogue input


SetAnalogueInputType (AT)

Reference [image] Tension [image] SetAnalogueInputType (AT)
SetAnalogueInputType (AT)
Set type of value for analogue input
Description
Library: Tension
This function specifies the analogue input used for tension control mode.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiType | Value of the analogue input
 | Data type: | UINT
 | Value range: | 0: Value of the analogue input is DisplayAnalogueInput 1: Reference error is DisplayAnalogueInput 2: Motor current is DisplayAnalogueInput (only available with SetFeedbackEncoder=19 or =20) 3: Value of the analogue input is DisplayReferenceErrorToCorrect 101 … 120: Value of the analogue input is the actual position DisplayActualPosition of the axis nn … 100
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ATnn | Value of the analogue input
 | Value range for nn: | see uiType
 | Default value: | 0
Linked functions
Function block | Command language | Function
DisplayActualPosition | DP | Display actual position
DisplayAnalogueInput | DA | Display analogue input
DisplayReferenceErrorToCorrect | DG | Display actual reference error
SetFeedbackEncoder | FS | Select rotary encoder type


SetAnalogueIntegralGain (AI)

Reference [image] Tension [image] SetAnalogueIntegralGain (AI)
SetAnalogueIntegralGain (AI)
Set integral gain for analogue control mode
Description
Library: Tension
This function sets the integral gain for the algorithm for analogue control mode.
Notes
The integral gain has a proportional effect on the time integral of the control deviation.
Applications: Winding and unwinding with tension control mode
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set integral gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 0
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
AInn | Set integral gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0


SetAnalogueMasterRangeDistance (MM)

Reference [image] Tension [image] SetAnalogueMasterRangeDistance (MM)
SetAnalogueMasterRangeDistance (MM)
Set analogue range distance for master
Description
Library: Tension
This function defines an analogue range distance for the master axis.
Notes
The analogue range distance is the distance between the upper and lower limit of the analogue input of an axis.
The value for the analogue range distance is used by the master axis.
Command language only:
The value that is currently set is displayed if MM is entered without parameters. The value calculated using XR can be read.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiDistance | Analogue range distance of master in increments
 | Data type: | UINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 256
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
MMnn | Analogue range distance of master in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 256
Linked functions
Function block | Command language | Function
ExecuteAnalogueDistanceInit | XR | Initialise initial transmission ratio with analogue range distances


SetAnalogueProportionalGain (AP)

Reference [image] Tension [image] SetAnalogueProportionalGain (AP)
SetAnalogueProportionalGain (AP)
Set proportional gain for analogue control mode
Description
Library: Tension
This function sets the proportional gain for the control algorithm for analogue control mode.
Notes
A higher proportional gain enables a short reaction time and a well adapted analogue control mode. However, the proportional gain should be set just high enough so that an overshoot is not created.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
udiGain | Set proportional gain
 | Data type: | UDINT
 | Value range: | 0 … 2 000 000 000
 | Default value: | 10 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
APnn | Set proportional gain
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 10 000


SetAnalogueRangeDistance (AR)

Reference [image] Tension [image] SetAnalogueRangeDistance (AR)
SetAnalogueRangeDistance (AR)
Set analogue range distance
Description
Library: Tension
This function defines an analogue range distance for an axis.
Notes
The analogue range distance is the distance between the upper and lower limit of the analogue input of an axis.
The value for the analogue range distance can be used for a master axis that is not controlled by PMCprimo.
Command language only:
The value that is currently set is displayed if AR is entered without parameters. The value calculated using XR can be read.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
uiDistance | Analogue range distance in increments
 | Data type: | UINT
 | Value range: | 0 … 65 536
 | Default value: | 256
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
ARnn | Analogue range distance in increments
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 256
Linked functions
Function block | Command language | Function
ExecuteAnalogueDistanceInit | XR | Initialise initial transmission ratio with analogue range distances


SetCopyAnalogueInputChannel (CA)

Reference [image] Tension [image] SetCopyAnalogueInputChannel (CA)
SetCopyAnalogueInputChannel (CA)
Read analogue input of another axis
Description
Library: Tension
This function reads an analogue input on another axis.
Notes
Other axes can also access the analogue output, e.g. for tension control mode.
Example:
The following settings are used to read a second analogue input on axis 4:
–
usiNode:=0
–
usiChannel:=4
–
usivalue:=2
Command language: CH0.4;CA 2
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
usiValue | Number of the analogue input
 | Data type: | USINT
 | Value range: | 1 … Number of analogue inputs on the network
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
CAn | Number of the analogue input
 | Value range for n: | 1 … Number of analogue inputs on the network


Wait

Reference [image] Wait
Wait
WaitEndState: End wait state
WaitForAbsolutePosition: Wait loop until absolute position is achieved
WaitForBoundPosition: Wait loop until cycle limit is achieved
WaitForRelativePosition: Wait loop until relative position is achieved
WaitForStatusMotor: Wait loop until motor status is detected
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
see Additional commands in command language


WaitEndState (WE)

Reference [image] Wait [image] WaitEndState (WE)
WaitEndState (WE)
End wait state
Description
Library: Wait
This function ends the wait loop that executes a PMCprimo. The next function is executed immediately.
Notes
The function only affects the selected axis.
Command language only:
GE ends all wait loops.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
WE
The wait loop on a current axis is ended. The next command is executed immediately.
Linked functions
Function block | Command language | Function
--- | GE | Cancel all wait loops


WaitForAbsolutePosition (WA)

Reference [image] Wait [image] WaitForAbsolutePosition (WA)
WaitForAbsolutePosition (WA)
Wait loop until absolute position is achieved
Description
Library: Wait
This function signals to a PMCprimo that a command should not be executed until an absolute position is reached.
Notes
The function can be incorporated into the control program to poll the absolute position.
The controller signals a "W" to the terminal if the wait loop is active on the selected axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Absolute position until the end of the wait loop in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
WA±nn | Absolute position until the end of the wait loop in increments
 | Value range for nn: | ±2 000 000 000


WaitForBoundPosition (WB)

Reference [image] Wait [image] WaitForBoundPosition (WB)
WaitForBoundPosition (WB)
Wait loop until cycle limit is achieved
Description
Library: Wait
This function signals to a PMCprimo that a command should not be executed until the cycle limit is detected.
Necessary settings in linked function blocks
Set cycle length see SetPositionBound
Notes
The controller signals a "W" to the terminal if the wait loop is active on the selected axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
WB
Do not execute the command until the cycle limit is detected
Linked functions
Function block | Command language | Function
DisplayPositionBound | SB | Display cycle length
SetPositionBound | SB | Set cycle length


WaitForRelativePosition (WR)

Reference [image] Wait [image] WaitForRelativePosition (WR)
WaitForRelativePosition (WR)
Wait loop until relative position is achieved
Description
Library: Wait
This function signals to a PMCprimo that a command should not be executed until a relative position is reached.
Notes
The function starts a position counter. The wait loop is ended when the position counter matches the value of diValue.
The controller signals a "W" to the terminal if the wait loop is active on the selected axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Relative position until the end of the wait loop in increments
 | Data type: | DINT
 | Value range: | ±2 000 000 000
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
WR±nn | Relative position until the end of the wait loop in increments
 | Value range for nn: | ±2 000 000 000


WaitForStatusMotor (WS)

Reference [image] Wait [image] WaitForStatusMotor (WS)
WaitForStatusMotor (WS)
Wait loop until motor status is detected
Description
Library: Wait
This function signals to a PMCprimo that a command should not be executed until a certain motor status is detected.
Notes
The controller signals a "W" to the terminal if the wait loop is active on the selected axis.
IEC 61131-3 function block
Schematic representation
Input interface
bExecute, usiNode and usiChannel seeFunction blocks
diValue | Motor status
 | Data type: | DINT
 | Value range: |
 | 0 | Position control loop closed (EnablePositionControl)
 | 8 | Position control loop open, motor switched off (MotorOff)
 | 66 | Axis waits for coupling at the start of a position mapping (ExecuteMap)
 | 67 | Axis executes the coupling process at the start of a position mapping (C)
 | 68 | Axis executes an alignment movement for starting a position mapping (A)
 | 128 | Interpolator for the CNC application is active
 | 256 | Execution of continuous positioning or velocity control (MoveConstantVelocity)
 | 512 | Axis executes a positioning command (MoveToAbsolutePosition, MoveRelativePosition)
 | 2048 | Position mapping (= Map) active (ExecuteMap)
 | 4096 | Axis executes a stop command (StopMotor)
 | 8192 | Initialising is running (InitialisePosition, InitialisePositionBounds)
Output interface
bDone, bError and iErrorNumber see Function blocks
Command language
WSn | Motor status
 | Value range for n: | see diValue


Additional commands in command language

Reference [image] Wait [image] Additional commands in command language
Additional commands in command language
GE: Cancel all wait loops
WC: Wait loop until overflow counter is reached
WF: Wait loop until a reference signal is detected
WI: Wait loop until a positive or negative input status is detected
WT: Time delay
WV: Wait loop until variable is triggered


GE

Reference [image] Wait [image] Additional commands in command language [image] GE
GE
Cancel all wait loops
Description
This command cancels all running wait loops.
Notes
WE only cancels the wait loop of a current axis.
Command language
GE
Cancel all wait loops
Linked functions
Command language | Function
WE | End wait state


WC

Reference [image] Wait [image] Additional commands in command language [image] WC
WC
Wait loop until overflow counter is reached
Description
This command starts a wait loop. The next command cannot be executed until the overflow counter has reached a certain value ±nn.
Necessary settings in linked functions
Set cycle length see SB
Notes
The overflow counter counts the number of times the cycle limit is exceeded. Counting is positive or negative, depending on the travel direction.
The PMCprimo signals "W" to PTerm if the wait loop is active.
There is no IEC 61131-3 function block available. The function can be reproduced as follows:
–
Option 1: Execute WaitForBoundPosition in a loop. The counted loops correspond to nn.
–
Option 2: Emulate the required behaviour by polling DisplayBoundOverflowCounter.
Command language
WC±nn | Value of overflow counter
 | Value range for nn: | ±2 000 000 000
Linked functions
Command language | Function
SB | Set cycle length


WF

Reference [image] Wait [image] Additional commands in command language [image] WF
WF
Wait loop until a reference signal is detected
Description
This command starts a wait loop. The next command cannot be executed until a reference signal has been detected.
Notes
The command can be used if the reference has to be changed after initialisation has taken place.
The PMCprimo signals "W" to PTerm if the wait loop is active.
There is no IEC 61131-3 function block available. The function can be reproduced as follows:
In a controller, a reference input is placed as a pulse edge at bExecute on a function block.
Command language
WF
Activate wait loop


WI

Reference [image] Wait [image] Additional commands in command language [image] WI
WI
Wait loop until a positive or negative input status is detected
Description
This command starts a wait loop. The next command cannot be executed until there is a rising or falling edge at an input.
Notes
The local inputs on a PMCprimo are used if no network subscriber is stated.
The PMCprimo signals "W" to PTerm if the wait loop is active.
There is no IEC 61131-3 function block available. The function can be reproduced as follows:
In a controller, an input is placed as a pulse edge at bExecute on a function block.
Diagram
Example: Waiting for the status at input 2, byte 2.
0.1>
0.1M
0.1W
0.1M
0.1>
MA500;WI2:2-;MA0<CR>
The motor travels to the absolute position 500, waits until the status of input 2, byte 2 is logic "0" and then travels to the absolute position 0.
v: Velocity
Input 2: Input 2
WI: Wait loop
DB: Debounce time
Command language
WI[t.]g:n± | Wait loop until a positive or negative input status is detected
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
±:
+: End of wait loop at rising edge
-: End of wait loop at falling edge


WT

Reference [image] Wait [image] Additional commands in command language [image] WT
WT
Time delay
Description
This command triggers a time delay. The next command cannot be executed until the set time has elapsed.
Notes
The PMCprimo signals "W" to PTerm if the wait loop is active.
There is no IEC 61131-3 function block available. The function can be reproduced in CoDeSys with TON, for example.
Diagram
Example: Time delay of 2 seconds
0.1> MA2000;WT2000;MA0<CR>
0.1M
0.1M
0.1>
The motor moves to the absolute position +2000 increments, waits for 2 seconds and then returns to the absolute position 0.
Command language
WTnn | Time delay in ms
 | Value range for nn: | 0 … 2 000 000 000
 | Default value: | 0


WV

Reference [image] Wait [image] Additional commands in command language [image] WV
WV
Wait loop until variable is triggered
Description
With this command, the motion controller waits until a variable is assigned a value before executing the commands that follow.
Notes
A status variable or error variable may not be used for this command.
It is possible to use the pre-defined variable "$MREADY" from the position mapping table. This variable uses the internal motion generator.
Command language
WV$var | Wait loop until variable is triggered
 | Value range for $var: | Name of variable string


Additional commands in command language

Reference [image] Additional commands in command language
Additional commands in command language
Input commands
Program commands
Display commands
Variable
Miscellaneous


Input commands

Reference [image] Additional commands in command language [image] Input commands
Input commands
BG: Define input inhibit for group
BI: Inhibit input function
BN: Define input inhibit
DB: Set debounce time for inputs
DI: Define input function
DL: Define limit switch input
EI: Enable input function
EN: Enable inputs by priority
LI: Display input definition
MG: Define input mask for group
MI: Inhibit input function
MN: Define input mask
RI: Show state of digital inputs of an input byte
TG: Define enable input for timer, counter or cam
TK: Define input for timer or counter
TZ: Define reset input for timer or counter


BG

Reference [image] Additional commands in command language [image] Input commands [image] BG
BG
Define input inhibit for group
Description
This command defines an input inhibit. An input inhibit is used, for example, to mutually lock commands that may not or cannot be executed simultaneously.
Notes
A pulse edge at an input that is identified as inhibited by definition, inhibits all other inputs belonging to the group. The EI command cancels an inhibit.
II and WI are not influenced by BG.
The input inhibit that is currently defined is displayed if BG is entered without the parameter bb.
After the input is enabled, the corresponding input function will not be executed if the state of an inhibited input changes, in contrast to the MG command (see also MI command).
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
BG[t]g:bb | Define input inhibit for group
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
bb:
Bit mask for the input inhibit
Input 1 is on the right. Each bit represents an input.
0000 0000 … 1111 1111
0: No input inhibit is defined for the input
1: An input inhibit is defined for the input
Default value: 0000 0000
Linked functions
Command language | Function
EI | Enable input function
II | Execute commands depending on input status
MG | Define input mask for group
MI | Inhibit input function
WI | Wait loop until a positive or negative input status is detected


BI

Reference [image] Additional commands in command language [image] Input commands [image] BI
BI
Inhibit input function
Description
This command inhibits a previously defined input function or input group.
Notes
An input function can be inhibited if a program is only to be started once, for example. After the program is called, BI inhibits the input function. It can only be called again if the input is re-enabled using EI.
Input functions can be inhibited if they could disrupt other functions.
II and WI are not influenced by BI.
In contrast to the masked input MG, the corresponding input function is not executed if the state of the input changes and the input is enabled using EI.
All inputs functions that are stated with g are inhibited if the parameter n is not used.
All inputs functions are inhibited if no parameter is used.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
BI[[t.]g[:n]]nn | Inhibit input function
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
Linked functions
Command language | Function
EI | Enable input function
MG | Define input mask for group


BN

Reference [image] Additional commands in command language [image] Input commands [image] BN
BN
Define input inhibit
Description
This command defines an input inhibit at the inputs.
Notes
The addressed input is inhibited (in contrast to BG). The EI command re-enables the inhibited input.
After the input is enabled, the corresponding input function will not be executed if the state of an inhibited input changes (in contrast to MN). See also the MI command.
The input mask that is currently defined is displayed if BN is entered without the parameter bb.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
BN[t]g:bb | Define input inhibit
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
bb:
Bit mask for the input inhibit
Input 1 is on the right. Each bit represents an input.
0000 0000 … 1111 1111
0: No input inhibit is defined for the input
1: An input inhibit is defined for the input
Default value: 0000 0000
Linked functions
Command language | Function
BG | Define input inhibit for group
EI | Enable input function
MI | Inhibit input function
MN | Define input mask


DB

Reference [image] Additional commands in command language [image] Input commands [image] DB
DB
Set debounce time for inputs
Description
This command defines a debounce time for the real and virtual digital inputs.
Notes
Please note: The debounce time for reference inputs is set using RH.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
DBnn | Debounce time for input in ms
 | Value range for nn: | 0 … 10 000 Default value: 0
Linked functions
Command language | Function
RH | Set debounce time or debounce distance for reference signal


DI

Reference [image] Additional commands in command language [image] Input commands [image] DI
DI
Define input function
Description
This command assigns a program to a digital input.
Notes
An error message is triggered if a program is called that is not defined.
The ± sign is used to indicate the pulse edge at which the program is called.
A program can be assigned to each pulse edge. To do this, both pulse edges must be defined as input functions.
An input function is cancelled (+ or -) if DI is entered without a program name.
A program can be called again provided it has been run in full. If this is not the case, the following error is registered. "Cannot start the program <....> because it is already running."
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
Di[t]g:n±,Name | Define input function
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
± | Pulse edge at which the program is started +: Rising edge -: Falling edge
Name | Name of program string


DL

Reference [image] Additional commands in command language [image] Input commands [image] DL
DL
Define limit switch input
Description
This command defines a digital input as a limit switch. The motor shuts down immediately if the PMCprimo detects that the axis has passed a limit switch.
Necessary settings in linked functions
Define node and axis number see CH
Notes
The first ± defines the signal level. The PMCprimo uses this to evaluate whether the end limit has been passed.
The second ± defines the direction of rotation. The limit switch is only then triggered if it has been passed in the specified direction. This entry is optional.
–
The definition as limit switch is deleted if the second ± is not stated.
–
If a direction of rotation is not stated, the motor cannot be switched back on after a limit switch has been triggered, unless the definition as limit switch has previously been deleted.
Once the limit switch has been reached, motion tasks in the opposite direction are permitted if a direction of rotation has been defined. This means that the axis can again be moved away from the limit switch, without having to deactivate it first.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
DLg:n±[,±] | Define limit switch input
 | Value range for
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
First ± | Signal level at which the limit switch is deemed to be triggered +: Signal state "1" -: Signal state "0"
Second ± | Direction of rotation in which the limit switch should trigger exclusively
 | +: Positive direction of rotation -: Negative direction of rotation
Linked functions
Command language | Function
CH | Select axis


EI

Reference [image] Additional commands in command language [image] Input commands [image] EI
EI
Enable input function
Description
This command enables inhibited input functions or inhibited input groups.
Notes
Input functions are masked using the MI command or inhibited using the BI command.
All inputs functions on inputs that are stated via g are enabled if the parameter n is not used.
All inputs functions are enabled if no parameter is used.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
EI[[t:.]g[:n]] | Enable input function
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
Linked functions
Command language | Function
BI | Inhibit input function
MI | Inhibit input function


EN

Reference [image] Additional commands in command language [image] Input commands [image] EN
EN
Enable inputs by priority
Description
This command enables inhibited input functions or input groups. Priority is defined for execution of a program.
Notes
Input functions are masked using the MI command or inhibited using the BI command.
The bit mask bb indicates which inputs are enabled.
If several programs are pending execution due to masking (MI command), the lowest input number starts the corresponding program. All other programs will be ignored (see also EI command).
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
EN[t.]g:n,bb] | Enable inputs by priority
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
bb:
Bit mask for the input inhibit
Input 1 is on the right. Each bit represents an input.
0000 0000 … 1111 1111
0: No input inhibit is defined for the input
1: An input inhibit is defined for the input
Default value: 0000 0000
Linked functions
Command language | Function
BI | Inhibit input function
EI | Enable input function
MI | Inhibit input function


LI

Reference [image] Additional commands in command language [image] Input commands [image] LI
LI
Display input definition
Description
This command lists all the input definitions for a specific input byte.
Notes
Example
0.3> | LI1<CR> | Display all input definitions for input byte 1
# Inputs 0.1 |  | Inputs 1 to 8
0.1:1 - | DR3 | Falling edge is reference signal from axis 3
0.1:2 + | PROG1 | Call program PROG1
0.1:3 - | TEST | Call program TEST
0.1:4 | undef | Input free
0.1:5 | undef | Input free
0.1:6 | undef | Input free
0.1:7 - | DL2 | Software limit switch axis 2
0.1:8 - | undef | Input free
0.3> |  |
Command language
LI[t.]g | Display input definition
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.


MG

Reference [image] Additional commands in command language [image] Input commands [image] MG
MG
Define input mask for group
Description
This command defines an input inhibit. An input inhibit is used, for example, to mutually lock commands that may not or cannot be executed simultaneously.
Notes
A pulse edge at an input that is identified as inhibited by definition, inhibits all other inputs belonging to the group. The EI command cancels an inhibit.
II and WI are not influenced by BG.
The input inhibit that is currently defined is displayed if BG is entered without the parameter bb.
After the input is enabled, the corresponding input function will be executed if the state of an inhibited input changes, in contrast to the BG command (see also MI command).
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
MG[t]g:bb | Define input mask for group
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
bb:
Bit mask for the input inhibit
Input 1 is on the right. Each bit represents an input.
0000 0000 … 1111 1111
0: No input inhibit is defined for the input
1: An input inhibit is defined for the input
Default value: 0000 0000
Linked functions
Command language | Function
EI | Enable input function
II | Execute commands depending on input status
MG | Define input mask for group
MI | Inhibit input function
WI | Wait loop until a positive or negative input status is detected


MI

Reference [image] Additional commands in command language [image] Input commands [image] MI
MI
Inhibit input function
Description
This command inhibits a previously defined input function,
Notes
An input function can be inhibited if a program is only to be started once, for example. After the program is called, BI inhibits the input function. It can only be called again if EI cancels the inhibit.
Input functions can be inhibited if they could disrupt other functions.
II and WI are not influenced by BG.
The input function is executed if the input is enabled after a change in the input state.
All inputs functions that are stated with g are inhibited if the parameter n is not used.
All inputs functions are inhibited if no parameter is used.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
MI[[t.]g[:n]] | Inhibit input function
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
Linked functions
Command language | Function
EI | Enable input function
II | Execute commands depending on input status
WI | Wait loop until a positive or negative input status is detected


MN

Reference [image] Additional commands in command language [image] Input commands [image] MN
MN
Define input mask
Description
This command defines an input mask for a group of inputs.
Notes
The addressed input is masked (in contrast to MG). The EI command re-enables the masked input.
After the input is enabled, the respective input function is executed if the state of a masked input is still different after the enable (in contrast to BN). See also the MI command.
The input mask that is currently defined is displayed if MN is entered without the parameter bb.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
MN[t]g:bb | Define input mask
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
bb:
Bit mask for the input inhibit
Input 1 is on the right. Each bit represents an input.
0000 0000 … 1111 1111
0: No input inhibit is defined for the input
1: An input inhibit is defined for the input
Default value: 0000 0000
Linked functions
Command language | Function
BN | Define input inhibit
EI | Enable input function
MG | Define input mask for group
MI | Inhibit input function


RI

Reference [image] Additional commands in command language [image] Input commands [image] RI
RI
Show state of digital inputs of an input byte
Description
This command displays the state of the input byte g.
Notes
The inputs in Group 1 are displayed if the command is entered without stating g.
The logical signal state is also displayed:
–
masked (M)
–
inhibited (B)
–
enabled (E)
Example of the signal states for outputs on the stated byte:
Output: |  |
 | 0.1> RI0.1<CR> | State of input byte 1
 | 1 2 3 4 5 6 7 8 | Inputs 1 to 8 of Byte 1
 | 0 1 1 0 0 1 0 0 | Logic signal state of inputs 1 to 8
 | E E B M E B E E | Enabled (E), masked (M), inhibited (B) inputs
Inputs: |  |
 | 0.1> |
The software links the virtual outputs to the virtual inputs.
Command language
RI[[t.]g] | Show state of digital inputs of an input byte
 | Value range for
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.


TG

Reference [image] Additional commands in command language [image] Input commands [image] TG
TG
Define enable input for timer, counter or cam
Description
This command links a digital input from input byte g to an output.
Notes
Output defined as electronic cam: the cam is only set if the enable input is TRUE.
Output defined as timer or counter: the function is only executed if the enable input is TRUE.
TG can enable several outputs simultaneously with one input.
The parameters for this command are
Input address
Sign for the signal level ±
Output for timer or counter g2:n2
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
TGg:n[±,g2,n2] | Define enable input for timer, counter or cam
 | Value range for
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
±:
+: Signal level classed as TRUE
-: Signal level classed as FALSE
g2:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n2:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.


TK

Reference [image] Additional commands in command language [image] Input commands [image] TK
TK
Define input for timer or counter
Description
This command links a digital input from byte g to the output g2:n2 of a defined timer or counter function.
Notes
The corresponding counter is incremented or decremented if the state of a counter input switches from FALSE to TRUE (see also TC command).
The timer or counter is stopped and reset if the state of a reset input (defined with the TZ command) switches from FALSE to TRUE.
Enable input defined with TG:
–
Enable input TRUE: Timer or counter is incremented or decremented
–
Enable input FALSE: Timer or counter is not incremented or decremented
The parameters for this command are
Input address
Sign for the signal level ±
Output for timer or counter g2:n2
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
TKg:n[±,g2,n2] | Define input for timer or counter
 | Value range for
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
±:
+: rising edge is classed as a change from FALSE to TRUE
-: falling edge is classed as a change from TRUE to FALSE
g2:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n2:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.
Linked functions
Command language | Function
TC | Define output for a timer or counter function
TG | Define enable input for timer, counter or cam
TZ | Define reset input for timer or counter


TZ

Reference [image] Additional commands in command language [image] Input commands [image] TZ
TZ
Define reset input for timer or counter
Description
This command links a digital input from byte g to the output g2:n2 of a defined timer or counter function.
Notes
The timer or counter is stopped and reset if the state of a reset input switches from FALSE to TRUE (see also TK command). The function can also be implemented with CO.
The parameters for this command are
Input address
Sign for the signal level ±
Output for timer or counter g2:n2
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
TZg:n[±,g2,n2] | Define input for timer or counter
 | Value range for
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
±:
+: Signal level "1" classed as TRUE
-: Signal level "0" classed as FALSE
g2:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n2:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.
Linked functions
Command language | Function
CO | Reset output n in Byte g
TK | Define input for timer or counter


Program commands

Reference [image] Additional commands in command language [image] Program commands
Program commands
AS: Define program for start-up
AX: Cancel command execution
BK: Cancel program execution
EL: Execute command if query is FALSE
ER: End program loop
ES: Enter program
GA: Global abort
GX: Cancel command execution on all axes
IF: Execute command if query is TRUE
II: Execute commands depending on input status
IO: Execute commands depending on output status
IT:Execute commands depending on motor status
IX: Query program status
LOOP: Continuous loop for program processing
LS: List programs
ME:Define reaction program in the event of an axis error
NP: List program number
NS: End of program entry
RP: Repeat command line
XP: Call program in parallel
ZT: List active programs


AS

Reference [image] Additional commands in command language [image] Program commands [image] AS
AS
Define program for start-up
Description
This command defines which program is used to start up the plant.
Notes
The program is always run in the Power On state.
INFORMATION
There are additional commands in command language, which have no equivalent in the function blocks.
Command language
AS[Name] | Defines a program that is run on Power On
 | Value range for Name: | Name of the start-up program that is currently defined string, 20 characters 0: Deletes an existing definition of a start-up program Name stays blank: Displays the name of the current start-up program on the terminal.


AX

Reference [image] Additional commands in command language [image] Program commands [image] AX
AX
Cancel command execution
Description
This command cancels the current command execution. This does not stop the motor.
Notes
Special features in the application of AX:
–
An axis at constant velocity continues to travel at constant velocity.
–
Position mapping also remains activated.
–
A positioning command is run, but all other commands are no longer run.
–
A wait loop is run, but all other commands are no longer run.
Command language
AX
Cancel command execution
Example:
0.1> | VC+<CR> | Axis 1 travels at constant velocity
0.1V | RP;DP;WT200<CR> | Display actual position every 200 ms
0.1V DP | 1000 |
0.1V DP | 1500 |
0.1V DP | 2000 |
0.1V DP | 30000 AX<CR> | Cancel command execution
0.1V |  | Axis 1 travels at constant velocity


BK

Reference [image] Additional commands in command language [image] Program commands [image] BK
BK
Cancel program execution
Description
This command aborts the program that is running.
Notes
Aborting a running program via BK can depend on the results of the commands IF, II, IO, IT or IX.
Command language
BK
Cancel program execution
Linked functions
Command language | Function
IF | Execute command if query is TRUE
II | Execute commands depending on input status
IO | Execute commands depending on output status
IT | Execute commands depending on motor status
IX | Query program status


EL

Reference [image] Additional commands in command language [image] Program commands [image] EL
EL
Execute command if query is FALSE
Description
This command executes another command or command line if the result of one of the commands IF, II, IO, IT or IX is FALSE.
Notes
The EL command must be in the same command line as the command IF, II, IO, IT or IX.
The commands following EL are executed to the end of the command line if the query is false, otherwise these commands are skipped.
Command language
EL
Execute command if query is FALSE
Example:
0.1> | IF(($B!=0)&&($A>=100));XS PRG_A;EL;XS PROG99
0.1> |  | This command line calls the program PRG_A only if variable $B does not equal zero and variable $A is greater than or equal to 100, otherwise the program PROG99 is called.
Linked functions
Command language | Function
IF | Execute command if query is TRUE
II | Execute commands depending on input status
IO | Execute commands depending on output status
IT | Execute commands depending on motor status
IX | Query program status


ER

Reference [image] Additional commands in command language [image] Program commands [image] ER
ER
End program loop
Description
This command exits a program loop created using RP at the end of a run.
Necessary settings in linked functions
Repeat command line see RP
Notes
It is possible to exit continuous or non-continuous loops.
Command language
ER
Exit a program loop at the end of a run
Linked functions
Command language | Function
RP | Repeat command line


ES

Reference [image] Additional commands in command language [image] Program commands [image] ES
ES
Enter program
Description
This command starts a program entry.
Notes
A program consists of lines containing one or more commands. Several commands form a command string, separated by a semicolon ";".
Program entry is completed with NS.
A program is executed with XS or XP. The program is run line by line.
The number of programs is limited by the size of the Flash memory.
Subprograms are permitted. There are 30 nesting levels for subprograms.
A program is deleted if the NS command is called immediately after ES.
The program lines are numbered. Command entry follows "E". A line entry is completed with <CR>.
Example of a program entry:
0.1> | ES PRG10<CR> | Enter program PRG10
002E | IN-<CR> | Initialise in minus direction
003E | RP3;MR100<CR> | Move 100 increments in plus direction, execute command line 3 times
004E | MA2000<CR> | Move to absolute position 2.000
005E | NS<CR> | Complete program entry
0.1> |  | Program entered
Example for deleting a program:
0.1> | ES PRG10<CR> | Enter program PRG10
002E | NS<CR> | Complete entry, delete program
0.1> |  |
Command language
ESName | Enter program
 | Value range for Name: | Unique name of program Number of characters: 20, spaces and special characters are not permitted
Linked functions
Command language | Function
NS | End of program entry
XP | Call program in parallel
XS | Call program in command language


GA

Reference [image] Additional commands in command language [image] Program commands [image] GA
GA
Global abort
Description
This command brakes all axes to standstill with their respective deceleration ramp XA . In contrast to AB, this command includes all axes.
Command language
GA
Global abort
Linked functions
Command language | Function
AB | Stop motor, E-STOP
XA | Set E-STOP braking ramp


GX

Reference [image] Additional commands in command language [image] Program commands [image] GX
GX
Cancel command execution on all axes
Description
This command sends "Abort command" to all axes and also ends motion controller programs.
Notes
GX aborts all programs that are running if a command line or program starts with the GX command. The commands following GX are then executed.
If the Name parameter is stated: Only the program stated with Name is aborted.
Command language
GX[Name] | Cancel command execution on all axes
 | Value range for Name: | Name of the program that is to be aborted. string


IF

Reference [image] Additional commands in command language [image] Program commands [image] IF
IF
Execute command if query is TRUE
Description
With this command, the command or command line that follows is only executed if a query is TRUE.
Notes
If the query is true, the commands that follow the query are executed to the end of the line or to the EL command, otherwise these commands are skipped.
The query may be a simple comparison with a variable or an arithmetic expression.
Command language
IF query | Execute command if query is TRUE
 | Value range for Query: | Query, which may be TRUE or FALSE
Example 1:
0.1> RP;IF($X<10);$X=($X+1);SV($X*10000);WT1000;EL;ER
0.1>
The variable “$X” is incremented, sets a new velocity value and waits for one second. This command line is processed in full when the value of the variable "$X" reaches the value 10.
Example 2:
0.1> IF($V1==2);XSPRG3;EL;XSPRG21<CR>
0.1>
Variable 1 is polled for the value 2. If the result is TRUE, PMCprimo calls the program PRG3. If the result is FALSE, the program PRG21 is called.
Example 3 for a more complex IF statement:
0.1> IF(($X>=10)&&($X<=20));SV($X*10000)
0.1>
Linked functions
Command language | Function
EL | Execute command if query is FALSE


II

Reference [image] Additional commands in command language [image] Program commands [image] II
II
Execute commands depending on input status
Description
With this command, the commands that follow in the command line are executed to the end of the line or to EL only if the state of the input defined with n from Byte g has reached the required logic state, otherwise these commands are skipped.
Command language
II[t.]g:n± | Execute commands depending on input status
 | Value range for:
t:
Address (node number) of the device containing the input
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Input byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 inputs consists of 4 Bytes, each with 8 inputs.
n
Input in an input byte
1 … 8: depends on the system, based on the number of inputs
If there are more than 8 inputs, a new input byte is defined.
±
Logic state for which to check
+: Logic 1 = TRUE
-: Logic 0 = FALSE
Example 1:
0.1> II2:2-;CO1:3<CR>
The state of input 2 of Byte 2 is queried for "0". Output 3 of Byte 1 is reset if the input is "0".
0.1>
Example 2:
0.1> II1:2-;XS PRG3;EL;XS PRG21<CR>
The state of input 2 of Byte 1 is queried for "0". The program PRG3 is called if the input is "0". The program PRG21 is called if the state is "1".
Linked functions
Command language | Function
EL | Execute command if query is FALSE


IO

Reference [image] Additional commands in command language [image] Program commands [image] IO
IO
Execute commands depending on output status
Description
With this command, the commands that follow in the command line are executed to the end of the line or to EL only if the state of the output defined with n from Byte g has reached the required logic state, otherwise these commands are skipped.
Command language
IO[t.]g:n± | Execute commands depending on output status
 | Value range for
t:
Address (node number) of the device containing the output
0: Internal PMCprimo C. The parameter t =0 can be left out.
1 … 50: Reserved for CANopen
51 … 150: Reserved for SafetyNet
Default value: 0
g:
Output byte of an I/O-module (byte address)
1 … 8: depends on the system, based on the number of bytes
Example: An I/O module with 32 outputs consists of 4 Bytes to each 8 outputs.
n:
Output in an output byte
1 … 8: depends on the system, based on the number of outputs
If there are more than 8 outputs, a new output byte is defined.
±
Logic state for which to check
+: Logic 1 = TRUE
-: Logic 0 = FALSE
Example:
0.1> IO2:4+;XS PROG23<CR>
The state of output 2 of Byte 2 is queried for "1". The program PROG23 is run if the output is set.
Linked functions
Command language | Function
EL | Execute command if query is FALSE


IT

Reference [image] Additional commands in command language [image] Program commands [image] IT
IT
Execute commands depending on motor status
Description
With this command, the commands that follow in the command line are executed to the end of the line or to EL only if the motor at the selected axis is in operation, otherwise these commands are skipped.
Command language
IT
Execute commands depending on motor status
Linked functions
Command language | Function
EL | Execute command if query is FALSE


IX

Reference [image] Additional commands in command language [image] Program commands [image] IX
IX
Query program status
Description
With this command, the commands that follow in the command line are executed to the end of the line or to EL only if the program Name is active, otherwise these commands are skipped.
Notes
An error is registered if the program Name is not present.
Command language
IXName | Name of the program whose status is checked
 | Value range for Name: | string, 20 characters
Linked functions
Command language | Function
EL | Execute command if query is FALSE


LOOP

Reference [image] Additional commands in command language [image] Program commands [image] LOOP
LOOP
Continuous loop for program processing
Description
LOOP is the name for a program with cyclical program processing. The LOOP program is executed with the lowest priority. It assumes the function of an idle task.
Notes
The LOOP program is created with the ES command just like a normal program.
XSLOOP (see XS command): The LOOP program is executed once only.
XPLOOP (see XP command): The LOOP program is started in a continuous loop.
GXLOOP (see GX command): Ends the LOOP program that's running as a continuous loop.
The LOOP program is not started automatically on power-up.
ZTLOOP (see ZT command): Indicates whether the LOOP program is active.
The following commands are not permitted in the LOOP program:
–
SP: Save data
–
DM: Activate display mode
–
TR: Enable trace mode
–
CD: Set operating parameters of the motion controller
–
XM: Activate position mapping table
–
XS: Call program in command language
–
XP: Call program in command language
–
SK: Display and set software key
–
LM: List position mapping table
–
XX: Read length of alignment run
–
LB: List values of all bus variables
–
LV: List value of variables
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Linked functions
Command language | Function
ES | Enter program
GX | Cancel command execution on all axes
XP | Call program in parallel
XS | Call program in command language
ZT | List active programs


LS

Reference [image] Additional commands in command language [image] Program commands [image] LS
LS
List programs
Description
This command lists the following contents:
Programs available in the system
A program's command line
Notes
If the LS command is entered without a program name, all programs in the system are listed. Details of whether the program is an axis program or a controller program will also be listed. An axis program only contains axis-specific commands.
The program's command lines will be listed if LS is stated with Name.
Command language
LS[Name] |
 | Value range for Name: | List program's command lines
 |  | string, 20 characters
Example 1: List program PRG10
0.1> | LS PRG10<CR> | List program PRG10
 | IN-- |
 | RP3;MR100 |
 | MA2000 |
 | NS |
0.1> |  |
Example 2: Display a list of all programs in PMCprimo
0.1> | LS<CR> | List programs
TEST | (NODE 0) | TEST program available
PRG10 | (HOST) | PRG10 program available
PRG15 | (NODE 0) | PRG15 program available
0.1> |  |


ME

Reference [image] Additional commands in command language [image] Program commands [image] ME
ME
Define reaction program in the event of an axis error
Description
This command defines a program that reacts to axis errors. The program is called and run when axis errors occur.
Notes
If LS is entered without stating a program name Name, the name of the reaction program that is currently defined is listed.
LS0 is used to deactivate the reaction program that is currently defined. In this case, no reaction program is defined for the axis.
An independent reaction program can be defined for each axis.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
LS[Name] | Define reaction program in the event of an axis error
 | Value range for Name: | Name of reaction program string, 20 characters
The following errors trigger a reaction program:
Code | Error
5 | Software end limit has been passed in the plus direction
6 | Software end limit has been passed in the minus direction!
23 | Not enough RAM!
24 | Drag error limit has been exceeded!
29 | No encoder signals received!
37 | Reference error limit has been exceeded!
38 | Could not correct the reference error in one cycle!
39 | The monitoring time for the reference signal has elapsed!
56 | The limit switch has been activated and the motor switched off!
74 | Monitoring time for master positions has elapsed
117 | Value for analogue input is below the lower limit value
118 | Upper limit value for analogue input has been exceeded
141 | Master value does not exist in the position table
172 | Controller error: Heat sink temperature > 80 degrees Celsius
173 | Controller error: Overvoltage on intermediate circuit
174 | Controller error: Open circuit, short circuit in feedback (Resolver, Hiperface)
175 | Controller error: Undervoltage on intermediate circuit
176 | Controller error: Motor limit temperature exceeded
177 | Controller error: Problem with internal supply voltage
178 | Controller error: Maximum velocity exceeded
179 | Controller error: EEprom check sum error
180 | Controller error: Flash-Eprom check sum error
181 | Controller error: Open circuit or short circuit on brake
182 | Controller error: Motor phase missing
183 | Controller error: Device's internal temperature too high
184 | Controller error: Power stage defective
185 | Controller error: I2t limit exceeded
186 | Controller error: 2 or 3 phases missing in the supply voltage
187 | Controller error: A/D converter faulty
188 | Controller error: Ballast resistor defective or faulty setting
189 | Controller error: Phase missing in the supply voltage
190 | Controller error: System software not in order
230 | No more reference positions can be buffered
249 | Controller error: Commutation error


NP

Reference [image] Additional commands in command language [image] Program commands [image] NP
NP
List program number
Description
This command displays the program number of the program Name.
Notes
The program number is an internal number (address) assigned by the compiler. A program can be started via this number.
The command can be used to assign the program number and therefore the program to a variable.
Command language
NPName |
 | Value range for Name: | Name of program string, 20 characters


NS

Reference [image] Additional commands in command language [image] Program commands [image] NS
NS
End of program entry
Description
This command completes the program entry (ES command). Each program must end with this command.
Command language
NS
End of program entry
Linked functions
Command language | Function
ES | Enter program


RP

Reference [image] Additional commands in command language [image] Program commands [image] RP
RP
Repeat command line
Description
With this command, a command line is repeated nn times. The command implements a FOR count loop.
Notes
The loop is run continuously (continuous loop) if nn is not stated.
RP may only be used once in a command line.
ER can be used to end a loop prematurely.
AX and GX end a program loop immediately.
Command language
RP[nn] | Repeat command line
 | Value range for nn: | Number of repetitions 1 … 4 000 000
Linked functions
Command language | Function
AX | Cancel command execution
ER | End program loop
GX | Cancel command execution on all axes


XP

Reference [image] Additional commands in command language [image] Program commands [image] XP
XP
Call program in parallel
Description
This command starts a program in parallel to a program that's already running (see ES and NS).
Notes
The stated program is run immediately with XP.
GX ends program processing at any time.
A program cannot be called again until it has been run in full, otherwise the following error message appears: "The program <Name> cannot be started as it is already running!".
The main program continues running when a subprogram is started with XP.
Please note that a maximum of 25 programs may be started in parallel.
Example: Call program in parallel
0.1: ES PRG11 |  | Define program PRG11
002E | XP PRG12 | Program PRG12 is to be called in parallel
003E | SV | List velocity
004E | NS | End definition of PRG11
0.1: | ES PRG12 | Define program PRG12
002E | WT10000 | Wait 10 seconds
003E | SA | Acceleration listed.
004E | NS | End definition of PRG12
0.1: | XS PRG11 | Call program PRG11
0.1: |  |
0.1 | SV=20000 | Velocity is listed immediately
0.1 | SA=100000 | Acceleration is listed after 10 seconds
0.1: |  |
Command language
XP[Name] | Call program in parallel
 | Value range for Name: | Name of program to be called String, 20 characters
Linked functions
Command language | Function
ES | Enter program
GX | Cancel command execution on all axes
NS | End of program entry


ZT

Reference [image] Additional commands in command language [image] Program commands [image] ZT
ZT
List active programs
Description
This command lists the programs active in the motion controller.
Notes
If the Name of the program is not stated, all programs active on the motion controller are displayed.
Example 1:
0.1: zt | Command is triggered
0.1: |
Active processes: | List current program:
==================================================================
I0.1:3 => PRG1 | Program PRG1 is active; was called by input 0.1:3.
ONLINE(1000) => PRG3 | Program PRG3: called via an online command.
$VAR1 => PRG2 | Program PRG2: called by the trigger variable $VAR1.
$VAR2 => PRG4 => PRG5 | Program PRG5: called by the program PRG4. Program PRG4: activated by the trigger variable $VAR2.
0.1: |
If the Name of the program is stated, the program line that is currently active is listed.
Example 2:
0.1: ZTPRG2 | ZT command with program name
0.1: |
Active program: <PRG2> Subscriber: 0 Line: 2
 | Line no. 2 of PRG2 currently active.
Command language
ZT[Name] |
 | Value range for Name: | Name of active program string, 20 characters


Display commands

Reference [image] Additional commands in command language [image] Display commands
Display commands
TD: Display last value of a recording channel
TF: Set trigger edge for trace mode
TH: Set trigger channel for trace mode
TL: Set trigger level for trace mode
TP: Set pretrigger for trace mode
TR: Enable trace mode
TT: Set time base for trace mode
TW: Preset trace mode


TD

Reference [image] Additional commands in command language [image] Display commands [image] TD
TD
Display last value of a recording channel
Description
This command lists again the data that was recorded using trace mode TR.
Notes
If the command is entered without parameters, TD lists all the data.
The output line mm is listed in full if only mm is stated.
Only the display channel nn of output line mm is listed again if mm and nn are stated.
The parameters nn and mm may also be expressions (e.g. variable).
The time base TT and the presettings TW must not be modified after recording if TD is to be applied afterwards.
Command language
TD[mm][,nn] | Display last value of a recording channel
 | Value range for nn: | Recording channel 1 … 4
 | Value range for mm: | Output line
 |  | 1 … 10 000
Linked functions
Command language | Function
TR | Enable trace mode
TT | Set time base for trace mode
TW | Preset trace mode


TF

Reference [image] Additional commands in command language [image] Display commands [image] TF
TF
Set trigger edge for trace mode
Description
This command defines a trigger edge for trace mode TR.
Notes
Trace mode TR is started if the trigger channel TH has reached the value TL with the defined edge TF.
Command language
TFnn | Mode for trigger edge
 | Value range for nn: | 0 … 2 Trace mode TR is started with these parameters. Differences arise depending on the set information or the set command type in TW.
 |  | The following applies when triggering on variables: 0: Start TR if the variable value changes and is less than the set trigger level TL 1: Start TR if the variable value changes and is greater than the set trigger level TL 2: Start TR if the variable value is greater than the set trigger level TL
 |  | With all other recordings: 0: Start TR at falling edge 1: Start TR at rising edge 2: Start TR at both edges
Linked functions
Command language | Function
TH | Set trigger channel for trace mode
TL | Set trigger level for trace mode
TR | Enable trace mode
TW | Preset trace mode


TH

Reference [image] Additional commands in command language [image] Display commands [image] TH
TH
Set trigger channel for trace mode
Description
This command defines a trigger channel for trace mode TR.
Notes
Trace mode TR is started if the trigger channel TH has reached the value TL with the defined edge TF.
Command language
THnn | Recording channel that is to be triggered
 | Value range for nn: | 1 … 4
Linked functions
Command language | Function
TF | Set trigger edge for trace mode
TL | Set trigger level for trace mode
TR | Enable trace mode


TL

Reference [image] Additional commands in command language [image] Display commands [image] TL
TL
Set trigger level for trace mode
Description
This command defines a trigger level for trace mode TR.
Notes
Trace mode TR is started if the trigger channel TH has reached the value TL with the defined edge TF.
The parameter m determines whether nn is used with a sign or as an amount.
Command language
TLnn[,m] | Set trigger level
 | Value range for nn: | Trigger level, depending on the set information or the set command type in TW. ±6 000 000
 | Value range for m: | Use of trigger level 0: Trigger level with sign 1: Trigger level as amount Default value: 0
Linked functions
Command language | Function
TF | Set trigger edge for trace mode
TH | Set trigger channel for trace mode
TR | Enable trace mode
TW | Preset trace mode


TP

Reference [image] Additional commands in command language [image] Display commands [image] TP
TP
Set pretrigger for trace mode
Description
This command defines a pretrigger if trace mode is used with trigger TH.
Notes
When triggered, a history of nn milliseconds is recorded and the data is stored permanently in a ring memory.
Command language
TPnn | History before triggering in ms
 | Value range for nn: | 0 … 10 000
Linked functions
Command language | Function
TH | Set trigger channel for trace mode


TR

Reference [image] Additional commands in command language [image] Display commands [image] TR
TR
Enable trace mode
Description
This command activates trace mode. Up to 4 different pieces of information can be displayed. The command uses the oscilloscope program PScope. The information to be displayed is defined with TW.
Notes
Parameter nn:
–
No parameter nn stated: The information is displayed continuously depending on the set transmission rate.
–
nn!=0: The values are recorded in a specified time base (see TT command).
–
nn=0: The last data to be recorded is displayed again.
Please note: TT and TW must not be modified following the recording.
The TH command defines a trigger (see TH command).
The TP command defines a pretrigger (see TP command).
Command language
TRnn | Mode of display
 | Value range for nn: | 0: The most recent data to be recorded is displayed >0: nn lines are displayed in the specified time base (see TT command)
 | The format of the display depends on TW.
Linked functions
Command language | Function
TH | Set trigger channel for trace mode
TP | Set pretrigger for trace mode
TT | Set time base for trace mode
TW | Preset trace mode


TT

Reference [image] Additional commands in command language [image] Display commands [image] TT
TT
Set time base for trace mode
Description
This command defines a time base for trace mode TR.
Command language
TTnn | Time base in ms
 | Value range for nn: | 0 … 10 000
 |  | 0: Time base 1 ms
 |  | Default value: 0
Linked functions
Command language | Function
TR | Enable trace mode


TW

Reference [image] Additional commands in command language [image] Display commands [image] TW
TW
Preset trace mode
Description
This command is used to set the information or command type that is to be displayed in trace mode TR.
Notes
Each of the four recording channels can be assigned information or a command type.
Special feature: The respective variable name must also be stated for command types 43 and 44.
Command language
TWnn[n,m,VarName] |
 | n: | Recording channel to which the information or command type m is to be assigned.
 |  | Value range: 1 … 4 m:= 0 can be used to delete information or a command type that has previously been assigned to the recording channel.
 | m: | Display information or command type on a recording channel n
 |  | 0: Removes a previous definition. The recording channel n will then not be displayed using trace mode.
 |  | Value range: 1 … 202: Information or command type In addition to the value the display also contains a prefixed code, which describes the type of information in more detail. In the following list of parameters, the code is stated in brackets after the number. 0: No value selected
 |  | 2: (P) Actual position
 |  | 3: (E) Lag distance
 |  | 4: (V) Demand velocity
 |  | 5: (W) Actual velocity
 |  | 6: (X) Average velocity
 |  | 7: (R) Reference error
 |  | 8: (S) Snapshot of encoder
 |  | 9: (U) Change of setpoint value
 |  | 10: (C) Change of actual value
 |  | 11: (A) Value of analogue input
 |  | 12: (L) Lag distance with additional control
 |  | 13: (U) Current transmission ratio
 |  | 14: (MP) Position of master axis
 |  | 15: (MV) Velocity of master axis
 |  | 16: (DP) Position of differential axis
 |  | 17: (DV) Velocity of differential axis
 |  | 18: (IS) Actual current of servo amplifier
 |  | 19: Reserved
 |  | 20: (UB) Absolute amount of setpoint change
 |  | 21: (I1) Input byte 1
 |  | 22: (I2) Input byte 2
 |  | 23: (I3) Input byte 3
 |  | 24: (I4) Input byte 4
 |  | 25: (I5) Input byte 5
 |  | 26: (I6) Input byte 6
 |  | 27: (I7) Input byte 7
 |  | 28: (I8) Input byte 8
 |  | 29: Reserved
 |  | 30: Reserved
 |  | 31: (O1) Output byte 1
 |  | 32: (O2) Output byte 2
 |  | 33: (O3) Output byte 3
 |  | 34: (O4) Output byte 4
 |  | 35: (O5) Output byte 5
 |  | 36: (O6) Output byte 6
 |  | 37: (O7) Output byte 7
 |  | 38: (O8) Output byte 8
 |  | 39: Reserved
 |  | 40: (ME) Motor error
 |  | 41: ($F) Error variable
 |  | 42: ($S) Status variable
 |  | 43: ($Bn) Bus variable
 |  | 44: ($Name) variable
 |  | 45..60: Reserved
 |  | 61..68: (I1..I8) CAN input byte 1..8
 |  | 69: Reserved
 |  | 70: Reserved
 |  | 71..78: (O1..O8) CAN output byte 1..8
 |  | 79..100: Reserved
 |  | 101..132 (I1..I32) CAN input byte 1..32
 |  | 133..170: Reserved
 |  | 171..202 (O1..O32) CAN output byte 1..32
 | VarName | Name of the assigned variable with command types 43 and 44
 |  | Value range: string
Linked functions
Command language | Function
TR | Enable trace mode


Variable

Reference [image] Additional commands in command language [image] Variable
Variable
$var: Display and use variable
$var=: Assign variable
$var>: Define trigger variable
BV: Inhibit trigger variable
EV: Enable trigger variable
IA: Define variable array
LV: List value of variables
MV: Inhibit trigger variable
VX: Display trigger variable


$var

Reference [image] Additional commands in command language [image] Variable [image] $var
$var
Display and use variable
Description
This commands displays the value of the variable on the terminal.
Necessary settings in linked functions
Assign variable see $var=
Notes
An error is registered if a variable is called that has not previously been assigned using $var=.
The variable name $var can also be used as a parameter in commands.
The elements are displayed as follows, when the variables form a variable array:
1.1> $SPD<CR>
1.1> $SPD[0]=0 (0x00000000)
1.1> $SPD[1]=0 (0x00000000)
1.1> $SPD[2]=0 (0x00000000)
1.1> $SPD[3]=13 (0x0000000D)
1.1> $SPD[4]=0 (0x00000000)
1.1>
Individual elements of a variable array are displayed by attaching an index $var[n].
Command language
$var[n] | Display and use variable
 | Value range for $var: | Variable name
 | Value range for n: | Optional (only on arrays): Index of the element in the variable array 1 … 255
Linked functions
Command language | Function
$var= | Assign variable


$var=

Reference [image] Additional commands in command language [image] Variable [image] $var=
$var=
Assign variable
Description
The command "=" assigns content to a variable $var.
Notes
A uniquely initialised variable can be used in commands instead of values.
Command language
$var=nn=
Assign content to a variable
Value range for $var:
Variable name
Value range for $nn:
string
The content of a variable may be:
a value
a command
another variable
an arithmetic value


$var>[PrgName]

Reference [image] Additional commands in command language [image] Variable [image] $var>[PrgName]
$var>[PrgName]
Define trigger variable
Description
The command ">" defines a trigger variable. The addressed program starts when the variable is called or changed.
Notes
Programs that are assigned to a trigger variable are not permitted to write to the variables themselves, as this would create a continuous loop.
The trigger variable is deactivated if $var> is entered without a program name.
Please note: All trigger variables are inhibited when the controller is switched on. They must be enabled through the EV command.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
$var>[PrgName[,n]] |
 | Value range for PrgName: | Name of the program that is to be triggered. The program is defined with ES. string
 | Value range for n: | Type of program execution 0: Each time the variable is accessed 1: When the value of the variable changes
Linked functions
Command language | Function
ES | Enter program
EV | Enable trigger variable


BV

Reference [image] Additional commands in command language [image] Variable [image] BV
BV
Inhibit trigger variable
Description
This command inhibits a trigger variable $var.
Notes
All trigger variables are inhibited if BV is entered without $var.
EV re-enables a trigger variable.
After being enabled with EV, the defined program is not executed if a value is assigned to an inhibited trigger variable (in contrast to MV).
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
BV[$var] | Inhibit trigger variable
 | Value range for $var: | Name of the trigger variable that is to be inhibited string
Linked functions
Command language | Function
EV | Enable trigger variable
MV | Inhibit trigger variable


EV

Reference [image] Additional commands in command language [image] Variable [image] EV
EV
Enable trigger variable
Description
This command enables a trigger variable $var.
Notes
All trigger variables are enabled if EV is entered without $var.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
EV[$var] | Enable trigger variable
 | Value range for $var: | Name of the trigger variable that is to be enabled string


IA

Reference [image] Additional commands in command language [image] Variable [image] IA
IA
Define variable array
Description
This command defines a variable array.
Notes
The index n is the number of elements in the variable array. The individual elements are numbered from 0 to n-1.
Each element is a fully-fledged variable.
The individual elements of the array can subsequently be addressed and treated as normal variables (e.g.: "$array[4]=5000").
Each individual element can be stored in MRAM. (see $var>$Hx)
If the array name $var (e.g.: "$array") is entered without an index, all elements in the array are displayed as follows:
1.1> $SPD<CR>
1.1> $SPD[0]=0 (0x00000000)
1.1> $SPD[1]=0 (0x00000000)
1.1> $SPD[2]=0 (0x00000000)
1.1> $SPD[3]=13 (0x0000000D)
1.1> $SPD[4]=0 (0x00000000)
1.1>
Command language
IA$var[n] | Define variable array
 | Value range for |
 | $var: | Name of variable array
 | [n]: | Number of elements in the array [1] … [255] Please note: The square brackets are part of the command.
Linked functions
Command language | Function
$var | Display and use variable
$var>$Hx | Store variable in non-volatile memory


LV

Reference [image] Additional commands in command language [image] Variable [image] LV
LV
List value of variables
Description
This command lists all the variables defined by the user with their values.
Command language
LV
List value of variables
The list of all defined variables with their current values has the following format:
0.1> LV<CR> | Request variable
$BCD=12 | The value of the variable BCD is 12.
$SPD=5000 | The value of the variable SPD is 5000.
$TR=75 | The value of the variable TR is 75.
0.1> |


MV

Reference [image] Additional commands in command language [image] Variable [image] MV
MV
Inhibit trigger variable
Description
This command masks a trigger variable $var.
Notes
All trigger variables are masked if MV is entered without $var.
EV re-enables a trigger variable.
After being enabled with EV, the defined program is executed if a value is assigned to a masked trigger variable (in contrast to BV).
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
MV[$var] | Inhibit trigger variable
 | Value range for $var: | Name of the trigger variable that is to be masked
Linked functions
Command language | Function
BV | Inhibit trigger variable
EV | Enable trigger variable


VX

Reference [image] Additional commands in command language [image] Variable [image] VX
VX
Display trigger variable
Description
This command lists all trigger variables with their type.
Command language
VX
Display trigger variable
The list of trigger variables has the following format:
0.1> VX<CR> |
M - $SPD>PRG1 | Variable is masked
B - $FRG>PRG2 | Variable is inhibited
E - $TR>START_PRG | Variable is enabled.
0.1> |
Meaning of the letters at the start of the command lines:
M: Variable is masked
B: Variable is inhibited
E: Variable is enabled
see also MV, EV and EV
Linked functions
Command language | Function
BV | Inhibit trigger variable
EV | Enable trigger variable
MV | Inhibit trigger variable


Miscellaneous

Reference [image] Additional commands in command language [image] Miscellaneous
Miscellaneous
??: Request help
CH: Select axis
LG: Select language
RD: Reload data
SD: Display IO state safety card
SK: Display and set software key
SP: Save data


??

Reference [image] Additional commands in command language [image] Miscellaneous [image] ??
??
Request help
Description
This command opens the help function on the terminal.
Command language
?? | Request help
 | The following menu opens: Help - Main menu ================= ??n --> Error text for error number n ?1 --> Command overview ?2 --> Error and status messages on the display ?3 --> Abbreviations used ?4 --> Mathematical operators ?5 --> Variables ?6 --> Programs and tables (maps) ?7 --> Map generator ?8 --> Values of status variables ?9 --> Number formats
?m | Call up help's submenum
 | Value range for m: | 0 … 9
??n | Display text for error number n
 | Value range for m: | 0 … INT
xx? | Display help for a specific command xx
 | Value range for xx: | AA … ZZ
 | Example: | MA?: Run help for MA command


CH

Reference [image] Additional commands in command language [image] Miscellaneous [image] CH
CH
Select axis
Description
This command selects an axis on which axis-specific commands are to be executed.
Notes
The axis can be changed at any time.
Command language
CHn | Select axis
 | Value range for n: | Number of axis 1 … 60


LG

Reference [image] Additional commands in command language [image] Miscellaneous [image] LG
LG
Select language
Description
This command sets the language for the messages on the PMCprimo.
Command language
LGn | Set language for the messages
 | Value range for n: | 0: German 1: English 2: Italian 3: French


RD

Reference [image] Additional commands in command language [image] Miscellaneous [image] RD
RD
Reload data
Description
This command overwrites the data on the PMCprimo C at runtime with previously generated backup data. This enables an older configuration to be loaded.
Notes
Use of SD card:
–
The SD card must be inserted in the card reader of the PMCprotego.
–
The address of the PMCprotego in which the SD card is inserted must be stated with the command CD26.
–
If the address 0 is stated, CD26 automatically looks for the first PMCprotego (lowest address) with an SD card.
NOTICE
Hazardous states arise when the command is used in conjunction with CoDeSys!
The command must not be used in conjunction with programs created using CoDeSys.
Command language
RDn | Read data
 | Value range for n: | Function mode: 0 … 5
 |  | 0: Loads the data into the internal Flash memory. The Flash memory contains the data that was saved the last time SP was called. All changes made since the last save operation are deleted.
 |  | 1: Copies the PMCprimo programs from the SD card into the Flash memory.
 |  | 2: Copies the PMCprimo variables from the SD card into the Flash memory.
 |  | 3: Copies the PMCprimo configuration from the SD card into the Flash memory.
 |  | 4: Copies the CoDeSys boot project from the SD card into the Flash memory.
 |  | 5: Copies the CoDeSys source code from the SD card into the Flash memory.
Linked functions
Command language | Function
CD | Set operating parameters of the motion controller
SP | Save data


SD

Reference [image] Additional commands in command language [image] Miscellaneous [image] SD
SD
Display IO state safety card
Description
This command displays the safety card's IO state register.
Command language
SD | Display IO state safety card
 | Display on the terminal:
 |  | Bit mask of IO state register (32 Bit) Bit 0: Least significant bit (0x00000001) Bit 31: Most significant bit (0x80000000)
 | 1st Byte, Bit 0 … 7: Inputs | 0: SS1 Activate
 |  | 1: I0 (SS2 Activate)
 |  | 2: I1 (SOS Activate)
 |  | 3: I2 (SLS Activate)
 |  | 5: I4 (SDI left Activate)
 |  | 6: I5 (SDI right Activate)
 |  | 7: I6 (SBT Activate)
 | 2nd Byte, Bit 8-15: Outputs | 8: READY
 |  | 9: STO Acknowledge
 |  | 10: O0 (SOS Acknowledge)
 |  | 11: O1 (SDI Acknowledge)
 |  | 12: O2 (SRA Acknowledge)
 |  | 13: O3 (SBT Acknowledge)
 |  | 14: SBC
 |  | 15: SIL3 STO
 | 3rd Byte, Bit 16-23: Reserved |
 | 4th Byte, Bit 24-31: Miscellaneous | 24 … 28: Reserved
 |  | 29: SS2 mode 0: Drive-activated 1: Controller-activated
 |  | 30: SS1 mode 0: Drive-activated 1: Controller-activated
 |  | 31: SS1 internal


SK

Reference [image] Additional commands in command language [image] Miscellaneous [image] SK
SK
Display and set software key
Description
This command displays the software key and activates a new software key.
Notes
The following software keys can be activated:
–
Dynamic curve calculation
–
IEC 61131-3 programming
–
Path interpolation
Software keys are already enabled if devices are ordered with the relevant options.
A software key can be ordered for an option retrospectively. This is enabled using the SK command.
Procedure
SK opens a dialogue box.
1.
Enter SK command. The serial number of the PMCprimo and activated software keys are displayed.
0.1: SK<CR>
0.1: Serial number: 000164
Installed software keys:
Motion: b976c5
1.
Enter new software key.
Example:
New key?
You have three options:
a) Enter new software key.
b) Enter existing software key. The software is disabled.
c) Complete the entry with ESC.
Command language
SK
Display and set software key


SP

Reference [image] Additional commands in command language [image] Miscellaneous [image] SP
SP
Save data
Description
This command saves the configuration and the runtime data of a PMCprimo in the Flash memory or on the SD card.
Notes
Make sure that you do not switch off any devices during the save process and that there is enough space in the Flash memory.
Close all programs before executing SP.
When the device is switched on the PMCprimo operates with the data in the Flash memory.
In the case of a restart, a check sum ensures that the data has been read in correctly.
The RD command loads the data back into the controller.
The SP4 command enables data to be read that was previously saved in Motorola S-Record format using LA4.
Use of SD card:
–
The SD card must be inserted in the card reader of the PMCprotego.
–
The address of the PMCprotego in which the SD card is inserted must be stated with the command CD26.
–
If the address 0 is stated, CD26 automatically looks for the first PMCprotego (lowest address) with an SD card.
Proceed as follows when saving data:
GX | Stop all programs
BV;BI | Mask trigger variable and inputs
GF | Switch off all motors
SP | Save data
WT100;EV;EI | Enable trigger variable and inputs after 100 ms
All parameters on the existing servo amplifier are stored as programs. If necessary, the programs can be started in order to import a backup.
Version number when saving:
–
When saving the program (not with variables): When saving, a version number is incremented and is stored in the Flash memory. Program changes made by third parties will be detected because the version number changes when saved.
–
The version number is also displayed with the LA command (displayed: "#Version: XX").
–
The version number is not displayed if only the variables or Flash memory are read (commands LA2 and LA4).
–
The version counter is set to zero if the user program is deleted via the boot menu or using the CD command.
Command language
SPn | Command mode
 | Value range for n: | 0 … 9
 |  | 0: Save all.
 |  | 1: Save all program data excluding variables.
 |  | 2: Save all variables. Please note: Only the variables defined in programs are saved, not variables that have been defined manually in the terminal.
 |  | 3: Save all program data including variables, but no programs for the drives.
 |  | 4: Save the data read in Motorola S-Record format usingLA4 back on to the controller. This enables an entire backup to be restored. Even the CoDeSys data is read back in.
 |  | 5: Save all PMCprimo programs to the SD card of the PMCprotego.
 |  | 6: Save all PMCprimo variables to the SD card of the PMCprotego.
 |  | 7: Save the PMCprimo configuration to the SD card of the PMCprotego.
 |  | 8: Save the boot project of CoDeSys to the SD card of the PMCprotego.
 |  | 9: Save the CoDeSys source code to the SD card of the PMCprotego.
Linked functions
Command language | Function
BV | Inhibit trigger variable
CD | Set operating parameters of the motion controller
EI | Enable input function
EV | Enable trigger variable
GF | Switch off all motors
GX | Cancel command execution on all axes
LA | List data from the RAM of a PMCprimo
RD | Reload data
WT | Time delay