User defined function blocks, Ra_dnet_master – Rockwell Automation 2080 Micro800 Digital and Analog Plug-in Modules User Manual

Page 53

Advertising
background image

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

45

DeviceNet Plug-in – 2080-DNET20 Appendix 5

0.005 = Nominal contact resistance used for every connection to the trunkline
In = Current drawn from the cable system by the device.

User Defined
Function Blocks

Download the following 2080-DNET20 user-defined function blocks from the
Sample Code Library:

http://www.rockwellautomation.com/go/scmicro800

RA_DNET_MASTER

This UDFB sets the 2080-DNET20 scanner to RUN mode.

IMPORTANT

To calculate for percentage of loading, divide the total voltage
calculated from the above formula by 4.65.

RA_DNET_MASTER: Input and Output Parameters

Variable Name

Type

Data Type

Description

FBEN

INPUT

BOOL

TRUE: To continue reading and writing
the scanner status. FBEN changed to
level Triggered.

SlotID

INPUT

UINT

Plug-in slot number (1…5)

Run

INPUT

BOOL

TRUE: Set the scanner to RUN mode.
FALSE: Scanner is in IDLE mode.
AutoScan is enabled.

AutoScan

INPUT

BOOL

TRUE: AutoScan is enabled.

ClearFault

INPUT

BOOL

TRUE: Clear scanner fault.
FALSE: No action.

FBENO

OUTPUT

BOOL

Function block enable output.
TRUE upon exit.

NodeAddress

OUTPUT

USINT

Scanner node address. Default node
address is 0.

BaudRate

OUTPUT

USINT

Network baud rate:
0: 125K
1: 250K
2: 500K
3: AutoBaud
Default baud rate is 500K.

Status

OUTPUT

USINT

Scanner fault status.
0: No error.

Error

OUTPUT

STRING

Scanner error description.

ActiveNodes

OUTPUT

USINT

Number of slave nodes in the network.

Scanlist0_62

OUTPUT

LWORD

Details on active node table, bit 0…62.
Bit 0: Represent Node 0.
Bit 62: Represent Node 62.

FBEN

SlotID

Run

FBENO

RA_DNET_MASTER

NodeAddress

BaudRate

Status

Error

ActiveNodes

ScanList0_62

AutoScan

ClearFault

Advertising