Rockwell Automation 842E EtherNet/IP Absolute Encoder User Manual User Manual

Page 67

Advertising
background image

Rockwell Automation Publication 842E-UM001A-EN-P May 2012

59

RSLogix 5000 sample code

Appendix B

Using an explicit message
configuration to set preset
encoder value

In this example a value is sent to the preset attribute in the encoder. The encoder
stores the preset value sent in non-volatile memory. Storing the preset value
applies the preset value to the encoder position value.

The following program fragment sends an explicit message and confirms the
message reception.

1.

Create a new message data type named

Preset_Message and a DINT named

Preset_Value.

ATTENTION

The preset function results in a change of position reading. This can cause
unexpected motion which could result in personal injury and damage to the
product or equipment. During preset, steps should be taken to ensure the shaft
is stationary and will remain so.

ATTENTION

In this example, a value is sent to the preset attribute in the encoder. The
encoder stores this preset value in non-volatile memory. Storing the preset
value applies the preset value to the encoder position value.

Advertising