beautypg.com

Structure example – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual

Page 141

background image

Rockwell Automation Publication 1789-UM002J-EN-P - December 2012

141

Develop External Routines

Chapter 7

STRUCTURE Example

C Declaration

struct MyStruct
{

// Structure with four integers
int n1;
int n2;
int n3;
int sum;

};

extern "C" __declspec(dllexport) int uvUDT(EXT_ROUTINE_CONTROL* pERCtrl,

MyStruct* pMS)

XML Declaration

uvUDT
This function accepts a pointer to a UDT
int uvUDT(EXT_ROUTINE_CONTROL* pERCtrl,

struct MyStruct* pMS)

Software Declaration