Rockwell Automation 1789-L10_L30_L60 SoftLogix 5800 System User Manual User Manual

Page 8

Advertising
background image

8

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

Table of Contents

Start a Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Set Breakpoints in External Routine Code . . . . . . . . . . . . . . . . . . . . . 138

Data Type Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

ARRAY Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
INTEGER Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
STRUCTURE Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
STRING Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Packing in Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Parameter Type Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Return Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Export Functions by Using C++ Export Style . . . . . . . . . . . . . . . . . . . . . 144

InlineExample.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
InlineExample.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Run dumpbin.exe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Edit XML Resource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Other Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Pass Tags by Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
External Routine DLL that Uses Other DLLs. . . . . . . . . . . . . . . . . . 146

Chapter 8

Program Windows Events to Monitor
and Change Controller Execution

Use Outbound Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Programming Example: Outbound Events . . . . . . . . . . . . . . . . . . . . . 148

Configure Windows Events to Launch Tasks within the SoftLogix

Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Configure a Windows-event Task in the Controller . . . . . . . . . . . . 151
Trigger a Controller Task from a Windows Application . . . . . . . . 154
Programming Example: Windows Event. . . . . . . . . . . . . . . . . . . . . . . 154

Programmatically Saving the Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Programming Example: Programmatic Save of Controller . . . . . . . 156

Appendix A

Communicate with Devices on a
DeviceNet Network

Configure Your System for a DeviceNet Network. . . . . . . . . . . . . . . . . . 160

Step 1: Install the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Step 2: Create the Communication Card in the SoftLogix Chassis

Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Step 3: Install the Communication Driver . . . . . . . . . . . . . . . . . . . . . 164
Step 4: Configure the Communication Card as Part of the Project . . .

167

Step 5: Download the Project to the Controller . . . . . . . . . . . . . . . . 169
Step 6: Define the Scanlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

Perform DeviceNet Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Step 1: Start the Test Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Step 2: Configure the Port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Step 3: Create a View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Step 4: Read Inputs and Write Outputs . . . . . . . . . . . . . . . . . . . . . . . 184
Step 5: Change the Scanner Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Advertising