Inlineexample.h – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual
Page 122
Advertising
122
Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
Chapter 7
Develop External Routines
// Set Error bit to zero if successful.
pERCtrl->ctrlWord.ER = 0;
}
else
{
// Some error
// Set Error bit to indicate error occurred
pERCtrl->ctrlWord.ER = 1;
pERCtrl->ctrlWord.ErrorCode = 1; // Set ErrorCode
}
// Set Done bit before exit of this XR.
pERCtrl->ctrlWord.DN = 1;
}
else
{
// Rung not enabled
pERCtrl->ctrlWord.DN = 0;
}
return itemp; // returns 0.0 if error
}
InlineExample.h
// Exported Functions:
extern "C" __declspec(dllimport
int SumArray(
EXT_ROUTINE_CONTROL* pERCtrl,
int Val[]);
Advertising