Sample code, Ra_dnet_node_status – Rockwell Automation 2080 Micro800 Digital and Analog Plug-in Modules User Manual

Page 54

Advertising
background image

46

Rockwell Automation Publication 2080-UM004B-EN-E - December 2013

Appendix 5 DeviceNet Plug-in – 2080-DNET20

Upon powerup, the scanner should be in IDLE Mode for the autoscan to start.
Wait until the autoscan process is complete before turning the scanner to RUN
Mode (that is, Run bit is TRUE).

Sample Code

RA_DNET_NODE_STATUS

This UDFB is used to read the node status of slave nodes in a DeviceNet network
where the 2080-DNET20 scanner is connected.

Sequence of Operation: RA_DNET_MASTER

Sequence

Run

Autoscan

Description

1

False

False

Reinitializes scan list from the plug-in scanner if
FBEN = TRUE.

2

False

True

Triggers autoscan to scan the network after clearing
scan list.

3

False

False

Puts scanner to IDLE mode by disabling autoscan if
active node number = number of nodes in network.

4

True

False

Puts scanner to RUN mode.

RA_DNET_NODE_STATUS: Input and Output Parameters

Variable Name

Type

Data Type

Description

FBEN

INPUT

BOOL

Function block enable input.
TRUE to enable the function.

SlotID

INPUT

UINT

Plug-in slot number (1…5)

NodeID

INPUT

USINT

Slave node address.

FBEN

SlotID

NodeID

FBENO

RA_DNET_NODE_STATUS

Status

Error

Advertising