Setting up communication between AB & Siemens (Part. 2)

Adding the Module to an Existing Project

1. Add the MVI56-PDPS module to the project. Right-click the mouse button on the I/O Configuration option in the Controller Organization window to display a pop-up menu. Select the New Module option from the I/O Configuration menu.


This action opens the following dialog box:


2. Select the 1756-Module (Generic 1756 Module) from the list and click OK.


3. Enter the Name, Description and Slot options for your application, using the values in the illustration above. You must select the Comm Format as Data - INT in the dialog box, otherwise the module will not communicate over the backplane of the CompactLogix rack.

4. Configure the Connection Parameters to match to the Block Transfer Size parameter in the configuration file. Use the values in the table corresponding with the block transfer size you configured.



5. Click Next to continue.


6. Select the Request Packet Interval value for scanning the I/O on the module.
This value represents the minimum frequency the module will handle scheduled events. This value should not be set to less than 1 millisecond.
Values between 1 and 10 milliseconds should work with most applications.

7. Save the module. Click OK to dismiss the dialog box. The Controller Organization window now displays the module's presence. The following illustration shows the Controller Organization window:


8. Copy the Controller Tags from the sample program.

9. Copy the User Defined Data Types from the sample program.

10. Copy the Ladder Rungs from the sample program.

11. Save and Download the new application to the controller and place the processor in run mode.


0 comments :

Setting up communication between AB & Siemens (Part. 1)

Introduction

The main propose of this is explain how to set up a communication between an AB PLC and a Siemens PLCs using Profibus Protocol.

The equipment required to make the communication are enlisted below.

- CPU Siemens with a DP Port.
- PLC Allen Bradley capable to support a 3dr Party Profibus Module.
- Prosoft Module (Profibus DP Slave Communication Module).

The next image shows the architecture of the network that is suggested.


Set up the module on the Siemens network
To set up the module on the Siemens network we need to follow the steps below.

1.- Open Simatic Manager.


2.- Once opened, we should open the Project on File->Open. Next find and select Hardware like its show below.


3.- Double click on Hardware and it will open the HW Config program. Here is where we need to add a Prosoft Module GSD, the GSD file is named “PSFT0988.gsd”. to add the GSD file in the HW Config program we need go to the main menu and find tools, next we find and select the option Install GSD File as its show in the image below.


4.- Once the GSD file is installed we have to look forward in the explorer tree showed in the right side of the program (Hardware Catalog) to add it into the Hardware Config area as its show below.


5.- Now we need to assign to the module an address node to work in the network and also configure the decentralized periphery adding how many words input/output we are going to need. In the image below are showed an example of the words that we can use.


6.- Once we select the words that we need, we have to drag and drop the words into the decentralized periphery area, as its show below we select 16 words input and 16 words output to share information.


7.- Now we take note of the registers that were assigned to the inputs and outpus words, in the example above the registers assigned were:


Notice that those registers will be different depends on the project IO configuration!!!

8.- Now we have to put the information to share on these registers, input registers are information read it from an AB PLC and the Outpus registers are the information that you will write on the AB PLC.



0 comments :

Updating an Add-On Instruction to a Newer Revision via Import

When you need to update an instruction to a newer revision, you can import it from an .L5X file or copy it from an existing project. You must be offline to update an Add-On Instruction.
Follow these steps to update an Add-On Instruction to a newer revision by importing it.

1. Right-click the Add-On Instruction folder and choose Import Add-On Instruction.

2. Select the file with the Add-On Instruction and click Import.


3. Review the Import Configuration dialog box, and from the Operations menu, choose Overwrite.


4. Click Collision Details to see any differences in the Add-On Instructions and to view where the Add-On Instruction is used.

The Property Compare tab shows the differences between the instructions, in this case, the Revision, Edited Date, and Software Revision.


The Project References tab shows where the existing Add-On Instruction is used.


5. Click Close and then OK to complete the operation.


0 comments :

Importing an Add-On Instruction

You can import an Add-On Instruction that was exported from another RSLogix 5000 project. When importing an Add-On Instruction, the parameters, local tags, and routines are imported as part of the Add-On Instruction. Once the project has the Add-On Instruction, you can use it in your programs.

When importing Add-On Instructions directly or as references, consider these guidelines.

Tag Data:
Imported tags that reference an Add-On Instruction in the import file may be affected if the Add-On Instruction is not imported as well. In this case, the imported tag’s data may be converted if the existing Add-On Instruction’s data structure is different and tag data may be lost.
If an existing Add-On Instruction is overwritten, project tag data may be converted if the Add-On Instruction’s data structure is different and tag data may be lost.

Logic:
Imported logic that references the Add-On Instruction in the import file may be affected if the Add-On Instruction is not imported. If an existing Add-On Instruction is used for the imported logic reference and the parameter list of the Add-On Instruction in the project is different, the project may not verify or it may verify but not work as expected.
If an existing Add-On Instruction is overwritten, logic in the project that references the Add-On Instruction may be affected. The project may not verify or may verify but not work as expected

Add-On Instructions While Online:
An Add-On Instruction cannot be overwritten during import while online with the controller, although a new Add-On Instruction may be created while online.

Final Name Change:
If the Final Name of an Add-On Instruction is modified during import configuration, the edit date of the imported Add-On Instruction will be updated. In addition, all logic, tags, User-Defined Data Types, and other Add-On Instructions in the import file that reference the Add-On
Instruction will be updated to reference the new name. As a result, the edit date of any Add-On Instruction that references the Add-On Instruction will be updated.
Add-On Instructions that have been sealed with an instruction signature cannot be renamed during import.

User-Defined Data Types:
Add-On Instructions cannot overwrite User-Defined Data Types. Add-On Instructions and User-Defined Data Types must have unique names.

Instruction Signature:
If you import an Add-On Instruction with an instruction signature into a project where referenced Add-On Instructions or User-Defined Data Types are not available, you may need to remove the signature.
You can overwrite an Add-On Instruction that has an instruction signature by importing a different Add-On Instruction with the same name into an existing routine. Add-On Instructions that have been sealed with an instruction signature cannot be renamed during import.

Safety Add-On Instructions:
You cannot import a safety Add-On Instruction into a standard task.
You cannot import a safety Add-On Instruction into a safety project that has been safety-locked or one that has a safety task signature.
You cannot import a safety Add-On Instruction while online.
Class, instruction signature, signature history, and safety instruction signature, if it exists, remain intact when an Add-On Instruction with an instruction signature is imported.


Import Configuration

When you select a file to import, the Import Configuration dialog box lets you choose how the Add-On Instruction and referenced components are imported.

If there are no issues, you can simply click OK to complete the import.

If your Add-On Instruction collides with one already in the project, you can:

· Rename it, by typing a new, unique name in the Final Name field.
· Choose Overwrite from the Operation menu.
· Choose Use Existing from the Operation menu.


The Collision Details button lets you view the Property Compare tab, which shows the differences between the two instructions, and the Project References tab, which shows where the existing Add-On Instruction is used.


0 comments :

Creating an Export File

When you choose to export an Add-On Instruction, the exported Add-On Instruction includes all of its parameters, local tags, and routines. These will be imported with the Add-On Instruction automatically.

Optionally, you can include any nested Add-On Instructions or User-Defined Data Types that are referenced by the exported Add-On Instruction. Referenced Add-On Instructions and data types are exported to the .L5X file if you select Include all referenced Add-On Instructions and User-Defined Types during the export.

Add-On Instruction definition references may also be exported when a program, routine, set of rungs, or User-Defined Data Type is exported.

In deciding how to manage your Add-On Instruction definitions in export files, you need to consider your goals in storing the definitionss.



Exporting to Separate Files

If you want to store many Add-On Instructions that share a set of common Add-On Instructions or User-Defined Data Types in a common location, you may want to choose to export each Add-On Instruction and User-Defined Data Types to separate files without including references.

Follow these steps to export to separate files.

1. Right-click the Add-On Instruction in the Controller Organizer, and choose Export Add-On Instruction.

2. Select the common location to store the .L5X file.


3. Type a name for the file.

4. Clear Include referenced Add-On Instructions and User-Defined Types.

5. Click Export.

6. Follow the above steps to individually export the other shared Add-On Instructions and User-Defined Data Types.

Using export in this way lets you manage the shared Add-On Instruction and User-Defined Data Types independently of the Add-On Instructions that reference them. One advantage of this is the ability to update the shared component without having to regenerate all the export files for the instructions that reference it. That is, it is only stored in one file instead of in every file whose instruction references it. This can help with the maintenance of the instructions as you only have to update one export file.

To use Add-On Instructions that have been exported in a separate file, without references, you must first import any User-Defined Data Types of Add-On Instructions that the exported instruction references before the import of the referencing instruction can be successful. To do this, work from the bottom up.

Import the lowest-level User-Defined Data Types and any User-Defined Data Types that reference them.

Then, import the lowest-level Add-On Instructions, followed by any Add-On Instructions that reference those low-level Add-On Instructions. Once all of the items it references are in place, the import of the Add-On Instruction will succeed.


Exporting to a Single File

If you manage each Add-On Instruction as a standalone, you may want to export the instruction and any referenced Add-On Instructions or User-Defined Data Types into one export file. By including any referenced Add-On Instructions or User-Defined Data Types, you also make it easier to preserve the instruction signature of an Add-On Instruction.

Follow these steps to export to a single file and include any referenced items.

1. Right-click Add-On Instruction in Controller Organizer and choose Export Add-On Instruction.

2. Choose the location to store the .L5X file.


3. Type a name for the file.

4. Check Include referenced Add-On Instructions and User-Defined Types.

5. Click Export.

This exports the selected Add-On Instruction and all the referenced instructions into the same export file. This file can be used to distribute an Add-On Instruction. When the exported Add-On Instruction is imported into the project, the referenced instructions are imported as well in one step.


0 comments :

Importing and Exporting Add-On Instructions

Creating an Export File (View)
Importing an Add-On Instruction (View)
Updating an Add-On Instruction to a Newer Revision via Import (View)

0 comments :

Storing Your Add-On Instructions

There are two ways to store a group of Add-On Instructions together. One is to save your Add-On Instructions in a project file. Another is to create an L5X export file.

Follow these steps to store your instructions by saving them in a project file.

1. Identify what instructions you want to store.

2. Place them in a project file called something like MyInstructions.ACD.

3. Open other projects in additional instances of the application and use copy and paste or drag and drop to move a copy of the instruction from MyInstructions.ACD to another project.

If any of these instructions reference the same Add-On Instruction or User-Defined Data Type, there is only one shared copy in the project file. When an Add-On Instruction is copied to another project, it also copies any instruction it references to the target project.


0 comments :

Copying an Add-On Instruction

You can copy an Add-On Instruction into your project when it exists in another Logix Designer project. After you copy the Add-On Instruction, you can use the instruction as is or rename it, modify it, and then use it in your programs.

Follow these steps to copy the Add-On Instruction.

1. Open the Logix Designer project that contains the Add-On Instruction.

2. Find the instruction in the Add-On Instructions folder.


3. Right-click the instruction and choose Copy.

4. Go to the other project where you want to paste the instruction.

5. Right-click the Add-On Instructions folder and choose Paste.



0 comments :

Determining if the Add-On Instruction is Source Protected

An Add-On Instruction may be source protected so you cannot view the logic.
Follow these steps to see if an Add-On Instruction is source protected.

1. Select the Add-On Instruction in the Controller Organizer.

The Add-On Instruction cannot be expanded when fully protected.

2. Look in the Quick View pane for Source Protection.

If the Source Protection attribute is not listed, then the instruction is not protected.



0 comments :

Viewing Logic and Monitor with Data Context

Follow this procedure when you want to view the logic of an Add-On Instruction and monitor data values with the logic.

1. Right-click the instruction call in any routine.


2. Choose Open Instruction Logic.


The Language Editor opens with the Add-On Instruction's logic routine and with data values from the instruction call.

As you view the logic you can:

· Identify the instruction call whose tags are being used for data.
· See the logic as it executes (when online).
· See Parameter and Local Tag values.
· Change local tag and parameter values for the data instance selected.


To edit the logic of the Add-On Instruction, you must select the instruction <definition> in Data Context.


You cannot edit the instruction logic:

· Online.
· When the logic is in the context of an instruction call.
· If the instruction is source-protected.
· If the instruction is sealed with an instruction signature.

0 comments :

Monitoring the Value of a Parameter

Follow this procedure when you want to see or change a parameter value of an Add-On Instruction.

1. Open the Properties of the instruction based on what language you are using.

a. For either a Function Block or Ladder Diagram, click Properties for the instruction.


b. For Structured Text, right-click the instruction name and choose Properties.

Motor_Starter(Motor_Starter_ST,
Stop_PB,Start_PB,Motor_Out_ST);


2. Monitor the value of the parameters and change any if needed.
3. Type a new value for each parameter as needed.
4. Click Apply and when finished, OK.

0 comments :

Programmatically Access a Parameter

Follow these procedures for any language when you want to access an Add-On Instruction parameter that is not available on the instruction face by default.

The following procedures demonstrate how to use the Jog parameter of the Motor Starter Add-On Instructions.


Using the Jog Command in Ladder Diagram

The first rung sets the Jog bit of Motor_Starter_LD = Jog_PB.


Using the Jog Command In Function Block Diagram

Any parameter can be made visible or invisible except those defined as required. Required parameters are always visible. If the parameter is required, you will see it checked in the Properties dialog box.

1. Click Properties for the instruction.


2. Check the Vis checkbox of the Jog parameter to use it in your diagram.

3. Click OK.


4. Wire to the pin for the parameter.


Using the Jog Command in Structured Text



0 comments :

Tips for Using an Add-On Instruction

This table describes programming tips for you to reference when using Add-On Instructions.

TopicDescription
Instruction HelpUse the instruction help to determine how to use the instruction in your code.
Ladder RungsIn a ladder rung, consider if the instruction should be executed on a false rung condition. It may improve scan time to not execute it.
Data TypesA data type defined with the Add-On Instruction is used for the tag that provides context for the execution from your code. A tag must be defined of this Add-On Instructiondefined type on the call to the instruction.
Indexed TagYou can use an indirect array indexed tag for the Instruction instance. One drawback is that you cannot monitor the Add-On Instruction by using this as a data context.
Passing Data·Input and Output parameters are passed by value. ·InOut parameters are passed by reference.

0 comments :

Including an Add-On Instruction in a Routine

Follow this procedure when you want to use an Add-On Instruction in one of your routines.

1. Open the Add-On Instruction folder in the Controller Organizer and view the listed instructions.

If the instruction you want to use is not listed, you need to do one of the following:

· Create the instruction in your project.
· Copy and paste an instruction into your project.
· Get the file for an exported instruction definition and then import the instruction into your current project.

2. Open the routine that will use the instruction.
3. Click the Add-On tab on the instruction toolbar.
4. Click the desired Add-On Instruction, for example Simulation, and drag the instruction from the toolbar into the routine.


5. Define arguments for each Parameter on the instruction call.

The instruction appears as follows in each of the languages.

Ladder Diagram


Parameter WithDescription
Single question markThis is a required InOut parameter. Enter a tag.
Single and double question marksThis is a required Input or Output parameter. Enter a tag.
Double question marksThis is not a required parameter. You can either: · Leave as is and use the default value. · Enter a different value if it is an Input parameter.

Function Block Diagram


ItemDescription
Nub on the end of pinThis is a required Input or Output parameter. You must wire the pin to an IREF, OREF, connector, or another block to verify.
Single question markThis is a required InOut parameter. Enter a tag.
No nub on the end of pinThis is not a required parameter. You can either: · Leave as is and use the default value. · Enter a different value if it’s an Input parameter.

Structured Text


The instruction expects arguments for required parameters as listed in the instruction tooltip.


0 comments :

Using the Add Element Dialog Box

Follow these instructions to access the Add (language) Element dialog box.

1. Press Alt + Insert anywhere in the editor or by right-clicking the logic in the Editor.


2. Locate the Add-On Instruction you want to add to your routine.


3. Select the Add-On Instruction and click OK.

Use Instruction Help to display the instruction help for any instruction in the browser.



0 comments :

Accessing Add-On Instructions

The Add-On Instruction can be used in any one of the Ladder Diagram, Function Block, or Structured Text languages (including Structured Text within Sequential Function Chart actions). The appearance of the instruction conforms to the language in which it is placed.

The Add-On Instructions in the project can be accessed from any of the normal instruction selection tools.

The instruction toolbar has an Add-On tab that lists all of the currently available Add-On Instructions in the project.



0 comments :

Using Add-On Instructions

Add-On Instructions are used in your routines like any built-in instructions. You add calls to your instruction and then define the arguments for any parameters.

Accessing Add-On Instructions (View)
Using the Add Element Dialog Box (View)
Including an Add-On Instruction in a Routine (View)
Tips for Using an Add-On Instruction (View)
Programmatically Access a Parameter (View)
Monitoring the Value of a Parameter (View)
Viewing Logic and Monitor with Data Context (View)
Determining if the Add-On Instruction is Source Protected (View)
Copying an Add-On Instruction (View)
Storing Your Add-On Instructions (View)

0 comments :

Simulation Instruction Example

The Simulation_DT_1st Add-On Instruction adds a dead time and a first-order lag to an input variable.

Figure 10 - Simulation Example Definition Editor General Tab


Figure 11 - Simulation Example Definition Editor Parameter Tab


Figure 12 - Simulation Example Logic


Ladder Diagram Configuration

In this example, the instruction simulates a deadtime and lag (first order) process.

The Simulation_DT_1st instruction reads the control variable from the PID instruction. The PID instruction reads the SimOutput Parameter of the Simulation_DT_1st instruction.


Function Block Diagram Configuration

The PIDE instruction sends the control variable to the Simulation_DT_1st instruction. The Simulation_DT_1st instruction calculates an output and sends it to the PIDE instruction as the process variable


Structured Text Configuration

Simulation_DT_1st( Sim_DT_ST, My_PIDE_ST.CVEU, DT_Array_ST );
My_PIDE_ST.PV := Sim_DT_ST.SimOutput;
PIDE(My_PIDE_ST );

The Simulation_DT_1st instruction reads the control variable from the PIDE instruction and calculates an output.

The output goes to the process variable of the PIDE instruction.



0 comments :