Develop external routines, Considerations for external routines, Chapter 7 – Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual
Page 115: Chapter
Rockwell Automation Publication 1789-UM002J-EN-P - December 2012
115
Chapter
7
Develop External Routines
This chapter describes how to use Microsoft Visual Studio to create external
routines. Instructions include how to use ‘Test Mode’ in detail, so that you can
test your external routine prior to running the routine with the controller’s
outputs enabled.
A SoftLogix 5800 controller executes an external routine as specified by
a JXR instruction.
Considerations For External
Routines
The external routines feature is an extremely flexible and powerful capability of
the SoftLogix 5800 product. The routines can be written in C or C++ when
using any commercial off-the-shelf development tool, such as Microsoft Visual
Studio, that can generate a Windows compatible DLL (dynamic link library).
The SoftLogix controller at runtime performs a ‘LoadLibrary’ to invoke the
external routine DLL's code from within the memory and process space of the
SoftLogix 5800 controller.
Because the user's external routine DLL runs in the memory and process space of
the SoftLogix 5800 controller, it is possible that incorrectly written user code can
errantly overwrite memory locations that are being used by the controller. Care
must also be taken when creating threads and assigning priorities, because this can
also impact the operation of the SoftLogix 5800 controller.
Topic
Page
Considerations For External Routines
How the SoftLogix Controller Executes External Routines
Create Synchronous, Single-threaded External Routines
Add Version Information to an External Routine DLL
Build and Download External Routines
Update an Existing External Routine
Create Multi-threaded External Routines