0% found this document useful (0 votes)
15 views41 pages

JMobile Training Module3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views41 pages

JMobile Training Module3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

JMobile Training Module3

JM v1.91.00.254
Module3 v06
Module3 Contents

• CODESYS v2 and iPLC on eTOP500


• Direct access to I/O from JMobile
• Indexed Tags
• Cross Reference
• Send eMail
• Keypad customization
• User Management customization

© 2015 Exor International S.p.A. - All rights reserved 2


CODESYS v2 and iPLC on eTOP500/600

© 2015 Exor International S.p.A. - All rights reserved 3


CODESYS as IEC 61131-3

• CODESYS is a development environment for programming


controller applications according to the IEC 61131-3

• IEC 61131-3 is the third part of the open international


standard IEC 61131 for PLC

• IEC 61131-3 deals with programming languages and defines


three graphical and two textual PLC programming language
standards:
• Ladder diagram (LD)
• Function block diagram (FBD)
• Structured text (ST)
• Instruction list (IL)
• Sequential function chart (SFC)

© 2015 Exor International S.p.A. - All rights reserved 4


Programming Languages

Instruction Structured Sequential


List (IL) Text (ST) Function Chart (SFC)
LD A
ANDN B C:= A AND NOT B Step 1 N FILL
ST C
Transition 1

Function Block Step 2 S Empty


Ladder Diagram (LD)
Diagram (FBD)
AND A B C Transition 2
A C -| |--|/|----------------( )
Step 3
B

© 2015 Exor International S.p.A. - All rights reserved 5


IEC 61131-3 Data Types

• IEC 61131-3 predefined (or elementary) data types:

IEC 61131-3 CODESYS JMobile


Limits Memory Space
Data Type Data Type Data Type
BOOL BOOL Boolean 0 ... 1 1 bit data
SINT SINT Byte -128 ... 127 8-bit data
USINT USINT / BYTE UnsignedByte 0 ... 255 8-bit data
INT INT Short -32768 ... 32767 16-bit data
UINT UINT / WORD UnsignedShort 0 ... 65535 16-bit data
DINT DINT Int -2.1e9 ... 2.1e9 32-bit data
UDINT UDINT / DWORD UnsignedInt 0 ... 4.2e9 32-bit data
LINT --- --- -9.2e19 ... 0.2e19 64-bit data
corresponds to IEEE
REAL REAL Float 1.17e-38 ... 3.40e38 single-precision
32-bit floating point type
corresponds to IEEE
LREAL --- Double 2.2e-308 ... 1.79e308 single-precision
64-bit floating point type

© 2015 Exor International S.p.A. - All rights reserved 6


What is what in CODESYS

Project
• A CODESYS Project contains all of the objects in a PLC
program.
• The following objects are included in a project:
• Data types,
• POUs (Program Organization Units),
• Resources,
• Libraries.

• Data types
• Along with the standard data types the user can define his own
data types. Structures, enumeration types and references can be
created.

© 2015 Exor International S.p.A. - All rights reserved 7


What is what in CODESYS

• POU (Program Organization Unit)


• Each POU consists of a declaration part and a body.
• The body is written in one of the IEC programming languages.
• POUs can call up other POUs but recursions are not allowed.
• POUs can be divided in three types:
• Function: it is a POU, which yields exactly one data element (which
can consist of several elements, such as fields or structures)
• Function Block: it is a POU which provides one or more values
during the procedure. As opposed to a Function, a function block
provides no return value.
• Program: A program is a POU which returns several values during
operation. Programs are recognized globally throughout the project.
All values are retained from the last time the program was run until
the next.
• PLC_PRG: The PLC_PRG is a special predefined POU. Each
project must contain this special program. This POU is called exactly
once per control cycle.

© 2015 Exor International S.p.A. - All rights reserved 8


What is what in CODESYS

• Resources
• You need the resources for configuring and organizing your
project and for tracing variable values. Resources are PLC
Configuration, Target Settings, Workspace, Global Variables,
Library manager…

• Libraries
• You can include in your project a series of libraries whose POUs,
data types, and global variables you can use just like user-
defined variables.

© 2015 Exor International S.p.A. - All rights reserved 9


Getting started: get CODESYS

1. Get the CODESYS v2.3 software:


From 3S website: http://www.codesys.com/download.html
Software is free to use, to download it you will need to register to 3S
website.

NOTE: CODESYS v3.5 is a completely different environment not


compatible with former CODESYS v2.3.

© 2015 Exor International S.p.A. - All rights reserved 10


Getting started: install CODESYS

2. Install CODESYS v2.3 workbench

* * = optional

* *
*

© 2015 Exor International S.p.A. - All rights reserved 11


Getting started: install target

3. Install JMobile target support package

© 2015 Exor International S.p.A. - All rights reserved 12


Create a new project

4. Start a new project

© 2015 Exor International S.p.A. - All rights reserved 13


Create a new project - remarks

• Target Configuration:
• WCE/ARM UN30 for eTOP510, 512, 515, 515G, 507M, 507MG
• WCE/ARM UN31 for eTOP504, 506, 507, 507G
• WCE/MIPS for eTOP400 series

• Target Settings > General


• Check the "Download symbol file"
In this way any change in the tag offset due to new compilation of
the PLC program does not require a symbol file re-import.
NOTE: When the option "Download symbol file" is not available
or not checked, the protocol can work only if the ProjectId tag is
imported. Any change in the tag offset due to new compilation of
the PLC program requires that symbol file is imported again.

© 2015 Exor International S.p.A. - All rights reserved 14


Symbol configuration

*
© 2015 Exor International S.p.A. - All rights reserved 15
Symbol configuration - remarks

• Project > Options


Under "Symbol configuration":
1. Check dump symbol entries
2. Configure symbol files

NOTE: "Export array entry" allow you to export an array as


separated tags, instead if you uncheck this option your array
will be exported as a single array tag.

• Project > Build

© 2015 Exor International S.p.A. - All rights reserved 16


Download to PLC

© 2015 Exor International S.p.A. - All rights reserved 17


Download to PLC - remarks

• Online > Communication Parameters


1. New channel: Tcp/Ip (Level2)
2. Change address from "localhost" to panel’s IP Address

• Online > Login

• Online > Create boot project


to keep PLC project on CPU also after a reboot

© 2015 Exor International S.p.A. - All rights reserved 18


Configure protocol in JMobile

© 2015 Exor International S.p.A. - All rights reserved 19


Configure protocol - remarks

• Add CODESYS v2 ETH protocol

• For eTOP500 iPLC, configure PLC IP address as 127.0.0.1

• Import tags from symbol file ".sym"


no needs to import ProjectID if "Download symbol file" is checked on
CODESYS project

© 2015 Exor International S.p.A. - All rights reserved 20


PLC Configuration: subelements

© 2015 Exor International S.p.A. - All rights reserved 21


Direct access to I/O from JMobile

© 2015 Exor International S.p.A. - All rights reserved 22


Direct access to I/O

• Starting from 1.91, users can access and control PLIO06/PLIO07


without the need of CODESYS v2 iPLC

• Useful when there's no needs of programmed logic


i.e. open/close relay with a JMobile button

• Define "System Variables" protocol and select "Direct I/O"

© 2015 Exor International S.p.A. - All rights reserved 23


Direct access to I/O

• The number after # identify the slot where PLIO06 is plugged in

• For PLIO06 we can access:


• Inputs (array of 8 bit)
• Diags (array of 3 bit)
• Outputs (array of 7 bit)

• To drive a single output PLIO06 slot #1

you MUST use Tagindex PLIO06 slot #2


property on "Attach To" PLIO06 slot #3

PLIO06 slot #4

© 2015 Exor International S.p.A. - All rights reserved 24


Indexed Tag addressing

© 2015 Exor International S.p.A. - All rights reserved 25


Indexed Tags

• Allow to dynamically attach a tag to a property using alias

• Useful when you need to replicate same object


but with different tags attached like "valves"

• Example: we have three valves, each one have


• left value
• right value

© 2015 Exor International S.p.A. - All rights reserved 26


Indexed Tags

• Defining an Indexed Tag Set called "valve",


driven by tag "index-valve",
allow me to "attach" the Alias "left" or "right" instead of real tag

• Use one valve widget instead of three

© 2015 Exor International S.p.A. - All rights reserved 27


Cross Reference

© 2015 Exor International S.p.A. - All rights reserved 28


Cross Reference

• The Tag Cross Reference displays Tags


used into project, based on their location

• References can be grouped by


• Tag: in this way for evey tag is showed
where it's used;
• Location: in this way for every project
location (pages, alarms...) is showed which
tags are currently used.

• Cross Reference pane, can show:


• All References
• Invalid Tag reference
• Unused tags

© 2015 Exor International S.p.A. - All rights reserved 29


Cross Reference

• An example of Tag Cross Reference grouped by Tag


and by Location

© 2015 Exor International S.p.A. - All rights reserved 30


Send eMail

© 2015 Exor International S.p.A. - All rights reserved 31


Send eMail

• With action "Send Mail" panel will send an email on events


• Under "EmailConfig" must be defined eMail Server
configuration

© 2015 Exor International S.p.A. - All rights reserved 32


Send eMail

• Under "EmailInfo" must be defined the eMail configuration


• From, To, Subject, Attachments and body of email

• All of the above can be attached to tag

© 2015 Exor International S.p.A. - All rights reserved 33


Keypad customization

© 2015 Exor International S.p.A. - All rights reserved 34


Keypad customization

• By default into every JMobile project are


already present two keypads:
• Alphabet
• Numeric

• These two keypads are model depending

• Converting project from a target device to


another with different screen size, default
keypads will be changed accordingly

© 2015 Exor International S.p.A. - All rights reserved 35


Keypad customization

• Alphabet and Numeric can be changed


as per our needs

• Additional keypads can be included


into the project

© 2015 Exor International S.p.A. - All rights reserved 36


User Management customization

© 2015 Exor International S.p.A. - All rights reserved 37


User Management customization

• User Management template refers to project pages


that comes out into Runtime when:
• Perform a login
• Perform a switch user
• Open the User Editor
• Add a user
• Delete a user
• Change a password

• This pages are included


into every project under
UserMgmtTemplates
folder

© 2015 Exor International S.p.A. - All rights reserved 38


User Management customization

• To edit and customize this pages you need simply to open them
into JMobile Studio:
• By drag and drop files into JMobile application
• Going to File > Open
and selecting *.jmx
as filename

• Pages can be changed


as per needs

© 2015 Exor International S.p.A. - All rights reserved 39


User Management customization

• Is possibile also to change:


• Login page
• Switch user page

• with one template with


a combox for username
• This result useful to
avoid to type everytime
username

• In order to be effective
need simply to replace
default template with the
ones named “_combo”

© 2015 Exor International S.p.A. - All rights reserved 40


Thank you!

You might also like