PiCPro for Windows Applications Version 12.0-SP1.1

TABLE OF CONTENTS

DISCLAIMER:

All programs in this release (application examples, application specific function blocks (ASFBs), etc.) are provided "AS IS, WHERE IS", WITHOUT ANY WARRANTIES, EXPRESS OR IMPLIED. There may be technical or editorial omissions in the programs and their specifications. These programs are provided solely for user application development and user assumes all responsibility for their use. Programs and their content are subject to change without notice.

TECHNICAL SUPPORT

For technical support call Giddings & Lewis at 1 800 558 4808 or 1 920 921 7100 and press 4 to speak to an engineer or send an e-mail to tech.support@ac.giddings.com.

CHANGES IN VERSION 12.0-SP1.1

Two new Application Specific Function Blocks have been added to support up to 32 SERCOS slaves on a ring for the MMC for PC control.

More information about these two new function blocks can be found in the PiCPro for Windows Function/Function Block Help included with PiCPro for Windows V12.0-SP1.

NOTE: These functions cannot be used without PiCPro for Windows V12.0-SP1.

CHANGES IN VERSION 12.0.1

The following changes were made in PiCPro for Windows Applications CD version 12.0.1.
  1. The OPC Server ASFBs have been added. They had been distributed with the PC-resident OPC Server software. Their document, in .pdf format, is part of the standard PiCPro function block guide in appendix B.
  2. The OPC_ENET ASFB had a minor fix: if the wrong slot number was provided, it did not indicate that error.
  3. The ASFB G_READFL had a minor fix: if an error occurs during a read, now the RAMDISK file will be closed.
  4. The ASFB M_DATCPT had a minor fix: the SDNE output would be set too soon on the second and subsequent sends to RAMDISK.
  5. The ASFB M_DSMCOM had a minor fix: the trailing comma "," was deleted from the serial port configuration string.
  6. The MMC4_SOI example ladder had an enhancement: the SCR_ERR function was added to provide details about a SERCOS ring error.
  7. The motion ASFBs involved with the press transfer support were enhanced to support a profile without a dwell. This enhancement affected M_CNST_V, M_PRF1MV, M_PRF2MV, M_PROFL ladders as well as the simple ladder example M_PRF_EX.
  8. Two new standalone MMC example applications have been added to the Examples subdirectory. They include an example for a standalone MMC with the stepper block I/O module (MMC_STEP including projects, ladder and a single UDFB) and an example for a standalone MMC with a Centurion DeviceNet MicroDSM Drive (MMC_DND including projects, ladder, ASFBs, and the DeviceNet scanner configuration data).
  9. A simple example application of the IO_CFG function (that was introduced in PiCPro version 11.0) has been added to the Examples subdirectory. This example illustrates how to monitor the I/O status, how to configure the block I/O chain when a block is removed and how to configure the block I/O chain when all blocks are present. The name of the ladder is IOCFGEX.LDO.
  10. With the addition of the MMC DeviceNet example, three new ASFBs were added to the set of Motion ASFBs. They are M_DNJOGC (jogging Centurion DeviceNet axis), M_DNPOSC (positioning Centurion DeviceNet axis) and M_DNSTAT (getting DeviceNet module status). Their addition resulted in a new revision to the Motion ASFB Manual.pdf.
  11. With the introduction of the MMC for PC SERCOS version that supports up to 16 servo axes on a single ring, a new ASFB S_CLOS9 was added to the set of Motion ASFBs. This ASFB supports the error recovery and position loop closure for SERCOS axes 9 through 16. This new ASFB has also been added to the Motion manual.
  12. There are three new example applications for the MMC for PC.
    1. MPC4_EX. This is the MMC4_EX application converted to the Analog MMC for PC. Further details for this 4 axis example with no integrated operator interface are provided for MMC4_EX.
    2. MPC4_OI. This is the MMC4_OI application converted to the Analog MMC for PC. Further details for this 4 axis example with a Cimrex operator interface are provided for MMC4_OI.
    3. MPC4_SOI. This is the MMC4_SOI application converted to the SERCOS MMC for PC. Further details for this 4 axis example with a Cimrex operator interface are provided for MMC4_SOI.
  13. A Tools directory has been added containing ServoSetupAssistant.xls. The ServoSetupAssistant is an Excel spreadsheet tool that makes creating your servo setup information a little bit easier. You specify machine parameters such as time base and precision in the ServoSetupAssistant spreadsheet. Based on these parameters the servo setup information for an axis is automatically calculated and can be imported into PiCPro for Windows using the new Import button that is provided under the 'Axis Data' tab. To use this spreadsheet:
    1. Do a File Save As to save this spreadsheet as a different name to maintain the original. A different .XLS file should be made for each axis in your application.
    2. Two sheets are provided for each type of axis that is allowed: Closed loop servo, Digitizing, and Closed loop SERCOS. The first sheet is used to input data, the second sheet holds the servo setup data that will be imported into PiCPro. You may delete the sheets for axes that are not being used. Double click on the tab for a sheet to change the name of the sheet to match the description of the axis.
    3. Enter the data for the axis. The setup information is being automatically calculated on the next sheet as you enter. Enter only information with pull down boxes or data that appears in blue. When you are ready to save the information for an axis select the sheet called 'PiCPro 'X' Setup Data' (where X is Servo, Digitizing or SERCOS Servo). NOTE: Before you save the file in .CSV format, you must save the entire workbook by doing a File Save to keep your edits. If you do not do this, all formulas and changes will be lost when you save the file in .CSV format.
    4. From the File menu select Save As and save the sheet under a different name, with file type .CSV (comma delimited variable). Excel will prompt you through the save process. All other sheets in the workbook and all formulas will be deleted in the .CSV file.
    5. Close the files in Excel.
    6. Start PiCPro for Windows. Import the data from the .CSV file by selecting the Import button under axis data.

UPGRADE TO VERSION 12.0-SP1.1

If you are upgrading from a previous version of the Applications CD, you should do the following:
  1. If you have your files for the PiC/MMC/MMC for PC applications located in a subdirectory under the Applications Vx.0.x directory, you should move that subdirectory tree under the new Applications V12.0-SP1.1 directory.
  2. If you have your application files organized using project manager, change the PiCPro library path to the V12.0-SP1.1 directory path.
  3. If you based an application on one of the MMC examples provided with version V11.0.x, please be aware of the possibility of changes. Giddings & Lewis is always striving for accurate and helpful examples so it is possible that changes can be made to them. At the time of this document's creation, no changes to the V12.0.1 examples were identified. If any changes were made, they will be identified so that the customer can decide whether those changes apply to the actual application based on the example. There were several significant changes made between the V11.0.1 and V11.0.2 releases; those changes are described in the V11.0.2 readme file.

OPC_ENET.LIB AND OPINTER.LIB DUPLICATION

This distribution includes the OPC_ENET.LIB and the OPINTER.LIB and their ladder and help files. The OPC Server CD Version 2.0 and before, also includes these files (version 3.0 and later do not contain those files). If you have installed both software packages and PiCPro for Windows has been configured to use the libraries provided for both packages, PiCPro will notify you of the duplicate libraries any time it reads all the libraries in the configured directory paths (such as when PiCPro is started, each time a project is loaded, any time the PiCPro library path is changed, etc.).

In this situation, it is recommended that the directory path to the libraries provided by the OPC Server installation be removed from the PiCPro library list (both in the default list for PiCPro and the library list defined in each project). The OPC Server's copies of these files must be considered obsolete.

To resolve the duplication, run PiCPro from Windows and select the File | PiCPro Libraries... menu to remove the unnecessary reference to the OPC Server ASFB directory. For each project that uses the OPC Server ASFBs, select the PiCPro Library Paths for the project and select Modify from its right-click menu. Within the subsequent dialog, remove the OPC Server ASFB directory.

CONTENTS OF APPLICATIONS VERSION 12.0-SP1.1

This release contains the Motion ASFBs, General ASFBs, Ethernet ASFBs and Example Applications for the standalone MMC and the MMC for PC.

Version 12.0-SP1.1 manuals are not available. Hard copy of version 12.0.1 manuals are available.

If you would like to order a hard copy of any manual, call PiC Sales at 1 800 558 4808 from within the US or 920 921 7100 from outside the US and Canada.

Part Numbers for the hard copies are:

There were no changes to the General or Ethernet ASFB manuals between V11.0.2 and V12.0.1.

Section 4 of the MMC tutorial covers the applications examples.

The PiCPro for Windows Applications 12.0-SP1.1 can be used with either PiCPro for Windows V12.0-SP1 (or higher) Professional or Standalone MMC Editions. The Examples folder has example projects for each edition of PiCPro.

The default folders when installing Applications are:
C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\ASFB

C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\Examples

C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\Tools

Note: You should not put any other files or applications into these folders.

The ASFB folder contains the Motion, General and Ethernet ASFBs.

The Tools folder contains the ServoSetupAssistant spreadsheet.

The Examples folder contains 8 standalone MMC examples or starter ladders and several simple examples for the Motion, General and Ethernet ASFBs. There are also 3 MMC for PC examples or starter ladders included, although these cannot be downloaded using the Standalone MMC Edition.

The following is a description of how the examples are named.

MMCxxxxxStandalone MMC Application Example.
MPCxxxxxMMC for PC Application Example.
SRCxxxxxSERCOS Setup Example.
SRVxxxxxStandalone MMC Servo Setup Example.
SRVPxxxxMMC for PC Servo Setup Example.
ZSRCMMCSERCOS Setup Example Library.
ZSRVMMCServo Setup Example Library.
xxxxxx.CPACimrex Operator Interface Application Example.
xxxxxx.GLCG&L DeviceNet Scanner Configuration Example.
M_xxxxxxMotion ASFB Example.
G_xxxxxxGeneral ASFB Example.
E_xxxxxxEthernet ASFB Example.
U_xxxxxxMMC Application Example UDFB.

The following is a brief description of each standalone MMC example (or starter ladder).

MMC4_EX. This example can be used as a starting point for a 4 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example does not have any operator interface support. All of the machine functions are performed with discrete I/O.

MMC2_EX. This example can be used as a starting point for a 2 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example does not have any operator interface support. All of the machine functions are performed with discrete I/O.

MMC4_OI. This example can be used as a starting point for a 4 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example uses a Cimrex 30 as an operator interface. The Cimrex application is called MMC4_C30.

MMC2_OI. This example can be used as a starting point for a 2 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example uses a Cimrex 30 or Cimrex 20 as an operator interface. The Cimrex applications are called MMC2_C30 and MMC2_C20 (for the Cimrex 30 or Cimrex 20 units respectively).

MMC4_SOI. This example can be used as a starting point for a SERCOS application having an operator interface device. It contains the logic required to initialize the SERCOS configuration, initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example uses a Cimrex 30 as an operator interface. The Cimrex application is called MMC4_SC30.

MMC4_PT. This example shows how to apply the press transfer application specific function blocks. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. It also contains logic to configure and run the specified slave profile(s). This example uses a Cimrex 30 as an operator interface. The Cimrex application is called M4PT_C30.

MMC_STEP. This example shows how to apply the stepper block I/O module. It contains the logic required to initialize the stepper block and to control it. A single UDFB (U_STPRC) provides the control logic for a stepper axis. The features supported by the UDFB include home (zero reference), jog, move a distance, move to a position, control-stop, emergency-stop and c-stop/e-stop reset.

MMC_DND. This example shows how to apply the Centurion DeviceNet Positioning MicroDSM drive. It contains the logic required to initialize and run the DeviceNet network. Two UDFBs provides the control logic for a DeviceNet axis to jog, move a distance or move to a position. A third UDFB provides the DeviceNet scanner status details. This example ladder and DeviceNet configuration are both referenced in the MicroDSM with DeviceNet installation manual.

The following is a brief description of each MMC for PC example (or starter ladder).

MPC4_EX. This example can be used as a starting point for a 4 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example does not have any operator interface support. All of the machine functions are performed with discrete I/O. This example is almost identical to MMC4_EX.

MPC4_OI. This example can be used as a starting point for a 4 axis application. It contains the logic required to initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example uses a Cimrex C30 with an Ethernet module as an operator interface. The Cimrex application is called MPC4_C30. This example is almost identical to MMC4_OI.

MPC4_SOI. This example can be used as a starting point for a SERCOS application having an operator interface device. It contains the logic required to initialize the SERCOS configuration, initialize the servo axes, close the servo loops, jog an axis, and home an axis. It also contains basic E-Stop and C-Stop logic. This example uses a Cimrex C30 with an Ethernet module as an operator interface. The Cimrex application is called MPC4_SC30. This example is almost identical to MMC4_SOI.

Note: for both of the MMC for PC with Cimrex examples, there will usually be a configuration change required before either works. The Cimrex configuration file calls out the Ethernet connection to the MMC for PC. However, the correct TCP/IP address of the PC hosting the MMC for PC is unknown. The actual host address must be verified in the Cimrex configuration before it is downloaded to the Cimrex unit.

The ASFB folder contains the Motion, General and Ethernet ASFBs.

STARTING A NEW MMC APPLICATION FROM AN MMC EXAMPLE

The following is a description of how to start a new application from a standalone MMC example.

To use one of the examples as a starting point for your application follow the steps below. The following procedure will use the MMC4_EX Professional Edition Project as the starting point. The target application will be called NEW_APPL and the servo setup library will be ZNEWAPPL; other appropriate names can replace these used in this procedure. The same steps can be followed with the PiCPro Standalone MMC Edition.

  1. Start PiCPro for Windows V12.0-SP1 Professional Edition.
  2. File | Open, MMC4_EX Pro Edition.PRJ. This will open up the project.
  3. Once the project is open, do a File | Save As and fill in the following fields:
  4. Change the destination folders for Main LDO, Lib Path, UDFB Source, Servo Source, and Servo Lib's from:
    C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\Examples
    To
    C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\New_Appl
  5. Close the Save As Project by clicking OK.
  6. Expand the Main .LDO and double click on MMC4_EX.LDO. This will open the main ladder and do a File | Save As with the new file name NEW_APPL.ldo.
  7. In network 5 (the network with the STRTSERV function), right click on SRV4_EX and then View Servo Setup. Do a File | Save As to SRV4_NEW.
  8. Make any necessary changes to the servo setup and then do a Compile | Make Function. When prompted for the library name for the servo function, change the name to ZNEWAPPL.
  9. Close servo setup.
  10. Replace the SRV4_EX function with the new servo setup function you just created by clicking on Ladder |Functions | ZNEWAPPL | SRV4_NEW.
  11. Close the NEW_APPL ladder window and save the changes when prompted.
  12. Go to back to the project window and delete MMC4_EX from the MAIN .LDO and add NEW_APPL.ldo.
  13. Do a File | Update Project Tree to update the project.
  14. Close the project. When prompted to compress the application select No. You do not need to compress the project until you are ready to store it on the flash disk.
  15. Using Windows Explorer delete the MMC4_*.* files, the SRV4*.* files and ZSRVMMC.LIB file from the new project folder:
    C:\Program Files\Giddings & Lewis\Applications V12.0-SP1.1\New_Appl
Note that if the application is using SERCOS-controlled servos, the above procedure is followed starting with MMC4_SOI with additional steps to replace the example SERCOS setup file.

DESCRIPTIONS OF THE STANDALONE MMC EXAMPLES

The following is a description of the functionality provided with each standalone MMC example.

The purpose of each example is to provide a foundation for a customer's own application. As mentioned above, each provides all the basic features of most applications:

Typically, the ladder logic required for a specific application can be added to the end of an example.

Which example is the best starting point depends on the specific application: how many servo axes are required and will an operator interface device be used?

Basic Application Examples

The following is a description of the two examples that lack an operator interface. They are MMC2_EX for a 2 axis MMC and MMC4_EX for a 4 axis MMC.

The initial network with the STRTSERV function loads the servo setup configuration. Each example ladder includes a servo setup example (such as SRV2_EX for a 2 axis MMC or SRV4_EX for a 4 axis MMC). Each application must have its own servo setup configuration. Typically, this configuration is unique for every application as each could have different ratios of programming units (i.e., inches, millimeters, degrees, etc.) to the servo feedback units, different travel limits, different servo PID gains, etc.

The M_CHK1 and M_CHK49 function blocks check which axes are configured within the loaded servo setup. These blocks make it easier to write sections of ladder code that support different numbers of axes; by checking the Booleans set here, the appropriate actions can be taken based on the axes that are configured.

The M_CLOS1 function blocks will close the position loops for the configured servo axes. This action also includes resetting any internal e-stop or c-stop servo conditions (a servo e-stop will open the position loop).

The M_STATUS and M_ERROR function blocks provide all the significant data for the servos in one place within the ladder. If the application is using the digitizing axis available with the MMC, there is a network that checks that axis for an e-stop condition (that can result from a 'loss of feedback' hardware error).

The STATUSSV functions provide the ladder with information regarding the state of the respective servo fast inputs. Each axis has a DC input provided with a 'fast input' capability - so that (when enabled) the axis can latch the axis position at the instant the DC input occurs, based solely on the input condition rather than on the ladder scan time.

The network with the ESTOPACT coil monitors for an emergency stop (or e-stop) condition. The purpose for this network is to ensure that if an e-stop condition is detected, all the servo axes will be e-stopped immediately.

The network with the CSTOPACT coil monitors for a controlled stop (or c-stop) condition. The purpose for this network is to ensure that if a c-stop condition is detected, all the servo axes will be c-stopped immediately.

The networks with the GEN_IO and AUX_IO labels provide a simple way to view all the MMC discrete input and output conditions using the ladder animation.

The subsequent networks provide support for jogging and homing the axes. When jogging, only one axis can be selected and it can jog in one of three modes: at a constant velocity, to a specific incremental distance, or as a follower to a handwheel. Note that jogging will stop when a travel limit is reached because an e-stop will occur (in the ESTOPACT's coil network). However, if the Machine Start push-button is being pushed at the same time as the jog button, the operator can jog off a specific over-travel. For instance when in velocity mode, if the axis is on the plus over-travel switch, the axis cannot jog in the plus direction but it can jog in the minus direction.

The last networks in the basic examples provide support for the referencing (or homing) of the servo axes. The M_FHOME function block supports a homing sequence for the axis using the axis fast input as the reference switch. The M_LHOME function block supports a homing sequence for the axis using a specific discrete input as the reference switch. Both function blocks are provided for each servo axis in the ladder with M_FHOME actually connected to the rail. If the M_LHOME functionality is desired, then its code fragment (the function block and the surrounding elements) can be cut and pasted over the M_FHOME area.

Operator Interface Application Examples

The examples having operator interface support (MMC2_OI and MMC4_OI) have more ladder logic than the basic examples. Early in the ladder, the OI_SER function block enables the MMC variables (in the main ladder) that are given the G (global) attribute to be shared with the operator interface device (typically a Cimrex terminal) connected via an RS232 serial connection. Note that the global attribute is also used when the MMC is connected to an external PC via the Ethernet module and the MMC shares its data with the PC using the OPC Server technology.

There are a number of networks that update the state of the ALARM() Boolean array. This array is used to provide immediate indicators to the operator interface device regarding specific ladder conditions.

After the axis jogging and homing section of the ladder, there are several networks involved with the saving and retrieval of the axis setup data using a RAMDISK file. Rather than having the various motion rates or reference positions hard coded within the ladder logic, they can be set by the operator and saved in a RAMDISK file, AXSETUP.DAT.

The examples conclude with a few networks that are the basis for supporting other Cimrex features: trending or graphing and the control of the LEDs.

SERCOS Drive Interface Application Example

There is an example provided for the 8 axis SERCOS MMC unit. This example (MMC4_SOI) is an extension of the 4 axis MMC example with an operator interface. For the support of the SERCOS drives, several different ASFBs are used.

At the start of the ladder logic, the SC_INIT function initializes the SERCOS ring connected to the MMC. Each SERCOS application must have its own SERCOS setup configuration. The example uses SRC_MMC4 for its 4 SERCOS axis configuration. For an actual application, this SERCOS setup function must be replaced with the actual SERCOS setup configuration. The programmer's steps to do that are very similar to those for replacing the servo setup, except that steps 7 through 10 in the above procedure (when STARTING A NEW APPLICATION FROM AN EXAMPLE) are done with SERCOS setup, not servo setup. The example uses SRV_MMC4 for its servo setup configuration. For an actual application, this servo setup function must be replaced with the actual servo setup configuration, as previously described.

The S_CLOS1 function block will close the position loop for the configured SERCOS axes. This ASFB is different for SERCOS axes because the SERCOS drive itself might have error conditions to reset before the position loop can be closed.

The S_ERRORC function block provides all the significant error information for a specific SERCOS axis. This ASFB is different than M_ERROR because a SERCOS axis has additional error information.

The S_FHOME and S_LHOME function blocks provide support for the referencing of the SERCOS axes. They are different than M_FHOME and M_LHOME because the latching of the reference position is done within the SERCOS drive.

The S_IO_C function block is unique to a Centurion SERCOS drive application because the additional discrete input and output points at the SERCOS drive can be made available to the ladder.

Press Transfer Application Example

There is an example provided for the press transfer ASFB set within the motion ASFB package. This example (MMC4_PT) is an extension of the 4 axis MMC example with an operator interface. There is a detailed 'readme' file for this example's user interface and the accompanying ladder logic; that file is MMC4_PT.TXT.

Stepper Application Example

There is an example provided for the stepper block I/O module. This example (MMC_STEP) is a simple ladder to illustrate the control logic for a stepper module.

The UDFB U_STPRC handles the overhead required for a stepper control. This UDFB handles the stepper home or zero reference, jog, move a distance, move to a position, controlled-stop, emergency stop, and a reset of a c-stop or e-stop.

Centurion DeviceNet Positioning MicroDSM Drive Application Example

There is an example provided for the Centurion DeviceNet MicroDSM drive. This example (MMC_DND) is a simple example to illustrate the logic to control the DeviceNet scanner and to control the DeviceNet drive over DeviceNet.

The ASFB M_DNJOGC handles the overhead required for the jog motion. The ASFB M_DNPOSC handles the overhead required for the motion of either a move of an incremental distance or a move to an absolute position. Note that both of these ASFBs are for the Centurion DeviceNet MicroDSM drive. Other DeviceNet drives will have their own unique DeviceNet interface (i.e., the respective boolean, byte and long-word tag name assignments in the scanner's memory map).

The ASFB M_DNSTAT extracts the details for the DeviceNet module status into individual bytes and booleans.

This example ladder is referenced in the MicroDSM with DeviceNet installation manual. It serves as the programming example for the MicroDSM with DeviceNet drive. The MMC_DND.GLC DeviceNet scanner's configuration data file is also referenced in the same drive manual to illustrate how to define the tag names for the DeviceNet drive's input and output data.