JXCP1 Library User Guide For TIA Portal
JXCP1 Library User Guide For TIA Portal
JXCP1 Library User Guide For TIA Portal
JXCP1 Library
for
TIA Portal
1
Table of Contents
I. Discalimer .................................................................................................................................................................. 3
II. Start a new project in TIA Portal ............................................................................................................................... 4
1. First steps .............................................................................................................................................................. 4
2. Hardware configuration ........................................................................................................................................ 4
2.1. PLC selection ................................................................................................................................................. 4
2.2. Installation of the GSD file............................................................................................................................. 5
2.3. Add and connect the JXCP1 unit to the PLC .................................................................................................. 5
III. Open and use the „JXCP1” library ......................................................................................................................... 7
1. Open a „JXCP1” library .......................................................................................................................................... 7
2. How to use these function blocks? ....................................................................................................................... 7
2.1. Insert a function block to the PLC program .................................................................................................. 7
2.2. Input/output variables .................................................................................................................................. 8
2.3. How to create an „Array[0..35] of Byte” type PLC tag? ................................................................................ 8
2.4. How to use the Array[0..35] of Byte tag........................................................................................................ 9
2.5. Function blocks and their input/output types ............................................................................................ 10
2
I. Discalimer
------- PLEASE READ CAREFULLY - THIS DISCLAIMER LIMITS OUR LIABILITY -------
THIS PROGRAM/FUNCTION BLOCKS ARE PROVIDED "AS ARE" FOR INFORMATION PURPOSES. THE
PROGRAM/FB AND ITS OUTPUT IS NOT INTENDED TO BE USED IN AN ACTUAL APPLICATION
WITHOUT MODIFICATION AND VALIDATION BY THE USER. THE PROGRAM IS BEING PROVIDED
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, ALL OF WHICH ARE HEREBY DISCLAIMED.
YOU ACKNOWLEDGE AND AGREE THAT YOU ARE SOLELY RESPONSIBLE FOR THE SELECTION,
APPLICATION AND USE OF THE PROGRAM/FUNCTION BLOCKS. SMC CORPORATION AND ITS
AFFILIATED COMPANIES, DO NOT WARRANT THAT THE FUNCTIONS PERFORMED BY THE
PROGRAM/FB WILL MEET YOUR REQUIREMENTS, OR THAT THE PROGRAM/FB WILL OPERATE
ERROR FREE, UNINTERRUPTEDLY OR IN COMBINATION WITH OTHER SOFTWARE, OR THAT ALL
PROGRAM DEFECTS ARE CORRECTABLE.
SMC IS NOT RESPONSIBLE UNDER ANY CIRCUMSTANCES FOR ANY HARM OR DAMAGE ARISING OUT
OF OR RELATED TO YOUR USE OF THE PROGRAM/FB.
THE USER ITSELF HAS TO ENSURE THE CORRECTNESS OF THE DATA TRANSFERRED BEFORE
EXECUTING THEM ON THE ACTUAL CONTROLLER AND THE MACHINE.
3
II. Start a new project in TIA Portal
1. First steps
2. Hardware configuration
2.1. PLC selection
4
2.2. Installation of the GSD file
a) Open the „Hardware Catalog”of the right side of your TIA Portal screen
Search for the JXCP1 device. The easiest way if you type in the field „JXC”
and then „Enter”.
Pick and drop the JXCP1 unit to the „Topology view” or „Network
view”of TIA Portal.
b) Connect the PLC Profinet port to the Port1 of the JXCP1 unit (if
it is connected to Port2 then connect to Port2 in the project)
5
When it has assigned you see it is
written the PLC name „Feccco” in
the JXCP1 unit box.
d) You can set the I/O allocation of the JXCP1 unit by selecting the ’upper arrow’ to
extend the „Device overview” under the „Device view” tab
You can set here the Input and Output addresses of the JXCP1 unit that allocate in
the PLC.
6
III. Open and use the „JXCP1” library
a) Select the „Libraries” (1) tab on the right side of TIA Portal.
d) You have the new „JXCP1” (3) library in your „Global libraries”. You don’t
have to open it again. It remains here until you remove from the „Global
libraries”.
e) Under the „Master copies” folder you can find the JXCP1 function blocks
that you can use in any of your projects. 3
b) Just pick and drop any of the function blocks from the „JXCP1/Master
copies” to the „Network” where you would like to use it.
7
c) A pop-up window appears and you have to
add a name of the „Data block”.
a) If you move your cursor onto the „…” marked place the required
variable type appears as a note.
b) If you double click on the function block in the „Project tree” the
variable table shows you the names and data types.
You are able to modify the function blocks because these are not protected.
b) Give a name of your new data type „Data”and give a type as „Array[0..35] of Byte”
8
c) In the „Project tree” open a „PLC tags” folder.
e) Give a nameof your variable that you would like to use in the PLC program. In our case it is „JXCP1 IN”.
Add a data type that you created in the previous steps (III./2.3./b) -> „JXCP1”
Do not afraid because it is pink after a compile it turns to grey as normal (in V14 it is normal-grey).
Add a start bit „Address” to the tag that you already set in the hardware configuration (II./2.3./d).
In our case we set the inputs and the outputs to „1..36” as well. Now we have to give „%I1.0” for inputs.
f) To create tags for the outputs just type for instance „JXCP1 OUT”, give a same type as previously „JXCP1”
and for the address set „%Q1.0”.
Select the „…” at „JXCP1 Inputs” and start type the name of
your PLC tag („JXCP1 IN”).
The software gives you an available tags that you can select
from the list by pushing the „Enter” button.
Now you can give a simple PLC tags and link to the output side of
this function block to use the datas in the PLC program like
„Current position”, „Current speed”, Alarm codes, etc…
9
2.5. Function blocks and their input/output types
a) „JXCP1_Inputs”
b) „JXCP1_StepDataOUT”
c) „JXCP1_StateBits”
10
d) „JXCP1_Outputs”
e) „JXCP1_StepDataIN”
f) „JXCP1_ControlBits”
11
g) „JXCP1_ControlFlags”
12