This video gives an overview for the creation of a simple automation
project using the M340 PAC discovery kit, and Unity Pro engineering software.
The full project instructions and project files for importing can be
found in the Start Up guide, within the Discovery Kit electronic files.
Inside the discovery kit you will find the following items:
4 slot mounting backplane
Power supply
PAC processor with memory card
Mixed input and output module
Pre wired connection cable
Tele fast simulation module
Programming cable
Tele fast power supply connection wires
Mount the PAC modules on the mounting backplane with the power supply
inserted in the left most slot of the rack, followed by the processor
and finally the mixed input and output module
Connect the Tele fast simulation module to the I/O module using the pre wired connection cable
Connect the simulation module power supply inputs to the power supply module output
And finally, connect the power supply inputs to a mains supply of 100 to 240 V A C
Launch the Unity Pro programme
Set the PLC address
Click on "PLC" in the menu bar
Click on "Set Address"
Enter S Y S in "address field" of the PLC zone
Select "USB" in the media field
Confirm by clicking OK
Create a new project by clicking on the new project button
Double click on the BMXP3420302 PAC and the Unity Pro user interface will now appear
Double click the PLC Bus and then double click on the rack
Select the BMXXBP0400 rack and click Ok
Double click the slot 1 position of the rack
Expand the Discrete selection box and select the BMXDDM16022 I/O module
The I/O for this application will be imported from the project files
however the first discrete input needs to be declared manually.
Double click on the BMXDDM16022 module in the bus editor
then click on the node in the top left hand corner.
Within the I/O objects tab, select the %I and %Q check boxes
click on Update Grid.
Select the line for input %I0.1.0 and enter “Badge_Inserted” in the Prefix
or Name field and “Input “Badge Inserted”” in the comment field.
Click on Create.
The variables for this application are able to be entered one at a time manually,
alternatively they can be imported from a .XSY file.
For the purposes of this demonstration we will import them from the project files.
Before importing the variables, the first variable needs to be manually declared.
Double click on Variables and FB instances directory in the project browser and select the first available line.
Enter “INIT” in the name field and select “EBOOL” in the Type field.
Enter “Sets the garage” to the INIT step in the comment field.
Right click on the Variables and FB instances directory in the project browser
Click on the import command
Save the project
Select the .XSY file type
Browse to the file location of Variables.XSY on the downloaded project files.
Click on the Import button
Click on the Keep All button and Ok.
The variables are now imported into your application
The functional part of the programme is going to be completed by importing
the required sections and derived function blocks (or DFBs) from the project files.
To import the garage management section, right click on Sections and select Import
Click Yes to save changes
Select the XLD file type and browse to the location of the project files
which contains the file Garage Management With DFB
Click Import
When the Import Trouble Report screen appears, click on Replace All and click Ok
The garage management section is now imported into the programme.
To view this section then click on the directory in the project browser.
To import the Door Management DFB,
right click on the Derived FB Types directory and select Import
Click Yes to save changes
On the import dialogue box,
select the XDB file type and browse to the DFB Door Management file in the project files.
Click Import.
click on replace all and click OK
To view the section click the derived FB types directory in the project browser.
To import the car counting section of the programme,
right click on the sections directory of the project browser and select the Import command
Click Yes to save changes
Select the XST file type and browse to the Car Counting.XST file in the project files.
Click Import and Replace all on the Import Trouble Report.
Click Ok to confirm.
To view this section, double click the Car Counting directory in the project browser.
To import the Operator Screen, right click Operator Screens and click on Import.
Select Yes to save changes.
Select the file type Runtime screen and browse to the Garage Control file in the project files.
To create the animation table,
right click on the Animation Tables directory in the project browser and select New Animation Table.
Enter Animation in the properties window, and click Ok.
Double click the Variables and FB instances directory in the project browser.
Sort the variable by clicking on the Address column to group the inputs and the outputs.
Select all of the inputs and outputs by pressing CTRL + A and press CTRL+C
Double click the animation table in the project browser.
Select the first row and press CTRL+V.
All of the inputs and outputs are now displayed in the animation table.
Using the USB connection cable, connect the computer to the programming port of the PAC
After making sure that Unity Pro is in Standard mode, click on the connect button.
Note: if the computer will not connect to the PAC then check the Unity Pro help menu.
Click on the Download project button and check the PLC Run after transfer box
In the Transfer project to PLC box, click Rebuild All and Transfer and then Ok to Run the PAC.
The application will now transfer to the PLC.
The developed application is now being executed by the PLC.
To simulate the application you will use Unity Pro commands to control the execution of the application,
the Tele fast module to activate the 3 inputs,
the operator screen to view the garage status and car positions,
and finally the animation table to view the status of every input/output,
the car counter, and to see if the garage is full.
When in Run mode the PLC will execute the application.
If the Run icon is greyed out, the PLC is in Run mode.
To change to Stop mode click on the Stop icon.
To return to Run mode, simply click on the Run icon and confirm OK in the dialogue box.
The first 3 switches on the Tele fast module control the 3 inputs for the system:
Badge Inserted, Entry Sensor, and Exit Sensor.
Move the switch to the right hand position to enable the input.
To access the operator screen,
open the Operator Screens directory in the project browser and double click on the Garage Control item.
Maximise the screen to see a larger view.
You will need to use the buttons Reset Number Of Cars and INIT System.
To access these buttons, click on the Enable Write Variable icon in the toolbar.
To initialise the system,
click on the INIT System button of the operator screen.
The Door Closing output will be activated for 10 seconds and then the door will be closed.
Switch on the Badge Inserted input by moving the
Telefast module channel 0 toggle switch to the right and then switch off again.
A car will appear at the entrance to the garage
and the door will open 10 seconds after the input is switched on.
The car is now able to enter the garage.
Switch on the Car Entry Sensor input by moving the channel 1
switch to the right to simulate the car having reached the entry to the garage.
Move the channel 1 switch to the centre position to simulate the car having moved past the entry point.
Switch on the Car Exit Sensor by moving the channel 2 toggle switch
to the right to simulate the car moving past the garage door.
The door will now close after 10 seconds,
the “Number of Cars” counter has changed to 1.
Move the channel 2 toggle switch to the centre to simulate the car
moving past the garage exit point and parking in an empty space.
Repeat the last 3 steps to simulate additional cars entering the garage
and note the car counter incrementing each time.
To simulate a car leaving the garage,
move the channel 2 toggle switch to the right.
The garage door will now open.
Move the channel 2 toggle switch back to the centre position once the garage door is open.
Move the channel 1 toggle switch to the right to simulate the car
having reached the entry point to the garage.
Note the garage door will now close.
Move the channel 1 switch to the centre position to simulate the car having left the garage.
Note the Number of Cars counter decrements after each car has left.