ENCODER_IN (148)


ENCODER_IN (148)

ID                          148

 

 

Application:

PLC


Group: MOTION

 

Short description:

Function that reads the counter value of the selected encoder.

 

Inputs: none

 

Outputs (1):

no.

type

impulse

mark

notes

1

I

no

OUT

Readout of the encoder pulse counter value

 

Settings:

no.

type

mark

notes

1

I

ENC_NUM

encoder number


Function operation:

The ENCODER_IN function is used to read the counter value of the selected external encoder. It returns on the OUT output the value of the counter of the selected external encoder, defined by the number ENC_NUM. The function gets the value of the encoder counter from the special register according to the table below:

ENC_NUM

Registry no.

1

R3501

2 R3511
3 R3521
4 R3531

 

R registers and M markers used:

no.

name

description

R - read, W - write

R3501

_EncoderCounter_1

value of the counter associated with the encoder R
R3511 _EncoderCounter_2 value of the counter associated with the encoder R
R3521 _EncoderCounter_3 value of the counter associated with the encoder R
R3531 _EncoderCounter_4 value of the counter associated with the encoder R