en:software:devices:abscnt

This translation is older than the original page and might be outdated. See what has changed.

DEVICE ABSCNT

1. Introduction

The internal ABSCNT device manages the acquisition and manipulation of the position from absolute sensors. These sensors are typically absolute encoders with different types of output interface (parallel, SSI, etc.) The main features of the device are:

  • control of the data quality from the transducer
  • support for binary or gray encoding data
  • sexagesimal representation of read data (angles in degrees and early)
  • internal zero for the absolute position
  • generating an incremental count to be used by other devices

2. Declaration

For use the device you must declare it in the INTDEVICE section of the unit configuration.

;--------------------------------- 
; Internal devices Declaration
;--------------------------------- 
INTDEVICE 
...
<nome>  ABSCNT  TCamp  IAbsCont  ICont

Dove:

Field name Description Example Note
<nome> Device name Axe -
ANPOS2 Keyword that identifies the device ABSCNT - -
TCamp Device sampling time in milliseconds 4 -
IAbsCont Absolute counter number (Verify the HW documentation
of the product for the correct value to set)
1
ICont Incremental counter address generated by the device (always 1.CNTx) 1.CNT01 If entering the value X. X field is ignored
:important:All fields of the Declaration are mandatory and must be present on the same line. Set “X.X” or “X” if a resource is not available or cannot be used. Disable a resource means disable all functionality of the devices that use it.

3. Operation

Operation of the device is illustrated with the following diagram:

The “Communication configuration” block Configure Protocol blocks appropriately in accordance with the number of bits to be captured, with the number of bits to “discard”, with the capture mode, etc.

The “SSI protocol interface” block executes the acquisition of data from a transducer with SSI protocol. The read data should then be manipulated to get information by absolute position.

The “Communication error control” block does the control of the “quality” of data acquired by the transducer. Controls can be equal and/or, for transducers that require it, the verification of certain bits of error present in the frame.

The “Speed checking” block check the rotational speed in RPM compared to the maximum and shall report any overshoot. His task is to detect errors in the acquisition of the data.

The “Reversing” block manages the reversal of direction of rotation that causes the increase in location determined byst_cntdir.

The “Module” block manipulates the position acquired and subtracts the offset to bring it back within the range 0÷(pulserev x revnum) quando signenab be worth 0 and within the range -(pulserev x revnum)/2 ÷ (pulserev x revnum)/2 when signenab be worth 1.

The “Position conversion” block converts from value bits position at value position in units of measurement. The data obtained (posit) can have decimal or sexagesimal representation depending on the setting parameter posittype.

4. Notes on the device operation

  • It is possible to use the device for generating a virtual counter by setting the address ICont on the device declaration; because is the “virtual” counter you will always find in slot 1 (CPU ID). This feature makes it possible to use a translator of absolute type with counting and positioning devices that use incremental translators only (hardware resource CNTxx). Important: the “virtual” counter will update each device or sampling every 1ms depending on the setting of the parameter value updatemode.
  • When you set the sexagesimal representation the two least significant digits of the parameter posit indicate the 'minute', the other indicate the 'degrees'. With the sexagesimal representation, you must also set the parameters pulse and measure in particular on measure the value set must be in 'minute'. For example if we had an encoder with 10000 pulses and we wanted to get the angular position in 'degrees' and 'minutes' should set pulse=10000 and measure=360×60=21600.

5. Parameters list

Short description Protocol type
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷0
Parameter ID -
Write conditions st_updenab = 0

Description:

Defines the protocol type used for acquisition of position transducer:

0= SSI


Short description SSI Bits frame number
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷63
Parameter ID -
Write conditions st_updenab = 0

Description:

Is the total number of bits that make up the SSI frame.


Short description Non-significant bits in the SSI frame number
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷15
Parameter ID -
Write conditions st_updenab = 0

Description:

It is the number of bits, starting from the MSbit, which are meaningless for the reconstruction of the given by the transducer.


Short description The frame number insignificant SSI frame queued
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷15
Parameter ID -
Write conditions st_updenab = 0

Description:

It is the number of bits, starting from the LSbit, which are meaningless for the reconstruction of the given position from the transducer.


Short description Data code
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷1
Parameter ID -
Write conditions st_updenab = 0

Description:

It is the type of encoding of the data acquired by the position transducer:

0: Binary code
1: Gray code


Short description Logical data type
Dimension Byte
Default value Retentive
Access type Read
Unit measure -
Valid range 0÷1
Parameter ID -
Write conditions st_updenab = 0

Description:

Indicates the type of data captured by the transducer position:

0: normal
1: inverse


Short description Parity check
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷2
Parameter ID -
Write conditions st_updenab = 0

Description:

Indicates the type of parity check on SSI data:

0: disable
1: odd parity
2: even parity


Short description Bit position equal
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷31
Parameter ID -
Write conditions st_updenab = 0

Description:

Location of parity within the frame. This parameter is meaningful only if par > 0.


Short description Bit position error 1
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷31
Parameter ID -
Write conditions st_updenab = 0

Description:

Bit position 1 error within the frame. Parameter that is currently not implemented.


Short description Bit position error 2
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷31
Parameter ID -
Write conditions st_updenab = 0

Description:

Bit position 1 error within the frame. Parameter that is currently not implemented.


Short description Scan mode data
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷1
Parameter ID -
Write conditions st_updenab = 0

Description:

It is the temporal mode of acquisition of the transducer data:

0: each sample time device ABSCNT
1: continuous


Short description Clock frequency used from the SSI protocol
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷3
Parameter ID -
Write conditions st_updenab = 0

Description:

Select the clock frequency used in SSI protocol:

0: 1MHz
1: 500KHz
2: 250KHz
3: 125KHz


Short description Monoflop time
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure uS (microseconds)
Valid range 0÷127
Parameter ID -
Write conditions st_updenab = 0

Description:

Indicates the time in monoflop microseconds. This is the time that waits between two acquisitions with SSI protocol, when updating the data is continuous(updatemode = 1). The set value will be rounded up to a multiple of the period of clock frequency (inverse of clockrate). If the value set is not obtainable from the device because they are too big and reports a warning.


Short description Number of positions per revolution
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷999999
Parameter ID -
Write conditions st_updenab = 0

Description:

Number of positions per revolution of the transducer (plate data).


Short description Number of turn
Dimension Word
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷999999
Parameter ID -
Write conditions st_updenab = 0

Description:

It is managed by the transducer speed shown on the rating plate data. The value is significant when using multi transducers, for the transducers singleturn set the value 1.


Short description Sign enabling
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷1
Parameter ID -
Write conditions st_updenab = 0

Description:

Enables the interpretation of data acquired from the transducer with sign.

0: only positive position
1: positive and negative position


Short description Representation posit parameter type
Dimension Byte
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 0÷1
Parameter ID -
Write conditions st_updenab = 0

Description:

Defines the representation type of the value of the parameter position posit:

0: decimal
1: sexagesimal (degrees and minutes)


Short description Reference measure for the position factor calculating
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure Um
Valid range 1÷999999
Parameter ID -
Write conditions

Description:

Indicates the space, in units of measurement, routes to get primary impulses set in pulse parameter. This parameter is used to calculate the conversion factor between primary impulses and units.

posit = (encoder ⋅ measure) / pulse

The ratio measure/pulse must be a value between 0.00935 and 1.


Short description Number of impulses for calculating the position factor
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure -
Valid range 1÷999999
Parameter ID -
Write conditions -

Description:

Indicates the number of pulses (1 encoder pulse = 4 primary pulses) that will generate the transducer in both directions to get a movement of measure. This parameter is used to calculate the conversion factor between primary impulses and units.

posit = (encoder · measure) / pulse

The ratio measure/pulse must be a value between 0.00935 and 1.


Short description Maximum speed
Dimension Word
Default value Retentive
Access type Read - Write
Unit measure RPM
Valid range 0÷32767
Parameter ID -
Write conditions st_updenab = 0

Description:

Indicates the maximum speed expressed in revolutions per minute (RPM) where to ride is the position value in units corresponding to the impulses that are defined in pulserev. This parameter is used to control the quality of the value acquired by the transducer; basically the device check that between two consecutive values obtained there is a change in position “consistent” with the speed and that this variation does not exceed that which would be achieved when the transducer rotates the value set on the parameter. Setting value 0 disables the control.


Short description Bit absolute position value
Dimension Long
Default value 0
Access type Read - Write
Unit measure -
Valid range -
Parameter ID -
Write conditions -

Description:

It is the bits value ( encoder positions) of the transducer absolute position. The value assumed by this parameter starts from 0 to(pulserev · revnum) when signenab be worth 0 and it goes -(pulserev· revnum)/2 to (pulserev · revnum)/2 when signenab be worth 1.


Short description UM value in absolute position
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure Um
Valid range
Parameter ID
Write conditions -

Description:

It's the value expressed in units of absolute position of transducer. Is obtained by the following formula: encoder · measure / pulse.


Short description 01 parameter
Dimension Long
Default value 0
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Parameter 01. Not used, reserved for other use.


Short description 02 parameter
Dimension Long
Default value 0
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Parameter 02. Not used, reserved for other use.


Short description 03 parameter
Dimension Long
Default value 0
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Parameter 03. Not used, reserved for other use.


Short description 04 parameter
Dimension Long
Default value 0
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Parameter 04. Not used, reserved for other use.


Short description retentive parameter 01
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Retentive 01 parameter. Not used, reserved for other use.


Short description retentive parameter 02
Dimension Long
Default value Retentive
Access type Read - Write
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Retentive 02 parameter. Not used, reserved for other use.


Short description Identification code of the error.
Dimension Byte
Default value 0
Access type Read
Unit measure -
Valid range -
Parameter ID -
Write conditions -

Description:

Indicates the type of error detected by the device. For more information see the section.


Short description Identifying the cause of the error code
Dimension Byte
Default value 0
Access type Read
Unit measure -
Valid range -
Parameter ID -
Write conditions -

Description:

Indicates the type of the error detected by the device. For more information see the section.


Short description Code warning identification
Dimension Byte
Default value 0
Access type Read
Unit measure -
Valid range
Parameter ID -
Write conditions -

Description:

Indicates the type of warning reported by device. For more information see the section.


Short description Identification code of the cause of the warning
Dimension Byte
Default value 0
Access type Read
Unit measure -
Valid range -
Parameter ID
Write conditions -

Description:

Indicates the cause of the warning reported by device. For more information see the section.


6. State lists

Short description Enabling status update
Default value 0
Status ID -

Description

Indicates that the acquisition of the data by the transducer is activated and adjusted by the parameter updatemode.

0 = acquisition disabled.
1 = acquisition enabled.


Short description State of counterclockwise to increase the count.
Default value Retentive
Status ID -

Description

Indicates the direction of rotation that causes the increase of the counter.

0 = clockwise.
1 = counterclockwise.


Short description Warning presence
Default value 0
Status ID -

Description

Indicates the status of warning, to recognize the type of warning you must refer to wrncode and wrnvalue variables.

0 = warning not present.
1 = warning present.


Short description There is an error.
Default value 0
Status ID

Description

Indicates the error status of the device, in order to recognize the type of error you must refer to errcode and errvalue variables.

0 = error not present.
1 = error present.


Short description Generic status 1
Default value 0
Status ID -

Description

Available for future use.


Short description Generic status 2
Default value 0
Status ID -

Description

Available for future use.


Short description Generic status 3
Default value 0
Status ID -

Description

Available for future use.


Short description Generic status 4
Default value 0
Status ID -

Description

Available for future use.


7. Commands List

Short description Enabling update count.
Condition st_updenab = 0
Default value
Command ID -

Description

Enable the acquisition of position from the transducer according to the updatemode parameter.


Short description Disabling update count.
Condition st_updenab = 1
Default value
Command ID -

Description

Disable the transducer position acquisition. With update disabled you can modify communication parameters.


Short description Count increment counterclockwise direction.
Condition st_updenab = 0
Default value
Command ID -

Description

Sets the direction by which to increment the count to counterclockwise.


Short description Time count increment direction.
Condition st_updenab = 0
Default value
Command ID -

Description

Sets the direction by which to increment the count for clockwise.


Short description State error reset.
Condition st_error = 1
Default value
Command ID -

Description

State error reset (st_error) if no longer on the error condition.


Short description Warning state reset.
Condition st_warning = 1
Default value
Command ID -

Description

Reset the st_warning state.


Short description Generic command 1.
Condition -
Default value
Command ID -

Description

Available for future use.


Short description Generic command 2.
Condition -
Default value
Command ID -

Description

Available for future use.


Short description Generic command 3.
Condition -
Default value
Command ID -

Description

Available for future use.


Short description Generic command 4.
Condition -
Default value
Command ID -

Description

Available for future use.


8. Errors and Warnings

When the device fails to perform operations are caused by incorrect programming by the user reports this condition through activation of the st_error state. The device makes available, through theerrcodeanderrvalueparameters, some information for a better understanding of the type of error and which condition generated it. This information and the error statest_errorpersist until you run theRSERRcommand that deletes them. The following table specifies the values assumed by errcode:

errcode Description
0No error
1Generic error
2Hardware error: the hardware does not support absolute counter.

Through the errvalue parameter you can get more detailed information about the error.
Currently, theerrvalueparameter is not used and is always 0.

When setting a parameter of device is not accepted or when a command cannot execute the device reports this condition through activation of the Statest_warning. The device makes available, through thewrncodeandwrnvalueparameters, some information to better understand the type of warning and which condition generated it.
This information and the status of warningst_warningpersist until you run theRSWRNcommand that deletes them.
The following table specifies the values assumed by wrncode:

wrncode Description
0No warning.
1the parameter is accepted: writing about a parameter is not successful.
2command not executed.
3speed too high.
4parity error.

Using thewrnvalueparameter you can get more detailed information about the warning.

wrnvalue Description
0no additional information about the warning.
1operation is not enabled.
2given out of range.
  • Last modified: 2019/08/29 17:01