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

Page 142

Advertising
background image

142

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

Chapter 7

Develop External Routines

STRING Example

C Declaration

struct RA_String
{

unsigned long Len;
char Data[82];

};

extern "C" __declspec(dllexport) void StringFunc(EXT_ROUTINE_CONTROL* pERCtrl,

RA_String* pInRA_String, RA_String* pOutRA_String)

XML Declaration

<Routine>

<EntryPoint>StringFunc</EntryPoint>
<Description>This function accepts two strings. </Description>
<Signature>void StringFunc(EXT_ROUTINE_CONTROL* pERCtrl,

struct RA_String* pIn, struct RA_String* pOut)</Signature>

</Routine>

RSLogix 5000 Software Declaration

Advertising