M1301-7003 14.1 PiCPro SoftwareManual
M1301-7003 14.1 PiCPro SoftwareManual
M1301-7003 14.1 PiCPro SoftwareManual
Software Manual
Version 14.1
DO NOT ATTEMPT to use any G&L Motion Control product until the use of such product is
completely understood. It is the responsibility of the user to make certain proper operation
practices are understood. G&L Motion Control products should be used only by qualified
personnel and for the express purpose for which said products were designed.
Should information not covered in this document be required, contact the Customer Service
Department, G&L Motion Control, 672 South Military Road, P.O. Box 1960, Fond du Lac,
WI 54936-1960. G&L Motion Control can be reached by telephone at (920) 921–7100.
Release 2004
Part Number M.1301.7003
© 1995-2004 G&L Motion Control
TOC-1
Overview: Using Projects ................................................................................... 23
Menu Commands that Manage Projects ....................................................... 23
The Project Tree and Its Components ........................................................... 25
Project Tree Categories ....................................................................................... 26
Category: PROJECT NAME ........................................................................ 26
Category: MAIN.LDO .................................................................................. 28
Item: MAIN.LDO ......................................................................................... 29
Category: COMPRESSED FILE .................................................................. 29
Item: COMPRESSED FILE ......................................................................... 31
Category: PiCPro VERSION ........................................................................ 31
Item: PiCPro VERSION ............................................................................... 33
Category: PiCPro LIBRARY PATHS .......................................................... 34
Item: PiCPro LIBRARY PATHS ................................................................. 35
Source and Library File Categories .............................................................. 36
Category: Source and Library Files .............................................................. 37
Item: Source and Library Files ..................................................................... 38
Category: OTHER FILES ............................................................................. 39
Item: OTHER FILES .................................................................................... 40
Creating a New Project ....................................................................................... 40
Opening an Existing Project ............................................................................... 42
Opening a Project File (.PRJ) ....................................................................... 43
Opening a Compressed Project File (.G&L) ................................................ 44
Compressing a Project ........................................................................................ 46
Launching a Project ............................................................................................ 47
Printing a Project ................................................................................................ 48
Copying a Project (Save As) ............................................................................... 48
TOC-2
Zooming In and Out ...................................................................................... 67
Using Zoom Command from View Menu ............................................... 67
Using Zoom Command from Navigator Toolbar .................................... 68
Selecting and Deselecting Items ................................................................... 68
Focus ........................................................................................................ 68
Selection................................................................................................... 69
Deselect.................................................................................................... 70
Entering Ladder Networks .................................................................................. 70
Inserting a Network ...................................................................................... 70
Inserting a ST network with focus in a ST element................................. 71
Inserting a LD network with focus in a ST element ................................ 72
Inserting a ST network with focus in a LD element ................................ 72
Overview - Cut, Copy, Delete and Paste ............................................................ 73
Delete ................................................................................................................. 73
Deleting LD or ST Networks ........................................................................ 73
Deleting LD or ST Network Elements ......................................................... 73
Deleting LD Elements or Structured Text .................................................... 74
Cut, Copy, and Paste ........................................................................................... 74
Cutting Network Elements ............................................................................ 74
Cutting LD Elements or Structured Text ...................................................... 74
Copying LD Elements or Structured Text .................................................... 75
Copy Rules............................................................................................... 75
Pasting LD Elements or Structured Text ..................................................... 75
Paste Rules ............................................................................................... 76
Paste Insert Rules..................................................................................... 77
Drag and Drop .................................................................................................... 77
Drag and Drop Copy ..................................................................................... 77
Drag and Drop Copy Rules...................................................................... 78
Drag and Drop Move .................................................................................... 78
Drag and Drop Move Rules ..................................................................... 78
Drop Rules .................................................................................................... 79
Other Notes - Drag and Drop ........................................................................ 79
Finding and Replacing ........................................................................................ 80
Finding and Replacing - Procedures ............................................................. 82
To search for an element in the ladder..................................................... 82
To search and replace an element in the ladder ....................................... 82
Filtering Find and Replace ............................................................................ 83
Finding Duplicates ........................................................................................ 84
Saving, Closing, and Exiting .............................................................................. 84
Saving Files ................................................................................................... 85
Saving Files with a Different Name ............................................................. 85
Closing Files ................................................................................................. 86
Exiting PiCPro .............................................................................................. 86
Working with a Split Screen ............................................................................... 86
Hardware Declarations ....................................................................................... 88
Hardware Declaration Restrictions ............................................................... 88
TOC-3
Entering Hardware Declarations ......................................................................... 89
To bring up the Hardware Declarations table .......................................... 89
To enter hardware declarations - master rack (all CPU types) ................ 90
Viewing Hardware Declarations ................................................................... 91
Hardware Declarations Table - PiC CPU ................................................ 91
Hardware Declarations Table - Remote I/O Expansion Rack ................. 95
Hardware Declarations Table - MMC for PC CPU ................................. 95
Hardware Declarations Table - Standalone MMC CPU.......................... 96
Hardware Declarations Table - Block I/O Module.................................. 97
Editing Hardware Declarations ..................................................................... 97
Inserting and Deleting Hardware Declarations........................................ 97
Cutting and Copying Hardware Declarations .......................................... 98
Pasting and Paste Insert in Hardware Declarations ................................. 99
Pasting to Software Declarations .................................................................. 100
Printing Hardware Declarations .................................................................... 100
Closing and Saving Hardware Declarations ................................................. 101
Software Declarations ......................................................................................... 102
Entering Software Declarations .................................................................... 102
Names and Long Names of Variables .......................................................... 103
Names ...................................................................................................... 103
Long Names ............................................................................................. 103
Reserved Keywords ................................................................................. 104
I/O Points ...................................................................................................... 105
Standalone MMC I/O Points.................................................................... 105
Fast Inputs................................................................................................ 107
MMC for PC I/O Points........................................................................... 107
ASIU I/O.................................................................................................. 107
MMC for PC Fast Inputs ......................................................................... 108
Numbering .................................................................................................... 108
PiC CPU................................................................................................... 109
Master Rack, PiC CPU ............................................................................ 109
Expansion Rack I/O ................................................................................. 109
Master Rack Standalone MMC CPU....................................................... 110
ASIU I/O for MMC for PC CPU ............................................................. 110
Block Expansion Rack I/O ...................................................................... 110
Blown Fuse Status ........................................................................................ 111
Short Circuit Detection ................................................................................. 111
Fast Inputs ..................................................................................................... 112
PiC CPU................................................................................................... 112
Standalone MMC CPU ............................................................................ 112
MMC For PC CPU .................................................................................. 112
Initial Values ................................................................................................. 112
Prefixes for initial values ......................................................................... 113
Working with Data Types in Software Declarations .......................................... 113
Bitwise .......................................................................................................... 113
Numeric ........................................................................................................ 114
TOC-4
String ............................................................................................................. 115
Time .............................................................................................................. 115
Time of Day ............................................................................................. 115
Time duration........................................................................................... 116
Groups of data - Structures and Arrays ........................................................ 116
Arrays....................................................................................................... 116
Declare an Array ...................................................................................... 117
Resize an Array........................................................................................ 119
Remove an Array ..................................................................................... 120
Referencing and accessing elements of arrays in the module ................. 120
Structures ................................................................................................. 121
Declare a Structure.................................................................................. 121
Referencing and accessing member of structure ..................................... 122
Structures with arrays .............................................................................. 123
Declare structures with arrays.................................................................. 123
Referencing and accessing data in a structure with arrays ...................... 124
Array of structures ................................................................................... 124
Declare an array of structures .................................................................. 124
Referencing and accessing data in an array of structures ........................ 126
Array of structures with arrays ................................................................ 126
Declare an array of structures with arrays ............................................... 127
Referencing and accessing the data in an array of structures with arrays 127
Attributes ...................................................................................................... 128
Retentive Attribute................................................................................... 128
Global Attribute ....................................................................................... 128
Both Global and Retentive Attribute ....................................................... 129
External Attribute .................................................................................... 129
In and Out Variable Attributes for UDFBs.............................................. 129
Editing Software Declarations ............................................................................ 129
Inserting/Deleting Software Declarations ..................................................... 130
Cutting, Copying, and Pasting Software Declarations ................................. 130
How to Select Multiple Entries................................................................ 131
Reserved Keywords when pasting ........................................................... 132
Searching in the Software Declarations Table .............................................. 134
Find by Name Only.................................................................................. 135
Find by Type ............................................................................................ 135
Find by I/O Point ..................................................................................... 135
Using the Find Next Command ............................................................... 136
Purging Unused Variables from the Software Declarations Table ............... 136
Working with Networks and Network Elements ................................................ 137
Network Size ................................................................................................. 137
LD Network Size ..................................................................................... 137
ST Network Size ...................................................................................... 138
Network Labels in Networks ........................................................................ 138
To assign or edit a label on a network, follow these steps: ..................... 139
Comments in Network Elements .................................................................. 139
TOC-5
To add comments to your ladder, follow these steps:.............................. 139
To choose the number of comment lines to display, follow these steps:. 139
Constants and Variables in Network Elements ............................................. 139
Constants.................................................................................................. 139
Variables .................................................................................................. 140
LD Elements ................................................................................................. 141
Contacts ................................................................................................... 141
Wires ........................................................................................................ 143
Functions/Function Blocks in LD Network............................................. 144
Jump in LD Network ............................................................................... 146
ST Elements and Structured Text ................................................................. 147
Expressions .............................................................................................. 147
Comments in ST Elements ...................................................................... 149
Conditional Statements ............................................................................ 151
ELSIF-THEN-ELSE ............................................................................ 153
Iteration Statements ................................................................................. 155
FOR-DO................................................................................................... 157
Other Statements in ST ............................................................................ 161
Inserting Conditional and Iteration Statements in ST.............................. 162
Rules for a Structured Text Template...................................................... 163
Functions in ST ........................................................................................ 163
Function Blocks in ST ............................................................................. 166
ST Network Considerations..................................................................... 167
Variables in ST Networks........................................................................ 168
Checking Syntax in a ST Element ........................................................... 171
Using the Right-Click Menu in a ST Element ......................................... 171
Compiling and Downloading .............................................................................. 173
Compiling ..................................................................................................... 173
Downloading............................................................................................ 173
Compiling a Bin File ..................................................................................... 173
Compile and Download ........................................................................... 174
Compile Only........................................................................................... 175
Compiling a Hex File .................................................................................... 175
To Compile a Hex File............................................................................. 176
Compiling a Task .......................................................................................... 176
To Compile a Task, follow these steps: ................................................... 176
Compiling a UDFB, follow these steps: ....................................................... 177
To Compile a UDFB, follow these steps: ................................................ 177
Settings .......................................................................................................... 178
Ignore Direct I/O...................................................................................... 179
Force Soft Bit Memory ............................................................................ 179
Generate Map File (Main Ladder Only) .................................................. 179
Operator Interface .................................................................................... 179
Extended Data Memory Feature ................................................................... 179
Tips on Working with Extended Data Memory ............................................ 180
Animating the Ladder ......................................................................................... 181
TOC-6
To Turn Animation On, follow these steps: ................................................. 181
To Turn Animation Off, do any of the following: ........................................ 182
Forcing & Viewing Variables ............................................................................. 182
Entering Variables in the Force List ............................................................. 183
Copy/Paste ............................................................................................... 184
Drag-n-Drop............................................................................................. 184
Right-Click Menu in Ladder.................................................................... 185
Manual Entry ........................................................................................... 185
Turn Forcing/Grouping On/Off .................................................................... 185
Turn Forcing/Grouping On ...................................................................... 185
Turning On Forcing/Grouping from the On-Line Menu ......................... 186
Turning On Forcing/Grouping from the Tool Bar Buttons ..................... 186
Turning Off Forcing/Grouping from the On-Line Menu......................... 186
Updating the control after Force List is edited ............................................. 187
Viewing Enabled Variables ................................................................................ 187
Copy/Paste ............................................................................................... 188
Drag-n-Drop............................................................................................. 188
Right-Click Menu in Ladder.................................................................... 188
Manual Entry ........................................................................................... 188
Turning Animation On in the View List ....................................................... 188
Controlling the Scan ........................................................................................... 189
Stopping the Scan ......................................................................................... 189
To Stop the Scan, choose one of the following: ...................................... 190
Running One Scan ........................................................................................ 190
To Run One Scan, choose one of the following: ..................................... 190
Doing a Hot Restart ...................................................................................... 190
To do a Hot Restart, choose one of the following: .................................. 190
Doing a Warm Restart .................................................................................. 190
To do a Warm Restart, choose one of the following: .............................. 190
Doing a Cold Restart ..................................................................................... 190
To do a Cold Restart, choose one of the following: ................................ 191
On-line Editing ................................................................................................... 191
To perform an on-line edit or patch, follow these steps: .............................. 192
To abort a patch ............................................................................................ 192
Printing ................................................................................................................ 193
Printing the Ladder ....................................................................................... 193
To print the ladder file, follow these steps: ............................................. 193
Selections in the Ladder Network Section of the Print Dialog ..................... 194
Include in Listing ..................................................................................... 194
Cross Reference ....................................................................................... 195
Full Comments......................................................................................... 195
Long Names ............................................................................................. 195
Page Break at Function Block ................................................................. 195
Fit Width to Page ..................................................................................... 195
Selections in the Software Declarations Section of the Print Dialog ........... 196
Include in Listing ..................................................................................... 196
TOC-7
Selections in the Hardware Declarations Section of the Print Dialog .......... 196
Include in Listing ..................................................................................... 196
Printing View List, Force List, or Information Window .............................. 196
To print the view list, force list, or information window, follow these steps: 196
Printout Symbols ........................................................................................... 197
Troubleshooting the Print Option ................................................................. 198
Building a Dependency List ............................................................................... 198
To build a dependency list, follow these steps: ............................................ 198
Comment Import / Export ................................................................................... 199
Importing Comments .................................................................................... 199
Exporting Comments .................................................................................... 199
Communications ................................................................................................. 200
Communications Settings ............................................................................. 200
Communication Status .................................................................................. 201
Time Read / Set ............................................................................................. 201
Downloading a Hex File ..................................................................................... 202
To Download a Hex file for a PiC or Standalone MMC .............................. 202
To Download a Hex file to a MMC for PC .................................................. 203
Configure Application / RAMDISK Size ..................................................... 203
Update CPU’s Firmware ............................................................................... 204
Update TCP/IP Module Firmware ................................................................ 204
Update SERCOS Module Firmware ............................................................. 204
Update Drive Firmware ................................................................................ 205
Download Ladder Hex File ........................................................................... 205
Clear Flash Memory ..................................................................................... 205
Clear Application Memory ........................................................................... 205
To clear application memory with any MMC CPU:................................ 206
Backing Up and Restoring User Programs ......................................................... 206
Backing Up User Programs .......................................................................... 206
Restoring User Programs .............................................................................. 206
PiC Restore ......................................................................................................... 207
TOC-8
ONLINE Drive List/Drive Data view Scenarios ................................................ 216
Connect to Drive in Drive List ..................................................................... 216
Drive List view ........................................................................................ 216
Drive Data view ....................................................................................... 216
Disconnect the Current Drive and Connect to a Different Drive Already
in the Drive List ............................................................................................ 216
Drive List view ........................................................................................ 216
Drive Data view ....................................................................................... 216
Connect to an Initialized Drive not in the Drive List ................................... 217
Drive List view ........................................................................................ 217
Drive Data view ....................................................................................... 217
Connect to an Uninitialized Drive not in the Drive List ............................... 218
Drive List view ........................................................................................ 219
Drive Data view ....................................................................................... 219
Drive Information Operations ............................................................................. 220
Insert/Add a New Drive to a Drive List ........................................................ 220
Delete a Drive from a Drive List ............................................................. 221
Rename a Drive in a Drive List ............................................................... 222
Edit Drive Data ............................................................................................. 223
Cut/Copy/Paste from the Drive List View .................................................... 224
How to Select Drives .................................................................................... 224
Cut a Drive............................................................................................... 225
Copy a Drive ............................................................................................ 225
Paste a Drive ........................................................................................... 226
Save and Save As..................................................................................... 226
Close ............................................................................................................. 227
ONLINE vs. OFFLINE Drive List/Drive Data views .................................. 228
Other Operations in ONLINE Drive List View ............................................ 230
Configuring / Editing / Monitoring a Drive ........................................................ 232
Access Drive Data view from Drive List view ............................................. 232
Content of Drive Data view .......................................................................... 233
Changing Drive Data views .......................................................................... 234
Navigating in the Drive Data view ............................................................... 235
Find Parameter in Drive Data ....................................................................... 237
Search Column......................................................................................... 237
Search Drive Name .................................................................................. 237
Search Parameter Name........................................................................... 237
Copy/Paste Parameters ................................................................................. 238
Copy......................................................................................................... 238
Paste ......................................................................................................... 239
How to Select........................................................................................... 239
Undo .............................................................................................................. 240
Redo .............................................................................................................. 240
Monitoring ONLINE Drive Data .................................................................. 240
Download File Data ...................................................................................... 241
Print Drive Information ................................................................................ 241
TOC-9
Restore Factory Defaults .............................................................................. 243
Output Override ............................................................................................ 243
Override Output ............................................................................................ 244
Toggle Overridden Output....................................................................... 244
Remove an Override ................................................................................ 244
Control Panel / Oscilloscope View ..................................................................... 245
Accessing Control Panel / Oscilloscope view .............................................. 246
Content of Control Panel / Oscilloscope view .............................................. 246
Changing Control Panel / Oscilloscope modes ............................................. 247
Navigating in the Control Panel / Oscilloscope view ................................... 250
Display Control Panel .............................................................................. 250
Display Parameters .................................................................................. 250
Changing the Parameters area.................................................................. 250
File Menu Features ....................................................................................... 251
Save Trace…............................................................................................ 251
Restore Trace… ....................................................................................... 252
Save Scope Template…........................................................................... 252
Recall Scope Template… ........................................................................ 252
Restore Parameters .................................................................................. 253
Print Trace…............................................................................................ 253
Close Oscilloscope................................................................................... 253
Oscilloscope Channel Configuration ............................................................ 253
Oscilloscope Channel Signal ................................................................... 253
Oscilloscope Channel Scale..................................................................... 254
Oscilloscope Channel Offset ................................................................... 254
Oscilloscope Channel Color .................................................................... 254
Oscilloscope Channel Hide...................................................................... 254
Oscilloscope Setup ........................................................................................ 255
Trigger Signal .......................................................................................... 255
Trigger Level ........................................................................................... 255
Trigger Edge ............................................................................................ 255
Trigger Mode ........................................................................................... 255
Buffer Trigger Position ............................................................................ 256
Sample Rate ............................................................................................. 256
Samples per Division ............................................................................... 256
Secondary Scale ....................................................................................... 256
Line Weight ............................................................................................. 256
Control Panel Features .................................................................................. 257
Oscilloscope Group ....................................................................................... 257
Arm Trigger ............................................................................................. 257
Run Continuous ....................................................................................... 257
Stop .......................................................................................................... 257
Trigger State Indicator ............................................................................. 257
Channel Definition ........................................................................................ 258
Drive Status ................................................................................................... 258
Enabled / Disabled ................................................................................... 258
TOC-10
Warning / Fault ........................................................................................ 258
Drive Control ................................................................................................ 258
Enable / Disable ....................................................................................... 258
Set User Fault........................................................................................... 258
Clear Faults .............................................................................................. 258
Start / Stop Motion................................................................................... 259
Alignment Mode ................................................................................................. 259
Overview ....................................................................................................... 259
Accessing Alignment Mode .......................................................................... 260
Parameters in Alignment Mode .................................................................... 261
Changing the Parameters area.................................................................. 261
File Menu Features .................................................................................. 261
Oscilloscope Channel Configuration and Setup ...................................... 261
Control Panel Features............................................................................. 261
Alignment Mode for a Motor with Incremental Encoder ............................. 261
Overview.................................................................................................. 261
Alignment Successful for Motor with an Incremental Encoder .............. 262
Alignment Unsuccessful for Motor with an Incremental Encoder .......... 263
Alignment Mode for a Motor with a Resolver ............................................. 265
Overview.................................................................................................. 265
Alignment Successful for Motor with a Resolver ................................... 265
Alignment Unsuccessful for Motor with a Resolver ............................... 266
Cases When PiCPro Cannot Perform Alignment ......................................... 267
Stegmann Encoder ................................................................................... 267
Motor with alignment mode of Move, Move Minimum, or Hall then Index 267
TOC-11
Changing the Location of Custom Motor Files .................................................. 278
To Cancel the Location Change of Custom Motor Files ......................... 278
Information Window Messages .......................................................................... 279
TOC-12
Axis Tuning using Forcing ........................................................................... 322
Axis Tuning using Viewing .......................................................................... 323
Axis Tuning Variables .................................................................................. 324
TOC-13
Inserting / Editing IDNs for Receive Continuous ......................................... 363
Send IDNs ........................................................................................................... 364
Inserting/Editing IDNs for Send ................................................................... 365
Execute Procedure Command ............................................................................. 366
Ring State ............................................................................................................ 367
Slave Status/Control ........................................................................................... 369
IDN Lists ............................................................................................................. 370
Options for IDN Display ............................................................................... 370
IDN Lists ....................................................................................................... 371
Finding a Specific IDN in an IDN List ......................................................... 372
Printing IDNs from an IDN list .................................................................... 372
Viewing Variable Length Data from an IDN List ........................................ 373
Specifying the SRS for Viewing the Drive IDN List ................................... 373
Troubleshooting SERCOS .................................................................................. 374
Communication Problems........................................................................ 374
Control Problems ..................................................................................... 375
TOC-14
Semaphore Flag Example 1 - Data Transfer from Task LDO to Main LDO 392
Semaphore Flag Example 2 - Data Transfer from Main LDO to Task LDO 394
TOC-15
APPENDIX D - Stepper Reference Card ................................................. 505
TOC-16
APPENDIX M - Virtual Axis ...................................................................... 533
TOC-17
TOC-18
CHAPTER 1 Getting Started with PiCPro for Windows
Introduction to PiCPro for Windows
PiC (Programmable Industrial Computer) and MMC (Machine and Motion Con-
trol) systems provide an integrated solution to the logic, motion, process, operator
interface and communications requirements found in today’s industrial automation
applications. PiCPro for Windows Professional Edition and PiCPro for Windows
MMC-Limited edition are the software packages that allow you to program the
PiC or MMC to run your application(s). They include the following programs:
Program Function
Ladder Diagram Allows you to program control logic
in both ladder and structured text and
save it as a .LDO file
Servo Setup Allows you to program setup informa-
tion for your servo application and
save it as a .SRV file
SERCOS Setup Allows you to program setup informa-
tion for your SERCOS application and
save it as a .SRC file
Project Allows you to manage an application
through development and production
phases and then maintain the applica-
tion
Analog Interfaced Allows you to identify, set up and
Drive System monitor the analog interfaced digital
drives used in your application.
If PiCPro is new to you, you will soon discover how easy it is to write your appli-
cation program using the interactive tools available in PiCPro. There are tutorials
on the CD you receive that may be helpful.
If you have used PiCPro in the past, you will see how the new tools and enhanced
features in this Windows version enable you to work more effectively and effi-
ciently in designing your application program(s).
Structured text as used in PiCPro provides powerful data handling such as arrays
and structures that contain different data types. It provides control structures for
the following statements: IF-THEN-ELSE, CASE, FOR, REPEAT and WHILE
loops.
Included on the PiCPro CD are the Function/Function Block Reference Guide, the
PiC900 Hardware Manual, the Standalone MMC Hardware Manual and the MMC
for PC Hardware Manual.
PiCPro for Windows MMC-Limited edition allows you to program the standalone
MMC control and/or analog interfaced digital drives to run your application(s).
The title bar of the application indicates its edition.
Note: You cannot program an MMC for PC with this edition of software. You
must use the Professional Edition.
PiCPro for Windows Monitor Edition
PiCPro for Windows Monitor Edition is a subset of the PiCPro for Windows Pro-
fessional Edition software. The Monitor Edition allows you to view, print and
monitor the execution of an application program for the PiC/MMC family of con-
trols. It can also perform a PiC Restore.
Generally speaking, you cannot create new files, edit existing files or compile and
download.
However, project files and analog interfaced drive system files can be created and
edited with the Monitor Edition.
The Monitor Edition provides full functionality for the analog interfaced drive sys-
tems. You can identify, configure, setup, monitor and analyze the analog inter-
faced digital drives used in your application. You can create, edit and maintain the
drive files used to save the drive parameters. The Monitor Edition is packaged
with each analog interfaced digital drive shipped from Sheffield Automation.
The title bar of the application indicates its edition.
Customer Services
Note: Power saver option in BIOS should not be set when using an MMC for PC.
Setting this option will cause a communications error when the computer is shut
down.
A cable is supplied with the PiCPro package. One end of the cable is labeled
“PiC900” and the other “Computer”. Connect the “Computer” end to the serial
port you specify in the Online | Comm Settings dialog box and connect the
“PiC900” end to the PiCPro Port on the controller. The pin-out for the controller
serial port is given in the appropriate Hardware Manual. The pin-out for the serial
port should be in the computer’s manual.
Infrared Communications Drivers
If your system has Infrared Communications Drivers, you need to be aware that
under the Windows default settings, COM1 and COM3 use the same interrupts and
COM2 and COM4 use the same interrupts. The communications settings option in
PiCPro for Windows, when checking for valid communications ports, may initiate
execution of some Infrared Drivers. Communications problems will occur if the
Infrared Driver is using one member of the above pairs and PiCPro for Windows is
using the other. To avoid communications problems, do one of the following:
• Disable the Infrared Driver in the control panel
• Change the communications port used by the Infrared Driver so that it does
not conflict with the communications port used by PiCPro.
Installing PiCPro for Windows
When you open a file, its window appears in the work area. This is where you
work on developing a new file or editing an existing file. An information window
appears at the bottom of the work area. You can open multiple files and easily
move between them in the work area.
Title Bar
Menu
Bar
Toolbars
Main
Ladder
Area
Information
Window
6. (Not shown above, a blank space) until forcing is turned on. The symbol
will appear in this location when forcing is on.
7. Dynamically updates with the scan time when connected to a control and the
scan is running.
Example 1:
Note: The element can be in either Inserts (Ins) or Overstrike (OVR) mode.
In Insert mode, characters are inserted at the cursor position and ex-
isting characters past the inserted character are pushed to the right.
In Overstrike mode, inserted characters will overwrite any charac-
ters already at that position.
Example 3:
0.00ms Dynamically updates with the scan time when connected to a control and
the scan is running.
Window Elements
If you are familiar with Windows, you will recognize basic screen elements com-
mon to most Windows applications. If you are new to Windows, this section will
inform you about some of these elements.
The Title Bar
When you start PiCPro, a Title Bar extends across the top of the window. It dis-
plays the edition of PiCPro you are using, the name of the file you are working in
and indicates whether it is the active window or not. The Title Bar of the active
window is highlighted. The Title Bar of the inactive windows are dimmed.
PiCPro for Windows Title Bar
Where:
Editionname specifies the edition of PiCPro for Windows. The possible
versions are Professional, Monitor and MMC Limited.
You can drag the Title Bar to reposition the window within the work area.
Clicking on the icon on the left end of the Title Bar drops down a menu that allows
you to Restore, Move, Size, Minimize, Maximize, or Close PiCPro.
There are three buttons on the right end of the Title Bar.
Use the first to minimize the window, use the second to maximize the window to
fill the entire screen and use the third to close PiCPro.
The Menu Bar
Directly below the Title Bar is the Menu Bar. It contains the names of the menus
that group together similar commands. Clicking a menu name displays a list of
commands that can be used to access PiCPro functions.
When PiCPro is started, the Menu Bar contains the names shown below.
Once you open a ladder file, the Menu Bar is expanded to include more items
needed to program your ladder.
PiCPro has several features that let you set up your PiCPro work space for the way
you want to work.
You can:
• Set preferences
• Choose animation color
• Customize the toolbars
• Display/hide the status bar
• Choose Structured Text Keyword, Comment, Number and Template colors
Options for user preferences and color can be set under View | Options from the
menu or by pressing the button from the standard toolbar.
Ladder
Under the Ladder tab, you can set the following:
• Software Declarations - Forced Declarations: Whether you want a mes-
sage to appear that tells you to enter a software declaration for the ladder
element you have just added to your ladder.
• Sound - Beep Enabled: Whether you want a beep to sound after certain
actions.
• Confirmations - Confirm Actions: Whether you want a confirmation
message to appear after certain actions.
• Hide:
Symbol Long Name: Whether you want to view long names you have
entered in your program. Note: When you choose to view the long names
all the cells in your ladder are enlarged.
Structured Text F/FB Templates: Whether you want Function/Function
block templates shown when you drop a Function/Function Block into a
Structured Text element.
• Ladder View Preferences - Initial Network Rows: and Network Com-
ment Lines: The number of network rows and the number of comment
lines you want to view in your ladder.
• Cell Width: How wide the cells in the networks appear on your screen.
When you install PiCPro for Windows, the default directory structure is:
C:\Program Files\Giddings & Lewis\PiCPro for Windows Vxx.x editionname Edition
• where Vxx.x is the version number (e.g. V14.0) and editionname is the name of the Edi-
tion (e.g. Professional). Hereafter, this directory is referred to as the PiCPro program
directory.
To avoid confusion when installing new versions of PiCPro or uninstalling old ver-
sions, it is recommended that you NOT create your directories under the PiCPro
program directory structure (where PiCPro is installed).
PiCPro Libraries
All PiCPro functions and function blocks are stored in libraries. There is a standard
set of libraries that is installed with the PiCPro software. There are also libraries
that can be created by the user to hold user-defined function blocks, set up func-
tions, etc. You can add and remove the paths to these libraries using the dialog box
found under File | PiCPro Libraries.
Note: To be able to compile with a function/function block, whether it’s a standard
one or a user-written one, the path to its library must be configured in the PiCPro
Libraries list of directories. You can access this list directly by selecting File |
Library Contents
You may want to view a library’s contents or delete libraries. You may also remove
individual functions from within a library. Deleted libraries and removed functions
are removed from the Function list in PiCPro (Ladder | Functions).
Note: You cannot delete any of the standard PiCPro libraries or functions.
With the PiCPro Libraries dialog box displayed, choose the Contents button.
The Library Contents box appears.
1. In the Directory section, select the desired library path from the drop down
list.
5. If you want to print a list of all the libraries in the directory along with the
functions in each, choose the Print button. You can also choose to Print to a
File from within the print dialog box.
6. If you want to display the dependencies, if any, for each function/function
block, choose the Dependencies On button. The dependencies will be dis-
played right below the function name entry. With this button on, the dependen-
cies will be included in the print out or print file if you choose to print.
Using On-line Help
Note: The help files for the standard libraries and the ASFB libraries are
not .htm files, but rather .chm files. These are compiled html files.
The same rule applies regarding their location and naming. They are
named to match their corresponding library: <library name>.chm.
Example: arith.chm goes with arith.lib. Both files must exist in the
same directory, so if you’re moving your libraries around, move
their help files with them.
Once you start PiCPro, you’ll be able to create and develop your various applica-
tion files.
With PiCPro running, you can easily switch between PiCPro programs (Ladder
Diagram, Servo Setup, SERCOS Setup and Analog Interfaced Drive System). You
can go back and forth between programs without exiting one and launching the
other.
To begin working in PiCPro, start the PiCPro application.
To start PiCPro
1. Click the Start button in the Windows task bar.
2. Click the PiCPro for Windows entry in Programs.
3. Click the desired version and edition of PiCPro.
Or double-click the PiCPro for Windows desktop icon provided during installa-
tion.
Popup Menu
Description
Selection
Compress Allows you to compress the project file. This is the same as the com-
mand selected from File on the menu.
Print Allows you to print the information in the project tree. This is the same
as the command selected from File on the menu.
Launch Allows you to start up the edition/version of PiCPro configured in the
Project project if it is installed on your workstation. This is the same as the com-
mand selected from File on the menu.
Update Allows you to automatically update the entire project tree based upon
Project Tree dependency information. This is the same as the command selected from
File on the menu.
Validate Allows you to validate the contents of the tree categories. This is the
Project Tree same as the command selected from File on the menu.
Category: MAIN.LDO
The MAIN .LDO category can contain one item. This is the main .LDO file (lad-
der file) for this project.
If you right-click on the MAIN .LDO category, a popup menu is displayed with the
following menu selections:
Popup Menu
Description
Selection
Add Enables you to add a main ladder file to your project. This
option is only enabled if a main ladder file is NOT already
specified.
Delete All Enables you to delete all of the items belonging to this cat-
egory. In this case, that is only one: the main ladder file.
Note: the actual file is not deleted; just the entry in the
project tree is deleted. You are prompted for a confirma-
tion first.
Cut Cuts (removes) the main ladder file item from this cate-
gory and places it on the clipboard.
Copy Copies the main ladder file item from this category to the
clipboard.
Paste Pastes the contents of the clipboard into the MAIN .LDO
category. This command is only available if there is not
already a main ladder file item entered for this category
and if the clipboard contains a main .ldo file item.
Update Not enabled for this category.
Project
Items under
this Cate-
gory
28 Working with Projects
Item: MAIN.LDO
If you right-click on an item (the main ldo file) in the MAIN .LDO category, a
popup menu is displayed with the following menu selections:
Popup Menu
Description
Selection
Open Opens the main ladder file. If this ladder is already open, it
makes it the active window. You can also open this file by
double clicking on it.
Delete Removes this item, the main ladder file, from this cate-
gory. You are prompted for a confirmation first.
Edit Allows you to manually edit this item’s name and path by
typing in the new information.
Cut Removes this item, the main ladder file, from this cate-
gory.
Copy Copies this item to the clipboard.
Paste Pastes a main ladder file into this category. This is only
available if a main ladder file item is on the clipboard. This
overwrites the selected main ladder file item.
Popup Menu
Description
Selection
Add Enables you to add a compressed project file item to your
project. This option is only enabled if a compressed project
file is NOT already specified.
Delete All Enables you to delete all of the items belonging to this cat-
egory. In this case, that is only one: the compressed project
file item. Note: the actual file is not deleted; just the entry
in the project tree is deleted. You are prompted for a con-
firmation first.
Cut Cuts (removes) the compressed project file item from this
category and places it on the clipboard.
Copy Copies the compressed project file item from this category
to the clipboard.
Paste Pastes the contents of the clipboard into the COM-
PRESSED FILE category. This command is only available
if there is not already a compressed project file item
entered for this category and if the clipboard contains a
compressed project file item.
Update Not enabled for this category.
Project
Items under
this Cate-
gory
Popup Menu
Description
Selection
Open Not enabled for this category. Instead, to open a com-
pressed file, use File | Open and select a compressed
project. This will close the currently open project and
uncompress the selected compressed project according to
your specifications.
Delete Removes this item, the compressed project file, from this
category. You are prompted for a confirmation first.
Edit Enables you to edit the compressed project file item, not
the compressed project file itself. You may type in a new
path and/or compressed project file name.
Cut Removes this item, the compressed project file, from this
category.
Copy Copies this item to the clipboard.
Paste Pastes a compressed project file into this category. This is
only available if a compressed project file item is on the
clipboard. This overwrites the selected compressed project
file item.
Popup Menu
Description
Selection
Open Not enabled for this category.
Delete Removes this item, the PiCPro version/edition, from this
category. You are prompted for a confirmation first.
Edit Enables you to edit the PiCPro version/edition by display-
ing the PiCPro Version Selection dialog. You can choose
the edition and the version of PiCPro that you want associ-
ated with this project.
Popup Menu
Description
Selection
Modify Allows you to add or remove library paths in this category.
Displays the same dialog that you get when you select
File | PiCPro Libraries.
Delete All Deletes all of the libraries paths under this category. You
are prompted for a confirmation first.
Cut Cuts (removes) all of the library paths from this category
and places them on the clipboard. A library path on the
clipboard can be pasted into the PiCPro LIBRARY PATHS
category if it does not already exist there. Note: if you do a
cut on this category, you’ll get a warning message stating
that PiCPro couldn’t find any library paths. Just click OK.
Remember, you will need to add some library paths back
in sometime.
Copy Copies all of the library paths in this category and places
them on the clipboard. A library path on the clipboard can
be pasted into the PiCPro LIBRARY PATHS category if it
does not already exist there.
Paste If the clipboard contains library paths, this pastes the con-
tents of the clipboard into this category. If a matching path
already exists there, a duplicate one is not added. This
menu selection is only available if the clipboard contains
library paths.
Popup Menu
Description
Selection
Edit Allows you to manually edit the library path by typing in
the new information.
Modify Allows you to add or remove libraries paths in this cate-
gory. Displays the same dialog that you get when you
select File | PiCPro Libraries.
Delete Deletes the selected library path from the list. You are
prompted for a confirmation first.
Cut Cuts (removes) the selected library path from the list and
places it on the clipboard.
Copy Copies the selected library path from the list and places it
on the clipboard.
Paste Pastes the contents of the clipboard into this category,
replacing the selected item. This menu selection is only
available if the clipboard contains library path items.
A project is opened by using the File | Open command from the menu. There are
two types of project files that can be opened:
1. PiCPro for Windows project file (.PRJ or .prj).
2. PiCPro for Windows compressed project file (.G&L or .g&l).
You can also open any of these from the FMSDISK, if you have one, on the con-
trol.
3. If any other project is open, you are prompted to close it because only one
project can be open at a time.
When you create a project using PiCPro for Windows, you create a project file.
This file has entries that describe the name and location of the various source files
and library files and others that constitute your project. The actual files are not a
part of the project file. However, if you compress your project, a compressed
project file is created. This file physically contains, in compressed format, a copy
of all of the files described by name (plus their supporting files) in the project file.
You can now easily distribute your project as a single file or deposit it on an appro-
priate control’s FMSDISK.
Note: Compressed project files do not include the standard libraries.
To compress a project file:
1. Open or create a project.
2. Make sure a compressed project file name is configured in the COMPRESSED
FILE category of the project.
3. Select File | Compress or right-click on PROJECT NAME category and select
Compress
4. The project is automatically Validated. This checks that the files that are refer-
enced in the project tree actually exist in the configured location. It does not
validate the compressed project file or verify the PiCPro edition/version.
5. You are also prompted to save your project if it has changed. You must save it
to continue with the compress.
6. You are asked whether or not to Update your project. Updating checks the
dependencies for the files in your project and automatically includes source
and library files according to the properties selected for this project. Remember
that entries for files that were manually added to the UDFBs/TASKs, SERVO
SETUP FILES, and SERCOS SETUP FILES could be lost if other files are not
dependent on them.
7. The Select Compress Destination dialog is displayed. Your choices for desti-
nation are the workstation or the FMSDISK, if you have one. If you select the
workstation, the location for the compressed project file is exactly what you
had configured in the project file. However, if you select FMSDISK, the loca-
tion for the compressed project file is FMSDISK:\. (Note: you cannot edit the
destination from here, only from the COMPRESSED FILE category in the
project tree.)
8. Click OK.
Note: Even if you compress to your workstation, you can copy the compressed
project file to the FMSDISK on your control by using Online | Disk Operations |
Flash. Remember that depositing any file(s) to FMSDISK completely removes
anything that was already there. You do get a prompt warning you of this, allowing
you to Cancel, if desired.
Launching a Project
At times, you may open a project that is configured with a version and edition of
PiCPro for Windows that is different than the version and edition you are currently
running. In these cases, you are warned of this and can either continue opening the
project or not. If you choose to continue the open, the status bar will display an
icon with a red background that indicates the edition/version mismatch: . If no
mismatch, this icon is displayed in green: .
If you have a red (version mismatch) icon displayed, PiCPro for Windows pro-
vides a mechanism for you to automatically reopen your project in the correct edi-
tion/version of PiCPro for Windows (provided it is installed on your workstation).
• Select File | Launch Project
OR
• Right-click on the PROJECT NAME category of the project tree and select
Launch Project.
The Launch Project feature first checks to see if the configured edition/version of
PiCPro for Windows is installed on you workstation. If it isn’t, a message is dis-
played and the launch is canceled. Otherwise, the currently running PiCPro is
closed, the configured one is opened and the project is also automatically opened.
Note: It is important to be running the same edition/version of PiCPro for Win-
dows as is configured in the project if you need to edit and download any changes
to the control. To avoid unexpected results, a particular edition/version of PiCPro
Working with Projects 47
for Windows should only be used with the libraries distributed with it. For exam-
ple, if a project called for PiCPro for Windows 10.2 Standalone MMC Edition and
you are currently running PiCPro for Windows 11.0 Professional Edition a version
mismatch occurs. In fact, if your editions/versions mismatch, the Compile and
Download feature will report the mismatch to you and will then cancel.
Printing a Project
2. Once the project is open, select File | Print from the menu or click the
button
3. The standard Print dialog box is displayed.
4. Make appropriate changes for printer properties, etc. if needed.
5. Click OK.
Copying a Project (Save As)
The Save As command allows you to copy all of the files that make up an entire
project to new locations. Here you have total control over where each different file
type and directory combination will be copied to for the new project.
Note: If a category in the Source PRJ is empty, then the corresponding file types
will not be listed in this dialog’s Project Path(s):. For example, if the
Source PRJ has no items in the OTHER FILES category, then Other Files
will not be listed in the File Types: of this dialog. If the Source PRJ has
source files in the PROFILE SETUP FILES categories, but no library files,
then the File Types: in this dialog will have Profile Setup Source listed
but not Profile Setup Libs.
The File Types: and Source directories: columns cannot be edited from this dia-
log, but the entries in the Destination directories: column can be. Edit this field
for every file type’s destination that you want changed in the new project. By
default, the Destination directories: column is initialized with the same informa-
tion as in the Source directories: column.
To begin editing a Destination directories: field, single click at the point in the
text where you want to start typing. A blinking cursor should appear. Any charac-
ters typed will be inserted before the cursor. If any portion of a field is selected,
any character you type will replace that selected portion. If you click in the field
where there isn’t any text, the entire field will be selected.
Note:
• <Ctrl + X> cuts any selected portion to the clipboard.
• <Ctrl + C> copies any selected portion to the clipboard.
• <Ctrl + V> pastes clipboard contents over any selected portion otherwise
pastes before the blinking cursor in the field.
You can also use the browse button to the right of each Destination directories:
field to browse to the desired location.
When done click the OK button. The source PRJ file is automatically closed, the
files are copies to their new locations, and the new project file is opened in the
PiCPro for Windows that is currently running.
Note: In the PiCPro MMC-Limited Edition, the CPU type is always MMC.
Target CPU cannot be selected in the MMC-Limited Edition.
3. Choose OK to start a new ladder file. Select Cancel or to close the dialog
without starting a new ladder file. Select Help to display information related
to starting a new ladder file.
PiCPro then displays a new ladder diagram. You can now create your ladder program
with the tools and features available in PiCPro and then save your ladder file.
Network
Element
LD Network
LD
Elements
Network
Element
ST Network
ST
Element
Overview
Each LDO file can be assigned a password (Main LDO and UDFB files). By assign-
ing a password to an LDO file a file can be locked to prevent opening or editing. A
password can be set, modified, or removed using the File | Properties dialog.
Note: PiCPro Professional and MMC-Limited Editions prior to version V14.1 and all
versions of Monitor Edition do not allow assignment of passwords to an LDO
file. Also, all versions prior to V14.1 are not compatible with a password pro-
tected LDO file (an error will display when an attempt is made to open the
file).
Two levels of password protection are available:
• Password Required to Open File - The LDO file cannot be opened without enter-
ing a password. Once the password is entered, the LDO file is opened and full
editing of the LDO file is possible.
Note: If the file is opened in Monitor Edition, a password prompt will be dis-
played before the file is opened. Once the file is open, the file cannot be
edited.
• Password Required to Edit File - The LDO file is opened without entering a
password, but the LDO file cannot be edited until the file is unlocked by entering a
password through the menu item File | Properties or by selecting the unlock tool-
bar button.
If the same password is used for all files of a ladder program (Main LDO and
UDFB's), then all files in that ladder program can be unlocked by entering the pass-
word just once. When opening additional files, a prompt will be displayed asking for
a password. The newly opened files will open in an edit lock state until unlocked by
clicking on the unlock toolbar button - but this time, no password is required. This
helps prevent accidental changes to a file that was not specifically unlocked.
Note: The main LDO is always the main level of password protection. In other
words, a UDFB nested inside another UDFB always compares its password
against that of the main LDO and not its parent UDFB.
When passwords are different between the main LDO and a UDFB, each file adheres
to its own password protection scheme with one exception: the main LDO must
always be unlocked before a UDFB can be unlocked. If the main LDO has not been
unlocked yet (or has been re-locked), a double password prompt will be displayed; one
for the main LDO password and one for the UDFB password.
Files that are not password protected can still be locked temporarily during any edit
session. This protects a file against accidental changes. A click of the unlock toolbar
button is all that is required to unlock the file - no password is needed.
3. Select Add/Modify password required to open file to prevent the file from being
opened until a password is entered or select Add/Modify password required to
edit file to prevent editing of the file until a password is entered.
4. At New Password, enter the desired password. At Verify Password, enter the
desired password again.
5. Click OK.
Note: The file must be saved to activate the protection.
Note: The password entry field will be titled “UDFB Password” if a UDFB is
being loaded.
2. Click OK and the Unlock File: dialog will again be displayed, allowing the correct
password to be entered.
3. Enter the correct password.
Once the correct password has been entered, the file will open for viewing.
1. Click on the standard toolbar and the Unlock File: prompt will be dis-
played as follows:
2. Enter the correct password. The Lock/Unlock icon will change to indi-
cating that the file is unlocked and can be edited.
Note: There should not be any forcing windows active for the active LDO
being re-locked.
Note: The password entry field will be titled “UDFB Password” if a UDFB is
being edited.
1. From an open LDO file that is password protected, select File | Properties.
2. Click the Password Protection tab. The File Properties dialog will be dis-
played as follows:
6. Click OK or Apply to remove the password. Click Cancel to stop the pass-
word removal.
If the file was previously password protection, the file will be locked without fur-
ther prompting, unless the file has changes that have not been saved or if a force
list is opened for that file. If one of these cases exist, a dialog will display describ-
ing why the file cannot be locked. Once the file is locked, the file’s password will
be required to unlock the file again.
Locking a File with no password protection
If the file has no password protection a dialog will be displayed asking if you want
to add password protection.
If Yes is clicked, the File Properties password protection dialog will be displayed.
From this dialog, password protection can be added.
Note: If password protection is added to a file, the file will not be com-
patible with versions of PiCPro older than V14.1.
If Yes is clicked, the file will be locked against changes. No password is required
to unlock the file.
If No is clicked, the file will remain unlocked.
The toolbars give you quick access to some of the frequently used tools. These are the
toolbars available in PiCPro (refer to APPENDIX I - Toolbar Buttons).
• Servo - Standard and SERCOS - Standard
• Drive List - Standard Tools
• Custom Motor
• Standard
• Basic Online Operations
• Advanced Operations
• Ladder
• View Navigator
• Function/Function Blocks
• Compiler
• Structured Text Tools
• Insert New Network
The Pointer tool button is found on the Ladder Toolbar. It is the default selection
allowing you to point and click to select locations in the ladder. You can exit the drop
mode for any of the other Ladder toolbar buttons by selecting the Pointer tool.
1. Select View | Zoom from the menu. The Zoom dialog appears:
• To decrease the size of the display, click on the repeatedly until you reach
the desired magnification.
• To increase the size of the display, click on the repeatedly until you reach
the desired magnification.
Tip
When you zoom in or out, the cell in the top left-hand corner remains in that loca-
tion after zooming.
Focus
A cell or group of cells in your ladder will always have focus. Focus is indicated
by a dashed rectangular border around the area. A cell that has focus can be cop-
ied, cut, pasted, and deleted. You can also select a cell or group of cells.
The quickest way to set focus is by using the Pointer tool to single click on a cell.
If you place focus on the power rail in your ladder, the whole row will have focus.
If you place focus on a Function/Block, the whole Function/Block will have focus.
However, if you placed focus on the power rail and there is a Function/Block in the
row, the entire Function/Block is not selected. You can also move the cell focus
from the keyboard as follows.
Selection
Selection is indicated by highlighting the area. Selected cells can be copied, cut,
pasted, deleted, dragged and dropped.
Selection is set by first placing focus on the cell and then clicking within the cell.
The cell is highlighted.
A row is selected by placing focus on the power rail and then clicking on the
power rail within the focus row.
Multiple cells are selected by clicking on the first cell and then dragging the mouse
over the area you want to highlight.
If the power rail is not included in the selection, the selection must be contained
within a network.
If the power rail is included in the selection, the selection can contain sequential
rows from more than one network.
Note: A ST element takes up only 1 row but can contain up to 500 lines of text.
<Shift + Arrow> All cells within the rectangular area defined by the arrow
keys (Within a network if focus is not on the power rail
and over multiple networks if focus is on the power rail.)
<Shift + Home> The focus cell and cells to the left of it
<Shift + End> The focus cell and cells to the right of it until the last
filled cell
<Shift + Ctrl + Home> The focus cell and all cells to the upper left-hand cell in
the network if focus cell is not on the power rail.
The focus cell and all cells to the first row in the module
if the focus cell is on the power rail of the first row of the
current network or else selects the focus cells and all
cells through the first row of the current network
<Shift + Ctrl + End> The focus cell and all cells to the last row in the network
if focus cell is not on the power rail.
The focus cell and all cells to the last row in the module
if the focus cell is on the power rail of the last row of the
current network or else selects the focus cell and all cells
through the last row of the current network
<Ctrl + A> All cells in the ladder if all cells in the current network
are selected. If all cells in the current network are not
selected, all cells in the current network will be selected.
Deselect
Inserting a Network
When a network is inserted it will be inserted above the focus cell. A new network
appears above the focus cell. All the networks below the insertion are renumbered.
Right-Click Method
1. Position the focus where you want to insert a network.
2. Right-click and choose Insert | LD Network or ST Network.
Toolbar Method
Select a toolbar button from the Insert New Network toolbar. Select LD for a
Ladder Network or ST for a Structured Text Network.
Select Yes and the ST network will divide into two ST networks at the cursor loca-
tion and a LD network will be inserted between them. The focused element will be
the new LD element. The networks will be renumbered if this is not the last net-
work.
Inserting a ST network with focus in a LD element
The Cut, Copy, and Paste commands allow you to use the clipboard to make copies of LD
or ST Network Elements, LD Elements or Structured Text items from your ladder.
The Copy command places a copy of the selected item on the clipboard.
The Cut command removes the item from your ladder and places it on the clipboard.
Once an item is on the clipboard, you can use the Paste or Paste Insert commands to
place the item in a ladder. The item remains on the clipboard until you cut or copy another
item. Only one item can be placed on the clipboard at a time.
Note: The Delete command removes the selected item from your ladder. It does not
place it on the clipboard.
If animation is running when you begin these procedures, it will be halted.
Delete
Deleting LD or ST Networks
To delete a LD or ST network, do the following:
1. Position the focus anywhere in the network you want to delete.
2. Choose one of the following methods to delete a network:
• Select Ladder | Network | Delete from the menu
• Press <Shift + Delete>.
3. A confirmation message will appear. If you select OK, the network will be
deleted. All the networks after the deleted network are renumbered.
4. You can delete multiple networks by selecting all the rows within the networks.
Choose one of the following methods to delete a row:
• Select Ladder | Row | Delete from the menu
• Press Delete key.
Copy Rules
• If the data copied to the clipboard contains a power rail, it must be pasted on a
power rail.
• Rows must be pasted on rows. The only exception is if focus is on the End of
Module (EOM). If focus is on EOM, rows are inserted.
• Pasting a non-network element on a network element has the effect of merging
two like networks.
• A paste operation that does not include the power rail does a replace as fol-
lows:
If focus is on a LD network element, the following prompt will be displayed:
If you click Yes to continue, data in the network will be overwritten with the
data from the clipboard.
If focus is on a ladder element and the number of rows affected is less than or
equal to the number of rows in the network, the following prompt is displayed:
If you click Yes to continue, elements and functions in the network will be
overwritten with the data from the clipboard.
If focus is on a ladder element and the number of rows affected is more than
the number of rows remaining in the network, rows are added to the network.
If focus is on the EOM, rows are inserted.
• A paste operation that includes the power rail, does an insert above the line
with focus.
• The maximum number of cells in an LD network is 255.
• An error message will be displayed if an attempt is made to paste text into a ST
network that would cause the number of lines to exceed 500 or the number of
characters in a line to exceed 500.
• If Edit | Paste Insert is selected while focus is on a ladder element, the follow-
ing prompt is displayed asking if rows should be shifted down or network col-
umns should be shifted right:
• If the clipboard data contains a power rail, it must be pasted on a power rail.
The only exception is End of Module (EOM). If focus is on the EOM, rows can
be pasted.
• The maximum number of cells in an LD network is 255.
• Within a ST element, a paste is always a paste insert operation. If text is high-
lighted when paste is selected, the highlighted text will be deleted when the
paste occurs.
You can drag a highlighted area by left-clicking and holding down the button, moving to
the desired area, and drop the selection by releasing the button.
If a power rail is not included in the selection, the selection must be contained within a
network.
If the power rail is included in the selection, the selection can contain sequential rows
from more than one network.
Note: A ST element takes up only 1 row but can contain up to 500 lines of text.
When a portion of a ladder is Drag and Drop copied into a different ladder, the
software declarations that were used in the copied portion of the ladder are added
to software declarations. Undeclared variables will remain undeclared.
When a portion of a ladder is Drag and Drop moved into a different ladder, the
software declarations that were used in the moved portion of the ladder are added
to software declarations. Undeclared variables will remain undeclared.
If a LD network element is dragged and dropped, one of the following will occur
based on the location of the element to be moved.
After the move:
• If the network above the element being moved is a LD network, the
remaining rows in the network will be merged with the network above.
• If the network above is a ST network, an error message will be displayed.
• If the network is the first network and the network is empty, a prompt will
be displayed asking if the entire network should be deleted.
• If the network is the first network and the network is not empty, an error
message will be displayed along with a prompt asking if the entire network
should be deleted.
If a ST network element is dragged and dropped, one of the following will occur
based on the location of the element to be moved.
After the move:
• If the network above the element being moved is a ST network, the ST ele-
ment below the network element being moved will be merged with the ST
element above the network element being moved.
• If the network above is a LD network, an error message will be displayed.
• If the network is the first network and the network is empty, a prompt will
be displayed asking if the entire network should be deleted.
Drop Rules
• The maximum number of lines in a ST network is 500. The maximum number of
characters in a line in a ST network is 500.
• The maximum number of cells in a LD network is 255.
• If the data to be dropped contains a power rail, it must be dropped on a power rail
(rows must be dropped on rows). The only exception to this rule is the EOM. If
focus is on the EOM, rows can be dropped.
• Dropping a non-network element on a network element has the effect of merging
two like networks.
• A drop operation, which does not include the power rail, does a replace as follows:
• If dropping on a network element, the following prompt is displayed: Net-
work(s) will be overwritten. Continue anyway?.
• If dropping on a ladder element, and the number of rows affected is less than or
equal to the number of rows in the network, the following prompt is displayed.
Element(s) will be overwritten. Continue anyway?.
If dropping on a ladder element, and the number of rows affected is more than the
number of rows remaining in the network, rows are added to the network.
• If dropping on EOM, rows are inserted.
• A drop operation, which includes the power rail, does an insert above the line with
focus.
In a ladder in PiCPro, you can search for declared contacts, declared coils, declared
function blocks, declared elements, function/function block titles, network numbers,
or structured text.
The search can be refined by applying a filter that limits the search (e.g. Struc-
tured Text Only):
• All the filter selections except Structured Text Only, Function/Block Titles
and Network Numbers require entries into the Find: field that are defined in
software declarations and that match the current filter. If Structured Text
Only is selected, any text can be typed into the Find: field.
• If the Declared Contacts/Data Ins filter is selected, the entire ladder will be
searched for the contents of the Find: field. A match will be found in a ST net-
work anywhere the contents of the Find: field is used and not set. Note:
When this filter is selected, the Find: field must contain a valid variable name.
Finding Duplicates
When debugging a ladder problem, it can be useful to identify all symbols that are
modified at multiple locations within a ladder. Find Duplicates provides this function-
ality. When Find Duplicates is selected, PiCPro searches for function blocks, data
outs, and coils that appear more than once in the ladder. When PiCPro finds duplicated
function blocks, data outs, or coils, a message is displayed in the information window.
To search for duplicated elements:
1. Select Edit | Find Duplicates from the menu.
2. PiCPro searches the ladder and puts a message in the information window
when finished either saying no duplicates were found or listing the ones that
were found.
Note: Duplicated jump labels, contacts, data ins, and functions are not included in
this search.
When you close your ladder, PiCPro asks if you want to keep any changes that have not
yet been saved. You have three choices:
• Yes to save the latest changes
• No to lose the changes and close the ladder
• Cancel to allow you to change your mind and continue to work on the ladder.
Saving Files
It is a good idea to save your file at regular intervals as you work on it.
Using the Save command, you can save the file under its existing name.
Using the Save As command, you can specify a new filename and/or a location where
you want the file stored.
To save a new file, do the following:
1. Select File | Save from the menu or the button from the standard toolbar.
2. In the Save As box, choose a drive and folder where you want to save your lad-
der file (*.ldo).
3. Enter a name in the File name: field.
4. Click Save.
To save an existing file, do the following:
• Select File | Save from the menu or the button from the standard tool-
bar.
To save all files open within PiCPro, do the following:
• Select File | Save All from the menu
If any of the open files have not been saved previously, PiCPro prompts you to choose
a location to save the file to. Type in a name in the File name: field and click Save.
Note: This command will update the Windows time stamp on all of the open files
regardless of whether changes were actually made.
Closing Files
If the file has changed but has not yet been saved, PiCPro asks if you want to save the
file before closing it. Choose Yes to save the file before closing, choose No to close the
file without saving it.
To close a file, do the following:
• Select File | Close from the menu
Exiting PiCPro
Exiting means shutting down PiCPro. It marks the last step in a PiCPro session.
To exit, do one of the following
• Select File | Exit from the menu
• Click on the corner symbol on the title bar to drop down a list. Choose
Close.
• Press <Alt + F4>.
You may find it helpful to use the split screen feature when you want to view sections
of a ladder at the same time. Each section will have its own scrolling capability so you
can move to any ladder location you want.
Note: Click within the quadrant you want to scroll before using the scroll bar.
The screen can be split horizontally and/or vertically.
2. When the arrow head changes to the double line/double arrow, click the button
and drag the horizontal line into your ladder and release.
3. To split the screen vertically, move the arrow to the left section (encircled
below) of the horizontal scroll bar.
4. When the arrow head changes to the double line/double arrow, click the button
and drag the vertical line into your ladder and release.
To unsplit the screen, do the following:
• Double click on the vertical or horizontal split line to remove the split
screen and return to your normal view.
Hardware declarations will differ based on whether you declare a PiC CPU, standalone
MMC CPU, or MMC for PC CPU. If you declare a CPU that differs from what is actually
installed in the control, you may not be able to download your ladder file (*.ldo) to the
control.
The hardware configuration in the hardware declarations table is compared to the I/O
points defined in the software declarations table when the ladder (*.ldo) is compiled.
PiCPro can detect an error such as an output that is defined at an input location. An error
message will be displayed when you issue the Compile Only or the Compile & Down-
load command.
In the hardware declarations table, you define what type of hardware module occupies
each slot in the master rack. Based on the type of CPU selected, you can also define the
other types of I/O in your system such as remote I/O expansion racks, block I/O, or ASIU
I/O.
If you later change the CPU type from what was originally declared, you will need to
review the I/O points defined in software declarations to ensure that your I/O points are
correctly assigned.
(1) Not
all PiC 900 and PiC 90 CPUs support block I/O modules. Check the hard-
ware manuals for these CPUs for complete information.
(2)
MMC for PC does not require a separate Ethernet module. PiC and standalone
MMC require separate modules.
(3)
Information that applies to standalone MMC also applies to standalone MMC
PLUS.
Control Description
Master Rack Only Select this option if your hardware configuration consists
of a master rack only.
1. Position the cursor on the slot you want to declare a hardware module in and
left-click. A fly-out box appears. If an arrow is at the end of the item on the
fly-out list, there are more choices.
2. Slide the mouse over each fly-out list, select the description of the module you
want to declare.
3. When you are at the final fly-out list, left-click to make your selection. Your
choice will be listed in the master rack list. Note: if you want a brief descrip-
tion of the module, press F1 key before making your selection.
4. To add remote I/O (PiC CPU only) or block I/O, click the check box. You can
then use the fly-out lists to configure the I/O.
5. To enable I/O Config/Scan Options, select the appropriate radio button.
6. To save your declarations or changes and return to your ladder, use File | Save
& Close from the menu or F10 key or Enter key. To exit without saving your
changes, use File | Close from the menu or Esc key.
Slots 3 through 13 define the type and location of the I/O modules.
Expansion Rack
Master Rack
Blocks 1 - 77 Define the type and location of the I/O modules. Select the module type
and then the correct module from the fly-out list provided
After entering the first Remote I/O expansion rack, you can add additional expansion
racks by using the Insert After command.
To insert additional remote I/O expansion racks or block I/O, do the following:
1. Select the device after which you want to insert another device.
2. Choose Edit | Insert After from the menu or Insert key. The new device will
be placed directly after the one you selected. If there are any racks or blocks
after it, they will be renumbered.
The Copy and Cut commands let you use the clipboard to create copies of some
selected objects in the declarations table. The commands are context sensitive and
will be grayed if they do not apply to where you are in the table.
The Copy command places a copy of the selected object on the clipboard.
The Cut command removes the object from the table and places it on the clip-
board.
Once an object is on the clipboard, you can use the Paste command or the Paste
Insert After command to place the object back into the table. The object remains
on the clipboard until you cut or copy another object onto the clipboard. Only one
object can be placed on the clipboard at a time.
In the Software Declarations table, you enter the following information for your lad-
der:
• The name and data type of every variable, contact, coil, function block,
structure and array used.
• The location of every physical input or output used.
• The initial or default value of any entry if required.
• The retentive, global, external, or UDFB in or out attribute of any variable
if required.
• A descriptive long name if desired.
You can perform the following editing functions in the Software Declarations table:
• Inserting and deleting entries
• Finding declared entries
• Cutting, copying, and pasting entries
• Purging the table of entries that are not used in your ladder
You can add a variable to the declarations. There are six columns in the table in
which you enter information.
Since the release of PiCPro for Windows V13.0, Long Names are no longer
required. This column is being retained for ladder files created with versions of
PiCPro prior to V13.0.
In the Long Name column, you can add a long name to any variable used in a net-
work. Long names can have up to 40 ASCII characters on four lines (10 per line).
You can view, edit or add a long name to a variable in a LD network or to the Long
Name column in the Software Declarations table. When you add or change a long
name for a variable in a network, PiCPro automatically updates the Long Name
column in the Software Declarations table and vice versa. You can choose to dis-
play or hide the long names in your LD Networks.
The following are reserved Keywords that are not allowed as variable names:
ACTION ADD AND ANDN
ARRAY AT BOOL BY
DO DS DWORD ELSE
F_EDGE GE GT IF
JMPCN L LD LDN
LT MOD MUL N
NE NOT OF ON
OR ORN P PROGRAM
R_EDGE S SD SINT
SL ST STEP STN
I/O Points
In the I/O Point column, enter the location of physical inputs and outputs only.
• For hardware modules located in the master or expansion rack,
the rack and slot location of the module and the channel location of the input or
output are defined. The hardware module must be declared in the Hardware
Declarations table.
• For block I/O modules, the block number and the point number are defined.
• For ASIU I/O modules, the ASIU number and the point number are defined.
The data type in the Type column must be boolean in order to enter information in the
I/O Point column.
The format of I/O points defined in software declarations is different based on the
CPU type declared in hardware declarations. The definition of Block I/O points is
unaffected by CPU choice.
Note: I/O point information that applies to the standalone MMC CPU also applies to
the standalone MMC PLUS CPU.
Standalone MMC I/O Points
Both PiCPro Professional and the MMC-Limited Edition allow you to copy and
paste the I/O information to the Software Declarations table from the Hardware
Declarations table. This can be done for the I/O on the MMC CPU module and the
MMC analog servo module.
The information can be copied by doing the following:
• Select the CPU (Slot 2) or Analog Servo Module (any slot) in the Hard-
ware Declarations table.
• Right-click and choose Copy I/O to Clipboard.
• Close the Hardware Declarations table and view the Software Declarations
table.
• Paste the information into the Software Declarations table.
All necessary information will be entered in the Software Declarations table.
In the PiC I/O Point column, s represents the slot number. Where the slot number
is 4 if the Analog Servo module was in slot 1, or slot number of the Analog Servo
Module +2 if the Analog Servo module was in slots 3 through 6.
Note: The PiC I/O Point column is what will appear in the software declarations
if you later change your CPU from standalone MMC to a PiC CPU type. Always
check the I/O points after changing CPU types to be sure the I/O mappings match
your system.
Note: If you later change the CPU type in hardware declarations, the I/O points
will automatically change in software declarations.
PiCPro Professional Edition is used to program the I/O points for MMC for PC
CPU types. If an MMC for PC CPU is specified in the hardware declarations, all
I/O points in the software declarations must be MMC for PC I/O points.
I/O points can be manually entered or copied from one ladder to another. The
ASIU I/O points can be copied to the clipboard from Hardware Declarations table,
and pasted into the Software Declarations table. Note: Declarations for the Fast
Inputs available for each axis must be manually entered into Software Declarations
table. They cannot be copied to the clipboard from Hardware Declarations table.
ASIU I/O
The following table describes the MMC for PC, Analog Servo Interface Unit
(ASIU) I/O points. The information in column 2 is the default declared name
which will be pasted into the Name column if the ASIU I/O is copied to the clip-
board from Hardware Declarations table. The information in column 3 will be
pasted in the I/O point column. The ASIU number is included in both the declared
In the PiC I/O Point column, s represents the slot number where the slot number is
the sum of the ASIU # and 5.
Note: The PiC I/O Point column contains the I/O that would be displayed if the
CPU in hardware declarations were changed from an MMC for PC CPU to a PiC
CPU.
Note: If you later change the CPU type in hardware declarations, the I/O points
will automatically change in software declarations.
MMC for PC Fast Inputs
Numbering
The manner in which I/O points are displayed changes based on the type of CPU
selected in Hardware Declarations (PiC, standalone MMC, or MMC for PC).
108 Working with Ladders
PiC CPU
The master or CPU rack is #0. Expansion racks are numbered 1 - 7, where #1 is the
rack connected to the master, #2 is the rack connected to #1, etc. Slots are num-
bered left to right when facing the PiC rack. Slot 1 and slot 2 are reserved for the
CSM/CPU module. On an expansion rack, slot 2 is reserved for the I/O driver
module.
Master Rack, PiC CPU
(Three Options)
1st I or O Input or Output
2nd AUX, FAUX Connector/Type
3rd 1-6 Slot number
4th . (point) Used as a separator
5th 0-4 First digit of channel number
6th 0-6 Second digit channel number
OR
1st I or O Input or Output
2nd GEN Connector/Type
3rd . (point) Used as a separator
4th 0-4 First digit of channel number
5th 0-6 Second digit of channel number
OR
1st I or O Input or Output
2nd 1-6 Slot number
3rd A1, A2, A3, A4 Connector/Type
4th . (point) Used as a separator
5th 1-2 First digit of channel number
(Two Options)
1st I or O Input or Output
2nd GEN, AUX, FAUX Connector/Type
3rd 1-8 ASIU number
4th . (point) Used as a separator
5th 0-4 First digit of channel number
6th 0-6 Second digit channel number
OR
1st I or O Input or Output
2nd 1-8 ASIU number
3rd A1, A2, A3, A4 Connector/Type
4th . (point) Used as a separator
5th 1-2 First digit of channel number
Note: Block Expansion Rack I/O is only available for certain CPUs.
Fast Inputs
PiC CPU
The fast inputs available on the encoder, resolver, and servo encoder hardware
modules can be declared as inputs in the Software Declarations table. The inputs
are:
For Channel 1 For Channel 2 For Channel 3 For Channel 4
X.1 X.3 X.5 X.7
The fast inputs available on the standalone MMC can be declared as inputs in the
Software Declarations table. The inputs are (where # is the slot number):
IFAUX#.1 Channel 1 (AXIS 1)
IFAUX#.2 Channel 2 (AXIS 2)
IFAUX#.3 Channel 3 (AXIS 3)
IFAUX#.4 Channel 4 (AXIS 4)
IFAUX#.49 Channel 5 (AXIS 49)
The fast inputs available on the MMC for PC can be declared as inputs in the Soft-
ware Declarations table. The inputs are (where # is the ASIU number):
IFAUX#.1 Channel 1 (AXIS 1)
IFAUX#.2 Channel 2 (AXIS 2)
IFAUX#.3 Channel 3 (AXIS 3)
IFAUX#.4 Channel 4 (AXIS 4)
IFAUX#.49 Channel 5 (AXIS 49)
Initial Values
All variables have a default value of zero. By entering a value in the Initial Value column,
you can change the default value. Default values go into effect:
• For all variables when a cold restart is performed
• For variables that are not retentive, when a warm restart is performed
Note: An initial value cannot be set if the variable has an I/O point assigned to it.
The following prefixes are required for values in the formats listed.
Prefix Value Format
2# Binary
8# Octal
None Decimal
16# Hexadecimal
D# Date
TOD# TIME_OF_DAY
DT# DATE_AND_TIME
T# TIME
When a variable is declared in the Software Declarations table, you assign a data
type to it in the Type column by entering in the type or selecting it from the drop-
down list. The data type categories and associated data types are listed below:
Bitwise Numeric String Time of day Time duration
BOOL SINT STRING DATE TIME
BYTE INT TIME_OF_DAY
WORD DINT DATE_AND_TIME
DWORD LINT
LWORD USINT
UINT
UDINT
ULINT
REAL
LREAL
Bitwise
Bitwise variables/constants are used to represent binary values. When manipulated,
these data types are treated as a series of binary digits.
Description Data Type # of Bits Range
A boolean value is a bit. Contacts and coils BOOL 1 0 or 1
are always represented by boolean vari- boolean
ables. 0 = off/no 1 = on/yes
Byte, word, double word, and long word values BYTE 8 eight 0s - 1s
are groups of bits that are used when logical WORD 16 sixteen 0s - 1s
and bit manipulation operations are performed. DWORD 32 thirty-two 0s - 1s
double word
LWORD 64 sixty-four 0s - 1s
long word
Numeric
Numeric variables/constants are used to represent integers and real or floating point
numbers. When manipulated, these types of data are treated as numbers.
Description Data Type # of Range
Bits
Integers are whole SINT 8 -128 to +127
numbers or zero. short integer
INT 16 -32,768 to +32,767
integer
DINT 32 -2,147,483,648 to +2,147,483,647
double integer
LINT 64 -9,223,372,036,854,775,808 to
long integer +9,223,372,036,854,775,807
Unsigned integers USINT 8 0 to 255
are greater than or unsigned short integer
equal to zero. UINT 16 0 to 65,535
PiCPro will prevent unsigned integer
you from entering a UDINT 32 0 to 4,294,967,295
negative number for unsigned double integer
an unsigned integer. ULINT 64 0 to 9,223,372,036,854,775,807
unsigned long integer
Real numbers are REAL 32 significant digits 6-7
floating point num-
bers. They contain a LREAL 64 significant digits 15-16
decimal point and long real
an exponent indicat-
ing the power of ten
the number is to be
multiplied by to
obtain the value
represented.
Length in
Description Data Type bytes Range
(internal)
String type variables are used to read STRING Two plus num- 1 to 255 ASCII characters
or write messages. Every string has ber of
two extra bytes that hold information declared char-
about the string. The second byte tells acters
the actual length of the string.
String values are keyed in exactly as they are to be interpreted. A three character com-
bination of the dollar sign ($) followed by two hexadecimal digits is interpreted as the
hex representation of an eight-bit ASCII character code. A two character combination
of the dollar sign followed by a character is the ASCII interpretation given below.
Character String Interpretation
$$ dollar sign
$’ single quote
$L line feed
$N new line
$P form feed (page)
$R carriage return
$T tab
Time
Time of Day
Time of day values represent the time of day, the date, or both.
Description Data Type # of Range Examples
Bits
Date and time values are DATE 16 Jan.1, 1988 - Year/month/day
used when the date or time Dec. 31, 2051 D#1997-10-23
is to be printed, or when an TIME_OF_DAY 32 00:00:00 - Hours/minutes/ seconds
event is to be triggered at a 23:59:59 TOD#23:59:59
given moment in time. Val- DATE_AND_TIME 32 Same as the Year/month/day/hours/
ues can be assigned manu- two above, minutes/ seconds
ally or extracted from the PiC combined
clock (with functions). DT#1997-10-23-23:59:59
Values are entered as shown in the examples below where d = day, h = hour, m =
minute, s = second, ms = millisecond. T# is required and d, h, m, s, and ms are
required if the value for that increment is not zero.
T#1d3h7m16s45ms T#14d T#459871ms
An array is a group of variables. Each variable in an array must be of the same data
type. Any data type is acceptable. An array can have from 2 to 999 variables.
These variables are called elements. Arrays are useful for handling large groups of
like data items.
• Only single dimensioned arrays are supported in PiCPro
• Array variables are identified with square brackets.
• Array subscripts follow the same rules in ST and LD. An array subscript
can be any variable or constant that evaluates to USINT or UINT. Array
subscripts can be nested if the variable name used in the subscript is
another array.
As an example, assume that you have a list of 200 rod part numbers. An array
could be used to store the list. Each part number is an element in the array. See the
table below:
R101 STRING
R102 STRING
. .
. .
R199 STRING
R200 STRING
Declare an Array
Note: If all the elements in the array are to have the same value, enter the value in
Initial Value column now, before you create the array. That value will then appear
with each element in the array when it is declared. This will not be done for the
example, since each rod part number is different and will have to be entered indi-
vidually.
3. Choose one of the following methods to size your array:
• Select Tools | Make Array from the menu
• Press <Alt + A>
• Right-click and select Make Array
Enter the array length (a number between 2 and 999) in the dialog. Press
the Enter key to accept the value. For the example, 200 was entered.
5. The index numbers (0…x-1) will appear behind the data type of the vari-
able where x is the length specified.
In the example, x = 200 and the index numbers will be 0 through 199 as
shown below:
The word ..ARRAY.. will be displayed in the initial value field if the ini-
tial value for any element in the array has been entered.
6. To initialize or change the initial values of the elements in the array, move
the cursor to the Initial Value field and press the Enter key. If no initial
value was entered before the array was declared, then there will be no value
for any elements. If an initial value was entered before the array was
declared, that initial value will be duplicated for all elements in the array.
Resize an Array
Array elements are referenced according to the position of the element within the
array. The positions are numbered 0 through x-1, where x is the number of ele-
ments. The position numbers are called index numbers and they act as pointers to
the elements. To access an element, you enter the name of the array and the index
number of the element.
One of the powerful features of arrays is that the index number can be a variable
(USINT or UINT). By using a variable and changing its value, you are able to
access every element in the array with a minimal number of commands.
IMPORTANT
Be careful to enter the correct index number for the element you want.
PiCPro does not prevent you from entering an invalid number. If an
index number is greater than “x-1,” a memory location after the array
will be accessed. The results are unpredictable.
Structures
A structure is a group of variables where the variables can be of any data type
except another structure. Each variable that comprises a structure is called a mem-
ber. A structure can have an unlimited number of members.
NOTE: When booleans are used as data types in structures, each boolean occupies
a byte of memory and more scan time is required. It is the most significant bit of
the byte that indicates the state of the boolean.
When you declare a structure you are creating a template or framework for a group
of data items.
As an example, assume that you have some information about a rod part that you
want grouped together. The data consists of a part number (PART), a description
of the part (DESC), its diameter (DIAM), the first operation on the part (OPER)
and the time it takes to perform the operation (TIM1).
You could create a structure with five members, depicted below:
Member name PART DESC DIAM OPER TIM1
Declare a Structure
Note: A dot or period will be automatically inserted before the member name
by PiCPro. All member names (and only member names) start with a period.
Members can be any data type except another structure.
Referencing and accessing member of structure
To reference a member or access the data, enter the structure and member names,
separated by a dot or period.
For the ROUTING structure with the members PART, DESC, DIAM, OPER and
TIM1, the names on the left are used in the module:
Name used to reference member Contents of the member Data type assigned
A structure with arrays is a structure where one or more members are arrays of
data. Given the definitions and requirements of arrays and structures, it follows
that for a structure with arrays:
1. Each element in an array must be the same data type.
2. Each array can be a different data type.
3. The arrays can have different numbers of elements.
As an example, assume that for the structure shown earlier the information for that
part is expanded to include data about four diameters, operations and times. This
is depicted in the following table of a structure that has three members which are
arrays: DIAM, OPER and TIME.
PART DESC DIAM OPER TIME
A member of a structure is made into an array the same way that any variable is
made into an array.
With the cursor in any field on the member line, choose one of the following meth-
ods to display the array length dialog:
• Select Tools | Make Array from the menu
• Press <Alt + A>
• Right-click and select Make Array
Enter the array length. Press the Enter key to accept the value.
Also, initial values are assigned the same way that they are for arrays. Click in the
Initial Value field of the member and press the Enter key.
DIAM, OPER and TIM1 in the example are new arrays with four elements each.
Note: The initial value of one or more of their elements has been changed
Since an array in a structure is a member, the entire array is accessed as any mem-
ber of a structure is accessed. Enter the structure name and member name, sepa-
rated by a dot or period.
The lowest level of data in a structure with arrays is an element in an array. To
access or reference an element you use a combination of the methods used to
access elements of arrays and members of structures. Input the name of the struc-
ture, the name of the member and an index number for the array element.
For the structure with arrays discussed in this topic, where the structure is named
ROUTING, array element data is accessed as follows:
Con- Con- Con-
DIAM elements
tents OPER elements tents TIME elements tents
Note: A variable instead of a constant can be used for the index number.
Array of structures
4. To initialize members, click the Initial Value field of the desired member and
press the Enter key.
The Change Initial Values dialog appears:
A single element appears with its members. You can use the directional buttons
or the element tabs near the bottom of the dialog to move to the next element.
5. Click in the value field of the member. Type the value.
6. Use one of the following methods to move to the next member value field:
• Click in the value field of the next member.
• Use the up/down arrow keys.
• Press the Enter key.
7. When the values have been loaded, select OK to accept the values, select Can-
cel or click on button to exit the dialog without saving the values or select
Help to display information related to initial values.
Since a structure in an array is simply an element in the array, the entire structure is
accessed as any element in an array is accessed. Enter the name of the array and
the element's index number.
The lowest level of data in an array of structures is a member in one of the struc-
tures. To access a member, use a combination of the methods used to access mem-
bers of structures and elements of arrays. Input the name of the structure, (all
structures in an array have the same name), its index number, a dot or period and
the name of the member.
For the array of structures previously discussed, where the structures are named
ROUTING, data is accessed as follows:
An array of structures with arrays is an array of structures each of which has one or
more members, which are arrays of data. This is the most complex representation
of data that can be created for the control. It combines the four types of groups of
data - structures, arrays, arrays of structures and structures with arrays.
Building upon the previous examples, assume that structured data is to be created
for the 200 parts, and that each structure should contain the arrayed data for four
operations. The following table depicts the array of structures with arrays. Only 2
of the 200 elements are shown.
R101 class A rod 126 deburr 15m
. . 122 polish 30m
. . 124 plate 90m
. . 123 polish 30m
.
R200 class A rod 113 deburr 20m
110 polish 45m
112 plate 120m
111 polish 30m
An array of structures with arrays is accessed in the same way that a member in an
array of structures is accessed.
The lowest level of data in an array of structures with arrays is an element in an
array. To access an element, you use a combination of the methods used to access
members and arrays. Input the name of the structure, its index number, a dot or
period, the name of the member and the index number of the element.
Attributes
You can assign a retentive, global, global and retentive, external, variable in or vari-
able out attribute to a selected variable in the Software Declarations table. The global,
global and retentive, and external attributes are used when the DOS LDO Merge fea-
ture is used to merge multiple LDOs. The external attribute is also used for TASKS.
Variable in and variable out attributes are used with UDFBs.
You access attributes for a selected variable with one of the following methods:
• Tab to the A (Attributes) column and click,
• Select Tools | Modify Attributes from the menu.
• Right-click and select Modify Attributes.
Clear will remove an attribute from a selected variable as will Delete. Also, if the
selected field is in the A (Attributes) column, you can enter E for External, I for Vari-
able In, O for Variable Out, G for Global, R for Retentive or B for Both Global
and Retentive.
Retentive Attribute
The retentive attribute makes the selected variable retain its value upon a warm
restart or power cycle, but not on a cold restart. Physical I/O points and individual
structure members cannot be made retentive. All other elements, including entire
structures, can be made retentive. Note: Retentive memory is limited to 24K.
Global Attribute
The global attribute is used when an operator interface device or DOS LDO merge
is being used.
When an operator interface device is used, the global attribute identifies the vari-
able as one to be used by the operator interface device.
When DOS LDO merge is used, it identifies the selected variable as the master or
global variable. Any variable with the same name in other LDOs will inherit this
variable’s definition (data type, I/O point, initial value) when the LDOs are
merged.
The both global and retentive attribute is used when DOS LDO merge is being
used. It identifies the selected variable as the master or global variable and as
retentive.
External Attribute
The external attribute is used when DOS LDO merge is being used or when the
TASK feature is used. It signals PiCPro that this variable is used in more than one
LDO, and that the variable’s global definition is in another LDO. If the properties
of this variable (data type, I/O point, initial value) differ from the properties of its
global counterpart, the variable will acquire the properties of the global variable
when LDOs are merged.
The external attribute is also applied to a TASK variable that is to be shared with
other tasks. Only mark the variable as External in the TASK.LDO, never in the
main LDO in which the TASK is called.
In and Out Variable Attributes for UDFBs
Variable In designates the variable as an input to a UDFB. When the LDO you are
creating will be converted to a UDFB, every variable you want to use as an input to
the UDFB must have this attribute.
Note: The first variable with the I attribute in the Software Declarations table will
become the EN input of the UDFB. Its data type must be BOOL. Additional
UDFB inputs should be entered in the order you want them to appear on the left
side of the function block.
Variable Out designates the variable as an output to a UDFB. When the LDO
module you are creating will be converted to a UDFB, every variable you want to
use as an output from the UDFB must have this attribute.
Note: The first variable with the O attribute in the declarations table will become
the OK output for the UDFB. Its data type must be BOOL. Additional UDFB out-
puts should be entered in the order you want them to appear on the right side of the
function block.
If you need to add or edit declarations, you can use the following tools:
• Inserting and deleting in the Software Declarations table
• Cutting, copying and pasting in the Software Declarations table
• Searching in the Software Declarations table
• Purging unused variables from the Software Declarations table.
3. To put the selected information on the clipboard, use one of the following
methods:
• Select Edit | Cut from the menu
• Press <Ctrl + X>
If the entry is not referenced in the ladder file, the entry is removed from the table.
If the entry is referenced in the ladder file, the entry is grayed and is not removed
from the table. If the entry is a structure and the structure or any of its members are
referenced in the ladder file, the entire structure will be grayed. The entry will
remain grouped until it is pasted into a new location in the same declarations table
or until Software Declarations table is closed.
To copy software declarations
1. Make the Software Declarations table active.
2. Highlight the entry you want to copy. You can highlight a row in the table by
placing the arrow in the small rectangle region (marked below) until the
pointer arrow becomes a horizontal black arrow pointing to the row. Then click
to select the row. See How to Select Multiple Entries below for more than one
entry.
3. To put the selected information on the clipboard, use one of the following
methods:
• Select Edit | Copy from the menu
• Press <Ctrl + C>
How to Select Multiple Entries
Multiple entries can be selected at the same time if they are part of the same Soft-
ware Declarations table.
If you attempt to paste a variable name that is a reserved keyword, the following
error message will appear:
This message displays the variable that cannot be pasted. Enter a variable name
that is not a reserved keyword and use the appropriate control button.
Click this button and the dialog box closes. The variable name
OK
entered is validated.
Click this button and the dialog box closes. The variable is
Skip removed from the paste list and is not pasted. All the other vari-
ables will be pasted.
Cancel Click this button and the dialog box closes. Nothing is pasted.
If the symbols have the same name, type, and array status and you choose to use
the target definition, the resulting array size could be smaller. Initial values could
change. No attempt is made to make sure one of the array elements being removed
is not referenced in the ladder.
Symbol Information
This area displays information about a duplicate symbol that was
encountered while pasting. It shows the name, type, Attributes, I/O
point, initial value, and long name of the duplicate symbol from the
source and from the target.
Source:
The source is the ladder you are cutting or copying from.
Target:
The target is the ladder you are pasting into.
Note: The source and target can be the same ladder if you are cutting,
copying, and pasting in that ladder's Software Declaration table oth-
erwise they are two distinct ladders.
Skip paste of this symbol
Select this option to skip the paste of this symbol. This will leave the
pasted ladder element unnamed.
You can find the next occurrence of the declaration by clicking the Find/Next but-
ton again or by pressing the F3 key, if you have closed the Find dialog.
Your ladder file consists of executable networks entered by you. They hold the ladder
logic commands and/or structured text that run your application. They are numbered
sequentially by PiCPro as you enter them. The networks are executed in this numerical
order unless a jump command forces execution to be out of sequence.
Network Size
LD Network Size
A LD network is comprised of a matrix of rectangles (outlined by dots) called
cells. Each cell is approximately the size of the cursor. Each element in the net-
work occupies at least one cell. Elements, like functions, can occupy several cells.
A PiCPro LD network accepts a network with an area of 1 to 255 cells. The area of
the network is the sum of the product of its width (number of columns in widest
row, excluding last row) and its length (number of rows - 1) plus the width of the
last row.
A portion of a LD network is shown below. The cursor on the right occupies one
cell in the network. Note the dots that mark each cell. The function on the left
occupies four vertical cells.
At this time the network will have to be split and a new ST network started. If you
want to continue writing the current structured text network, it must be continued
in the new network. Any loop or IF/THEN constructs must be closed in the first ST
network; they can not be continued in the next network.
Note: Although you can choose to display up to 100 comment lines, they
will not all display at the same time. To see all the lines you must
double-click in the comment display box. This takes you to the com-
ment editor where you can see all the comments. To exit the com-
ment editor, choose Cancel.
Constants
• Constants can be used as input values to function/function blocks.
Note: In a LD network, constants cannot be entered anywhere else in the
network.
• Constant values must be entered in the same form and within the same range a
variable value would be entered in the Software Declarations table.
• Strings cannot be represented as constants. String constants are defined in Soft-
ware Declarations via a variable and then referenced within the ladder file.
LD Elements
The elements that go into creating a LD network include contacts, coils, wires, func-
tions/function blocks, data, jumps, variables and constants.
Contacts
Contacts are boolean elements that represent hard wired circuitry or internal logic
in the ladder. Each boolean element must be assigned a boolean variable declared
in the software declarations table. The variable holds the value of the state of the
input. If the input is OFF or deenergized, the value is 0. If the input is ON or ener-
gized, the value is 1. If the element is a physical input, its location must also be
declared.
Buttons Contact Types
Normally Open
Normally Closed
Positive transition, normally open
Positive transition, normally closed
Negative transition, normally open
Negative transition, normally closed
Coils
Coils or control relays are boolean elements that represent hard wired circuitry or
internal logic in the ladder. Each boolean element must be assigned a boolean vari-
able declared in the software declarations table. The variable holds the value of the
state of the output. If the output is OFF or de-energized, the value is 0. If the output
is ON or energized, the value is 1. If the element is a physical output, its location
must also be declared.
Buttons Coil Types
energize
de-energize
set (latch)
reset (unlatch)
Energize Coil
If power flow/logic continuity to this coil occurs, it is turned on.
If power flow/logic continuity to this coil drops, it is turned off.
De-energize Coil
If power flow/logic continuity to this coil occurs, it is turned off.
If power flow/logic continuity to this coil is dropped, it is turned on.
Wires
Wires are used in your network to connect other elements. They create data paths
along which data is transferred from one element to another. They can also be used
to broaden or lengthen the spacing of elements on your screen.
There are three types of wires available.
Buttons Wire Types
Horizontal
Vertical
Both (combination)
2. Click the point to point wire button . Position the cursor on the wire
starting point and drag the cursor to the wire terminal point. Release the
mouse button. Note: You must be in the same row (horizontal wires) or
column (vertical wires) for this to work.
3. Select Ladder | Wires from the menu. A fly-out appears from which you
can select Vertical, Horizontal, or Both.
* Unless you are next to a function/function block in which case focus moves to the cell
below the vertical wire.
The horizontal wire provides a left-to-right horizontal connection between ele-
ments in the network.The vertical wire provides a top-to-bottom vertical connec-
tion between elements in the network. The combination wire provides a branch
connection between elements in the network. The branch must follow this same
left-to-right, top-to-bottom scanning.
Functions that return a string type variable as an output have a unique characteris-
tic. The output variable must be assigned on the input (left) side of the function.
This is necessary because STRINGs require memory allocations before the opera-
tion is performed.
For detailed information on functions/function blocks, please refer to the PiCPro
Function/Function Block Reference Guide.
Data
When entering functions or function blocks into a network, you can choose
from the three categories of data below to enable the connections to these ele-
ments.
Data Fly-outs Descriptions
Jump Fly-
outs Descriptions
To Label Places the symbol for the jump to label command into the net-
work and prompts you to enter the label of the network to which
execution should jump.
To Subroutine Places the symbol for the jump to subroutine command into the
network and prompts you to enter the label of the network to
which execution should jump.
Return Places the symbol for the return command (<return>) into the
network.
Can be placed:
In a subroutine where it returns you to the network from which
the jump originated
In the main module (typically at the end of the program before
any subroutines) where it takes you to the <End Of Module> in
the ladder
In a UDFB source ladder (typically at the beginning) where it
takes you to the <End Of the Module> if the EN (enable) is not
set.
Notes:
It is recommended that subroutines be placed at the end of your
main module program. A return command should be placed not
only at the end of the subroutine, but also at the end of the main
module directly before the subroutine network. The return at the
end of the subroutine takes you back to the original jump to sub-
routine command network. The return at the end of the module
takes you to the end of the module. If it were not included, the
program would execute the subroutine again.
Expressions
Expressions are used in many of the ST statements and are one of the fundamental
building blocks for many of the ST statements. They are used for calculations and
they resemble mathematical formulas. An expression is a combination of operands
and operators that are used to form an algebraic expression that evaluates to a sin-
gle value and data type. An operand can be a variable, constant, or function call.
Valid expression operators are listed in the table ST Operators-Evaluation Prece-
dence located in Expressions - Operators and Precedence Order. Examples of
very simple to more complex expressions are shown in the following table:
Example Explanation/Description
SPEED Expressions can be as simple as a con-
stant or a variable.
MAX(IN0:=A, IN1:=B) Expressions can also be a function call.
The result from this expression is either
A or B depending on which is larger.
A *(B + MIN(IN0:=C, IN1:=D)) Expressions can be as complex as
needed.
Result:
B is added to the minimum value
of C or D, the result is then multi-
plied by A.
Comments:
• To detect run time errors such as overflow and divide by zero, in ex-
pressions, call the OK_ERROR function. Refer to the Function/
Function Block Reference Guide for a description of this function.
* Multiplication
/ Division
MOD Modulus operation
+ Addition
- Subtraction
= Equal To
<> Not Equal
OR Boolean OR Lowest
P * R / Q + W / X - Y When P :=10, R := 5 , Q := 2, W
:= 15, X := 3, Y := 12
1 2 4 3 5
1 10 * 5 is 50
2 50 / 2 is 25
3 15 / 3 is 5
4 25 + 5 is 30
Comments:
Many of the ST operators have an equivalent function that can be called.
Each of these functions provide the same functionality/behavior as their ST
operator equivalent with the following exceptions:
• Functions provide status via OK. This can be used to check for over-
flow, divide by zero, etc.
Comments in ST Elements
In addition to the network comments that can be entered there are two types of ST
comments that can also be entered.
The first type, also known as line comments, begins with a // and end with the
enter key. A line comment can be written on a line by itself or at the end of a line
containing a ST statement.
Comments:
Assignment Statements
Assignment statements are used to change the value stored within a variable.
Generic Format
<<Variable>> := <<expression>>;
Expression is evaluated and results are assigned or stored in variable.
Example Explanation/Description
A := B + C * (10 / D); Results:
When A := 1090, B :=10, C := 5,
D := 2
Expression evaluates to 35 and
A is then set to 35.
Comments:
• The data type of the <<expression>> must match the data type of the
<<variable>>.
IF-THEN
IF-THEN-ELSE
ELSIF-THEN-ELSE
CASE
IF-THEN
Generic Format
IF <<boolean expression>>THEN
Section 1
This section will execute if the above <<boolean-expression>> is true. If the
above <<boolean-expression>> is not true, then Section 1 will not execute.
END_IF;
Example Explanation/Description
IF A > 10 THEN Results:
C := 20; When A is less than or equal to
END_IF; 10, the value of C will not be
changed.
When A is greater than 10, then
C will be set to 20.
Comments:
Section 1 must contain at least one ST statement.
Generic Format
IF <<boolean-expression>> THEN
Section 1
Section 1 will execute when the above <<boolean-expression>> is true.
ELSE
Section 2
If the above <<boolean-expression>> is not true, then this Section will execute.
END_IF;
Example Explanation/Description
IF A > 10 THEN Results:
C := 20; When A is greater than 10,
ELSE then C will be set to 20.
When A is less than or equal
C := 100; to 10, then C will be set to 100
END_IF;
Comments:
Section 1 and Section 2 must each contain at least one ST statement.
Generic Format
IF <<boolean-expression #1>>THEN
Section 1
Section 1 will execute when <<boolean-expression #1>> is true.
ELSIF <<boolean-expression #2>>THEN
Section 2
When <<boolean-expression #2>> is true and <<boolean-expression #1>> is
false, Section 2 will execute.
ELSE
Section 3
If none of the previous <<boolean-expressions>> are true, then Section 3 will
execute.
END_IF;
Example Explanation/Description
IF A > 11 THEN Results:
C := 20; When A is greater than 11, then
ELSIF A := 5 THEN C will be set to 20.
When A is equal to 5, then C
C := B + X; will be set to B+X.
ELSIF A := 6 THEN When A is equal to 6, then C
will be set to B+1.
C := B + 1;
When A is equal to 2, then C
ELSE will be set to 100.
C := 100;
END_IF;
Comments:
Generic Format
CASE << integer-expression>>OF
Section 1
This section is evaluated first. Statements (in the form <<int-constant #n>> :
<<statement>> ) that have an integer value that matches the value of the <<inte-
ger expression>> above are executed.
ELSE
Section 2
If no matches to the above <<integer-expression>> are found, then Section 2
will execute.
END_CASE;
Example Explanation/Description
CASE SPEED_SETTING OF Results:
1: SPEED := 10; When SPEED_SETTING is equal to
2: SPEED := 20; 1, then SPEED will be set to 10
3: SPEED := 30; When SPEED_SETTING is equal to
4,5: SPEED := 50; 2, then SPEED will be set to 20
6..10: SPEED := 60;
When SPEED_SETTING is equal to
11,14,16..18: SPEED := 70; 3, then SPEED will be set to 30
ELSE When SPEED_SETTING is equal to 4
SPEED := 0; or 5, then SPEED will be set to 50
Comments:
Iteration Statements
Iteration statements are provided for situations where it is necessary to repeat one
or more statements a number of times depending on the state of a particular vari-
able or condition.
Note: An iteration statement must have a finite limit. It is the user/program-
mer’s responsibility to insure that the iteration statement does not take too
long to execute which may cause a scan loss.
An iteration statement can be typed directly into a ST element or can be selected
from Ladder | Structured Text or by clicking the appropriate icon on the Struc-
tured Text Toolbar.
Structured Text in PiCPro allows three iteration statements, WHILE-DO, FOR-
DO, and REPEAT-UNTIL.
Button Statement
WHILE-DO
FOR-DO
REPEAT-UNTIL.
Generic Format
WHILE <<boolean-expression>> DO
Section 1
<<boolean-expression>> is evaluated. If <<boolean-expression>> evaluates to
true, Section 1 will execute. This process repeats until <<boolean-expression>>
evaluates to false.
END_WHILE;
Example Explanation/Description
ArrayIndex := 0; Results:
WHILE ArrayIndex < 10 DO The first time through the
PartReject[ArrayIndex] := 0; loop, ArrayIndex is 0 and
ArrayIndex := ArrayIndex + 1; PartReject[0] is set to 0. The
END_WHILE; second time through the loop
ArrayIndex is 1 and
PartReject[1] is set to 0. This
process repeats and the loop
terminates when ArrayIndex
is 10.
At the end of this loop, Par-
tReject[0] through PartRe-
ject[9] will be set to 0.
Comments:
Generic Format
FOR <<count-variable>> := <<initialization-expression>> TO <<limit-expres-
sion>> BY <<step-expression>> DO
Section 1
This is the body of the FOR loop. This contains one or more ST statements.
END_FOR;
Description
1.The <<initialization-expression>> is evaluated and the results stored in
<<count-variable>>. This sets the starting value of the loop.
2. The <<limit-expression>> and the <<step-expression>> are evaluated.
3. The <<limit-expression>> is then compared to the <<count-variable>>.
If the <<count-variable>> is less than or equal to (greater than or equal
to, if counting down) the <<limit-expression>>, continue to Step 4, oth-
erwise the loop terminates.
4. The ST statements in Section 1 are executed.
5. The <<step-expression>> is then added to the <<count-variable>> and
the results are stored in the <<count-variable>>.
6. Go to Step 3.
Generic Format
REPEAT
Section 1
This section of ST statements are executed.
UNTIL <<boolean-expression>> END_REPEAT;
The <<boolean-expression>> is evaluated. If <<boolean-expression>> evalu-
ates to False, the ST statements in Section 1 are re-executed. When the
<<boolean-expression>> evaluates to True, the loop terminates.
Example 1
ArrayIndex := 0;
REPEAT
PartReject[ArrayIndex ] := 0;
ArrayIndex := ArrayIndex + 1;
UNTIL ArrayIndex > 9 END_ REPEAT;
Explanation/Description
Results:
The first time through the loop, ArrayIndex is 0 and PartReject[0] is set to
0. The second time through the loop ArrayIndex is 1 and PartReject[1] is
set to 0. This process repeats and the loop terminates when ArrayIndex is
10.
At the end of this loop PartReject[0] through PartReject[9] will be set to 0.
Example 2
REPEAT
FIND (IN1 := Vision_X_String, IN2:= Space_Char,
OUT =>Loc_of_Space);
IF Loc_of_Space > 0 THEN
DELETE (OUT := Vision_X_String,
IN := Vision_X_String, L := 1,
P := Loc_of_Space);
END_IF;
UNTIL Loc_of_Space = 0 END_REPEAT;
Explanation/Description
Results:
The first time through this loop, find the first space in the string
Vision_X_String. If a space is found, delete it from Vision_X_String. The
second time through this loop find the next space in the string
Vision_X_String. If a space is found, delete it from Vision_X_String. This
process repeats until all spaces are removed from Vision_X_String.
At the end of the loop, all spaces from Vision_X_String will be deleted.
Other Statements in ST
EXIT
This statement can only be used within iteration statements and allows itera-
tion loops to end prematurely.
Generic Format
EXIT;
When this statement is executed, the iteration statement is immediately termi-
nated.
Example
FOR Station_Number := 10 TO 0 BY -1 DO
Station_Pointer := INT2UINT(IN := Station_Number);
IF Station_Available[Station_Pointer] THEN
EXIT;
END_IF;
END_FOR
Explanation/Description
Results:
When Station_Available [Station_Pointer] is true, the EXIT statement is
executed and the FOR-DO statement is terminated.
Comments:
When the EXIT statement is located within nested iteration statements, exit
shall be from the innermost iteration statement in which the EXIT is
located, that is, control shall pass to the next statement after the innermost
iteration statement that is terminated.
Generic Format
RETURN;
This statement, when executed, will cause the subroutine or UDFB to
return to the calling module.
Example Explanation/Description
IF NOT EN THEN Results:
RETURN; Assuming this example is in a
END_IF; UDFB and the EN is false, the
RETURN statement causes a
OK := 1;
return to the calling module.
Comments:
• This statement has the same functionality in ST as it does in LD.
• For more information about this statement, refer to the section Jump in
LD Network.
Inserting Conditional and Iteration Statements in ST
When focus is in a ST network, you can use a toolbar or pull-down menu to enter
conditional and iteration statement (e.g. an IF-THEN statement) templates.
Replace the template fields with the desired text.
IF-THEN
Menu
Item
IF-THEN
Toolbar
Button
The cursor will be placed on the first template field. The text is located inside <<
>> and will be highlighted. The first character entered replaces the template field.
162 Working with Ladders
Rules for a Structured Text Template
A Structured Text Template Field (e.g. <<bool-expression>>) will act as a single
character.
• If the cursor is located inside a template field, a character entry will over-
write the template field with that character (even though the template field
is not highlighted).
• When dragging a selection, if the beginning or end of the selection ends in
the middle of the template field, the entire template field will be selected.
• When deleting or backspacing over a template field, the entire template
field will be deleted.
• When typing a character and ‘insert mode’ is off, if the character over-
writes the start of a template field, the entire template field will be replaced
with the character.
• You cannot create a template field from the keyboard.
Functions in ST
Functions allow you to perform operations such as arithmetic or motion control.
Functions can be called from a ST statement or from within an expression. See the
Generic Format and Examples below.
For detailed information on Functions, please refer to the PiCPro Function/Func-
tion Block Reference Guide.
A function block can be typed into a ST element directly or can be selected from
the Ladder | Functions menu.
Explanation/Description
Results:
When E_ERRORS is 9 then LossOfFeedback and UserEstop will be enabled.
When E_ERRORS is 3 then LossOfFeedback and ExcessError will be enabled.
Explanation/Description
Results:
When JogSlowFastSwitch is not set, then JogSpeed := SlowJogRate.
When JogSlowFastSwitch is set, then JogSpeed := FastJogRate.
Comments:
• Selecting Ladder | Functions will insert a Function template that
includes the input and output parameters into your ST Element. Input
parameters are identified using := and output parameters are identified
using =>. If more than one parameter is used, they are separated by
commas. Parameters can be specified in any order.
• Output parameters cannot be specified in a function call used in a ST
expression. Output parameters are optional in a function call used in a
ST statement. However, if no output parameters are specified, no
results will be returned from the function.
• Functions that do not return a value cannot be used in a ST expression.
They must be called from a ST statement (e.g. CLOSLOOP).
• Functions that return multiple values, cannot be used in a ST expres-
sion. They must be called from a ST statement (e.g. MOVE, and
BYT2BOOL).
• Although EN is always specified as the first input parameter to a Func-
tion in a LD network, EN cannot be specified as an input parameter to a
ST function.
• The data type for each function input and output parameter must match
the data type of the function definition for that parameter.
Generic Format
<<FunctionBlockInstance>> : <<FunctionBlockTitle>>
(<<InputParameter1>> := <<Expression1>> ,
<<InputParameter2>> := <<Expression2>> ,
<<OutputParameter1>> => <<VariableName1>> ,
<<OutputParameter2>> => <<VariableName2>> , ...) ;
<<Expression1>>, <<Expression2>> ,... are evaluated. The function block is then called
with <<InputParameter1>>, <<InputParameter2>>, .... The results from the function block
call are returned in output parameters <<VariableName1>>, <<VariableName2>> , ...
ST Example
CTU1: CTU(CU := PE, R := FULL, PV := 6, Q => FULL,
CV => CURRENT);
LD Equivalent
Explanation/Description
Results:
The PE input detects a product on the line. When six products have been completed,
the full output at Q will energize. Current will represent the number of products in the
package. Full would be used to move the finished package out and reset the counter
to zero.
ST Network Considerations
• In a LD network, Function Blocks are called each and every scan. In a ST net-
work, the Function block will not be called every scan but will be called only
when the logic surrounding the Function Block supports it.
• There are no equivalent ST statements for transitional contacts (i.e., Normally
Open Positive Transition Contact, Normally Closed Positive Transition Con-
tact, Normally Open Negative Transition Contact, and Normally Closed Nega-
tive Transition Contact).
• ST networks, as do LD networks, execute every scan. Therefore, it is important
to take this into consideration when creating a ST network.
• Conditional and iteration ST statements can be nested within other conditional
and iteration ST statements to create more complex ST networks.
• An iteration statement must have a finite limit. It is the user/programmer’s
responsibility to insure that the iteration statement does not take too long to
execute because this may cause a scan loss.
Note: If an * is displayed before the variable name, the variable has been used
more than once in the ST network and the compiler detects a conflict with
the variable type.
4. Put focus on the line in the Software Declarations: Add Unknown ST Vari-
ables dialog.
5. Press the Insert key or select Tools | Insert Symbol. The following dialog will
be displayed.
< Remove Click this button to move undefined variables highlighted in Add
to Software Declarations List to Pick List.
Select All Click this button to select all undefined variables in the list
above.
Select None Click this button to deselect undefined variables in the list above.
Cancel Click to close the dialog without adding any undefined variables
to software declarations.
Delete Network Select to delete the network the cursor is located on.
Find Next Select to execute another search on data from the previous
search.
Info: The information displayed will vary based on the location of the
cursor.
Add ‘variable name’ to Select to add unknown variables to the Software Declarations
Software Declaration table.
Add ‘variable-name’ to If the cursor is on a known variable, select to add the variable to
View List the view list. If multiple variables are highlighted, this item
becomes Add Selected Var(s) to Force List and all variables
selected and declared will be added to the View List.
Add ‘variable name’ to If the cursor is on a known variable, select to add the variable to
Force List the force list. If multiple variables are highlighted, this item
becomes Add Selected Var(s) to Force List and all variables
selected and declared will be added to the Force List.
View UDFB/Task If the cursor is on a UDFB or task, select to open the UDFB or
task.
View Servo Function If the cursor is on a servo function, select to open the servo func-
tion.
View SERCOS Func- If the cursor is on a SERCOS function, select to open the
tion SEROCS function.
Compiling
When the development is complete, the ladder file can be compiled into one of the fol-
lowing:
• A BIN file which can either be downloaded directly to a control or stored in a
directory or on a disk and later loaded into a control with the Restore command
• A HEX file which allows your ladder file to be copied to an EPROM or to lad-
der flash memory
• A TASK creating a UDFB for use in a main ladder file
• A UDFB creating a customized UDFB for use in other ladder files
Downloading
Downloading sends the active ladder file on your workstation to the CPU memory
after it has been compiled into an executable program.
The source form of your ladder file remains on the workstation. You can edit the
source form, run animation, etc. Any off-line changes you make to the source file
must be downloaded to the control before they take effect. Always backup this
source ladder file to ensure that you will have a copy of your ladder file in its
downloaded form. Include in the backup the filenames for the ladder file with any
of the following extensions:
LDO, REM, SRV, LIB, SRC, FRC, RTD, SVT, SCT, ADV
You can backup this executable form from the control to the workstation by using
the Online | User Program | Backup | Application Program command or the
button on the Basic Online Operations toolbar. You can restore any BIN file
to the control memory with the Online | User Program | Restore command or the
These commands can also be accessed from the Compile and Download button
You have two download options. You can choose to stop the scan and down-
load the ladder file or, if you were able to make on-line changes to the ladder
file, you can choose to patch the scanning ladder. You can also choose to restart
the scan if it was stopped and have animation enabled after the download is
complete.
3. The binary file is compiled and downloaded and the status is reported in the
information window. If the download is successful without any errors, the
memory usage information is shown in the information window.
This displays:
• The amount of retentive memory used in data bytes. (24K limit)
• The amount of memory used for data bytes. (64K limit)
• The amount of memory used for ladder code bytes.
• The total code bytes for your application ladder plus libraries*.
*The total code bytes must not exceed the application memory available on the
CPU module.
1. Choose the Compile | Bin File | Compile Only command or the button on
the Compiler toolbar.
2. The binary file is compiled and the status is reported in the information win-
dow. If the compile is successful without any errors, the memory usage infor-
mation is shown in the window.
Just like when you perform a compile and download, this displays:
• The amount of memory used for data bytes. (64K limit)
• The amount of memory used for ladder code bytes.
• The total code bytes for your application ladder plus libraries*.
*The total code bytes must not exceed the application memory available on the
CPU module.
2. Choose Compile | Hex from the menu or choose the button from the com-
piler toolbar.
3. If there are no errors, the hex file details are listed in the Information Window
and the compile is complete.
4. The hex file is saved in the directory of the current ladder file with the ladder
filename and the HEX extension.
5. If any errors occur during the compile process, they will be reported to the
Information Window. The compile process will stop and you must edit the lad-
der to resolve the errors and compile again.
The Download Hex command from the Online menu is used to load the file to
flash memory.
Compiling a Task
The logic you enter in a task ladder file is converted into a TASK function block by
compiling it.
Settings
The Settings command under the Compile menu allows you to choose settings in four
areas:
1. Ignore Direct I/O
2. Force Soft Bit Memory
3. Generate Map File (Main Ladder Only)
4. Use an Operator Interface
Operator Interface
Within the operator interface box, there are several settings.
When the Construct Data File checkbox is checked, an operator interface data
file (OID) is created when you compile the BIN file. This file contains the neces-
sary information for the operator interface software.
The Operator Interface Node Number is usually set to 0. But it can be used to cre-
ate multiple displays for a single machine. Available numbers are 0 to 255.
The Operator Interface Output Directory allows you to put the OID file in the
directory of your choice. If you leave this box empty, the OID file will be placed in
the same directory as the ladder file.
IMPORTANT
You must rebuild all UDFBs and TASKs if this is the first time you are
using a version of PiCPro and firmware that have the Extended Data
Memory feature.
IMPORTANT
Animation allows you to monitor the power flow in the LD networks of a ladder diagram
that has been compiled and downloaded to the control and in one or multiple UDFB and/
or TASK ladder files that are displayed. Variables used in ST networks must be animated
in the View List.
+Infinity 1.#INF
-Infinity -1.#INF
Indefinite digit.#IND
Not-a-number digit.#NAN
• All variable lengths are dependent on cell size for display. If a string is too
long for the cell, you can view it in the view list.
Ladder with Animation Off Ladder with Animation On, Scan Running
• Toggle the button on the Advanced Operations toolbar when the win-
dow which should no longer be animated has focus.
• Enter the edit mode and make a change to the ladder file. A message will
tell you that the workstation version is no longer identical to the control
version. The ladder file must be compiled and downloaded after an edit.
• Access any dialog other than View List or Forcing List.
When animation is turned off, any numeric values shown above the variables are
no longer displayed.
Forcing is a way to alter the contents of up to 61 variables while the program is running. It
is a powerful tool in isolating a problem. Variables can be forced individually or as a
group. Grouping is an extension of the forcing feature. One example of how it could be
used is to allow you to toggle the state or value of a variable by entering one value or state
in grouping and the other in forcing and then switching between them.
When testing or debugging a software module, you can Force a value into the following:
• An input element to simulate the data input from an application device, which has
not been connected
• An element that enables a function or function block you want to check
• A preset timer variable to check what happens when it times out
When troubleshooting an application, you can Force a value into the following:
• An output element to locate a problem when troubleshooting an application
WARNING
If you have a forcing list open but inactive when you attempt to turn forcing on, you will
get a message that asks if you want to activate forcing. When you switch from the main
ladder force list to a UDFB force list, you turn off the main force list and vice versa.
Briefly, to force a variable, you will do the following:
1. Enter the variable name and value in the Force List.
2. Mark the variable in the Force List to enable it.
3. Turn Force on.
4. If needed, edit the Force List and update the forcing information to the control.
IMPORTANT
You have four ways to enter a variable into the Force List Window.
Copy/Paste
1. Copy the element in the ladder file that you want to place in the Force List.
2. Open or activate the Force List Window.
3. Position the focus in the Force List Window grid and paste the selection.
If you are in a blank row, the variable you are entering will fill that row.
If you are in a row that already contains a variable, the new variable will
appear in a row above the existing one.
If you are in a row that is highlighted, the new variable will replace that row.
4. Enter a value in the Value column. An error message will appear if the value
you enter is out of range, incompatible, etc.
5. Check the Force Enable and/or Group Enable column.
Drag-n-Drop
1. Open or activate the Force List Window.
2. Select the variable in the ladder to add to the Force List.
3. Drag the selection from the ladder to the Force List row you want to insert the
variable in and release the button.
4. Enter a value in the Value column. An error message will appear if the value
you enter is out of range, incompatible, etc.
5. Check the Force Enable and/or Group Enable column.
Manual Entry
1. Open or activate the Force List Window.
2. Place the focus in the Name column of the Force List.
3. Type in the name of the variable you want to add or click on the down arrow to
bring up a list of all variables in the software declarations table except function
blocks. If the symbol is an array, it will be entered into the list as an ARRAY().
You must enter the index number in the parenthesis.
4. Enter a value in the Value column. An error message will appear if the value
you enter is out of range, incompatible, etc.
5. Check the Force Enable and/or Group Enable column.
Turn Forcing/Grouping On
In order to activate variable forcing/grouping, the following conditions must be
met:
• The ladder file is open.
• The ladder file has been compiled and downloaded to the control.
• If you make any changes after the download, be sure to compile and down-
load again or the time stamps will be different. If the time stamps are dif-
ferent, an error message will appear and you will not be able to activate
forcing.
• The Force List Window is open.
Note: The window does not have to be active.
If the above conditions are met, you can turn forcing on.
1. Toggle forcing off by choosing the button from the Advanced Operations
toolbar.
Note: If grouping is on, it will also be toggled off.
2. Toggle grouping off by choosing the button from the Advanced Operations
toolbar.
With the control running and your ladder file open, you are ready to enter variables
into a View List. Only one View List is created for each ladder file. It is given the RTD
extension and the same filename as the ladder file.
To bring up the View List, choose one of the following:
You have four ways to enter a variable into the View List Window:
Drag-n-Drop
1. Open or activate the View List Window.
2. Select the variable in the ladder to add to the View List.
3. Drag the selection from the ladder to the View List row you want to insert the
variable in and release the button.
4. Check Enable.
Manual Entry
1. Open or activate the View List Window.
2. Place the focus in the Name column of the View List.
3. Type in the name of the variable you want to add or click on the down arrow to
bring up a list of all variables in the software declarations table except function
blocks. If the symbol is an array, it will be entered into the list as an ARRAY().
You must enter the index number in the parenthesis.
4. Check Enable.
When the control is running, the CPU repeatedly scans the application program in its
memory. A scan is the cyclical process of:
1. Reading data from the hardware input modules
2. Using the forcing list to modify input data
3. Executing ladder logic and using the data to update program variables*
4. Using the forcing list to modify output data
5. Sending commands to the hardware output modules
6. Sending data to the workstation to be displayed in animation and/or view
modes
Note: When you created your ladder program, the PiC hardware modules were
declared under Hardware Declarations. Each input/output point was assigned to a spe-
cific logic element through the Software Declarations.
* Step 3 above is referred to as the ladder scan and the remaining steps are referred to
as the system overhead. How long a scan takes depends on the length and complexity
of the program.
IMPORTANT
The PiC or MMC systems shut down as a safety measure if either the
ladder scan or the overhead takes more than 200 ms.
Note: To display the Scan Control menu, select Online | Control Opera-
tions | Scan Control.
WARNING
Do not use any commands in the Scan Control menu until you under-
stand how the control system runs and exactly how the command will
affect the application. Starting or stopping the scan at random may
cause injury or damage to machinery.
• Click the button with the BLUE arrow from the Basic Online Operations
toolbar.
• Select Online | Control Operations | Scan Control | Run One from the
menu.
• Click the button with the circular RED arrow from the Basic Online Oper-
ations toolbar.
• Select Online | Control Operations | Scan Control | Hot Restart from the
menu.
• Click the button with the circular YELLOW arrow from the Basic Online
Operations toolbar
• Select Online | Control Operations | Scan Control | Warm Restart from the
menu
• Click the button with the circular BLUE arrow from the Basic Online
Operations toolbar
• Select Online | Control Operations | Scan Control | Cold Restart from the
menu
On-line Editing
In normal program development, you edit your ladder and then download the entire mod-
ule to the control to incorporate the changes. The scan is stopped during this download and
you must restart the scan when the download is complete.
There may be times when you need to edit or patch the ladder on-line without stopping the
scan. If you make changes to the ladder that is currently being scanned in the control and
choose compile and download, you are given two choices.
• Stop the Scan and Download (off-line edit)
or
• Patch the Scanning Ladder (on-line edit)
When you choose Patch the Scanning Ladder, only the changes you have just
made will be downloaded and the scan is not stopped. The changes will take effect
at the beginning of the next scan. These changes become a permanent part of the
program in your control. They are included in any backup from the control. When
you are working with UDFBs, you can patch the main module and the source lad-
ders of any UDFB. Animation is turned off when patching but forcing remains on.
When the patch download is complete, the information window will summarize
the resources listed below that you still have available.
• Data Bits (in hard bit systems only)
• Data Bytes
• Code Bytes
• Number of Patches (out of 100)
• Number of Label/Function Links (out of 27)
Patch the Scanning Ladder is not available in the following situations:
• If any changes have been made to the hardware declarations,
you must do a full download stopping the scan to incorporate them into
your ladder.
• If more than 40 internal tasks have been added/modified in the current lad-
der.
• If more than 100 patches have been added to the current ladder
Every time a network is modified, it is considered one patch but could
include several internal tasks.
• If more than 27 label or function links have been established in the current
ladder
To abort a patch
You can undo the last patch downloaded to the control with the Abort Last Patch com-
mand. This will remove the patch from the control but does not remove it from your
ladder. You can redo the patch in your ladder and do another patch download. The
Abort Last Patch command remains enabled after patching a ladder until one of the
following occurs:
• The next full download is performed.
• The ladder doc is closed.
• PiCPro is closed.
1. After a patch has been downloaded to the control, choose one of the following:
IMPORTANT
Aborting the last patch removes the operation but not necessarily the
effect of that operation from the control. For example, if you add a new
network that turns on a new coil and do a patch download followed by
an Abort Last Patch command, the new network is removed from the
control but the coil will remain on.
Printing
You can print your ladder file, the View list, Forcing list, or the Information Win-
dow. Put focus, by clicking, on the window you want printed, and choose File |
Print.
Include in Listing
The Include in Listing box is checked (default) and the Entire Ladder selected
(default). If you do not want to print the entire ladder you have two choices.
• You can print a range of networks by selecting Networks and entering a
range in the From: and To: boxes. The From/To boxes initially contain the
range of networks for the entire ladder.
• You can print a previously highlighted ladder selection by choosing Selec-
tion.
Full Comments
When the Full Comments box is checked (default), the entire comment for each
network is printed. If unchecked, the first line of each comment is printed.
Long Names
When the Long Names box is checked (default), the long name is printed below
each element in a ladder network for which you have entered a long name in soft-
ware declarations. This has no impact on ST networks.
Include in Listing
When the Include in Listing box is checked (default), the software declarations
table is printed with the ladder. You can choose to sort the software declarations by
one of the following:
• Order Entered (default)
• Alphabetically
• By Type
Note: When you choose to print a portion of your ladder, only the software decla-
rations connected to the printed portion will be included.
If a variable name is longer than 8 characters, the name is displayed on a separate
line. The line(s) following the name display the type, attribute, I/O point, initial
value and long name.
Include in Listing
When the Include in Listing box is checked (default), the hardware declarations
are printed with the ladder.
To print the view list, force list, or information window, follow these steps:
1. Ensure that the list or window you want to print is active by clicking it. If you
want to print part of the list or window, highlight that portion before choosing
the print command.
2. Choose any of the following to bring up the print dialog box:
Printout Symbols
When you print out a copy of your ladder file, these symbols may appear.
Symbol Description
When you build a dependency list, you create a complete list of all the files that are
related to the module you are currently running in PiCPro. The list can include all the
ladder file source, REM source, UDFB/TASK sources, and UDFB/TASK libraries
required to run the program. If you have FLASH memory installed on your control,
the dependency list can be used to send all the listed files to the FMSDISK using the
Flash Disk Operations under the online menu.
Importing Comments
You can import a text file of exported comments (or a text file of comments you have
created) into your ladder file.
1. Select Ladder | Comments | Import from the menu.
2. Browse to the location on your workstation of the text file you want to import
and select it so that it appears in the entry field.
3. Select either the option to update the comments or the options to replace all
comments with the text file.
• Update comments with text file option: This is the default. Only the com-
ments whose index or network number is in the text file will be modified in
the ladder.
• Replace ALL comments with text file … option: ALL comments in the
ladder file will be removed and replaced with the comments defined in the
text file. In other words, any comment in the ladder file that has no counter
part in the text file is removed.
4. Click the Start button. The Action box shows the progress.
Note: After importing comments, the ladder file must be saved to keep these
changes.
Exporting Comments
You can export the ladder comments to a text file. You can then open and edit the text
file using a text editor. This text file can then be imported back into the same ladder or
into a different one.
1. Select Ladder | Comments | Export from the menu.
2. Enter the path and filename for the text file which will hold the comments. The
default will be the path and filename of the ladder file with a .txt extension.
3. Select the option to use index numbers (#n) used by the software to keep track
of each network comment or to use the actual network numbers (@n). The
symbol and number appear above your comment in the text file.
IMPORTANT: Never change the number or use the # (or @) symbol in the
first column of any comment you edit in the text file.
4. Click the Start button. A bar shows the progress.
Note: Comments in a ST network that begin with (* and end with *) are not
exported.
Communications Settings
Your workstation and control must be set up to communicate with each other. The
Comm Settings command found under the Online menu allows you to set the serial
communications port, the baud rate, the IP address if communicating via Ethernet, and
the type of communications you are doing: serial or Ethernet-TCP/IP.
• The Type section specifies the type of communicating you are doing: Serial,
TCP/IP (if you have an Ethernet card in your workstation), or TCP/IP Relay
(if you do not have an Ethernet card in your workstation), or Local MMC for
PC (if you have an MMC for PC in your workstation). With TCP/IP Relay, you
select an RS232 connection to a control and then an Ethernet connection to
another control that has an Ethernet-TCP/IP module installed. Use the G&L
Ethernet-TCP/IP configuration tool to set up the module. See CHAPTER 8.
• The Serial section is active if you choose Serial or TCP/IP Relay as a commu-
nication type. You select a RS232 communication port that the control is con-
nected to and a baud rate to communicate at.
• If you choose TCP/IP or TCP/IP Relay, the Network section is active. You
enter the IP Address in dotted decimal format, name, or internet format. This
is the address of the control you are communicating with over Ethernet.
• If you click the Net Info button, additional information associated with the IP
Address/Name is displayed. An indication is also provided if the destination IP
Address/Name is on the network and this computer can communicate with it.
• The TCP/IP Timeouts section is available if you choose either TCP/IP or
TCP/IP Relay. Selecting Extend timeouts increases the timeout value for
TCP/IP network and internet connections between PiCPro and the control.
This means that PiCPro will wait longer for a response from the control before
issuing a communications timeout message. Note: If you are experiencing tim-
The Download Hex File command allows you to do any of the following;
• Configure application/RAMDISK size.
• Update the control’s firmware.
• Update TCP/IP firmware.
• Update the SERCOS module firmware.
• Load the ladder flash memory on the CPU.
• Clear the ladder flash memory.
• Clear the ladder application memory.
NOTE
3. Use Select Port drop down list to select the com ports available on the com-
puter. Select the MMC for PC port.
4. Use the Local checkbox to indicate that the MMC for PC is in the local
machine. If the MMC for PC is not in the computer you are currently using,
uncheck the box.
5. Use the Select TCP/IP location drop down lists to enter the IP Address.
6. Click Start to begin the download process.
7. A status bar will show you the progress of the download.
8. If any errors occur, they will reported in the Information Window.
WARNING
IMPORTANT
An action that affects the contents of the application memory, does not
affect the contents of the flash memory, and vice versa.
If a ladder is downloaded to flash memory, and no ladder is loaded in
application memory, the ladder in flash memory is scanned. If subse-
quently, a ladder (the same or another) is downloaded to application mem-
ory, the ladder in application memory is scanned.
The clrapp.hex file does not clear the flash memory, and the clrflash.hex
file does not clear the ladder in application memory.
PiC Restore
You can restore your PiC or MMC controls with the firmware, ladder (hex or binary),
RAM disk data (binary), and flash memory if you ever lose the data in your control. You
will need the required files either previously saved by you or supplied by your OEM.
PiC Restore is available only if an application ladder is not open. From the Online menu,
choose PiC Restore. The following dialog appears.
To restore or save files, enter the path and name of the restore file (.ppr).
The five check boxes allow you to check the files you want sent to the control. (The check
boxes will default to any settings currently in an existing restore file.)
Selecting Restore starts execution of the restore file. When the download is complete
without any errors, the information window will indicate the results by listing the files sent
to the control.
The Save to File button allows you to save the path and file names of the hex, bin, or dpl
files and the check box settings to the restore file.
Note: Generic filenames are shown above. Your filenames and locations will be different.
In addition to using PiC Restore, a standard text editor can be used to create the restore
file. The format for the restore file is shown below. The filenames are listed in the order
(SendDPL can also be entered as: SendFlash yes C:\filelocation\Ladder.ldo, and any
extension can be used.)
The first field is the type of send: either SendHex, SendBin, SendDPL, SendFlash, or
Empty. The second field contains either a “yes” or a “no” and defines the default value
used for the checkbox. The third field is the name and path of the file. Make sure the type
of file corresponds with the type of send. For example, use SendHex for sending a hex file.
If there is a file type you aren’t using, type in ”Empty No Null” (without the quotes) to so
indicate.
The Drive Setup program in PiCPro allows you to identify all analog interfaced digital drives
used in your application. As each drive is identified, it is put into a Drive List. Within Drive
List view, you can add, remove, rename, cut, copy and paste drives. You can then save infor-
mation to a drive file.
The Drive Setup program also allows you to monitor and/or configure characteristics of the
analog interfaced digital drives in the form of parameters. Drive Data view is activated from
the Drive List view. Within Drive Data, the parameters for each drive can be monitored and/or
configured.
Drive Control Panel/Oscilloscope view, subsequently referred to as Control Panel / Oscillo-
scope view, allows you to view the drive in action. You can capture data throughout the drive
setup process to compare the effect of changes to the parameters.
To use Drive Setup:
1. Start your drive list by creating a new analog interfaced drive system file or opening
an existing analog interfaced drive system file.
2. Build your drive list - add, remove, rename, cut, copy and paste drives.
3. Save the analog interfaced drive system file (name.ADV), subsequently referred to as
drive file.
4. Further refine or monitor parameters from the Drive Data view.
5. Analyze drive operation from the Control Panel / Oscilloscope view using the Oscillo-
scope tool.
Maintenance Mode
Maintenance mode allows quick identification of an analog interfaced digital
drive.
1. Connect the drive to the workstation and open PiCPro
2. Choose one of the following methods to start Maintenance Mode:
Note: If a drive list is already open, the following prompt will be displayed:
To access Analog Interfaced Drive System setup information, open or create an Analog Inter-
faced Drive System file.
• Select Open
• Double-click the file name.
• Press Enter key.
Note: Select Cancel or to exit the dialog without opening a drive file.
4. A drive list will either display as an OFFLINE Drive List view or an ONLINE
Drive List view.
OFFLINE Drive List view
An OFFLINE Drive List view will appear when there is another drive list open.
This is indicated by the word OFFLINE appearing to the right of the filename.
In the ONLINE Drive List view, only one analog interfaced digital drive can be
connected at a time.
Drive1 No
Drive4 Yes No
The drive label consists of two elements: 1) a drive status icon (shown in the table
below) and 2) an alphanumeric string that represents the drive name.
The drive name must adhere to the following criteria: 1) drive name is limited to
31 characters; 2) first character must be an alpha or underscore; 3) the remaining
characters can be alphanumeric or underscores; 4) the strings are not case sensi-
tive, therefore drive1 is the same as Drive1 or DRIVE1; and 5) drive names must
be unique.
Icon Indication
Black X
Drive connected to PiCPro, drive enabled, no faults.
Green Circle
Drive connected to PiCPro, drive not enabled, no faults.
White Circle
Drive connected to PiCPro, drive enabled, warning(s).
Green Circle
with Yellow
Triangle
Drive connected to PiCPro, drive not enabled, warning(s).
White Circle
with Yellow
Triangle
Drive connected to PiCPro, drive enabled, fault(s).
Red Octagon
Connected?
A Yes in this column indicates the drive is connected to the workstation. Only one
drive can be connected at a time. A No in this column indicates the drive is not
connected to the workstation.
Enabled?
A Yes in this column indicates the connected drive is enabled or previously con-
nected drives were enabled when disconnected from the workstation. A No in this
If this column is blank, there are no faults or warnings registered for the connected
drive or the previously connected drives when disconnected from the workstation.
If a single fault or warning exists for the connected drive or existed for the previ-
ously connected drives when disconnected from the workstation, the fault or warn-
ing description will be displayed. If multiple faults or warnings are detected for
the connected drive or the previously connected drives when disconnected from
the workstation, the fault and/or warning numbers will be listed. More details on
the faults and warnings can be obtained in the Drive Data view.
Data - File vs. Actual
Text color indicates whether there are differences between file data and actual data.
If there are differences, the text color is blue. If there are no differences, the text
color is black.
The drive label icon and drive information will change to reflect the current
status of the newly connected drive.
Drive Data view
The drive label icon and drive information will change to reflect the current
status of the newly connected drive.
Disconnect the Current Drive and Connect to a Different Drive Already in the
Drive List
Physically disconnect the PiCPro cable from the existing drive and connect it to the
desired drive.
The Status bar connection icon will change to and then change back to .
Configuration parameters will automatically be uploaded into actual data for the
newly connected drive.
Differences between file data and actual data will be identified for the newly con-
nected drive.
Drive List view
1. The drive label icon will change to for the previously connected drive.
2. The drive label icon and drive information will change to reflect the current
status of the newly connected drive.
Drive Data view
1. The drive label icon will change to for the previously connected drive.
2. Actual data can no longer be changed for the previously connected drive.
It will remain unchanged until the drive is reconnected.
3. The drive label icon and drive information will change to reflect the current
status of the newly connected drive
A prompt will be displayed asking if you want to add the drive to the drive list
(e.g. Drive6):
Choose Yes to add the drive to the drive list. Select No or Cancel or click
to exit the dialog without adding a drive to the drive list.
Configuration parameters will automatically be uploaded into actual data for
the newly constructed drive.
Actual data is copied to file data for the newly connected drive. There will be
no differences identified between file data and actual data.
Drive List view
1. A line will be added to the drive list for the newly connected drive.
2. The drive label icon and drive information will reflect the current status of
the newly connected drive
Drive Data view
1. Actual and File columns will be added to the Drive Data view for the
newly connected drive.
2. The drive label icon and drive information will reflect the current status of
the newly connected drive.
3. At Name: enter a name for the drive. The drive name must adhere to the fol-
lowing criteria: 1) drive name is limited to 31 characters; 2) first character
must be an alpha or underscore; 3) the remaining characters can be alphanu-
meric or underscores; 4) the strings are not case sensitive, therefore drive1 is
the same as Drive1 or DRIVE1; and 5) drive names must be unique.
5. Choose Yes to add the drive to the drive list. Select No, Cancel or to close
the dialog without adding the drive to the drive list. Select Help to display
information related to adding drives to drive list.
Drive name, motor model and default values for the remaining drive configuration
parameters will be downloaded to the drive automatically.
Drive List view
1. A line will be added to the drive list for the newly-connected drive.
2. The drive label icon and drive information will change to reflect the current
status of the newly connected drive.
Drive Data view
1. Actual and File columns will be added to the Drive Data view for the
newly connected drive.
2. The drive label icon and drive information will reflect the current status of
the newly connected drive.
3. At Name: enter a name for the drive. The drive name must adhere to the fol-
lowing criteria: 1) drive name is limited to 31 characters; 2) first character
must be an alpha or underscore; 3) the remaining characters can be alphanu-
meric or underscores; 4) the strings are not case sensitive, therefore drive1 is
the same as Drive1 or DRIVE1; and 5) drive names must be unique.
4. At Motor Model: select a motor from the drop down list.
5. At Drive Model: select a drive model from the drop down list.
File data will be loaded with selected motor model, power section and default
values for the remaining configuration parameters.
2. The drive label icon will reflect that the drive is not connected.
Delete a Drive from a Drive List
1. Select the desired drive(s) in the Drive List. See How to Select Drives for
selection methods.
2. Choose one of the following methods to delete a drive from a drive list:
• Select Edit | Delete Drive(s)... from the menu
• Press the Delete key
• Right-click and select Delete Drive(s)...
4. Choose Yes if you want to delete the selected drive(s). Select No, Cancel
or if you do not want to delete the drive(s) from the Drive List.
If Yes is selected, the drive(s) will be deleted from the Drive List as shown
below.
Note: If the selected drive(s) have outputs overridden, an additional message will
be displayed:
1. Choose a single line in the Drive List and do one of the following.
The following dialog will be displayed when the drive being renamed is the
connected drive:
Note: Removing this check allows the name of the drive in the drive list
to be changed but does not change the name of the connected drive.
When OK is selected, the drive’s icon changes to ‘X’ to indicate the
drive name no longer matches the name of the connected drive.
3. At New Name: enter the new name for the drive. The drive name must
adhere to the following criteria: 1) drive name is limited to 31 characters;
2) first character must be an alpha or underscore; 3) the remaining charac-
ters can be alphanumeric or underscores; 4) the strings are not case sensi-
tive, therefore drive1 is the same as Drive1 or DRIVE1; and 5) drive names
must be unique.
4. Choose OK. The drive will be renamed if a valid name has been entered.
Note: Select Cancel or to close the dialog without renaming the drive.
Select Help to display information related to renaming a drive.
1. Select the drive(s) you want to cut. See How to Select Drives for selection
methods.
2. Choose one of the following methods to issue the Cut Command:
Yes A user fault is set in the drive with overridden outputs. Control of
the outputs is returned to their assigned states. Then the selected
drive(s) are cut.
No Selected drive(s) are not cut.
Copy a Drive
1. Select the drive(s) you want to copy. See How to Select Drives for selec-
tion methods.
2. Choose one of the following methods to issue the Copy command:
Paste a Drive
1. Select the drive list or Drive Data view you want to save.
2. Choose one of the following methods to issue the Save command:
If you wish to give the drive file a different name, choose File | Save as... You
will be prompted to provide a filename and location. The prompt displays your
default directory. Enter a filename and location desired. Choose Save to com-
plete the save command. If Cancel or is chosen, the dialog disappears and
drive system file is not saved.
Note: File data is saved with a Save or Save as command. If differences exist
between file data and actual data, you will be prompted to update the file
data with the actual data for each drive in the drive file that has differences
before the Save or Save as is executed. Choose Yes to update the file data
with the actual data for the specified drive. Choose No to keep only the file
data, ignoring the actual data. Choose Cancel or to exit the dialog
without saving the drive file. Once each drive with a difference has been
addressed, the Save or Save as command will execute.
Close
When closing a Drive List view, the associated Drive Data view will also close. If
drives have been modified without being saved, you will be prompted to save the
drive file.
Note: If no changes have been made to file data, but differences exist between
file data and actual data, you will be prompted to save the drive file.
Note: If the drive file has drive(s) that have outputs overridden, an additional
message will be displayed.
Yes A user fault is set in the drive with overridden outputs. Control of the
outputs is returned to their assigned states. Then the drive file closes.
No The drive file is not closed.
ONLINE Operation
1. When the Drive List view first becomes the ONLINE Drive List view, if
the connected drive is in the drive list, the parameters of the connected
drive are uploaded from the drive to the actual data. The actual data and
file data are compared. The Drive List view and its Drive Data view are
updated to reflect differences between the file data and the actual data. If
the connected drive is not in the Drive List view, you will be prompted to
insert/add the drive. If you choose Yes to the prompt, the drive data will be
uploaded and stored in both the file data and the actual data. The drive will
be added to the Drive List and no differences will be indicated. Note:
When drive maintenance is selected, no differences will be shown, actual
data will be loaded into file data.
2. In the Drive List view, blue text color indicates that differences exist
between file data and actual data of a connected drive or any drive con-
nected since the drive file has been opened. To see the detail of the differ-
ences, double-click on the connected drive in the Drive List view. This
activates the Drive Data view. The various parameters are displayed in col-
umns under Actual data (information uploaded from the drive) and File
data (information read from a saved drive file). Those parameters where
the actual data differs from the file data are displayed in a blue color.
3. When the cable is moved from one drive to another, the actual data for the
previously connected drive is grayed out and can no longer be modified
until the drive is reconnected. If differences existed between file and actual
data, differences will still be indicated by blue text. If the newly connected
drive is already in the Drive List view, drive data automatically uploads
and stores as the actual data. If differences exist, the Drive List view and
its Drive Data view will update to reflect differences between the file data
and the actual data. If, however, the newly connected drive is not in the
Drive List view, you will be prompted to insert/add the drive. If you
choose Yes to the prompt, the drive data will be uploaded and stored in
both the file data and the actual data. The drive will be added to the Drive
List view and no differences will be indicated.
4. When saving the drive file, only the file data is saved to the .adv file. If dif-
ferences exist between file and actual data, you are prompted to copy the
actual data to the file data before the save is executed.
5. When copying a drive from the Drive List view, only the file data is copied.
If differences exist between file data and actual data, you are prompted to
copy the actual data to the file data before the copy is executed.
Cold Restart
Cold Restart completely resets the drive. This command is available in the ONLINE Drive
List view, ONLINE Drive Data view or the Control Panel / Oscilloscope view when the
connected drive is selected. To cold restart, follow these steps:
1. Select the connected drive.
2. Choose one of the following methods to issue the Cold Restart command:
Drive Data view is the location to configure/monitor drive characteristics in the form of
parameters. The Drive Data view can be active in the ONLINE and OFFLINE modes. The
Drive Data view, however, must have a Drive List view open first. When a Drive List view is
ONLINE, its Drive Data view is ONLINE also. Closing a Drive List view will also close its
Drive Data view.
1. Click or button along the upper left side of the Drive Data view. The
view name on the button is the view that will be displayed when the button
is clicked.
2. Select View | Basic View or View | Expert View from the menu.
Search Column
The radio buttons select where the cursor will end up when the search is complete,
either in the File values column or in the Actual values column.
Search Drive Name
All drives in the drive list will be available for selection from the drop down list.
Data entry is not allowed. The drop down list is sorted alphabetically.
Search Parameter Name
All parameters will be available for selection from the drop down list. Data entry
is not allowed. The drop down list is sorted alphabetically.
Select the Find button to execute the search.
Select the Cancel button to exit the dialog without performing the search.
Select the Help button to display help on this command.
The matching category will be displayed in the text to the left of the Go To button.
You can either find the next match by selecting the Find button again or display
this match by selecting the Go To button, By displaying a match, any collapsed
category will be expanded and any hidden drives or hidden columns will be shown
so that the matching parameter can be displayed.
When a match is not found, the dialog will display “Not Found.” The first match
will always be found; subsequent searches of the same information may not have a
match. The next search will start from the top of the parameters.
Copy/Paste Parameters
Copy
Single value, multiple values, and entire value columns can be copied. See the
section on How to Select these various groups.
Redo
Redo reverses the last Undo command. Undo/Redo maintains 10 levels each.
Redo command can be activated by one of the following methods:
Output Override
You may want to force a situation to observe the results. One way is to override
outputs. The control of the overridden output is exclusively with the PiCPro user.
The PiCPro user can toggle the overridden output and can also remove the over-
ride.
Outputs can be overridden only if the following criteria are met:
• The drive must be connected and in the ONLINE drive list.
• Drive Data view and/or Control Panel / Oscilloscope view must be active
for the ONLINE drive list.
Note: If communications with the connected drive are lost while the drive has
overridden outputs, the following actions will be taken in the drive:
• (34) SW Ctrl Comm Timeout fault will be set.
• The control of the overridden output will be taken from PiCPro and
returned to the states currently assigned to the output.
Remove an Override
Control Panel / Oscilloscope view can be used to setup and tune the drives. The
Control Panel / Oscilloscope view, however, must have a Drive List view open
first. Closing a Drive List view will also close its Control Panel / Oscilloscope
view.
The Control Panel / Oscilloscope view can be used to display a saved trace.
3. Velocity Control Mode contains the parameters and settings required to run a
drive in velocity mode. A category is added that allows for software control of
the drive by specifying velocity. Four commands can be issued to the drive:
forward, reverse, sine wave and square wave. These are selected from a drop
down list. The velocity is specified in RPM. Forward causes the drive to run
with a constant positive command. Reverse causes the drive to run with a con-
stant negative command. For the sine and square wave modes a period is
selected from a dropdown list. Although the drive must be stopped to change
the command mode, the velocity and period can be adjusted while the drive is
running.
While parameters are used to control the drive, they cannot initiate or terminate
motion. Motion is started/stopped by the start/stop motion pushbuttons in the
Control Panel area.
When entering or leaving Velocity Control View, the drive must be disabled to
prevent unexpected motion. A dialog will appear accordingly.
5. Auto Tuning Control Mode allows the interface to setup and execute an auto
tune cycle. While executing the auto tune cycle, the drive is under software
control and being operated in current mode. The Current Limit parameter is a
percentage of the motor continuous current and the Distance Limit parameter
limits the number of revolutions of the motor for the forward and reverse
stroke of the auto tune cycle.
Motion is initiated by the Start/Stop Motion button in the Drive Control group
of the Control Panel. The drive will oscillate for a few seconds and then stop.
The auto tune cycle can be stopped at any time by clicking the Stop Motion
button.
When the drive has completed the auto tune cycle, the following dialog will be
displayed. Select Yes to disable the drive and change the parameters in the
drive. Select No, Cancel or to close the dialog without updating the param-
eters in the drive.
This command shows the pushbuttons and indicators below the oscilloscope. Oth-
erwise the oscilloscope trace covers the full height of the screen.
Select View | Show Control Panel from the menu to display the command area.
A √ will appear in front of the menu item to indicate the feature is activated.
Select View | √ Show Control Panel from the menu to hide the command area.
The √ will disappear from in front of the menu item to indicate the feature is deac-
tivated.
Display Parameters
This command shows the parameters to the right of the oscilloscope. Otherwise
the oscilloscope trace covers the full width of the screen.
Select View | Show Parameters from the menu to display the parameter area. A √
will appear in front of the menu item to indicate the feature is activated.
Select View | √ Show Parameters from the menu to hide the parameter area. The
√ will disappear from in front of the menu item to indicate the feature is deacti-
vated.
Changing the Parameters area
There are two columns of information for the connected drive from the ONLINE
drive list. The columns are Actual values and Actual Units. The bolded words
are the column headers in the Parameters area of the Control Panel / Oscilloscope
view.
Here are some ways to change the look of the Parameters area of the Control Panel
/ Oscilloscope view:
1. Pressing the up or down arrows, moves the cursor to the next category.
Unless the category is expanded, then the cursor moves to the next parame-
ter value field.
2. Use any of the following methods to collapse categories:
• Select the (-) button to the left of the category name to collapse single
categories.
This feature saves the entire current trace data to a tab-delimited text file (*.txt).
1. Select File | Save Trace … from the menu.
2. Save As dialog appears for filename and location. The current drive name
will be the default filename with a .txt extension.
3. Enter the filename and locate it.
4. Select Save to save the file and close the dialog. Click or select Can-
cel to close the dialog without saving the file.
Even though the saved trace is a text file, it is not intended that the file be modi-
fied. MMC Smart Drive.xls has been developed to generate a plot similar to
what is seen in the Oscilloscope area of the Control Panel / Oscilloscope view.
This feature reads in a trace from a previously saved tab-delimited text file (*.txt).
1. Select File | Restore Trace … from the menu.
2. Open dialog appears for filename and location.
3. Enter the filename and locate it.
4. Select Open to open the file and close the dialog. Click or select Can-
cel to close the dialog without opening the file. An additional selection is
available. You can check Open as read-only box for read-only access to
the trace file.
Note: A dialog will appear if discrepancies are detected in the format of the
restored trace file.
Save Scope Template…
This feature saves the oscilloscope settings and the velocity, current and auto tun-
ing control settings in a *.scp file for use on other drives. Typically, this feature
would be used to establish a favorite group of settings that can be called into any
drive. None of the drive parameters are saved in this file, only the control panel
and oscilloscope settings.
1. Select File | Save Scope Template… from the menu.
2. Save As dialog appears for filename and location.
3. Enter the filename and locate it.
4. Select Save to save the file and close the dialog. Click or select Can-
cel to close the dialog without saving the file.
Note: For a specific drive, all the above mentioned settings along with all the
drive data is saved in the *.adv file.
Recall Scope Template…
This feature reads a previously saved control panel and oscilloscope settings
(*.scp).
1. Select File | Recall Scope Template… from the menu.
2. Open dialog appears for filename and location.
3. Enter the filename and locate it.
4. Select Open to open the file and close the dialog. Click or select Can-
cel to close the dialog without opening the file. An additional selection is
available. You can check Open as read-only box for read-only access to
the trace file.
252 Setting up the MMC Smart Drive
Note: Template files (*.scp) have a signature that is checked on recall. A dialog
will appear if there is a problem.
Restore Parameters
This feature restores the drive to the condition it was in before entering the Control
Panel/Oscilloscope view.
1. Select File | Restore Parameters from the menu.
2. A dialog will appear to confirm this action.
Print Trace…
This feature prints the current trace screen on the selected printer.
1. Select File | Print Trace… from the menu.
2. Print dialog appears to set print characteristics.
3. Select OK to print the trace and close the dialog. Click or select Can-
cel to close the dialog without printing the trace.
Note: Only what is visible on the screen is printed.
Close Oscilloscope
The channel signal setting is the drive variable you wish to monitor with the oscil-
loscope. The channel signal is selected from a tree control type list of signals in
any of the Parameters area views. Any signal can be used in any channel. To
The channel scale setting establishes the number of vertical units per division on
the oscilloscope display for this channel. The oscilloscope vertical display
defaults to + 11 divisions. This field's drop down list provides the available
choices.
Oscilloscope Channel Offset
The channel offset setting establishes the value that appears at the vertical center of
the oscilloscope trace. A value can be entered directly into this field. This field
also has scrollbar value control. See Content of Control Panel / Oscilloscope view
for scrollbar operation.
Oscilloscope Channel Color
The channel color setting allows you to select a different color for each of the
channels. The channels are defaulted to different colors. This field's drop down
list provides alternate choices.
Oscilloscope Channel Hide
The channel hide setting allows you to remove a channel from the display. Even
though the hidden channel will not be displayed, data is still being recorded so that
the channel can be displayed at any time and the data will be correct. This field's
drop down list provides a Yes/No choice. No is default.
Trigger Signal
Trigger signal setting is the drive variable the drive monitors to create a trigger
event. The trigger signal is selected from a tree control type list of signals in any
of the Parameters area views. Any signal can be used. To return the field to unde-
fined, move to the field and press the Delete key. Note: Data entry is not allowed
in this field.
Trigger Level
Trigger level is the value of the trigger signal at which the trigger should occur.
Acceptable range is -2,147,483,648 to 2,147,483,647 (+2^31).
Trigger Edge
To view an event, buffer trigger position setting allows you to adjust where in buff-
ered data the trigger occurs. If this value is 0, then all the data will be buffered
from after the trigger occurred. If this value is 50, then half the data will be buff-
ered from before and half will be buffered from after the trigger occurred. If this
value is 100, then all the data will be buffered from before the triggered occurred.
Buffer trigger position field is a percentage ranging from 0 to 100. A value can be
entered directly into the field. It also has a slider control selection. There are 600
words of trigger capture buffer. For one channel of a word variable, there are 600
entries. For two channels of a word variable, there are 300 entries for each chan-
nel. For one channel of a double word variable, there are 300 entries…
Sample Rate
Sample rate setting specifies the rate at which data is captured. The acceptable
range is 0.125 to 8191 milliseconds. Values can be entered directly into this field.
Note: Sample rate applies only to the trigger mode, which runs in foreground.
Samples per Division
Samples per division setting is a four-selection choice from a drop down list. This
setting specifies the number of samples to display per each major division along
the horizontal axis.
Secondary Scale
Secondary scale setting is a four-selection choice from a drop down list. This set-
ting specifies which channel's scale to display on the right side of the oscilloscope
when more than one channel is being displayed. By default, the first channel's
scale is displayed on the left and the second channel's scale is displayed on the
right, in the appropriate color.
Note: If an invalid channel is selected, a dialog will indicate the problem.
Line Weight
The thickness or width of the lines used in the Oscilloscope traces can be adjusted
by using the drop down list. There are three selections; thin, medium and thick.
Oscilloscope Group
This group of pushbuttons controls the trace.
Arm Trigger
Click this button to initiate data capture with the oscilloscope setup information.
The drive will begin capturing data, waiting for the trigger event to occur. Data is
captured in foreground at the sample rate specified.
Run Continuous
Click this button to run the oscilloscope continuously, where there is no trigger and
the capture rate is determined by how fast the workstation is capable of processing
the data. Data is captured in background whenever requested by the workstation.
Stop
Click this button to stop the oscilloscope, whether running in trigger mode or con-
tinuous.
Trigger State Indicator
The trigger state indicator reflects the current state of the drive trigger mechanism.
• Solid Idle - When not using the oscilloscope
• Solid Running - When running the oscilloscope in continuous mode
• Blinking Waiting for Trigger - When the capture mechanism is armed and
looking for a trigger
• Blinking Triggered - When a trigger has been encountered, but the capture
buffer is not yet full
• Solid Triggered - When the capture is complete and being displayed
Drive Status
This group of indicators reflects the current status of the connected drive.
Enabled / Disabled
This status indicates whether the drive is enabled or disabled. Enabled with a
green background indicates the drive is enabled. Disabled with a yellow back-
ground indicates the drive is either physically not enabled or the drive has not been
enabled by software control.
Warning / Fault
This status indicates the fault condition of the drive. No Fault with a green back-
ground indicates the drive has no active faults or warnings. Warning Fault with a
yellow background indicates that at least one warning is active. Disabling Fault
with a red background indicates that at least one fault is active.
Drive Control
This group of pushbuttons is used to run the drive while in software control. Soft-
ware control of the drive is allowed while on the Velocity Control mode, Current
Control mode or Auto Tuning Control mode in the Parameters area of the Control
Panel / Oscilloscope view. Pushbuttons unavailable for use will be grayed out.
Enable / Disable
The text on the pushbutton (Enable or Disable) is the action that will be taken
when the pushbutton is clicked and proper conditions exist in the drive for the
action to take place. If the software control of the drive cannot be enabled due to
the drive not physically being enabled or a disabling fault being active, messages
will be generated identifying the problem.
Set User Fault
Click this button to set user fault. The user fault is a disabling fault, which will
immediately disable the drive. This button is operational while on the Control
Panel / Oscilloscope view.
Clear Faults
Click this button to clear existing faults. If conditions have not been changed to
eliminate the fault, the fault indication will come back. This button is operational
while on the Control Panel / Oscilloscope view.
The text on the pushbutton (Start Motion or Stop Motion) is the action that will
be taken when the pushbutton is clicked and proper conditions exist in the drive for
the action to take place. If the software control of the drive cannot be enabled due
to the drive not physically being enabled or a disabling fault being active, mes-
sages will be generated identifying the problem. The type of motion will be deter-
mined by the Parameters area mode selected; Velocity Control mode, Current
Control mode or Auto Tuning Control mode.
Alignment Mode
Overview
Alignment mode is used to establish an operational relationship between a feedback
device and a motor magnetic position. After the motor and feedback devices are
aligned, the feedback device provides the precise location of the motor magnetic posi-
tion.
For the purposes of alignment, PiCPro recognizes the following types of feedback
devices:
• Incremental Encoders
• Resolvers
PiCPro cannot perform alignment if it is connected to a drive with a motor having a
Stegmann encoder. PiCPro will only support Stegmann encoders that have been pre-
programmed by G&L Motion Control.
The Alignment Tool is only available with MMC Smart Drive firmware versions 2.2
or greater. If alignment is attempted with an earlier version of drive firmware the fol-
lowing message will appear:
Changes are made to the Parameters area the same as in Drive Control Panel
Mode.
File Menu Features
File menu features are the same as in Drive Control Panel Mode.
Oscilloscope Channel Configuration and Setup
Pushbuttons and indicators are located in the Control Panel area of the Control
Panel / Oscilloscope view and are the same as in the Drive Control Panel
Mode.
Overview
Current Limit (percentage of continuous current that will align the motor) can
be entered. The default value is 25%.
The current will be applied when Start Motion is clicked at the Drive Control
Panel and remain until the automatic alignment cycle is complete or Stop
Motion is clicked.
While the current is applied, the Current Limit can be changed. The motor will
be commanded to magnetic zero, and then incrementally commanded to the
next magnetic zero over several sequential moves. When the cycle is complete
or Stop Motion is selected, the process will discontinue.
Click OK to continue.
If the offset is larger (>15 degrees) a prompt will appear asking if the Hall Off-
set in the .csv file and the motor’s Hall Offset should be updated. The follow-
ing is an example prompt:
Click OK to continue. Make sure the counts per rev and number of
poles are correct in the motor data file.
Click OK to continue. Make sure the hall sensors are connected cor-
rectly to the drive.
Setting up the MMC Smart Drive 263
Too many hall transitions detected:
Click OK to continue. Make sure the counts per rev and number of
poles are correct in the motor data file.
Click OK to continue. Make sure the hall sensors are connected cor-
rectly to the drive.
Overview
A resolver uses an Index Offset instead of a Hall Offset and therefore does not
have Hall sensors. Functionality includes Current Limit adjustment, drive
enable, and starting motion.
Alignment Successful for Motor with a Resolver
Click OK to continue.
• If the offset is larger (>15 degrees) a prompt will appear asking if the Index
Offset in the .csv file and the motor’s Index Offset should be updated. The fol-
lowing display is an example prompt:
Click OK to continue.
A new custom motor must be created to use the recommended Index Offset
(refer to Chapter 5: Custom Motors).
Alignment Unsuccessful for Motor with a Resolver
Click OK to continue. Make sure the counts per rev and number of
poles are correct in the motor data file.
Stegmann Encoder
Click OK to continue.
Motor with alignment mode of Move, Move Minimum, or Hall then Index
PiCPro cannot perform alignment when connected to a drive with a motor hav-
ing an alignment mode of ‘Move’, ‘Move Minimum’, or ‘Hall then Index’. If
the attempt is made to do so, an error message will be displayed as follows:
Click OK to continue.
When PiCPro is installed, a list of standard motors is also installed. This is the list of
motors that is available when specifying motor model for a drive. If the motor model
being used is not found in the list, a custom motor must be created.
If non-standard motors are being used, there are two choices available for creating cus-
tom motor files:
• Custom motor files can be created in PiCPro using the procedures included in
this manual.
• G&L Motion will create the custom motor files.
The motor(s) are first sent to G&L Motion Control for testing by G&L Engi-
neers who specialize in the creation of custom motor files. The engineers cre-
ate a custom motor file and a speed torque curve for each motor. Contact the
G&L Motion Sales Department for further information.
A custom motor file (.csv) contains motor data for a single motor. The Custom Motor
View allows configuration of Custom Motor parameters.
Custom motor files are read:
• at the startup of PicPro
• if the location of the custom motor files is changed
Note: Select Cancel or click to close the dialog without creating a Custom
Motor file.
Configuring and Editing a Custom Motor File
The Custom Motor grid view is the location in which custom motor parameters are
configured. The grid view provides the ability to:
• Edit, copy and paste motor data within the grid.
• Restore default data and load default values from another motor.
Additional
Pull Down
Menus
4. If the above prompt is displayed, enter the proper value and press Enter.
Copy
A single value, multiple values, or the entire values column can be copied. Once
values are selected, use one of the following methods to Copy:
A Single value can be pasted anywhere there is a configurable value. Select the
value and use one of the following methods to Paste:
Undo
Undo reverses the last edit action. Undo maintains 10 levels. An undo command
can be activated by one of the following methods:
2. Select the motor from which the default values will be copied.
3. Click OK or press Enter.
A custom motor is added to the list of available motors in PiCPro when it's custom
motor file is saved. If a custom motor existing in PiCPro is modified using PiCPro, the
custom motor data will be updated when the file is saved.
Choose File | Save as... The following prompt will be displayed:
Enter a file name and the desired location. Click Save to save the new file. Click Can-
cel or cancels the new file save process.
The default file save location will be the custom motor directory. If the file is saved to
the custom motor directory, the new motor name will be added to all motor dropdown
lists. If the file is saved to a different location, a message will be displayed indicating
that the custom motor data will not be used because the file was not saved to the cus-
tom motor directory.
When the settings are satisfactory, select Print to queue the output to a printer.
Select Cancel or click the to exit the dialog without printing. Select Help to
display information related to this subject.
PiCPro does not provide functionality to delete a custom motor. To delete a custom
motor do the following:
1. Right click Start and click Explore to display the Windows Explorer view.
2. Navigate to the folder that contains the custom motor files.
3. Select the custom motor (.csv) file and delete it from the Custom Motor
folder.
4. Do one of the following:
• From within PiCPro, select View | Options. Select the Drive Setup tab
and click the Refresh button.
Refresh Forces PiCPro to reread all custom motor files in the custom
motor directory.
When custom motor files are read, messages will be displayed in the information win-
dow if one of the following conditions exists:
• A custom motor file is found whose name matches that of a motor already in
the installed motor file.
• A custom motor file with an invalid checksum is found.
• A custom motor file is found that includes parameters not supported by the
current personality files.
Note: If the motor file is saved in the current version of PiCPro, any unused
information will be lost.
• A custom motor file is found that was created with an earlier version of PiCPro
that did not support all of the motor parameters supported in the current ver-
sion PiCPro. If motor parameters are missing, default values will be given to
the missing motor parameters.
The Servo Setup program in PiCPro is used to enter setup data for all digitizing
and servo axes used in your application. Each axis you insert appears in a list
sorted by the axis type. It also allows you to read servo setup parameters in the
servo view list and write selected parameters to an axis in the servo force list.
A general overview of the procedure to incorporate servo setup into your applica-
tion program follows:
1. Use servo setup to enter setup data for your application.
2. Save the setup file (name.SRV).
3. With the compile command, make a function containing all the setup data.
Assign an appropriate name to the function. This function is placed in a library
file you create (name.LIB) which PiCPro can find. This library file will hold
all servo functions defined by you for your application.
4. Use PiCPro to create an application program (name.LDO).
5. Include the setup function you made, along with the STRTSERV standard
motion function, in a network of your ladder program.
Note: When setup data is called in a ladder, it is copied into the RAM
memory of the CPU.
6. Download the application to the control. The setup data for your application is
sent to the CPU in the form of the function.
7. Read and write setup parameters to fine-tune each axis in your application.
Note: This creates a .SVT file for the Servo View List and the Servo Force
List.
An axis is added to Servo Setup by using the Insert command from the menu,
pressing the Insert key, or right clicking and selecting one of the insert menu
items. You can insert a servo, digitizing (read-only) or time axis. Digitizing axes
have no output type. Time axes have no input or output type.
Servo setup will number the axes sequentially as they are inserted.
Each time you insert an axis you must enter the axis properties for that axis.
Servo Axis Limitations
In PiCPro for Windows Professional Edition, regardless of the CPU type selected,
the limitations are:
• The maximum number of servo axes is 32. The first 16 servo axes are num-
bered from 1 to 16 and the second 16 are numbered from 101 to 116.
• The maximum number of digitizing axes is 32. The digitizing axes are
numbered from 49 to 80.
• The maximum number of time axes is 4. The time axes are numbered from
25-28.
In PiCPro for Windows MMC-Limited Edition, the standalone MMC CPU is lim-
ited to:
• The maximum number of servo axes is 4 if axes are D/A Encoder. The
servo axes are numbered from 1 to 4.
• The maximum number of servo axes is 8 if axes are SERCOS. The axes are
numbered from 1-8.
• The maximum number of digitizing axes is 1 if axis is Encoder. The digi-
tizing axis is numbered 49.
When the CPU type is MMC for PC, the SERCOS axis can be designated as the
DLS Communications Master Axis by clicking on Communications Master. As
the Insert Axis Properties dialog shows:
5. Click on the tabs that appear to configure the output and input devices for your
application. Typically, you will need to specify at least the input and output slot
and channel for each device.
6. When you are done configuring your input and output properties, click on
Apply to activate the Axis Data button for this axis OR click on OK to con-
tinue inserting axes.
Note: An MMC for PC SRV file can only contain 1 axis specified as a digitiz-
ing DLS axis or a Communications Master.
Note: An inductosyn device may also be used. Choose resolver if you will be using
an inductosyn.
Analog Input Setup (Only for PiC CPU)
To configure the analog input
1. Enter the Slot: and Channel: location of the analog input module.
2. Select the Filter Time: from the drop down list.
3. If you are using the module in the 4/20 mA Offset: mode, select Yes from the
drop down list.
Note: The Bipolar: box will be changed to No and the unipolar input Range
(Volts): will be changed to 0 to 5. These defaults cannot be changed when in
the 4/20 mA mode.
4. If you are not using the module in the 4/20 mA Offset: mode, select the Bipo-
lar or Unipolar voltage range from the drop down list.
5. Click OK.
Note: TTL data is defined as valid depending on what is selected from the list.
Binary High Whenever input 24 is high, the inputs are not
allowed to change.
Note: For a SERCOS Digitizing Axis, Position Error Cyclic Update Offset:
fields are always hidden because they do not apply to digitizing axes.
SERCOS SETUP
Your servo setup file contains the data for one or more axes. When you open a
servo setup file, the axes are ordered by axis type (Servo, Digitizing, Time) . You
entered the properties and data for each axis when you inserted them into the file.
You can edit that information.
Editing Axis Properties
You can access the axis properties box in one of the the following ways:
• With the axis selected, select Edit | Axis Properties from the menu
• With the axis selected, press Enter key.
• With the axis selected, right-click and select Axis Properties.
• Double-click on the axis.
Make the necessary changes and choose OK.
Editing Axis Data
You can access the axis data box in one of the following ways:
• With the axis selected, select Edit | Axis Data from the menu.
• With the axis selected, press <Alt + Enter>.
There are three categories of servo axis data in the Servo Setup program:
1. Scaling data - sets up the ratio between feedback units, ladder units, and axis
units. This allows you to enter axis units instead of feedback units in the appro-
priate places for iterator and position loop data in setup. The three type of units
are defined below:
• Feedback units - the units the servo software uses to perform its calcula-
tions and issue its commands in.
• Ladder units - the units used in the ladder program. They must be integers.
• Axis units - the units of measurement (inches, millimeters, degrees) for the
system. They may be integers or non-integers (decimals) and are used in
the Servo setup program to enter certain types of setup data.
2. Iterator data - specifies how data such as limits, ramps, filters, and rollovers
will be handled by the move iterator.
3. Position loop data - provides the servo software with information on how the
axis is set up for the position loop.
Input Feedback units, ladder units, and ladder units/axis units establish a scaling ratio be-
Scaling tween the feedback units the servo software uses to perform its calculations and issue
its commands, the units used in the ladder, and the units entered in setup.
Note: When using SERCOS feedback, it is recommended that the units be entered in
a 1:1 ratio.
Feedback Units - These are the units the servo software uses to perform its calcula-
tions and issue its commands.
Ladder Units - These are the units used in the ladder program. Ladder units must be
integers and cannot be fractional values.
The ratio of the feedback device signal to the control feedback units is:
• One revolution of a resolver = x feedback units
• One pulse of an encoder = one feedback unit
• One cycle of a quadrature type encoder equals four pulses.
Note: You cannot enter fractional values here.
Ladder Units/Axis Units - Axis units are the units of measurement (inches, millime-
ters, degrees) used in your system. They are used to enter values for several setup pa-
rameters.
Enter the ratio of ladder units to axis units. (1, 10, 100, 1,000, 10,000, or 100,000)
IMPORTANT
Keep in mind that certain iterator and position loop data is entered in axis units. The
default values are also in axis units and are sometimes at the upper limit of an accept-
able value (ramps and software limits). If you choose a ratio for your ladder units/axis
units that is greater than 1, then these default values will exceed the limit. Change the
default value to a lower value for those parameters.
Output These three parameters provide the information the controller needs to be able to cal-
Scaling culate how much voltage the analog output will need to operate the axis at a certain
speed and how many feedback units will be received for each motor revolution.
Commanded Voltage - Enter commanded voltage in millivolts.
Motor RPM at Voltage - Enter the motor RPM at the Commanded Voltage entered.
Counts/Motor Revolution – Enter the number of feedback units that occur for each
motor revolution.
Button Description
Add All Click to add all items from the Pick list to the Chose list.
Add> Click to add selected item from the Pick list to the Chose list.
< Remove Click to remove selected item from the Pick list.
Remove All Click to remove all items from the Pick list.
Cancel Click to close without saving changes made to the Chose list.
3. Highlight and then Add> the Feed Forward Percent parameter to the list.
4. Click OK.
5. Enter 100% for the value of Feed Forward Percent.
6. Move the axis at a fixed velocity in either always the positive or always the
negative direction.
7. Observe the following error in the Servo View List. If the following error is not
zero, the velocity scaling is incorrect.
8. Change the Motor RPM at Voltage in the Output Scaling of Axis Data.
For example, if you are jogging in the positive direction and the error is always
negative, increase the RPMs and vice versa.
The E_STOP function and the Excess Following Error E-Stop are
the only types of E-Stops that are resumable. All other types of
E_Stops will execute normally regardless of this selection.
Using this dialog, S-Curve information can be specified for both Move Accel/
Decel and Controlled Stop Decel. Selecting Move Accel/Decel will display
known information for Move Accel/Decel. Selecting Controlled Stop Decel will
display known information for Controlled Stop Decel.
When initially displayed:
• Move Accel/Decel will be selected.
• If S-Curve information has previously been entered, existing values will be
entered, and checkboxes checked accordingly. The slider will indicate the
relationship between acceleration and jerk. The resulting S-Curve will be
drawn with Distance Traveled displayed at the top.
• If S-Curve information has not been entered, Velocity will be checked and
set to a value equal to that of Velocity Limit as specified in the iterator
data. In addition, Time will be checked and set to a value of 3 seconds.
Constant Jerk and Max Acceleration will be calculated based on the initial
1/3 of the time at constant jerk, the next 1/3 of the time at constant maxi-
mum acceleration, and the final 1/3 of the time at constant jerk. The slider
will be set to approximately 1/3 from the left. And the resulting SCURVE
will display Distance Traveled.
The checkboxes are used to indicate data that is entered. The values for fields
where the checkbox is not checked will be calculated. At least two fields, but no
more than three at the most can be checked in order for a calculation to take place
Servo Setup and Tuning 305
and the graph to be updated. The spinner controls increment or decrement the
value in the associated field by 1% of the value. They are enabled when the associ-
ated checkbox is checked.
The following parameters comprise the S-Curve data:
For digitizing axes, the update rates are .25, .5, 1, 2, 4, 8, or 16 ms.
A rate can be selected for each axis.
There is only a single category of time axis setup data in the Servo Setup program
that:
• specifies how data such as rollover, max acceleration and constant jerk will
be handled by the move iterator,
• allows you to calculate default values for max acceleration and constant
jerk.
Note: There must be at least one Servo or Digitizing axis defined if a Time
Axis defined.
Using this dialog, S-Curve information can be specified for Move Accel/Decel.
Controlled Stop Decel is disabled and grayed because it is not valid for a time
axis.
When initially displayed:
• Move Accel/Decel will be selected.
• If Max Acceleration and Constant Jerk are 0 when the S-Curve Wizard
button is pressed, Max Acceleration and Constant Jerk will be calculated
using a time of 3 seconds, a velocity of 60,000 cnt/min and a value of 33
for the relationship between acceleration and jerk.
• If S-Curve information has previously been entered, existing values will be
entered, and checkboxes checked accordingly. The slider will indicate the
relationship between acceleration and jerk. The resulting S-Curve will be
drawn with Distance Traveled displayed at the top.
The checkboxes are used to indicate data that is entered. The values for fields
where the checkbox is not checked will be calculated. At least two fields, but no
more than three at most can be checked in order for a calculation to take place and
the graph to be updated. The spinner controls increment or decrement the value in
the associated field by 1% of the value. They are enabled when the associated
checkbox is checked.
Axis data can be imported from or exported to a file, which can be read by a spread-
sheet or text editor. The data file will be in comma separated values (.csv) format.
Exporting Axis Data
From the Axis Data dialog, click the Export button. To replace an existing file, select
the filename from the dropdown most recently used list or use the browse (...) button.
To create a new file, that can be opened by Excel®, enter a complete filename (include
full path information) with a .csv extension. Click the Export button.
Once you have entered an axis in servo setup and entered all the axis data for that
axis, you can use the copy/paste commands to add additional axes with the same
information.
How to copy and paste an entire axis
1. Select the axis you want to copy. Select Edit | Copy from the menu, press
<Ctrl + C> or right-click and select Copy.
2. To insert a new axis place the focus on the EOF line and select Edit | Paste
from the menu, press <Ctrl + V> or right-click and select Paste. If there is
already an axis with the same number as the one you are pasting, you will be
advised that the axis will be pasted with the first available, valid axis number.
You can confirm or cancel the procedure.
3. The Axis Properties dialog will appear, with the prompt in the Axis Label:
box. You must give the axis a new label as there cannot be duplicates in the .srv
file. You can also make any other changes to the axis properties or axis data
that you wish.
How to copy axis data from one axis to another
From the servo setup screen you can also copy Position Loop, Iterator, and Scaling
data for one axis into the axis data for another axis. This is a time-saver if the axis
data parameters for both axes are similar. If some of the axis parameters for the
second axis need to be changed, you can edit them after you have copied the axis
data to the second axis.
1. Highlight the axis with the data you want to copy. Select Edit | Copy from the
menu, press <Ctrl + C> or right-click and select Copy.
2. Highlight the axis with the data you want to copy. Select Edit | Paste from the
menu, press <Ctrl + V> or right-click and select Paste.
3. If you need to change some of the parameters for the second axis, select Edit |
Axis Data from the menu or press <Alt + Enter> to bring up the axis data box.
Note: When pasting axes, the servo view list and servo force list information will
not be pasted. That information must be manually entered.
When pasting between files with different CPU types, you will receive a warning
to check the input polarity. The input polarity of a PiC CPU is reversed from that
of the standalone MMC or MMC for PC. You must edit the axis data to avoid
unexpected motion when the ladder is run.
• If a digitizing DLS axis is pasted into a MMC for PC or PiC SRV file, an error
message will be displayed. A digitizing DLS axis can only be pasted when the
target CPU is MMC for PC.
• If an axis created in a MMC for PC SRV file and specified as a DLS Commu-
nications Master, is pasted into a MMC or PiC SRV file, a message will be dis-
played indicating that DLS Communications Master information will be
removed.
Servo Setup files that are created or modified in V14.0 or later cannot be opened
directly by earlier versions of PiCPro.
Do the following to save an SRV file for use with an earlier version of PiCPro for
Windows:
1. Select File | Save As from the menu.
2. In the Save as type: list, select the desired type.
3. Click Save. Any errors will be displayed in the Information Window.
You can print the axis information (scaling, iterator, and position loop information)
for one or all axes in your servo setup program.
To print axis information
1. Open the Servo Setup file (.srv) that you want to print. If you just want to print
the axis information for one axis, select that axis.
2. Choose one of the following methods:
After you have entered all the setup information for all the axes in your applica-
tion, you will create a servo setup function to store all this information. This func-
tion will be stored in the servo library you designate and can then be called in your
ladder program to initialize the setup data for your application. The axes setup
information will then be sent to the control when you download your application.
The name of the function will be the same as the name of the .srv file name. It will
appear in the list of functions in PiCPro.
Note: Function names are limited to 8 characters.
To create a servo setup function
1. After all the setup information for all your axes has been entered, select Com-
pile | Make Function from the menu.
2. The Save As dialog will appear if you have not previously saved your setup
file. Choose the location you want to save your .SRV file to. There is a default
that is entered in the File name box beginning with Servo1.SRV. You can
accept this name or enter your own.
Note: The second setup file you create will have the default name
Servo2.SRV, the third will be Servo3.SRV and so on.
Note: It is strongly recommended that the filename use the DOS 8.3 nam-
ing convention of 8 characters, a period, and 3 characters.
3. The Compile SRV box appears. The Registered ServoSetup/SercosSetup
Libraries: section will hold the names of any setup libraries you have created
previously. You may choose from this list or create a new Servo Setup Library
by entering one in the Library Name: box.
Note: If you are recompiling a function that was created earlier, you must
place the function in the same library where it was originally locat-
ed. You cannot select a new library location. The Library Name:
box will be disabled (grayed out).
4. Click OK to insert the servo setup function into the chosen library. If you are
creating a new library a prompt will appear asking if you want to create a new
library. If the directory path specified for the new library is not found in the
current library path, a prompt will be displayed asking if this path should be
added.
Choosing Yes will define the library path so PiCPro can locate the function.
The library and setup function will immediately show up in PiCPro under Lad-
der | Functions and in the Functions list on the toolbar
5. Do a full compile and download of the ladder using this function.
The servo setup function you compile with the Servo Setup program must be
incorporated into your ladder program. To initialize all the setup data you use the
standard motion function STRTSERV with your setup function. Below is a net-
work designed to do this. The example setup function is labeled SERVOSET.
Axis tuning allows you to make adjustments to offsets and gains for an axis
through software rather than hardware. When the ladder containing your servo
setup file is downloaded and scanning in the control, any servo axis defined in
your servo setup file can be tuned using the Servo Force List (Write) and the Servo
View List (Read) in Servo Setup. When you change a value through the Servo
Force List, a prompt will appear when you close the force list asking if you want to
update the axis data for the selected axis. If you answer Yes, the data will become a
permanent part of your program.
Note: In order to use Servo View and Servo Force, the latest version of the
motion library must be installed. This occurs automatically if you choose
Typical as an installation choice.
Axis Tuning using Forcing
You can write values into certain servo variables for an axis running in the control
using the Servo Force List.
To force an axis servo variable in the Servo Force list
1. Open the ladder containing your servo function. Choose one of the following
methods:
• Select View | Servo Function from the menu.
• Select the servo setup function, right-click and select View Servo Func-
tion.
2. Select the axis you want to force variable values on.
3. Choose one of the following methods:
• Select View | Servo Force List from the menu.
• Right-click and select Servo Force List.
A Servo Force List can be opened for each servo axis you have defined in
Servo Setup. A Servo Force List cannot be opened for a digitizing axis. The
Axis number appears in the title bar of each list.
4. Use the Add/Remove button to edit the forcing list.
5. Click in the check box of the variables you want to force.
6. Enter a value for the variable in the Value column. A message will appear if
the value is out of range for the variable.
7. Click Update Forcing to send the updated values to the CPU
Control SERCOS
Module
Master
1 2 8 1 2 8
(up to 8) (up to 8)
Typically, the SERCOS drive accepts position commands from the control
whereas an analog drive accepts velocity commands. In SERCOS, the position
loop that compares the commanded position to the actual position and then applies
a PID algorithm to the difference is performed in the drive rather than in the con-
trol.
The following are all part of how control is performed once communications is
established.
You define the SERCOS configuration for all the SERCOS axes using Sercos-
Setup in PiCPro.
SERCOS Functions
The Motion library contains the following function/function blocks in the groups
listed. Refer to the Function/Function Block Reference Guide for a complete
description of the function/function blocks.
SCA_… function blocks have an AXIS input to identify the SERCOS axis that
has been initialized in Servo setup.
SCS_… function/function blocks identify the SERCOS axis by slot, ring, and
slave number.
SERCOS Phases
During initialization, the SERCOS system moves through five communication
phases (0 through 4) before normal communication can begin. These are summa-
rized below.
Phase # Description
Phase 0 Closes the communication ring and allows initialization to proceed.
Phase 1 Identification phase where the control addresses each drive individ-
ually and waits for an acknowledgment.
Phase 2 Sets parameters for cyclic data transmission.
Phase 3 Sets parameters for non-cyclic or service channel data transmis-
sion.
Phase 4 The SERCOS ring can begin normal operation as defined by the
application.
The movement through these five communication phases occurs in sequential
order. In SERCOS setup, it is possible to decide to halt the movement after the
completion of Phase 2 allowing you to send additional IDNs specific to your appli-
cation which you did not enter in SERCOS setup and then resume moving through
Phase 4. At the end of Phase 4, you have another opportunity to send IDNs.
Two approaches to SERCOS startup are presented next. In the first situation, it is
assumed that you are simply replacing your analog drives with SERCOS drives
and not attempting to use the advanced features available. In the second situation,
you are planning to use the advanced features available with SERCOS.
With the SERCOS Setup program, you will create a *.src file containing data for
all the slaves in your SERCOS system. You convert this *.src file to a function in
order to send all the data to the control so that the SERCOS slaves can be initial-
ized. There are several ways to access the SERCOS Setup program.
To create a new SERCOS setup file
1. Choose one of the following methods:
• Click on the button on the standard toolbar.
• Select File | New from the menu
2. Select SercosSetup from the box that appears
A ring is added to SERCOS Setup by using the Insert menu. Each time you insert
a ring you must insert the slave axes you are connecting to that ring and any IDNs
required.
Inserting / Editing a SERCOS ring
1. Select Insert | Ring from the menu. The Insert Master Ring box appears.
2. Enter the slot number (3-13) identifying the slot in which your SERCOS mod-
ule is installed in the control rack.
3. Enter the ring number (1-2).
Note: If a standalone MMC or an MMC for PC CPU is selected, only 1 ring
can be entered. Slot and ring are limited to a value of 1.
4. The default update rate is 4 ms. Choose an Update Rate from the drop down
list (1, 2, 4, or 8) if you want to change this. The update rate for any ring cannot
exceed the CPU update rate. The CPU update rate is the fastest of all servos
initialized. If the SERCOS slave axis is a servo axis, the ring update rate must
be the same as the axis update rate.
Note: If 1 ms is chosen as an update rate, only one ring with six slaves on that
ring can be used regardless of CPU type. All other update rates allow two rings
with eight slaves on each when used with a PiC CPU.
5. Choose the Baud Rate from the drop down list (2 or 4 for PiC and standalone
MMC, and 2, 4, 8, or 16 for MMC for PC).
6. Choosing YES for Pause after Phase 2 allows you to send/receive additional
IDNs via the ladder if required. Use the SCR_CONT function to continue on
through phase 4.
7. Choose OK to accept your ring configuration.
Once you have entered a ring in SERCOS setup, you can edit it by highlighting the
line the ring is on and pressing the Enter key or selecting Edit | Ring Data from
the menu. This brings up the Edit Master Ring Data box.
To insert another ring, highlight an existing ring or the end of rings line and press
the Insert key. The ring will be inserted above the highlighted line.
With a PiC or standalone MMC CPU, the slaves on a ring must be numbered to
match the quantity of slaves entered. For example, if you are entering three slave
axes on this ring, number them in any order: 3, 1, 2; or 1, 3, 2 or 1, 2, 3. However,
they cannot be numbered as 1, 2, 4.
If the CPU is an MMC for PC, enter the slave number (1-32) that matches the
address switch set on the slave. Slaves do not have to be numbered to match the
quantity of slaves entered. This is known as “Slave Gapping” and is allowed only
with an MMC for PC CPU. If you later change the CPU type, you will need to
renumber the slaves accordingly.
Telegram # Description
0 No data
1 Torque control
2 velocity control, velocity feedback
3 Velocity control, position feedback
4 Position control, position feedback
5 Position and velocity control, position and velocity feedback
6 Velocity control
7 User-defined
4. Enter the name and location of the DriveIDN ListFilename: for this slave.
Use the Browse button to locate the file if necessary.
5. If this axis is a digitizing axis (external feedback will be used), check the Digi-
tizing Axis box. The telegram changes to 7, Digitizing Axis Probe Edge
checkboxes become active, and IDN 53 is added to the AT (if not already
present).
Note: A valid drive filename must be specified before you can select the Digi-
tizing Axis box.
6. In the Probe Inputs section, you can select whether the positive or negative
edge of the probe input should be used for a servo or digitizing axis. If you use
probe edges in your ladder, be sure to check them here in setup. The Telegram
defaults to 7 when a probe input box is checked. The following IDNs will be
added to the AT if they are not already present:
• Servo Axis - 130 for positive edge, 131 for negative edge
• Digitizing Axis - 132 for positive edge, 133 for negative edge
• For either Servo or Digitizing Axis - 179 if any box is checked
Once you have inserted a slave in setup, you can edit it by highlighting the line it is
on and pressing the Enter key or select the Edit | Slave Data from the menu. The
Edit Slave Data dialog appears. The Edit dialog looks just like the Insert dialog.
When you click on Edit Startup IDN List, the following dialog box appears.
If you are entering IDN numbers to be used at startup with this slave axis, double-
click on the END OF LIST entry in the IDN number column or press the Insert
key. The Insert IDN box appears.
To edit an existing entry, double-click on that entry in the list or press the Enter
key. The Insert IDN box appears and you can make the necessary changes to the
selected IDN.
If you press the Insert key on an existing entry, you can add a new IDN. It will be
entered directly above the existing one.
You can also cut/copy/paste entries within this list using the <Ctrl + X, Ctrl + C,
and Ctrl +V > keys.
Enter the data for the IDN to be added to the startup list.
The Slot/Ring/Slave Information identifies the slave you are inserting an IDN
for.
The System IDNs button brings up a list of system IDNs from the SERCOS spec-
ification. If you select an IDN from this list, it will appear in Number:.
The Drive IDNs button brings up a list of drive IDNs from the file you uploaded
from the drive. If you select an IDN from this list, it will appear in Number:.
You can choose an IDN that is not in any list by entering its number from the range
of 1 to 65535 (S1 to S32767 or P0 to P32767) in the Number: field.
The Name: box displays the IDN name for an IDN number that can be found in
any list.
The Length: box indicates the size of the data (two or four byte, variable length
one, two, or four byte data strings). This information is usually found in the system
or drive IDN file. If not, refer to the SERCOS specification and enter the size listed
there.
The Element: box indicates the SERCOS element to use.
Min: displays the minimum value allowed for the selected IDN.
Units: displays the units used with the selected IDN.
Max: displays the maximum value allowed for the selected IDN.
From the Edit Slave Data box, click on Define Cyclic Data.
The Slot/Ring/Slave Information identifies the slave you are defining cyclic data
for.
The Telegram area allows you to choose from the list of telegrams shown in a
drop down list.
The telegram you choose is held in IDN 15. The MDT: and AT: telegram boxes
hold the IDNs connected to the telegram you select.
Note: Once SERCOS is initialized, you cannot change this configuration. The
operation mode must support these cyclic data requirements.
If you choose any telegram other than 7, you do not have to make any other
choices.
If you choose telegram 3, 4, or 5, you are using feedback 1 on the drive.
If you choose telegram 11, 12, or 13, you are using feedback 2 on the drive.
If you choose telegram 7, you must also define a list of IDNs for sending and
receiving cyclic data.
The MDT and AT buttons to the right of the MDT: and AT: description boxes are
only active if telegram 7 is chosen. They include lists of IDNs from IDN 187 (AT)
and IDN 188 (MDT). These come from the drive list that you uploaded from your
drive. You click on an IDN in the list to add it to the description. You can click on
a highlighted IDN in the list to remove it from the description.
Note: When you are working with motion.lib, select either telegram 4 or telegram
7. If you choose 4, nothing further needs to be done. If you choose 7, IDN 47
(position read) must appear in the MDT description and IDN 51 for feedback 1
(IDN 53 for feedback 2) (position write) must appear in the AT description. You
can then place additional IDNs in the description from the MDT/AT lists.
The list of IDNs for MDT become IDN 24 and for AT become IDN 16.
From the Edit Slave Data box, click the Define Operation Modes button.
A SERCOS slave can operate in up to eight modes provided the drive you are
using supports them. The modes are defined and enabled in the Define Operation
Mode dialog box.
Once you have entered a SERCOS configuration in setup, you can use the copy/
cut/paste commands.
How to use the copy/cut/paste commands
1. Enter the SERCOS configuration.
2. Select the ring(s) or slave(s) you want to copy or cut and choose one of the fol-
lowing methods:
It is a good idea to save your file at regular intervals as you work on it.
Using the Save command, you can save the file under its existing name.
Using the Save As command, you can specify a new filename and/or a location
where you want to store the file.
To save a new file
1. Select File | Save from the menu.
2. In the Save As box that appears, choose a drive and folder where you want to
save your setup file.
3. Enter a name in the File name: box. Note: It is strongly recommended that the
filename follow the DOS 8.3 naming convention of 8 characters, a period, and
3 characters.
4. Click Save.
To save an existing file
Select File | Save from the menu
To save a file under a different name or in a different location
You can use the File | Save As command to change the name and/or location of a
file. By giving the file a different name when you save it, you create a copy of the
existing file while keeping the original intact.
1. Select File | Save As from the menu.
2. Select the location for the file in the Save in: box.
3. Enter the new file name in the File name: box.
4. Click Save.
To save in a format readable by a previous version of PiCPro
SERCOS Setup files created or modified in V13.0 cannot be read by previous ver-
sions of PiCPro.
• To save the file in a format that can be read by older versions of PiCPro
select File | Save As from the menu.
• In the Save as type: combo box, select the desired PiCPro version.
• If invalid information for the specified format exists in the file, details will
be shown in the Information Window to indicate the invalid ring(s) or
slave(s).
• If the CPU type is MMC for PC, the file cannot be saved in a format read-
able by older versions of PiCPro.
You can print a highlighted selection or all the information in the SERCOS Setup
file.
To print SERCOS data
1. Open the SERCOS Setup file (*.src) that you want to print. If you just want to
print the data for one ring, select that ring. If you want to print the data for a
slave, select that slave.
2. Choose one of the following methods to bring up the print dialog:
After you have entered all the SERCOS setup information, you will create a SER-
COS setup function to store all this information. This function will be stored in the
SERCOS library you designate and can then be called in your ladder program to
initialize the SERCOS setup data for your application. The SERCOS setup infor-
mation will then be sent to the control when you download your application.
The name of the function will be the same as the name of the *.src file name. It
will appear in the list of functions in PiCPro.
To create a SERCOS setup function
1. After all the setup information has been entered, select Compile | Make Func-
tion from the menu.
2. The Save As box will appear if you have not previously saved your setup file.
Choose the location you want to save your .SRC file to.
There is a default that is entered in the File name: box beginning with
SERCOS1.SRC. You can accept this name or enter your own.
Note: The second setup file you create will have the default name
SERCOS2.SRC, the third will be SERCOS3.SRC and so on. It is strongly rec-
ommended that the filename be 8 characters, a period, and 3 characters.
3. The Compile SRC box appears. The Registered ServoSetup/SercosSetup
Libraries: section will hold the names of any setup libraries you have created
previously. You may choose from this list or create a new SERCOS Setup
Library by entering one in the Library Name: box. Note: If you are recompil-
To use additional SERCOS features beyond replacing the analog signal with a dig-
ital interface, it is necessary to upload the drive information from the drive. This
information is in the form of a list of IDNs. The list will show all the information
that can be read or written from the drive. It will indicate the units and the limits
for each IDN in the list. Using this information, SERCOS setup can read or write
information, define custom cyclic data, or change modes.
To upload this IDN List, select Online | Upload Drive Information from the main
menu. This dialog provides the capability to upload the IDN List from a single
device or for all of the slaves defined in SERCOS Setup
1. To upload drive information for a single drive, select Upload drive info for a
single slave as shown below:
The Status: line will indicate that the upload is complete, whether or not the
process was halted due to an error, or if your workstation is waiting for a re-
sponse. The status bar will show the progress of the upload.
Select Upload Now to begin the upload process for all slaves listed in SER-
COS Setup.
SRS:, Device IDN List Filename, and Status will update to reflect which
slave is currently being uploaded, the filename the IDN List is being written
to, and the status of the current slave’s upload.
The Upload All Progress bar indicates the progress for the upload of all
slaves. It indicates the number of SERCOS slaves that have been updated
versus the total number of SERCOS slaves to upload.
Errors that occur during the upload as well as the completion status of each
upload are provided in the information window.
Notes:
Select Edit | Convert Target CPU To | PiC or MMC or MMC for PC from the
menu.
A message box similar to the following will appear.
When you convert from one CPU type to another, all slot, ring, and slave values
are set to zero. You will need to edit each one to assign the correct slot, ring and
slave values. In cases where more rings or slaves are present than allowed for the
chosen CPU type, you will need to delete them. The compile function will not
allow you to have more rings or slaves than valid for the CPU type and all must
have valid values.
You can copy an SRS Structure to the clipboard for the slave that is currently
selected. This structure contains slot, ring and slave information. The structure can
be pasted into software declarations and used as the input to the SERCOS func-
tions that need SRS.
The procedure is as follows:
1. Open or create a SERCOS Setup file.
2. Select the Slave by clicking on the line containing the Slave.
The battery box feature allows you to command velocity motion of a SERCOS
slave from PiCPro.
IMPORTANT – It is the operator’s responsibility to prevent possible damage to
machinery that is connected to the drive due to overspeed or direction errors.
Select Online | Batterybox from the menu.
Note: The drive loop is closed while the battery box is active. It does not open
when you exit the battery box.
7. The Slot/Ring/Slave Information (SRS:) defaults to the selected slave in the
SERCOS Setup List. If no slave was selected, all of the other controls in the
dialog are disabled until you fill in the SRS.
8. Select the operation mode.
9. Type in the velocity or adjust the slider. You can also use the up and down but-
tons.
10. Select either Plus or Minus for the direction.
11. Click Start. Once started, the motion continues until you click on the Stop but-
ton.
OR
12. Click Jog Mode for jogging the SERCOS drive and follow the directions
shown in the dialog box.
Note: With either method, there may be some delay between selecting an
action and the drive motor reacting depending on the speed of the workstation.
13. When you are finished using the battery box, exit it.
14. Use the WRITE_SV function to set variable 48 to zero. This gives control back
to motion.lib in the control and both loops will be opened as in step 2.
15. Ensure that all motion is stopped.
16. Call the SCA_CLOS function to close the loop.
17. Call the CLSLOOP? function to confirm that both loops are closed.
You are now ready to resume control using motion.lib in the control.
You can receive information on an IDN from the drive with this feature (Online |
Receive Idn...). If you have a slave selected, the Slot/Ring/Slave Information
will default to it. If there is no information in the SRS: box, you cannot proceed.
You can choose from four categories of IDNs: System, Drive, Cyclic Data, or
Startup IDNs.
The Number:, Name:, Length:, and Element: boxes will be filled in when you
select an IDN from one of the lists.
Or you can enter an IDN number (Range from 1 to 65535; or S1 - 32767 or P0 -
32767). If the number you entered can be found in one of the IDN lists, the data
length will be displayed. If it cannot be found, you must enter the data length.
Valid values will be listed in the drop down list.
The Element: box allows you to select what element of the IDN you want to
receive. The default is the operation data. Other elements include the name,
attribute, units, minimum value, and maximum value. Choose them from the drop
down list.
After you have entered the IDN number, the Receive button is activated. Click it to
read the requested IDN from the drive. The Receive button changes to Abort.
The Status: box reports on the progress of the receive command.
The Data box holds the data for the requested IDN. If the IDN is a string and is not
completely displayed, double-click on the Data entry to view the entire string. If
the IDN requested is a variable length array, a grid will be displayed. Each array
element is displayed in a separate row.
PiCPro and SERCOS 361
Receive Continuous IDN Data
You can choose to receive IDN data continuously. Select Online | Receive Con-
tinuous... from the menu. Add new IDNs to the list by double-clicking or pressing
the Insert key on the End List line. The Insert IDN dialog appears.
Click in the Enable column to choose which IDNs you want to receive continu-
ously.
With Receive Continuous, the Element column can include operation data,
attribute, minimum value, and maximum value.
To delete an entry from the receive continuous list, click in the first column or
select the entire row and press the Delete key. A warning message will appear.
Click OK if you want to proceed with the deletion.
To cut, copy, and paste in the list use the <Ctrl + X, Ctrl + C, and Ctrl +V > keys.
When the Receive button is chosen, all the enabled IDNs will be received continu-
ously. The button text changes to Abort. You can choose Abort to halt the receive
continuous command. The Status: field reports on the status of the receive contin-
uous command.
If you want to send IDNs, select the Online | Send IDN from the menu or right-
click and select Send IDN. Add new IDNs to the list by double-clicking or press-
ing the Insert key on the End List line. The Insert IDN box appears and you enter
the information for the IDN you want to add to the Send List.
Once your list is complete, you must check the box in the Enable column if you
want to send that IDN when you select the Send button.
You can cut/copy/paste entries within this list using the <Ctrl + X, Ctrl + C, and
Ctrl +V > keys.
When the Send button is selected, the text changes to Abort so that you can select
it to stop the transfer at any time.
The Status: bar reports on the progress of the send command. Communication and
drive errors that may occur are also reported here.
The Save To Startup button saves the IDNs you highlight to the appropriate star-
tup list. You may want to do this after you know the data you have entered is work-
ing for your application.
Note: Only IDNs with the Operation Data element can be saved to the startup list.
The Online | Execute Procedure CMD Command Function (PCF) allows you to
select and execute SERCOS procedure commands.
The Slot/Ring/Slave Information must be entered in order to proceed. If you have
selected a slave in SERCOS setup, it will appear in the SRS: box. You can choose
one from the drop down list.
The System PCFs and the Drive PCFs buttons hold lists of PCFs from the system
file or the drive file respectively. Select a PCF (IDN) from a list or enter one. It
will be displayed in the Number: box. The name appears in the Name: box.
Once the PCF has been entered, the Execute button is active. Click it to send the
PCF IDN to the drive and begin the procedure. The progress of the procedure will
be noted to the right of the Execute button.
The Execute button converts to a Cancel button when progress begins.
By using Online | Ring State... you can read the State Information shown below
for a ring.
The Version: represents the version number of the firmware on the SERCOS mod-
ule.
The Last Completed Phase: gives the phase number including whether the ladder
is halted after phase 2.
The Ring Error State: displays one of the ring error numbers shown below if one
occurs.
Slave Status/Control
In SERCOS, there is a status word from each slave to the control and there is a
control word from the control to each slave. You can read the data in each word
using the Online | Slave Status/Control command that brings up the box shown
below.
The Control section displays the control word data continuously. The three lines
for the Drive: tell whether it’s on or off, enabled or not, halted or restarted. The
Operation Mode: indicates which mode is in effect. The Realtime Bits indicate
whether they are on or off. The word Value: is displayed in hex.
The Status section displays the status word data continuously. The Drive: line tells
whether the drive is ready or not, the logic is ready, and the power is active or not.
The Error: line reports on whether or not an error has occurred. The Operation
Mode: indicates which mode is in effect. The Realtime Bits indicate whether they
are on or off. The word Value: is displayed in hex.
There are lists of IDNs for the system, the drive, the cyclic data, the startup, the
system PCFs, and the drive PCFs. While working in SERCOS setup, there are sev-
eral dialog boxes that allow you to access these lists of IDNs. You can also view
the system and drive IDN lists from the View menu.
When the Display with P and S option is selected, if you enter an IDN number
without the letter prefix, it will be added for you when you tab off of the IDN field.
When the Display as Number option is selected, if you enter an IDN number with
the letter prefix, it will be converted to the number only when you tab off the IDN
field.
After selecting the IDN display format you want, choose OK to accept your format
and close the dialog box. If you choose Apply, your format will be applied but the
dialog box does not close.
You can use the Find Name String button to bring up an IDN Search box.
When you click on the Drive IDNs button in a dialog box, it displays a list of IDNs
that you uploaded from the drive. You can sort by number or name, toggle the sort
order, search by name, and print this drive IDN list.
When you click on the Cyclic Data IDNs button in a dialog box, it displays a list
of IDNs that you entered as cyclic data.
The Startup IDNs button in a dialog box displays a list of IDNs you entered for
startup.
• If the loop will not close, you can read the status of the drive using the
SCA_STAT or SCS_STAT function or the Online | Slave Status/Control
command. The control word has 16 bits. Bits 1 and 2 indicate the state of
power stage the drive is in. Bits 8, 9, and 10 indicate the operation mode.
You may also want to read IDNs 11, 12, and 13.
• A loss of feedback error may occur if the ring has not reached phase 4.
• If the drive does not accept IDNs, the drive may not support the feature.
Check the SERR output of a SERCOS function to learn more.
• Use SCS_ or SCA_RECV functions to read IDN 95. IDN 95 contains a text
diagnostic message with basic error conditions reported from the drive.
• IDN 11, 12, and 13 are diagnostic IDNs that report common control prob-
lems. Consult your drive documentation for the bit definition of these
IDNs.
The User Defined Function Block (UDFB) feature allows you to convert the logic
in a ladder module (.LDO) into an individual function block. The name you give to
the LDO becomes the name of the UDFB. The UDFB is inserted into a library file
(.LIB) and appears in the list of available functions. It can then be used in a net-
work of any module you create.
Using the UDFB feature results in an application program that is better organized,
more readable, and easier to maintain. Some ways UDFBs can be used include:
• UDFBs can segregate the logic for a section of an application program
(i.e. diagnostics, fault logging, etc.).
• Custom functions with a higher level of functionality can be created
(i.e. analog output with ramping).
• A single UDFB can replace in-line programming of repetitive machine
functions
(i.e. axis one fault control, axis two fault control, etc.).
The UDFB follows the same conventions as the standard function blocks found in
PiCPro. It must be declared in the software declarations table when it is used in the
network of a module. You assign a name to it when it is declared.
Creating a UDFB
Briefly, you will do the following to create and use a UDFB.
1. Open a new ladder diagram and enter ladder logic which will accomplish what
you want the UDFB to do.
2. Mark the variables that you want to appear as labels in the UDFB template as
inputs or outputs in the software declarations table.
3. Compile the UDFB.
4. Open another ladder diagram in which you want to use the UDFB and insert
the UDFB from the Function list into a network. It will have to be declared in
the software declarations table and given a name (CITY in the example below.)
Ladder Structured Text
<<INSTANCE NAME>>:MICE(EN:=<<BOOL>>,
,IN1:=<<BOOL>>, IN2:=<<BOOL>>, IN_N:=<<NUMERIC>>,
OK => <<BOOL>>;
IF NOT EN THEN
RETURN;
END_IF;
OK :=1;
This ensures that you will always have control of the EN and OK in any module
you use the function block in. It causes the program to jump to the end of the
UDFB logic if the EN is not set. This prevents the logic in the function block from
being scanned unless the EN is set.
Note the wire in the empty network #N with the JUMPEND label. PiCPro does not
allow empty networks. A horizontal wire was added so that the empty network
error is not generated.
The only situation where you would not want to control the EN and OK in this
manner is if you create a UDFB which would need to work when the EN is not set.
The TOF (timer off) standard function block is an example. The function block
continues to execute after the EN is reset.
The UDFB will also appear in the list in the Function toolbar.
IMPORTANT
Data is copied and pointers are passed into a UDFB only when there is
power flow to the first input (EN). String, array, or structure pointers
within a UDFB must not be accessed until power flow to the EN has
occurred.
Off-Line Editing
When you are doing off-line editing, the first two choices are available.
The Compile and place in library option changes the module in the library and
requires a full download. If you add any function/blocks and/or declarations that
require initializations, you must compile the UDFB and do a full download. The
scan is stopped.
Variables of any type with optional initial values may be declared for use in the
UDFB module. However, variables cannot be external, retained, global, or discrete
I/O.
Note: If you need to add discrete I/O in order to test the UDFB module, be sure to
remove them from the module and the software declarations table before compil-
ing the UDFB.
The variables which will become the inputs for the UDFB may be any data type
except function blocks.
The variables which will become the outputs for the UDFB may be any data type
except function blocks, structures, arrays, and strings.
Inputs that are structures, arrays, and strings all pass pointers to the UDFB and,
therefore, cannot be used as outputs. It is possible, however, to design a function
block in which the result of the function block being executed ends up in a struc-
ture, array, or string used as an input.
Naming the Variables
Up to the first four characters you assign to the UDFB input and output variables
in the software declarations table will become the labels in the UDFB template.
Tasks
A task is a programming tool that allows you to create a module (.LDO) that will
execute at periodic intervals or on the rising or falling edge of a boolean variable
from within your main LDO. This provides the ability to schedule events from
your main LDO.
WARNING
Use discretion when programming tasks in your LDO. You must have
a thorough understanding of how they work and what effect they will
have on your program to ensure that your program will execute
properly.
Tasks are programmed similar to UDFBs. You convert the task LDO into a func-
tion block that is stored in a library. Whenever PiCPro is executed, the task will be
available through this library under the Functions menu. It can then be used in a
network of your main LDO.
Working With Tasks and UDFBs 383
Comparing UDFBs and Tasks
There are some differences between tasks and UDFBs.
• Tasks can access I/O modules located in the main rack of the control.
UDFBs cannot.
• A task cannot be programmed within another task or within a UDFB. A
UDFB can be nested within another UDFB.
• The on-line edit feature cannot be used in a network containing a task.
• Forcing is not allowed in a task.
• When you insert tasks into your main LDO, the function block template is
always the same. You cannot program any inputs or outputs for a task.
They are predefined.
Types of Tasks
There are three types of tasks available.
1. Servo Interrupt Tasks - triggered on the 1, 2, 4, 8, or 16 millisecond servo time
tick.
2. Hardware Interrupt Tasks - triggered on a hardware event.
3. System Tick Tasks - triggered on a multiple of the 10 millisecond system tick
task.
Note: Variables 44 through 48 are available to be used with servo tasks using the
READ_SV and WRITE_SV functions. Refer to the Function/Function Block Ref-
erence Guide for information on these variables.
When multiple tasks are declared in the main LDO, the task that is declared first in
the software declarations table is executed first.
When a task is triggered in the main LDO, the following hierarchy occurs.
• System tasks will interrupt the main LDO.
• Hardware tasks will interrupt system tasks and the main LDO.
• Servo tasks will interrupt hardware tasks, system tasks, and the main LDO.
Structured Text
The EN must be on for a task to run. The SERV, HDWR, and SYST inputs are
mutually exclusive. Only one can be connected at a time depending on whether
your task is a servo, hardware, or system interrupt task.
Errors at the ERR output of the Task
The errors that can appear at the ERR output are:
ERR # Description
1 Task installation failure
2 The time tick requested is larger than 10.92 minutes.
3 The servo task is faster than the servo interrupt time.
COMM NETWORK
These I/O functions can be called in both the main LDO and the task LDO.
Motion Functions
These motion functions can only be called in the main LDO.
These motion functions may not interrupt each other, i.e. if one function is access-
ing a queue, a second function is not allowed to interrupt the first function and
access the same queue. If this occurs, the function in the interrupting task will not
execute and the OK will not be set.
Software Declarations
*Never mark with the External attribute in software declarations any direct I/O
used in the LDO.
Hardware modules and I/O points may be used in multiple task LDOs. They must
be declared in all task LDOs they are used in.
Whenever data is exchanged between the main LDO and a task LDO, there is a
possibility of inaccurate data being transferred. This is dependent on when a task
interrupts the main LDO or interrupts a lower priority task accessing the same
data.
In order to preserve the integrity of the data that is being read/written, you need to
program an interlock between the main LDO and the task LDO. One method of
interlocking data is to use semaphore flags. A semaphore flag refers to a way of
communicating between the main LDO and a task LDO when a significant event
has occurred.
Setting up Semaphore Flags
In setting up semaphore flags, the main LDO energizes a LOCK flag which pre-
vents the task LDO from reading or writing data while data is being transferred to
or from the main LDO. After the data transfer is complete, the main LDO
de-energizes the LOCK flag and the task LDO is allowed to read or write the data.
There are two examples that follow. The first shows data being transferred from
the task LDO to the main LDO. The second shows the data being transferred from
the main LDO to the task LDO. In both examples the main LDO has control of the
data even though tasks of higher priority are accessing it.
Semaphore Flag Example 1 - Data Transfer from Task LDO to Main LDO
The MOVE function with a task output TO data structure is used in both the main
and task LDO. The TO structure acts as a buffer for the data transfer. The TO
structure is marked External (only in the task LDO software declarations table, not
the main LDO software declarations table) allowing that data to be used by both
the main and task LDOs.
In the Main LDO
When the MOVE function in the main LDO is enabled, the following sequence of
events occurs.
1. TO.LOCK is energized by moving LOCK into TO.LOCK.
2. TO.COUNT is moved into COUNT.
3. TO.LOCK is de-energized by moving UNLOCK into TO.LOCK.
Variable Definition
TO Task output structure
.LOCK Semaphore flag
.COUNT Count variable to be written by the task LDO
COUNT Main LDO count variable
LOCK IN1 to MOVE function, set to 1
UNLOCK IN3 to MOVE function, set to 0
The variables in the software declarations table of the task LDO are:
Variable Definition
TO Task output structure
.LOCK Semaphore flag
.COUNT Count variable to write to the main LDO
T_COUNT Task variable to be transferred into COUNT in main
LDO
Semaphore Flag Example 2 - Data Transfer from Main LDO to Task LDO
The MOVE function with a task input TI data structure is used in both the main
and task LDO. The TI structure acts as a buffer for the data transfer. The TI struc-
ture is marked External (only in the task LDO software declarations table, not the
main LDO software declarations table) allowing that data to be used by both the
main and task LDOs.
In the Main LDO
When the MOVE function in the main LDO is enabled, the following sequence of
events occurs.
1. TI.LOCK is energized by moving LOCK into TI.LOCK.
2. SETPOINT is moved into TI.STPT.
3. TI.LOCK is de-energized by moving UNLOCK into TI.LOCK.
Variable Definition
TI Task input structure
.LOCK Semaphore flag
.COUNT Setpoint to be read by the task LDO
SETPOINT Main LDO setpoint
LOCK IN1 to MOVE function, set to 1
UNLOCK IN3 to MOVE function, set to 0
PC PiC
Software
Download .LDO File to PiC PiCPro DeviceNet
PiCPro Port
Configuration (.UCT) File Port
exported to PiCPro
DeviceNet Conf. Software Download .UCP File to Config.
Personality File (.UCP) DeviceNet Scanner Module
Port
DeviceNet Network
For the MMC for PC CPUs, use PiCPro Professional Edition, select Online |
Download Hex. Enter the name of the personality file (.ucp) and select the
port as MMC for PC. More information on this can be found in Chapter 3.
10. Return to the application screen and save your file before exiting.
Note: The on-line configuration option and EDS files are not supported in the
G&L DeviceNet Configuration Software.
Device Status Word
A 16-bit device status word for each slave device can optionally be tagged.
(Refer back to step 7 of the procedure for using the G&L DeviceNet Configuration
Software.) The word has the following format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
(Reserved) IDLE STATUS
This section covers the configuration of an Ethernet network for PiC and standal-
one MMC. This procedure is not needed when using an MMC for PC.
Overview of setting up an Ethernet Network
The following steps summarize what you need to do to set up an Ethernet network.
1. Use the Ethernet - TCP/IP Configurator within PiCPro to configure your sys-
tem. (See procedure at the end of this section.)
2. Send the configuration information to the Ethernet - TCP/IP module using the
PiCPro cable connected to the RS232 Com 2 port on the module.
3. Always cycle power after changing Ethernet settings.
4. Design your ladder program using PiCPro.
5. Download the ladder file to the control using the PiCPro cable connected to the
PiCPro Port.*
PiCPro
Ladder File (.ldo)
Ethernet Network
Animation of your program is halted when the configurator is chosen. All entries
are blank except the Ethernet Port and Comm Port entries.
2. Enter the information in the following entry fields.
• IP Address
Enter the IP address of the host in dotted decimal notation. Note: If DHCP
is checked, you do not have to enter an address here.
• Subnet mask
Enter the Subnet mask in dotted decimal notation. Note: If DHCP is
checked, you do not have to enter an address here.
• Ethernet Port
There are three choices for the PiC900 Ethernet module: UTP (default),
BNC, and AUI. There is one choice for the standalone MMC Ethernet
module: UTP.
• Name of this host
Enter the name of the PiC or standalone MMC host.
• Gateway
Enter the gateway node by name if a name server is present. Otherwise,
enter it by address in dotted decimal notation.
• Domain name
Enter the domain name of this host.
Workstation PiC
Software
Download .LDO File to PiC PiCPro Profibus
PiCPro Port
Configuration (.UCT) File Port
exported to PiCPro
Profibus Configuration Download .UCP File to Config.
Software Port
Profibus Scanner Module
Personality File (.UCP)
Profibus Network
NOTE
There are also INs/OUTs on all the data type conversion functions. In those functions, the
IN is always the data type you are converting from and the OUT is always the data type
you are converting to.
01 opcode_error
Invalid device open mode specified for function (e.g. 16#602)
02 handle_error
The handle to a function is invalid. Possible reasons include:
Using I/O functions with an unopened handle
Attempting to do a READ on a handle opened for WRITE
ONLY
Attempting to do a WRITE to a handle opened for READ
ONLY
03 already_open
Reserved for Sheffield Automation. Internal GLOS error
04 open_error
OPEN mode (READ/WRITE/APPEND) specified is invalid.
05 device_empty
Reserved for Sheffield Automation
P=0
P > 255
P > length of IN
L > 255
The length of IN - L > the length of OUT
P=0
P > 255
P > ength of IN
IN2 = OUT
The length of IN1 + the length of IN2 > the length of OUT
L > 255
L > the length of OUT
P=0
P > 255
P > length of IN
L > 255
L > the length of OUT
P=0
P > 255
P>length of IN1
L > 255
IN1 = OUT
IN2 = OUT
The length of IN1 + the length of IN2>the length of OUT
L > OUT
L > 255
Function Errors
6008 Function: No Definition for Function
The definition for the function _ was not found. Changes to this file cannot be
saved unless the function stub is removed.
PiCPro cannot locate the library containing the function. Check that you are point-
ing at the correct library and close and reopen your file.
There are four types of errors that can occur when working with servo control. The first three apply to
individual axes. The fourth, timing errors, is connected to the entire system.
1. C-stop (controlled-stop) errors
2. E-stop (emergency stop) errors
3. P (programming) errors
4. Timing errors
Hex* Value
Bit Location (decimal in
(low byte) Error Description ladder)
8, 7 Not Used
6 SERCOS error
SERCOS drive E-stop - Status word bits 15, 14, and 13 not 8010
equal to 1 1 0 respectively. (32784)
4 User-set
An E-stop on a servo axis has occurred which was called in the 8008
ladder using the ESTOP function. (32776)
3 Overflow error
A slave delta overflow during runtime has occurred. This prob- 8004
lem is most likely to occur if you are moving at a high rate of (32772)
speed and/or the slave distance is very large compared to the
master distance.
There are two conditions that can set this bit.
1 In
FU, if the master moved position times the slave distance
entered is greater that 31 bits.
2 In
FU, if the master moved times the SDIS divided by the
MDIS > 16 bits.
2 Excess error
When an excess following error has occurred, the axis has 8002
exceeded the limit entered in the Servo setup program as the (32770)
following error limit. This represents the maximum distance the
commanded axis position can be from the actual axis position.
1 Loss of feedback
* When more than one error occurs, the hex values are OR’d. For example, if 8001
and 8004 occur, the result is 8005 hex (32773 decimal).
This error can occur when using the FAST_QUE function or the func- 8020
tions for master/slave moves (RATIO_GR, RATIOSYN, or RATIO- (32800)
PRO). The conditions that can set this bit include:
1 Master axis or fast axis not initialized
2 Interrupt rates different for axes
3 Axis
at slave input is the same as axis at master input in master/
slave moves
5, 4, 3, 2 Not Used ---
1 Master start position for lock on
When the dimension for the lock position was converted to feedback 8001
units, it was too big to fit into 32 bits. (32769)
Hex* Value
Bit Location (decimal in
(high byte) Error Description ladder)
8 A programming error has occurred. There must be at least one other 8000
bit set in the word. (32768)
7, 6, 5 Not Used ---
4 Master axis beyond start point 8800
(34816)
The master axis is beyond its starting point for a ration synchronization
(RATIOSYN) move.
3 Slave axis beyond start point 8400
(33792)
The slave axis is beyond its starting point for a ratio synchronization
(RATIOSYN) move.
2 Master distance not valid 8200
(33280)
When the master distance is converted to feedback units, it is greater
than 16 bits.
1 Slave distance not valid 8100
(33024)
When the slave distance is converted to feedback units, it is greater
than 16 bits.
*When more than one error occurs, the hex values are OR’d. For example, if 8100
and 8200 occur, the result is 8300 hex (33536 decimal).
IMPORTANT
Ring Errors
The ring errors listed below appear at the ERR output of the SCR_ERR function
and will appear on the Ring Error State line in the Ring State dialog.
68 Error occurred calculating total time Too many slaves on one ring
required for communication cycle Cyclic data on slaves too long
Update rate too fast
SERR # Description
4097 This IDN does not exist.
4105 The data for this IDN may not be accessed.
8193 The name does not exist.
8194 The name transmission is too short.
8195 The name transmission is too long.
8196 The name may not be changed.
8197 The name is write-protected.
12290 The attribute transmission is too short.
12291 The attribute transmission is too long.
12292 The attribute is write-protected at this time.
16385 The units do not exist.
16386 The units transmission is too short.
16387 The units transmission is too long.
16388 The units may not be changed.
16389 The units are write-protected at this time.
20481 The minimum value does not exist.
20482 The minimum value transmission is too short.
20483 The minimum value transmission is too long.
20484 The minimum value may not be changed.
20485 The minimum value is write-protected.
24577 The maximum value does not exist.
24578 The maximum value transmission is too short.
24579 The maximum value transmission is too long.
24580 The maximum value may not be changed.
24581 The maximum value is write-protected.
28674 The data is too short.
28675 The data is too long.
28676 The data may not be changed.
28677 The data is write-protected at this time.
28678 The data is smaller than the minimum value.
28679 The data is larger than the maximum value.
28680 The bit pattern for this IDN is invalid.
If the compile process is unsuccessful, errors will be reported in the information window. Typically,
you must re-edit the ladder to correct the errors and recompile.
These errors can be the following types:
1. Fatal - indicates a severe problem that prevents the compile from being completed.
2. Error - indicates a program syntax error.
3. Warning - provides an informational message. A warning does not prevent the com-
pile command from being completed, but it is recommended that the situation that
caused the warning be corrected.
If a compile error does occur, you can double-click on it in the information window and it will navigate
you to the place in the ladder where the error occurred. You can get help on an error by single clicking
on the error in the information window and pressing the F1 key.
Note: If a network has a label assigned to it but no logic to execute (empty), the label will be ignored
and may cause an undefined label error message to appear. If you need the network (i.e. when
designing UDFBs), you can prevent this error by simply adding a horizontal wire in the empty net-
work. The error will be avoided and you will be able to successfully compile your UDFB.
Tip
Whenever an empty network is included in a ladder, an error message will appear.
Delete the empty network if it is not required.
Enter ladder logic.
5003 COMPILE: CONNECTION ERROR
DATA IN, DATA OUT, or CONSTANT must be directly connected to a function/function block.
Example of Error
The SUM DATA OUT variable is not connected to the ADD function.
Incorrect Correct
Function incorrectly placed at left
Function correctly positioned.
power rail.
Tip
Function/function blocks can never be placed in the first column of your network. Reposition the
function/function block to column two or greater and make the appropriate connections.
5005 COMPILE: DELETED NETWORK CONTAINS TASK
Deleted Network contains a task and cannot be patched. A scan stopped, full module down-
load is required.
You cannot use the patch feature when you delete a network that contains a task.
Tip: Whenever you delete a network that contains a task, you must stop the scan and perform a full
download.
5006 COMPILE: NOT ENOUGH INPUTS
‘Function Name’: Function requires ‘#’ inputs, only ‘#’ supplied.
You have not supplied the correct number of required inputs for the function you are using.
Example of Error
An input at IN2 is required. Ensure that the correct number of inputs have been supplied to the func-
tion.
Tip
Enter the required function block input
5008 COMPILE: NETWORK CONTAINS TASK
Modified network contains a task and cannot be patched. A scan stopped, full download is
required.
You cannot use the patch feature when you modify a network that contains a task. You must stop
the scan and perform a full download.
Tip
Whenever you make changes to a network that contains a task, you must stop the scan and perform
a full download.
Tip
Function/function blocks cannot be directly connected to each other. Leave a column between them
and use wires or contacts/coils to make the required connection.
5010 COMPILE: VARIABLE REQUIRED
Variable name required.
DATA IN, DATA OUT, CONTACTS, and COILS all require variables or constants.
Example of Error
The name of the variable at the SUM output is missing.
Tips
You must enter a variable name declared with the appropriate data type to the DATA IN, DATA OUT,
or the CONTACT/COIL location. The DATA IN may have a constant entered in place of a variable
name. The data type for the contact/coil variable is always a boolean.
Note: Under the View | Options menu in User Preferences, you can choose to turn on Force Dec-
larations. PiCPro will then prompt you to declare a variable each time you are required to enter one.
Tip
A wire or a contact/coil can be connected to the first output (i.e. the OK) of a function/function block
if desired. You may choose not to make any connection to the first output if you do not need to
receive the output data.
Tips
Ensure that you have assigned a label to the network you want to jump to.
or
Remove the Jump to Label or Jump to Subroutine entry.
5015 COMPILE: LABEL UNDEFINED
Label is not defined.
Network labels are required on Jump to Label and Jump to Subroutine commands. If you enter a
label that you have not assigned to a network, you will get this error.
Tips
Ensure that any network you want to jump to has a label assigned to it.
If you get this error after entering a label with the jump command, make sure the label exists and/
or check the spelling of the label to ensure it matches the label of the destination network.
Correct
The correct method of branching the above example is shown below.
Review the documentation associated with the function/function block you are working with and cor-
rect the input.
Tip
Ensure that the value you enter as a constant is within the required range. The range is based on
the number of bits specified for the data type.
Tip
Tips
Enter DATA IN or DATA INVERTED for the HDWR input of the task function block.
or
Convert the wire or contact to a DATA IN or DATA INVERTED.
5035 COMPILE: MAX IO EXCEEDED
The number of function block inputs or outputs exceed 64.
An internal error has occurred. Please contact Sheffield Automation.
Tips
If you receive an internal error, take the following steps.
1 Write down the error number and the exact wording of the error message.
2 Note the version of the software you are using.
3 Save your ladder file.
4 Send the above information, your ladder file and all related files to Sheffield Automation.
Tip
Enter T#1MS, T#2MS, T#4MS, T#8MS or T#16MS at the SERV input of the task function.
Tip
Delete the EXIT statement or move within an iteration statement.
5105 COMPILE: NO MATCHING WHILE
END_WHILE without a matching WHILE statement.
An END_WHILE statement was encountered that does not have a matching WHILE statement.
Tip
Delete the END_WHILE statement.
5106 COMPILE: NO MATCHING REPEAT
UNTIL or END_REPEAT without a matching REPEAT statement.
An UNTIL or END_REPEAT statement was encountered that does not have a matching REPEAT
statement.
Tip
Delete the UNTIL or END_REPEAT statement.
5107 COMPILE: NO MATCHING FOR
END_FOR without a matching FOR statement.
An END_FOR statement was encountered that does not have a matching FOR statement.
Tip
Delete the END_FOR statement.
Tip
Ensure that the REPEAT statement is entirely within the WHILE statement as the Correct example
illustrates above.
5111 COMPILE: NESTING ERROR #2
Nesting error - Expecting END_FOR before END_WHILE.
Structured Text statements can be nested inside other structured statements. A statement that is
nested within another statement must be entirely within the outer most statement. No overlapping of
statements are allowed.
Example of Error:
Incorrect: Correct:
WHILE A DO WHILE A DO
FOR I=0 TO 5 DO FOR I=0 TO 5 DO
END_WHILE; END_FOR;
END_FOR; END_WHILE;
Tip
Ensure that the FOR statement is entirely within the WHILE statement as the Correct example illus-
trates above.
Tip
Ensure that the WHILE statement is entirely within the REPEAT statement as the Correct example
illustrates above.
OR
1st I or O Input or Output
2nd 1-8 ASIU number
3rd A1, A2, A3, A4 Connector/Type
4th . (point) Used as a separator
5th 1-2 First digit of channel number
1st B Block
nd I or O Input or Output
2
rd 0 - 7 First digit of module number* (can omit if 0)
3
th 0 - 9 Second digit of the module number*
4
5 th . (point) Used as a separator
th 0 - 6 First digit of point number** (can omit if 0)
6
7 th 0 - 9 Second digit of point number**
*Valid block module numbers = 1 - 77.
**Valid point numbers = 1 - 64.
Example: If the input is in block I/O module 33, point 5, enter: BI33.5
For example: If the short circuit input is from a 24VDC input and output block I/O, module number
33, there is only one group of outputs, the detection input is 9, enter: BI33.9
If the short circuit input is from the GEN outputs for a standalone MMC, there are two groups of
outputs (1 to 8 and 9 to 16), there can be two detection inputs: ISGEN.1 and ISGEN.2. The detec-
tion input from an ASIU would also include the ASIU number.
Fast Inputs
PiC CPU
The fast inputs available on the encoder, resolver, and servo encoder hardware modules can be
declared as inputs:
For Channel 1 For Channel 2 For Channel 3 For Channel 4
X.1 X.3 X.5 X.7
Standalone MMC CPU
The fast inputs available on the standalone MMC can be declared as inputs: (where # is the slot
number 1- 6)
IFAUX#.1 Channel 1 (AXIS 1)
IFAUX#.2 Channel 2 (AXIS 2)
IFAUX#.3 Channel 3 (AXIS 3)
IFAUX#.4 Channel 4 (AXIS 4)
IFAUX#.49 Channel 5 (AXIS 49)
MMC For PC CPU
The fast inputs available on the MMC for PC can be declared as inputs: (where # is the ASIU
number 1- 8)
IFAUX#.1 Channel 1 (AXIS 1)
IFAUX#.2 Channel 2 (AXIS 2)
IFAUX#.3 Channel 3 (AXIS 3)
IFAUX#.4 Channel 4 (AXIS 4)
IFAUX#.49 Channel 5 (AXIS 49)
Out of Data Memory. A scan stop and a full compile and download is required.
This error occurred while patching in new software declarations variables and extended data memory
is being used for this ladder.
There are a total of 3 data segments. They are only used as needed. Patching of declarations can
only occur until the current segment is full. If the current segment becomes full when you patch in new
declarations, you'll get this message. Then you must do a full compile and download of the ladder. If a
full compile and download does not fix the problem, all three segments are full and you must optimize
your usage of data memory by consulting with Sheffield Automation Tech Support.
Check that you have indicated the correct directory for the libraries. Select File | PiCPro Libraries...
from the menu.
Your ladder’s UCT file does not have the correct format. The most likely cause is manual editing of the
UCT file. Re-create this file using the G&L DeviceNet TM Configurator.
The tag name specified in the error message cannot be found in the software declarations for the
associated ladder. The tag name may have been spelled wrong when it was entered in the G&L
DeviceNet TM Configurator. If so, run the Configurator and correct the problem. Or the variable really
does need to be added to your ladder’s software declarations. If this is the case, go to software decla-
rations and add a variable with the same name and type as declared in the Configurator.
The tag name specified in the error message has an invalid IRAM location configured for it. The most
likely cause of this error is manual editing of the UCT file. Re-create the file using the G&L DeviceNet
TM
Configurator.
The tag name specified in the error message has an invalid bit mask associated with it. The valid val-
ues are 0 through 7. The most likely cause of this error is manual editing of the UCT file. Re-create the
file using the G&L DeviceNet TM Configurator.
The tag name specified in the error message has a data type that does not match the corresponding
variable’s type in the ladder’s software declarations. Run the G&L DeviceNet TM Configurator and
change the data type for this tag name to match the type for the same variable in software declarations
- OR - edit the software declarations for your ladder and change the variable’s type.
The tag name specified in the error message has an invalid size associated with it. The most likely
cause of this error is manual editing of the UCT file. Re-create the file using the G&L DeviceNet TM
Configurator.
The tag name specified in the error message has an invalid update type associated with it. The cur-
rently supported values are “Polled Input” (bit0=1) and “Polled Output” (bit 1=1). The most likely cause
of this error is manual editing of the UCT file. Re-create the file using the G&L DeviceNet TM Configura-
tor.
The specified line in your UCT is invalid. The most likely cause of this error is manual editing of the
UCT file. Re-create the file using the G&L DeviceNet TM Configurator.
The specified line in your UCT has an invalid slot number associated with it. The most likely cause of
this error is incorrect manual editing of the UCT file. Make sure the Slot number is within the valid
range of 3 through 13.
software upper limit * FU = N (where N must be within range of -536870912 to 536870911 FU)
LU
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
11021 SERVO: SOFTWARE LOWER LIMIT CALCULATION ERROR
Overflow calculating the Software Lower Limit. Check your inputs for Axis #__.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU) and the
software lower limit. The software uses the formula shown to convert this information into feedback
units and checks that the result is within the acceptable range.
software lower limit * FU = N (where N must be within range of -536870912 to 536870911 FU)
LU
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
plus integral error limit * FU = N (where N must be within range of 0 to 536870911 FU)
LU
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
minus integral error limit * FU = N (where N must be within range of -536870912 to 0 FU)
LU
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
11027 SERVO: VELOCITY LIMIT CALCULATION ERROR
Overflow calculating Velocity Limit. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, and the velocity limit (entered in LU/min). The software uses the formula shown to con-
vert this information into feedback units per iteration and checks that the result is within the accept-
able range.
velocity limit * FU * 8 * update rate = N (where N must be within range of 0 to 32767 FU/iteration)
LU
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
11028 SERVO: INTEGRAL GAIN CALCULATION ERROR
Overflow calculating Integral Gain. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, and the integral gain. The value entered in setup for integral gain represents the ladder
units per minute per ladder unit of following error (FE) times minutes. The software uses the formula
shown to convert this information into feedback units and checks that the result is within the accept-
able range.
integral gain value * 3253 * update rate = N (where N must be within range of 0 to 32767)
FU/min-volt
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. A typical value for integral gain entered in setup is zero. If required, up to 32,000
LU/min/LUFE * min. can be entered.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
proportional gain value * 762601 = N (where N must be within range of 0 to 32767 FU)
FU/min-volt
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. Typical values for proportional gain entered in setup are from 1,000 to 5,000 LU/
min/LUFE.
11030 SERVO: DERIVATIVE GAIN CALCULATION ERROR
Overflow calculating Derivative Gain. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, and the derivative gain. The value entered in setup for derivative gain represents the
ladder units per minute for each ladder unit of following error per minute. The software uses the for-
mula shown to convert this information into feedback units and checks that the result is within the
acceptable range.
derivative gain value * 178734 = N (where N must be within range of 0 to 32767 FU)
FU/min-volt * update rate
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. A typical value for derivative gain entered in setup is zero. If required, up to 500
AU/min/AUFE/min can be entered.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
11031 SERVO: FEED FORWARD CALCULATION ERROR
Overflow calculating Feed Forward Factor. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, and the feed forward percent. The software uses the formula shown to convert this
information into feedback units and checks that the result is within the acceptable range.
cstop ramp * FU * update rate * update rate = N (where N must be within a range shown below)
LU * 937500
If Encoder, Resolver, or TTL, then N must be within the range of 1 to 67108864.0 FU.
If Analog Output or Stepper, then N must be within the range of 1 to 262144.0 FU.
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. Typical values entered in setup are 10,000 to 10,000,000 LU/min/sec, not to
exceed 1023 FU/update/update.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
11033 SERVO: ACCEL RAMP CALCULATION ERROR
Overflow calculating Acceleration Ramp. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, and the acceleration ramp in ladder units/minute/second. The software uses the for-
mula shown to convert this information into feedback units and checks that the result is within the
acceptable range.
acceleration ramp * FU * update rate * update rate = N (where N must be within a range shown
LU * 937500 below)
If Encoder, Resolver, or TTL, then N must be within the range of 1 to 67108864.0 FU.
If Analog Output or Stepper, then N must be within the range of 1 to 262144.0 FU.
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. Typical values entered in setup are 10,000 to 10,000,000 LU/min/sec not to
exceed 1023 FU/update/update.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
deceleration ramp * FU * update rate * update rate = N (where N must be within a range shown
LU * 937500 below)
If Encoder, Resolver, or TTL, then N must be within the range of 1 to 67108864.0 FU.
If Analog Output or Stepper, then N must be within the range of 1 to 262144.0 FU.
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. Typical values entered in setup are 10,000 to 10,000,000 LU/min/sec, not to
exceed 1023 FU/update/update.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
11035 SERVO: BUILDER FEED OVERRIDE
This is an internal error. Please make a note of the error number and consult factory.
11036 SERVO: SLOW FILTER CALCULATION ERROR
Overflow calculating Slow Velocity Filter. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU) and ladder units (LU), the
update rate, the slow filter, and the slow velocity filter in milliseconds. When the slow filter is non-
zero, the software uses the formula shown to convert this information into feedback units and
checks that the result is within the acceptable range.
65535 * (1 - e(-Y)) = N (where N must be within range of 0 to 65535)
and where:
-Y = -(update rate/slow filter)
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
velocity threshold * FU * update rate = N (where N must be within range of 1 to 65535 FU)
LU * 60000
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range. Typical value entered in setup is zero, not to exceed 4095.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
11039 SERVO: FILTER LAG CALCULATION ERROR
Overflow calculating Velocity Filter Lag Error. Check your inputs for Axis # __.
In servo setup you have entered scaling data for feedback units (FU), and ladder units (LU), the
update rate, the velocity threshold, and the fast velocity filter in milliseconds. When the fast filter is
non-zero, the software uses the formula shown to convert this information into feedback units and
checks that the result is within the acceptable range.
(V * FU * update rate)/(LU * 65535 * (1-e(-Y))) = N (where N must be within range of 0 to 65535)
and where:
V = velocity threshold
-Y = -(update rate/slow filter)
Tip
Adjust the axis data information so that the result of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry,
use the number of milliseconds for an update rate value, i.e. for a 2 ms update rate, use “2”.
In Servo Setup you have entered scaling data for feedback units (FU), ladder units (LU) and Ladder
Units to Axis Units (LU2AU), the update rate, and the Constant Jerk for Move Accel/Decel in ladder
units/minute/second/second. The software uses the formula shown to convert this information into
feedback units and checks that the result is within the acceptable range.
Constant Jerk * FU * update rate * update rate * update rate * LU2AU = N (where N >0
LU * 60000 * 1000 * 1000 and < 67108863.0)
Tip
Adjust the axis data information so that the results of the conversion calculation will fall within the
acceptable range.
In Servo Setup you have entered scaling data for feedback units (FU) ladder units (LU) and Ladder
Units to Axis Units (LU2AU), the update rate, and the Max Acceleration for Move Accel/Decel in ladder
units/minute/second. The software uses the formula shown to convert this information into feedback
units and checks that the result is within the acceptable range.
Tip
Adjust the axis data information so that the results of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry, use
the number of milliseconds for an update rate value (e.g. for a 2 ms update rate, use 2).
In Servo Setup you have entered scaling data for feedback units (FU), ladder units (LU) and Ladder
Units to Axis Units (LU2AU), the update rate, and the Constant Jerk for Controlled Stop Decel in ladder
units/minute/second/second. The software uses the formula shown to convert this information into
feedback units and checks that the result is within the acceptable range.
Constant Jerk * FU * update rate * update rate * update rate * LU2AU = N (where N >0
LU * 60000 * 1000 * 1000 and < 67108863.0)
Tip
Adjust the axis data information so that the results of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry, use
the number of milliseconds for an update rate value (e.g. for a 2 ms update rate, use 2).
In Servo Setup you have entered scaling data for feedback units (FU) ladder units (LU) and Ladder
Units to Axis Units (LU2AU), the update rate, and the Max Acceleration for Controlled Stop Decel in
ladder units/minute/second. The software uses the formula shown to convert this information into feed-
back units and checks that the result is within the acceptable range.
Adjust the axis data information so that the results of the conversion calculation will fall within the
acceptable range.
Note: When using a formula in any of the Servo error calculations calling for an update rate entry, use
the number of milliseconds for an update rate value (e.g. for a 2 ms update rate, use 2).
Good mark detected 00000000 0000(1)000 0008 Master axis beyond E 8800
start point (34816)
Bad mark detected 00000000 000(1)0000 0010
DIST + TOLR 00000000 00(1)00000 0020 Slave axis beyond start E 8400
point (33792)
exceeded
Fast input rising 00000000 0(1)000000 0040 Master distance not E 8200
valid (33280)
64 Resume distance S
The errors listed below can appear at the SERR output of certain SERCOS functions/func-
tion blocks.
SERR # Description SERR # Description
4097 This IDN does not exist. 20482 The minimum value transmission is too short.
4105 The data for this IDN may not be accessed. 20483 The minimum value transmission is too long.
8193 The name does not exist. 20484 The minimum value may not be changed.
8194 The name transmission is too short. 20485 The minimum value is write-protected.
8195 The name transmission is too long. 24577 The maximum value does not exist.
8196 The name may not be changed. 24578 The maximum value transmission is too
short.
8197 The name is write-protected. 24579 The maximum value transmission is too long.
12290 The attribute transmission is too short. 24580 The maximum value may not be changed.
12291 The attribute transmission is too long. 24581 The maximum value is write-protected.
12292 The attribute is write-protected at this time. 28674 The data is too short.
16385 The units do not exist. 28675 The data is too long.
16386 The units transmission is too short. 28676 The data may not be changed.
16387 The units transmission is too long. 28677 The data is write-protected at this time.
16388 The units may not be changed. 28678 The data is smaller than the minimum value.
16389 The units are write-protected at this time. 28679 The data is larger than the maximum value.
20481 The minimum value does not exist. 28680 The bit pattern for this IDN is invalid.
Data Capture
Axis variables that can be captured on a servo interrupt basis with the CAPTINIT
function.
VAR Description Type VAR Description Type
1 Actual position DINT 9 Prefilter commanded DINT
2 Fast input BYTE 10 Prefilter command change INT
3 Commanded position DINT 11 Remaining master offset DINT
4 Position error DINT 12 Remaining slave offset DINT
5 Slow velocity filter error INT 13 Command change DINT
6 Command change INT 14 Position change DINT
7 Position change INT 15 Prefilter command change DINT
8 Feedback position DINT
Error numbers and descriptions for CAPTINIT function ERR output are:
0 No error
1 The CAPTSTAT function has not stopped capturing data from a previous data capture
initialization.
2 An axis number in the structure is invalid.
3 The limit of eight variables in the array of structures has been exceeded.
4 Parameter number in the structure is out of range.
5 The CAPINIT function was called before the STRTSERV function was called.
No error 0
Module not found at rack and slot location or not enough channels on module 3
122 No math coprocessor Attempted to perform floating point operation with no math coprocessor
installed on the CPU.
123 Scan too long A ladder scan loss has occurred because the CPU takes more than 200 ms to
scan the application program.
Whenever the scan light is out, the discrete outputs go to the OFF state and
the analog outputs are zeroed.
125 Insufficient memory There is insufficient memory on the CPU to run the current program.
126 No hardware bit memory There is no bit memory installed on the CPU and the program requires it.
127 No software bit memory There is no bit memory capability via software and the program requires it.
222 Driver error No driver support on the CPU for the I/O module. Update your system
EPROMs.
22_ Master rack error The I/O modules in the master rack do not match what was declared in the
hardware master declaration table. The number of flashes in the third digit
identifies the slot number that is in error.
231* No daughter board There is no communications daughter board installed on the CPU when
attempting to do expansion I/O communications.
233* Number of racks error The number of expansion racks in the system does not match the number of
expansion racks declared in the expansion hardware declaration table.
24_ Master rack error The I/O modules in the MMC for PC master rack do not match what was
declared in the hardware master declaration table. The number in the third
digit identifies the slot number that is in error.
25_ ASIU Error The ASIU modules found do not match what was declared in the hardware
master declaration table. One or more ASIU modules may have the same
address switch setting. The number in the third digit indicates the ASIU
address.
3_ _* Expansion rack error The I/O modules in the expansion rack(s) or the block I/O modules do not
match what was declared in the expansion hardware declaration table.
For rack expansion:
The number of flashes in the second digit indicates the remote rack
(1 through 8). The number of flashes in the third digit indicates the slot num-
ber.
For block I/O modules:
The number of flashes in the second and third digits indicates the block I/O
module (01 through 77). The second digit will flash a 1 - 7, 10 for 0. The third
digit will flash a 1 - 9, 10 for 0. For example, if the second digit flashes 3
times and the third digit flashes 10 times, the module is 30.
260 ASIU Data Overrun Error The specified nmber of axes at the specified update rate exceeds the through-
put capacity of CPU to ASIU communications.
* Errors connected with I/O expansion. Refer to the I/O Driver Module write-up in the PiC900 Hardware
Manual for more information.
Dec Hex Char Dec Hex Char Dec Hex Char Dec Hex Char
00 0x00 NUL 32 0x20 SPC 64 0x40 @ 96 0x60 `
01 0x01 33 0x21 ! 65 0x41 A 97 0x61 a
The time axis feature allows a servo axis to be slaved to time instead of a physical
master position transducer. All the master/slave functions can be used with a time
axis.
If time axes are going to be used they must be defined in Servo Setup. There are
four axis numbers reserved for a time-based master; 25, 26, 27, and 28. This is the
number used to identify the master time axis on the input to a master/slave func-
tion i.e. RATIO_GR.
The S_CURVE or ACC_DEC functions or the command velocity variable 6 can be
used to move a time axis. The time axis can be manipulated with variables 1, 12,
and 26. Use the WRITE_SV and READ_SV functions to work with these vari-
ables.
Referencing a Time Axis
Actual Position (Variable 1)
The actual position variable allows you to read the position of the time axis or
change the current position by writing a value with the WRITE_SV function.
Range: +2,147,483,647 to -2,147,836,648 counts.
Controlling Time Axis Velocity
You can use either the S-CURVE or ACC_DEC functions or the command veloc-
ity variable 6 to move a time axis.
S_CURVE and ACC_DEC Functions
When using the S_CURVE or ACC_DEC functions with a time axis, you can use
the distance, position, or velocity moves to move the axis. The S_CURVE or
ACC_DEC functions must be called first when using these moves. See the
S_CURVE and ACC_DEC descriptions in the Function/Function Block Reference
Guide.
Command Velocity (Variable 6)
If you are not using the S_CURVE or ACC_DEC functions, the command velocity
variable can be used to define how fast the time axis will travel. It is programmed
in counts per second. When the WRITE_SV function is called with variable 6, the
time axis will step to the programmed velocity.
For example, if a value of 1000 is programmed as the number of counts per second
for the velocity, then the time axis would move one count in one millisecond. If the
master distance (MDST) was set at 1000 and the slave distance (SDST) was set at
2000 in the RATIO_GR function, it would take the slave axis one second to move
2000 units.
511
By entering a zero, the time axis is stopped. This provides the ability to synchro-
nize multiple slave axes. You call all the moves you want to synchronize and then
write a non-zero value to variable 6. All the axes will begin motion at the same
time.
Note: In order for all slave axes to start at the same time, the master start position
of any master/slave move with a MSTR input would have to have the same value
(or zero) at its MSTR input. If the option to ignore master start is selected, the
slave axes will start when the master axis begins to move.
An alternative method for synchronizing slave starts is to use variable 26.
Range:+/-2,000,000 counts/sec.
Rollover on Position with a Time Axis
The rollover on position variable allows you to select where the time axis will reset
to zero. The variable is entered in ladder units.
Note: Without rollover on position, when 2,147,483,647 is reached, the next
number will be -2,147,483,648. The count continues to zero and back
up to 2,147,483,647, etc.
Range: 1 to 536,870,912 counts (Entering a zero turns rollover on position off.)
Synchronizing Slave Axes with a Time Axis
The synchronized slave start variable allows you to tell the time axis which of its
slave axes must be queued up before any of them begin their move. Each slave axis
you want to synchronize is identified by setting a bit in a DINT using the lower 16
bits where the LSB = axis 1 and the MSB = axis 16. When the last set axis has
been queued, all the slave axes will begin their move on the next interrupt.
The WRITE_SV function with variable 26 must be called before the move. It can
be called again when you want to identify a different set of synchronized slave
axes. Change the bits only after the slave axes identified in the first WRITE_SV
function have started to move.
Writing a zero to variable 26 clears all identified axes. The READ_SV function
can be used to read the number of slave axes being synchronized.
512
APPENDIX H - Stepper Axis Module Notes
Introduction - Stepper Axis Module
All other READ_SV and WRITE_SV variables can be used with a stepper.
Note: Feedback units are stepper units. Ladder units may still be used.
TUNEREAD/TUNEWRIT Functions
The filter variable is the only one that can be read and written by these functions
when using a stepper axis. The remaining TUNEREAD/TUNEWRIT variables
cannot be used with a stepper axis.
STRTSERV Function
Call STRTSERV to initialize the stepper axis and begin the stepper motion.
ERRORS
There is no loss of feedback or excess error. If an E-stop error occurs, the com-
mand to the stepper will be zeroed.
New Document
Open Document
Save Document
Cut
Copy
Paste
Print
About
Help
Options
Stop the Scan
Run One Scan
Hot Restart (Red Arrow)
Warm Restart (Yellow Arrow)
Cold Restart (Blue Arrow)
Backup User Program
Restore User Program
Reset Power
Control Status
Drive Maintenance
New Document
Open Document
Save Document
Cut
Copy
Paste
Undo
Redo
Print
About
Help
Options
Display Drive Data
Rename Drive
Drive Maintenance
Download to Drive
Reset Faults
Reset Peaks
Cold Restart
Control Panel
New Document
Open Document
Save Document
Cut
Copy
Paste
Undo
Redo
Print
About
Help
Options
Restore Factory Defaults
Choose Default Motor Values
New Document
Open Document
Save Document
Cut
Copy
Paste
Print
About
Help
Options
Toggle Animation
Toggle Forcing
Group Enable
Update Force Values
Abort last patch
Pointer
Normally Open Contact
Normally Closed Contact
Normally Open Positive Transition Contact
Normally Closed Positive Transition Contact
Normally Open Negative Transition Contact
Normally Closed Negative Transition Contact
Energized Coil
De-energized Coil
Set Coil
Reset Coil
Horizontal Wire
Vertical Wire
Combination Wire
Point to Point Wire
Jump to Label
Jump to Subroutine
Return from Jump
Compiler Toolbar
IF-THEN
IF-THEN-ELSE
ELSEIF-THEN-ELSE
CASE
FOR-DO
WHILE-DO
REPEAT-UNTIL
Insert Variable
Check ST Syntax
ADV Drive parameters from an analog interface Save from MMC Smart
Analog Interfaced Digi- digital drive and associated motor param- Drive Setup
tal Drive System File eters.
FRC List of variables that can be forced and Save, if forced variables
Forcing their values are designated
SCP Contains the control panel and oscillo- Save Scope Template
Scope Template scope settings
SRV Setup data for all servo axes used in appli- Save
Servo setup cation
UCT Used by PiCPro when downloading your Save from the G&L
Universal Communica- ladder DeviceNet Configuration
tion Text Tool
The WiseUpdate installation update program allows you to locate PiCPro Service Packs
at a specified Sheffield Automation Internet website location. This program is automati-
cally installed when PiCPro is installed.
Note: Connection to the Internet is required to use this program.
This update program can be used on either a case by case manual basis or be set to work
automatically.
• From within PiCPro, using Help | Check for Updates. If the updated pro-
gram is started from the PiCPro Help menu, it can be run at the same time
as PiCPro.
527
• Or after PiCPro installation is complete by using a check box.
Check the box for Yes, I want to check the Internet for updates and
Click Finish.
Note: If the update program is downloaded, it will not be installed
until PiCPro is closed.
528
The update program can now be downloaded as follows:
1. The following window will be displayed:
Clicking on the Advance button will bring up a dialog that allows you to
change the Internet access server and the time period between update
checks.
2. Make the desired changes in the Advanced Settings dialog and click
OK.
529
3. Click Next and the update program will check for any PiCPro updates.
If you already have the latest PiCPro Service Pack, a message box will
be displayed stating the following:
You are currently running the latest version of PiCPro V14.0 "Edi-
tion" Please check for updates again in the future. Click OK.
Your are now ready to download the update to PiCPro Vxx.xx Edi-
tion.
Press the Next button to begin the download. After the update is
downloaded you will be prompted to run the installation to update
your software to the newest version.
The update for PiCPro Vxx.xx Edition has been successfully down-
loaded.
When run in automatic mode, the update program is added to the start of PiCPro
and is executed every time PiCPro is started.
530
The update program is set up for automatic mode by doing the following:
1. From the PiCPro menu, choose View | Options.
531
532
APPENDIX M - Virtual Axis
Virtual Axis
A virtual axis is a servo axis with no feedback hardware and no command output hardware.
It can perform all the same functions as a normal servo axis: motion functions, master/
slave functions, registration, referencing, etc. A virtual axis is created by specifying “Vir-
tual” for the Output Type and Input Type of a servo axis in Servo Setup.
The control uses the virtual axis’ command position to generate a simulated feedback posi-
tion. If the rollover position = 0, when a feedback value of 2,147,483,647 is reached, the
next value will be -2,147,483,648. The count continues to zero and back up to
2,147,483,647, etc.
When using REGIST, FAST_REF, MEASURE, or FAST_QUE with a virtual axis, the lad-
der can simulate the fast input by calling the VFASTIN function.
Note: When all of the axes in an MMC for PC Analog control are declared as virtual axes,
it is required that at least one ASIU is connected to the control.
533
534
APPENDIX N- Firmware
Firmware
To determine whether you need to update firmware, select Online | Status from
the menu. Check the date you see here with the date of *.hex files in the Firm-
ware folder. Typically, you should be using the most current versions.
Here are the firmware (*.hex) files available:
Firmware Files Description
Where ## or #### are the versions numbers. See readme.txt for the versions com-
patible with this PiCPro software.
Memory Configuration Files are provided for configurable memory in PiC94x or
MMC for PC processors.
Appendix O - Things to Consider When Converting an Application from One CPU Type to Another 537
538 Appendix O - Things to Consider When Converting an Application from One CPU Type to Another
Application Note 1
Reading and Writing STRINGs from a Structure
The following applies only to Reading and Writing STRINGs that are members of
a Structure using just the structure name as the Memory Area (BUFR) input to
the READ and WRITE function blocks in PiCPro.
Any variable of type 'STRING' has an actual size that is 2 more than its 'Declared'
length. These two bytes are in the beginning of the STRING and are normally hid-
den from the user. The first byte contains the maximum or 'Declared' length of the
STRING, and the second byte contains the actual length of the STRING.
This means that the structure size will be increased by two bytes for every
STRING element in the structure.
Examples:
1. MY_STRUC STRUCT
.ONE DINT
.NAME STRING[10]
.TWO DINT
END_STRUCT
Example 1 has a size of 20 bytes (4 bytes for .ONE, 12 bytes for the .NAME ele-
ment and 4 bytes for .TWO).
2. MY_STR2 STRUCT
.NAMES STRING[10](0..3)
END_STRUCT
Example 2 has a size of 48 bytes (12 bytes for each STRING of 10, and it is an
array of 4 STRINGs).
So if you Write a structure that contains a 'STRING' type member, it is important
to write out the complete structure (i.e. if you write out MY_STR2 make sure you
write out 48 bytes and not 40 bytes).
Similarly if you Read into a structure that contains a STRING type member, it is
important to read in the complete structure (i.e. if you read in MY_STR2 make
sure you read in 48 bytes and not 40 bytes).
This does not apply if you Read from/Write to a STRING type variable itself. In
the example above, it would not apply if you read from/write to
MY_STRUC.NAME or MY_STR2.NAMES(3). In this case, PiCPro automati-
cally updates the two hidden length bytes as the STRING is read in.
To read all four STRINGs into the structure completely, you would use,
Note that this also means that the device you are reading the STRINGs from in this
manner MUST store them in the following format:
1 BYTE 'Declared' Length in PiCPro (In this example 10)
1 BYTE Actual Length of the STRING (actual number of characters in this
STRING)
(The actual length must be less than or equal to the declared length)
BYTES of the STRING itself. (In this example 10 Bytes. Even if the actual number
of characters in the STRING is less than the Declared Length, the STRING must
be padded up to the declared length. You can use any character you choose to pad
the STRING.)
543
hardware declarations 98 dragging and dropping 77
SERCOS data 350 drive list-standard toolbar 517
software declarations 130 duplicate 84
SRS structure 358 E
copying and deleting 73
creating editing
a New Project 40 axis data 296
new files 51 axis properties 296
SERCOS setup file 339 function block help 21
servo setup file 211, 281 hardware declarations 97
servo setup function 320 IDNs 345
Task 388 IDNs for send 365
UDFB 377 servo setup 296
C-stop error codes 421, 422 software declarations 129
customer service 2 startup IDN list 344
customizing PiCPro 11 UDFB 380
cutting an item 74 encoder input setup 288
cyclic data structures 348 entering
cyclic operation 332 forcing variables 183
iterator data 301, 305, 311
D iterator data for time axis 307, 310
D/A output setup 288 network 70
data handling in UDFBs 380 position loop data 307
data type scaling data 298
arrays 116 entering software declarations 102
numeric 114 error codes 415
structures 116 C-stop error codes 421, 422
time 115 diagnostic 507
data types E-stop error codes 422
inputs/outputs 409 function codes 415
define cyclic data 346 LED codes 507
define operation mode 349 programming error codes 424
Delete 73 servo timing error function 426
dependency list 198 stepper 514
errors 433 error messages
derivative gain 308 compile ladder 430
determining scaling information 300 dependency list 433
device status (Profibus) 408 hardware 433
device status code 401 library 433
device status word 400 servo 485
DeviceNet configuration software 397 E-stop error codes 422
procedure 398 execute procedure command 366
diagnostic error codes 507 exiting 86
dialog boxes 10 expansion rack I/O
displaying/hiding toolbars 16 numbering 109, 477
Download a hex file 202 export comments 199
544
extended data memory 179 H
working with 180 hardware connections 4
external attribute 129 hardware declarations 88
F closing 101
copying 98
fast inputs 112
cutting 98
faults, diagnostic 507
editing 97
feed forward percent 308
pasting 99
files
printing 100, 196
created types 525
saving 101
extensions 525
hardware error messages 433
organizing 17
help 19
filter search 83
creating Function Block Help 21
find
editing Function Block help 21
IDNs 372
Function Block 20
finding and replacing 80
Whats This 19
finding duplicates 84
help files 10
focus 68
Hex file 175
following error limit 308
forcing I
entering variables 183 I/O point 105
variables 182 I/O Points, numbering 108
forcing/grouping 185 IDNs 329
Function Block Help 20, 21 insert for receive continuous 363
edit 21 insert for send 365
function/function blocks 145 insert startup 345
data 145 parameter data 330
functions PCF 330
error codes 415 print 372
inputs receive 361
data types 409 receive continuous 363
outputs search 372
data types 409 send 364
SERCOS 326 import comments 199
SERCOS setup 353 information window 6
servo setup 320 infrared communication drivers 4
with Stepper Axis Module 513 initial values 112
functions toolbar 522 prefixes 112
G initialize
servo setup data 321
G&L scanner symbol 400
in-position band 309
G&L TCP/IP configuration software
input polarity 308
procedure 402
input scaling 298
global and retentive attribute 129
insert new network toolbar 524
grouping 185
inserting
IDNs 345
545
IDNs for send 365 jump command 146
networks 70 label 138
software declarations 130 wires 143
installation numeric 114
program directory 17 O
integral error limit 308
integral gain 308 off-line editing (UDFB) 380
interlocking Task data 392 on-line editing 191
introduction to PiCPro 1 on-line editing (UDFB) 381
iterator data 301, 305, 311 online Help system
iterator data for time axis 307, 310 printing 20
opening
J a Project 43
jump command 146 an existing ladder 53
SERCOS setup file 339
L
servo setup file 282
label 138 operation mode
ladder toolbar 521 defining 349
LED error codes 507 operator interface 179
libraries 17 options
library setting 11
error messages 433 options for IDN display 370
long names 103 organizing your PiCPro files 17
M output
polarity 308
master rack I/O scaling 298
numbering 477 Overview
MDT - Master Data Telegram 329 Using Projects 23
memory configurations 19
memory, extended data 179 P
menu bar 9 parameter data IDNs 330
MMC for PC pasting an item 75
SERCOS 326 patching the ladder 191
MST - Master Synchronization Telegram 329 PCF
N IDNs 330
phases
naming SERCOS 331
Task 389 PiC
UDFB 378 and SERCOS 326
variables 103 restore 19
NEMA SERCOS Specification 325 PiCPro
network closing files 86
coil 142 copy command 73
comments 139 creating files 51
contacts 141 customizing 11
elements 141 define 1
function/function blocks 145
546
deleting command 73 procedure 406
entering networks 70 program directory 17
exiting 86 programming error codes 424
filtering search 83 Project 43
finding and replacing 80 copy 48
finding duplicates 84 include sources 27
getting started 1 launch 47
libraries 17 new 40, 41
opening a file 53 open 43, 44
organizing files 17 open compressed 44
printing 19 open from control 44
programs 1 print 48
reference card 501 save as 48
saving 85 uncompress 44, 45
scanning 189 version mismatch 47
searching in 82 project
selecting items 68 paths 49
splitting the screen 86 Projects 23
starting 22 projects
tools 67 commands 23
work area 5 managing 23
working in 51 proportional gain 308
pointer tool 67 purging unused variables 136
position loop data 307 R
printing 19
comments 195 racks
cross reference 195 numbering 109
force list 196 receive continuous IDNs
hardware declarations 196 SERCOS
IDNs 372 IDNs
information window 196 receive continuous 362
ladder 193 receive IDNs 361
long names 195 recommended workstation 3
online Help system 20 reference card
projects 48 PiCPro 501
SERCOS 353 referencing a time axis 511
servo setup axis information 319 requirements 3
view list 196 resolver input setup 290
procedure restore 173, 206
DeviceNet configuration software 398 restore PiC 19
G&L TCP/IP configuration software 402 retentive attribute 128
Profibus configuration software 406 ring errors 367
procedure command 366 ring state 367
Procedure Command Function 330 rollover on position with a time axis 512
Profibus configuration software 405 running one scan 190
547
S receive 361
receive continuous 363
saving
send 364
files 85
startup list 344, 345
hardware declarations 101
upload drive file 362
prior version PiCPro 319
IDNs, changing data 356
SERCOS setup file 352
IDNs, uploading 356
servo setup 319
initialize setup data in your ladder 354
scaling information 300
inserting rings 341
scanner symbol 400
inserting slaves 342
scanning 189
MDT 329
cold restart 190
MST 329
hot restart 190
numbering slaves 342
stopping 189
operation mode
warm restart 190
application note 350
search IDNs 372
options for IDN display 370
searching 82
phases 331
software declarations 134
printing 353
selected cells 69
receive continuous IDNs 362
selecting items 68
receive IDNs 361
semaphore flags 392
referencing axes 338
SERCOS
replacing analog system 336
advanced features 337
ring errors 367
and MMC for PC 326
ring state 367
and PiC 326
rings,inserting 341
and standalone MMC 326
saving setup file 352
AT 329
send IDNs 364
axis positioning 338
service channel 332
battery box 359
accessing 333
changing IDN data and uploading IDNs
background information 333
356
servo axis 292
copying between SRC files 350
setup 325, 339
copying data 350
setup function 353
creating setup file 339
slave status/control
cyclic data structures 348
slave status/control 369
cyclic operation 332
slaves,inserting 342
define cyclic data 346
specifying the SRS 373
define operation modes 349
SRS structure
execute procedure command 366
copy to clipboard 358
functions 326
standard Motion Functions and Variables
IDNs 329
327
display options 370
startup IDN List 344
find 372
telegrams 329
insert for send 365
troubleshooting 374
parameter data 330
upload drive information 362
PCF 330
using Functions/Blocks with TASKS 328
printing 372
548
variable length data 373 SERCOS setup 292
SERCOS standard toolbar 516 TTL input 291
service channel 332 update rate 309
accessing 333 servo standard toolbar 516
background information 333 setting user preferences 11
servo settings command 178
calculate defaults 299 size of UDFB Libraries 379
error messages 485 slave gapping 342
timing error function 426 software declarations 102
servo setup 281 attributes 128
analog input 290 copying 130
analog output offset 308 cutting 130
auto fill axes 295 editing 129
creating entering 102
file 211, 281 fast inputs 112
function 320 I/O point 105
D/A output 288 initial values 112
data categories 297 long names 103
derivative gain 308 pasting 130
editing 296 purging unused variables 136
encoder input 288 searching 134
entering specification
iterator data 301, 305, 311 NEMA SERCOS 325
iterator data for time axis 307, 310 split screen 86
entering scaling data 298 SRS structure
feed forward percent 308 copying 358
following error limit 308 standalone MMC
initializing 321 SERCOS 326
in-position band 309 starting PiCPro 22
input polarity 308 startup IDN list 344
input scaling 298 status
integral error limit 308 blown fuse 111, 478
integral gain 308 status bar 8
iterator data 297 displaying/hiding 9
open existing file 282 stepper
output polarity 308 axis module 23, 513
output scaling 298 error handling 514
overview 209, 269, 281 reference card 505
position loop data 297, 307 using functions with 513
printing 319 stopping the scan 189
proportional gain 308 STRING
resolver setup 290 read/write from STRUCT 539
saving 319 structured text constructs toolbar 523
scaling data 297 structures 116
scaling information 300 support services 2
549
T comparing to Task 384
compiling 177, 380
Task 377
creating 377
comparing to UDFB 384
data handling 380
compiling 176
edit 380
creating 388
inputs and outputs
hardware declarations 387
marking 383
interlocking data 392
number of 383
naming 389
order of 382
semaphore flags 392
library size 379
software declarations 387
naming 378
template 385
software declarations 382
types 384
view 381
using Functions 386
parent ladder 381
technical support 2
Uncompressing a Project 44
telegrams
update rate 309
SERCOS 329
upload drive information 362
time 115
user preferences 11
time axis 511
User Programs
rollover on position 512
backup 206
setup data categories 305
restore 206
synchronizing slave axes with 512
using a time axis 511
timeouts 200
using projects 23
title bar 9
toolbar 515 V
advanced operations 520 variable in/out attribute 129
basic online operations 520 variable length data
compiler 522 viewing 373
customizing 15 variables 103, 113, 139
displaying/hiding 16 forcing 182
docking 16 names and long names 103
drive list-standard 517 view navigator toolbar 522
functions 522 viewing
insert new network 524 enabled variables 187
ladder 521 parent ladder 381
moving 16 UDFB 381
SERCOS 516
SERCOS standard 516 W
servo standard 516 web site 2
structured text constructs 523 Window elements 9
view navigator 522 wires 143
troubleshooting work area
SERCOS 374 PiCPro 5
TTL input setup 291 working with extended memory 180
U working with split screen 86
workstation 3
UDFB 377
550
Z
zooming 67
551
552