Parameter type checking, Return parameter, Export functions by using c++ export style – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual

Page 144: Parameter type checking return parameter

Advertising
background image

144

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

Chapter 7

Develop External Routines

Parameter Type Checking

Return Parameter

Only floating point and integer values can be returned from the external routine.
You cannot pass a pointer to a memory location as the return parameter. This is
enforced to maintain the integrity of the controller. Note that all memory that is
referenced by both the controller and an external routine must have been
allocated by the controller.

Export Functions by Using
C++ Export Style

If you export your external routine functions by using the C++ export style, make
sure that the EntryPoint value in your XML resource exactly matches the C++
decorated name that is exported by your C++ compiler.

RSLogix 5000 Data Type

Formal Parameter Enumeration

Allowed C Language Types (XML)

Literal integer value (such as 121)

IntegerValue

Char, short, int, long, bool

DINT

IntegerAddress
IntegerValue
VoidAddress

Int*, long*
Int, long
Void*

INT

IntegerAddress
IntegerValue
VoidAddress

Short*
Short
Void*

SINT

IntegerAddress
IntegerValue
VoidAddress

Char*
Char
Void*

Literal floating point values (such as 12.345)

FloatingPointValue

Float

REAL

FloatingPointAddress
FloatingPointValue
VoidAddress

Float*
Float
Void*

BOOL

IntegerAddress
IntegerValue
VoidAddress

Bool*
Bool
Void*

Literal BOOL

IntegerValue

Bool

UDT

StructureAddress
VoidAddress

Struct AnyStructT* s
Void*

Arrays

ArrayAddress

VoidAddress

Char var[], short var[], int var[], long var[], Bool var[],
float var[], struct AnyStructT var[]
Void*

RSLogix 5000 Data Type

Formal Parameter Enumeration

Allowed C language Types (in XML)

DINT

IntegerValue

Int
Long

INT

IntegerValue

Short

SINT

IntegerValue

Char

REAL

FloatingPointValue

Float

BOOL

IntegerValue

Bool

Advertising