43
LogicON Software Suite User Guide Document Revision 1.1 (Updated January 2, 2012) © 2012 Vital Systems Inc Phoenix, AZ USA For more information please visit the product web page: www.vitalsystem.com/logicon

LogicON Software Suite User Guide

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LogicON Software Suite User Guide

LogicON Software Suite User Guide

Document Revision 1.1 (Updated January 2, 2012)

© 2012 Vital Systems Inc Phoenix, AZ USA

For more information please visit the product web page: www.vitalsystem.com/logicon

Page 2: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 1 www.vitalsystem.com

Contents License Agreement ........................................................................................................................................................ 3

I. Introduction ................................................................................................................................................................ 4

LogicON Studio .......................................................................................................................................................... 4

LogicON Soft PLC........................................................................................................................................................ 4

LogicON Event Logger ................................................................................................................................................ 4

II. LogicON Studio User Interface ................................................................................................................................... 5

1. Project Explorer ..................................................................................................................................................... 6

1.1 Ladder Context Menu Items ............................................................................................................................ 6

2. Tool Box ................................................................................................................................................................. 7

3. Properties .............................................................................................................................................................. 7

4. Output .................................................................................................................................................................... 7

5. Ladder Editor ......................................................................................................................................................... 8

6. Graphical System Designer .................................................................................................................................... 9

7. Soft PLC Ladder and Global Status ....................................................................................................................... 10

8. Scan Configuration ............................................................................................................................................... 11

9. Tag Database ....................................................................................................................................................... 12

10. Comms File Configuration ................................................................................................................................. 12

11. Device Properties ............................................................................................................................................... 13

12. Cross Reference ................................................................................................................................................. 14

13. Soft PLC Operation ............................................................................................................................................. 15

III. System Files ............................................................................................................................................................ 16

1. Integer ................................................................................................................................................................. 16

2. Float ..................................................................................................................................................................... 16

3. Bit ......................................................................................................................................................................... 17

4. Timer .................................................................................................................................................................... 17

5. Counter ................................................................................................................................................................ 18

6. Comms File .......................................................................................................................................................... 18

7. Interlocks ............................................................................................................................................................. 19

8. 3G Device Data .................................................................................................................................................... 19

7.1 Inputs ............................................................................................................................................................. 20

7.2 Outputs .......................................................................................................................................................... 20

7.3 Rx Outputs ..................................................................................................................................................... 21

7.4 Control Words................................................................................................................................................ 21

IV. LogicON Ladder Commands ................................................................................................................................... 22

Page 3: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 2 www.vitalsystem.com

1. Normally Open Command ................................................................................................................................... 22

2. Normally Closed Command ................................................................................................................................. 22

3. Compare Command ............................................................................................................................................. 22

4. Output Command ................................................................................................................................................ 23

5. Timer/Counter Command .................................................................................................................................... 24

6. Move Command .................................................................................................................................................. 25

7. Send Message Command .................................................................................................................................... 26

8. Math Command ................................................................................................................................................... 26

9. Reset Command ................................................................................................................................................... 27

10. Event Log Command .......................................................................................................................................... 27

11. Data Convert Command .................................................................................................................................... 28

12. Ladder Subroutine Command ............................................................................................................................ 28

V. Text Formats ............................................................................................................................................................ 30

Message with no Parameters .................................................................................................................................. 30

Message with Parameters ....................................................................................................................................... 30

Parameter Formatting ............................................................................................................................................. 30

VI. FAQs ....................................................................................................................................................................... 32

1. Why switch from SuperLogic to LogicON? ..................................................................................................... 32

2. Where do I Start? ........................................................................................................................................... 32

Creating your First Ladder Program..................................................................................................................... 32

Importing a Ladder Program................................................................................................................................ 34

3. What are Ladder Subroutines and how do I use them? ................................................................................. 36

4. What are Interlocks and how do I use them?................................................................................................. 38

5. What is the Graphical System Designer and how do I use it? ........................................................................ 39

6. Is it possible to access the registers of a subroutine instance? ...................................................................... 42

Page 4: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 3 www.vitalsystem.com

License Agreement Before using this software and accompanying software tools, please take a moment to go thru this License agreement. Any use of this software and associated hardware indicate your acceptance to this agreement. LogicON Software Suite is protected by copyright laws and international treaties. Unauthorized reproduction or distribution of this software may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.

It is the nature of all mechanical and electrical systems to be hazardous. In order to be permitted to use LogicON Software Suite with any machine you must agree to the following terms: I agree that no-one other than the user of this software, will, under any circumstances be responsible for its operation, safety, and use. I agree there is no situation under which I would consider Vital Systems, or any of its distributors to be responsible for any losses, damages, or other misfortunes suffered through the use of the LogicON Software Suite. I understand that the LogicON Software Suite and associated hardware is very complex, and though the engineers make every effort to achieve a bug free environment, that I will hold no-one other than myself responsible for mistakes, errors, material loss, personal damages, secondary damages, faults or errors of any kind, caused by any circumstance, any bugs, or any undesired response by the software while running my machine or device. I fully accept all responsibility for the operation of this software and associated hardware and for its operation by others who may use the software. It is my responsibility to warn any others who may operate any device under the control of the software of the limitations so imposed. I fully accept the above statements, and I will comply at all times with standard operating procedures and safety requirements pertinent to my area or country, and will endeavor to ensure the safety of all operators, as well as anyone near or in the area of operation.

Page 5: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 4 www.vitalsystem.com

I. Introduction The LogicON Software Suite allows programming distributed Ethernet Smart3G I/O controllers from a central Windows PC using Ladder Logic. Multiple networks of I/O cards are supported for optimum I/O scanning performance. LogicON Software Suite is comprised of a backend Soft PLC and a front end Studio interface. The Soft PLC can execute multiple Ladder Logic programs within sub millisecond scan time. The front-end Studio software sports dockable windows that allow the user, among other features, to create and monitor ladder programs and configure networks of Smart3G cards. The Studio also shows real time I/O scanning performance to debug network and I/O issues. The Ladder Logic programming includes a rich set of commands including TCP/IP messaging to other applications on the local or remote PC. Software Components

LogicON Studio LogicON Studio is an application used to configure and interface with the Soft PLC, as well as to create and monitor Ladder Logic programs. Features:

Configure and control the Soft PLC with feature-rich tools.

Create powerful Ladder Logic Programs with a diverse set of commands and system files to work with.

Control the Soft PLC’s performance and System Files while in action.

Monitor the Soft PLC network as well as each individual Smart3G device.

Manage your workspace with studio-style docking window panels.

LogicON Soft PLC LogicON Soft PLC is a software PLC (Programmable Logic Controller) for the Windows platform and specially designed for the use of Smart 3G PLC devices. Features:

Create a master PLC that can simultaneously work with several Smart3G devices over multiple networks.

Hi-speed and precise Smart3G device scanning.

Run multiple Ladder Logic Programs in parallel with sub-millisecond speeds.

Interact with other devices and applications with message sending and receiving using multiple Network Protocols (e.g. UDP, TCP).

LogicON Event Logger LogicON Event Logger is an application specifically designed to receive event messages from the Soft PLC. Features:

Capture events from the Soft PLC even from a remote computer.

Soft PLC Events are time-stamped, custom-colored, and filtered by custom categories for manageable logging.

Automatically writes captured events to a file for future reference.

Page 6: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 5 www.vitalsystem.com

II. LogicON Studio User Interface

The LogicON Studio Application serves as the user’s direct interface with the Soft PLC, it’s status, which devices are being scanned, and what ladder programs are executing. As such, it has two major purposes:

1. Allows the user to create ladder programs using a rich graphical and manageable user interface. 2. Allows user-control for the SoftPLC as well as monitoring, debugging, and controlling ladder programs

running from the Soft PLC. The Icon Menu Bar

1. Create New Project 2. Open Existing Project 3. Save Project 4. View Project Explorer 5. View Toolbox 6. View Property Window 7. View Output Window 8. Find 9. Connect to Soft PLC 10. View Soft PLC Status 11. Install Current Project to Soft PLC

Page 7: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 6 www.vitalsystem.com

12. Ladder Program Selector Combo Box (Affects 13 – 16) 13. Run Selected Ladder Program on Soft PLC 14. Stop Selected Ladder Program on Soft PLC 15. Reload Selected Ladder Program on Soft PLC 16. Monitor Selected Ladder Program

1. Project Explorer The Project Explorer Window is the basic navigation and management window for the studio. It can be accessed from the View Menu or by clicking the Project Explorer Icon under the Menu Bar. The Project Explorer diplays:

The active project

The Ladder Programs on the active project.

The Ladder Subroutines on the active project.

The Scan Configuration for configuring which devices the Soft PLC will scan.

The Tag Database for creating any form of text definitions.

The Comms File Configuration for configuring which Comms Files should receive certain messages.

The Devices that are being scanned, provided that a connection to the Soft PLC is present.

1.1 Ladder Context Menu Items

View Designer – Opens the Ladder Program’s Graphical System Designer. Compile – Compiles the Ladder Program. Enable Autorun – Indicates that the Soft PLC will automatically run the Ladder Program on start up. Delete – Permanently Deletes the Ladder Program File. Run – Executes the Ladder Program on the SoftPLC. Start Monitoring – Monitor the Ladder Program. Lock – Locks the Ladder Program on the SoftPLC. No Actions can be taken on a running Ladder Program (e.g Run, Stop, Reload, Install Project). Status – View the Soft PLC Status.

Page 8: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 7 www.vitalsystem.com

2. Tool Box The Tool Box contains the needed tools for creating a ladder program. Adding contacts, rungs, or branches can be done from here. The Tool Box can be accessed from the View Menu, or by clicking the Tool Box Icon under the Menu Bar. For a list of available commands, see LogicON Ladder Commands.

3. Properties

The Properties Window displays the editable properties for each command in the Ladder Program Editor. It can be accessed by Right-Clicking inside a Ladder View and Selecting “Properties”, from the View Menu, or by clicking the Property Window Icon under the Menu Bar. NOTE: Modification is disabled when the ladder program is being monitored.

4. Output

The Output Window provides feedback such as compilation status, debug messages, and errors. The Output Window can be accessed by clicking the Output Window Icon under the menu bar, otherwise it pops-up automatically when an output notification is generated.

Page 9: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 8 www.vitalsystem.com

5. Ladder Editor

The Ladder Editor is where the user can create, modify, and monitor a ladder program. This window can be accessed by Double-Clicking a ladder program node under “Ladder Programs” in the Project Explorer, or by creating a new Ladder Program. To create a new Ladder Program:

Right-Click on the “Ladder Programs” node in the Project Explorer.

Select “Add New”.

Input a valid Ladder Program Name (this can be changed later on).

Confirm. The Ladder Editor for a ladder program is also automatically opened when monitoring is enabled from the Project Explorer, or the Icons Menu Bar. NOTES:

- It is possible to copy and paste rungs and contacts between multiple Ladder Editors. - When modifying a contact, it can almost always be done from the Property Window.

Page 10: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 9 www.vitalsystem.com

6. Graphical System Designer

The Interlock Layout View provides a system-wide schematic of the subroutine objects that the ladder program utilizes and how they are interlocked. Subroutine instances may be created, edited or deleted from this view. The Interlock Layout View also provides an easier way to edit the interlocking of the subroutine instances through graphical means.

Page 11: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 10 www.vitalsystem.com

7. Soft PLC Ladder and Global Status

The Ladder Status window displays all the files allocated by the Soft PLC for a given ladder program. The current values may be viewed in this window if there is a connection to the Soft PLC and if the Soft PLC is currently running the ladder program. The user may also make changes to the Soft PLC files from this window, which gives the user a degree of manual control on the execution of the ladder program. The Status Window for a particular Ladder Program can be accessed by right-clicking in it’s Ladder Editor and selecting “PLC->Status”, by right-clicking it’s node in the Project Explorer and selecting “Status”, or by selecting the ladder from the combo box in the icon menu bar, and clicking the “Ladder PLC Status” Icon. A Ladder Status View displays the only the Ladder Program’s allocated files. The global files and Comms files may be viewed and modified from the Global Status Window. It can be accessed by Clicking the “LogicON PLC” Menu and selecting “Status”.

Page 12: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 11 www.vitalsystem.com

The Ladder Status Window displays the time for the ladder to finish execution, while the global status displays the time it took to complete one process cycle for the SoftPLC (Scanning all devices and executing all ladders). NOTE: Ladder programs may be set to Auto-run on Soft PLC startup, by toggling the checkbox on a ladder status window, or by right-clicking the ladder program node in the Project Explorer and toggling auto-run.

8. Scan Configuration

The Scan Configuration Window allows the user to configure which devices will be scanned by the Soft PLC and how they will be scanned. This Window can be accessed by double-clicking the “Scan Configuration” node in the Project Explorer. The Scan Configuration contains the following configuration parameters:

Network Adapter IP – IP address of the local machine for a selected network.

Device ID Start and End – The range of devices to add to the Soft PLC scan list.

Transmit Interval – The interval in milliseconds to transmit data to the device.

Receive Interval – The interval in milliseconds to receive data from the device.

Timeout Multiplier – Timeout Multiplier is used to shift left 4 and multiply the result with Poll Interval to calculate connection timeout value.

Example: Given a Timeout Multiplier of 3 and Poll Interval of 100:

(4 << 3) x 100 gives a timeout of 3200 ms or 3.2 seconds.

Remote IO – If the device is in Remote IO, then outputs can be written to, otherwise not. NOTE: When duplicate data is present, only the first instance of the scan configuration is added to the scan list.

Page 13: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 12 www.vitalsystem.com

9. Tag Database

LogicON Studio supports user-defined definitions for file addressing. These user-defined definitions are called tags, and are handled in the Tag Database. The Tag Database can be accessed by clicking the “Tag Database” node in the Project Explorer. Creating a tag has the following parameters:

Name – The definition mask over the real value of the tag.

Value – The real LogicON address Format.

Comment Advantages of using tags:

More Descriptive addresses (Ex. [192.168.0.20]OUT:3 may be tagged as “ESTOP_SIGNAL”).

If you are using a tag multiple times in the ladder program, you can simply change the value in the Tag Database Editor once and it will affect all commands using the tag.

Message Formats can be defined using tags.

10. Comms File Configuration

The Comms File configuration is used to configure where received messages will be stored. Genrally, one Comms File is tied to one port, meaning all received messages coming from that port will be received into the Comms File.

Page 14: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 13 www.vitalsystem.com

The Comms File Configuration can be viewed by double-clicking the “Comms File Configuration” node in the Project Explorer. A Comms File Configuration entry requires the ff parameters:

Name – this value can be used in the same way that tags can.

CMF ID – The Comms File to use.

Protocol – The protocol used to listen for incoming messages.

Net Params – additional parameters required depending on the protocol used. Note: As of the writing of this document, the Net Param entries are as follows:

Smart3G_Serial or Smart3G_Msg: NetParam1 would be the IPaddress of the 3G device to receive the message from.

UDP: Net Param1 would be the Port to listen for incoming messages.

11. Device Properties

The Device Properties Window is used to view the current status of the 3G device. It can only be accessed after connecting to the Soft PLC and Double-Clicking a device node in the Project Explorer.

Page 15: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 14 www.vitalsystem.com

12. Cross Reference

The Cross Reference View provides a list of which Devices, Tags, and SoftPLC Files are used in the current project. It

also lists which rung and Ladder Program is referencing the file, device, or tag.

Page 16: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 15 www.vitalsystem.com

13. Soft PLC Operation Although Ladder Compilation can be done on LogicON Studio, a Ladder Logic program can only be run with a connection to the PLC. NOTE: Make sure that the LogicON Soft PLC Application is running when you attempt to connect to it. Click the Connect Button (Highlighted in Red) to connect. When attempting to connect to the Soft PLC, a window with Connection Parameters will appear. Poll Frequency determines the interval (in milliseconds) to request monitoring data from the PLC. Setting this to a low value while monitoring multiple ladder programs may eat up too much CPU resources. Take note of the connection status to the lower left of the window.

If the connection attempt is successful, you are given the option to then Import, Install, or Delete an active project on the Soft PLC.

Install – Installs the current project on the Studio to the Soft PLC. After Installation, the Soft PLC will automatically run the project on startup. Additionally, the Soft PLC will start scanning and run any Ladder programs that are set to auto-run. Installing the project is required if: 1. There is no Active Project on the Soft PLC. 2. The Scan Configuration, Tag Database, or Comms File Configuration was modified. 3. A new Ladder Program was added to the project. NOTE: Modifying an existing ladder program only requires a ladder program reload to the Soft PLC.

Import – Retrieve the project from the PLC.

Delete – Deletes the auto-run project from the Soft PLC.

Page 17: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 16 www.vitalsystem.com

III. System Files LogicON Soft PLC supports multiple addressable file types of which are: signed 32-bit Integer, signed 32-bit Float (floating point value), bit values (1 or 0), Timers, Counters, 3G Device Data Structures, Interlocks and Comms Files (Communication Files). File types also possess type-specific attributes that present more information on the type. All running Ladder Programs share a global set of data and each subroutine has a set of it’s own files that are manually allocated. Below is a more detailed explanation for each of these files. Legend: Description – information on the file type. LogicON Keyword – The keyword used to reference the file. Scope – A “Ladder File” scope means that each ladder has its own set of this file type. A “global” scope means that the file type is shared between multiple ladders. Index – The available range of indexing values. Attributes – The attributes that are present for the given file. The file type of the attribute is enclosed in parentheses. Bit Indexing returns a bit using a specified bit position (Known as BIN in LogicON). Format – The Format address used to reference a specific file. Italicized text enclosed in <> are variable values. Usage – How the file can be used.

1. Integer

Description A 32-bit signed integer. Referred to as Register in LogicON.

Scope Ladder File, Global

LogicON Keyword REG

Index Global: 0 to 199

Ladder Subroutine: 0 to <allocatedValue - 1>

Attributes Bit Indexing [0 – 31]

Format REG:<file index>.<attribute>

Usage Read, Write

2. Float

Page 18: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 17 www.vitalsystem.com

Description A 32-bit signed floating point value.

Scope Ladder File, Global

LogicON Keyword FLT

Index Global: 0 to 199

Ladder Subroutine: 0 to <allocatedValue - 1>

Attributes

Format FLT:<file index>

Usage Read, Write

3. Bit

Description A bit value that can be 0 or 1.

Scope Ladder File, Global

LogicON Keyword BIN

Index Global: 0 to 199

Ladder Subroutine: 0 to <allocatedValue - 1>

Attributes

Format BIN:<file index>

Usage Read, Write

4. Timer

Description LogicON Timer Register that can keep time in a resolution of Milliseconds. The timer keeps time until a user-defined preset value is reached. Directly usable only with the Reset and Timer command.

Scope Ladder File, Global

LogicON Keyword TMR

Index Global: 0 to 99

Ladder Subroutine: 0 to <allocatedValue - 1>

Attributes

AC – Accumulated Time in milliseconds (REG value).

PR – Preset Value in milliseconds (REG value).

EN – Timer Enabled (BIN value).

DN – Done Timing (BIN value).

Page 19: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 18 www.vitalsystem.com

TM – Currently Timing (BIN value).

Format TMR:<file index>.<attribute>

Usage Read

5. Counter

Description LogicON Counter Register that increments it’s accumulated value by 1 every time the rung state transitions to true. Directly usable only with the Reset and Counter Command.

Scope Ladder File, Global

LogicON Keyword CTR

Index Global: 0 to 99

Ladder Subroutine: 0 to <allocatedValue - 1>

Attributes

AC – Accumulated Counts (REG value).

PR – Preset Value (REG value).

EN – Timer Enabled (BIN value).

DN – Done Timing (BIN value).

Format CTR:<file index>.<attribute>

Usage Read

6. Comms File

Description

The Comms File (Communication File) is a buffer for received messages. When using this in an address (e.g. CMF:0), it refers to using the buffer which is text. NOTE: Receiving messages into Comms Files requires the appropriate configuration in the “Comms File Configuration” in the LogicON Project.

Scope Global only

LogicON Keyword CMF

Index 0 – 49

Attributes

NEW – Flag for checking if the message is new. Must be turned off in the Ladder Program.

(BIN value).

OVR – Becomes active if NEW is true and the buffer is overwritten with newer data (BIN

value).

Page 20: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 19 www.vitalsystem.com

SZ – The size of the message in bytes (REG value).

Format CMF:<file index>.<attribute>

Usage Read

7. Interlocks

Description A set of 32 bits that are directly shared between two Ladder Subroutine Commands.

Scope Ladder Subroutines. Globally Accessible through scope modifier.

LogicON Keyword ILK

Index 0 – 9

Attributes Bit Indexing [0 – 31]

Format ILK:<file index>.<attribute>

Usage Read, Write

8. 3G Device Data

Description

3G Device Data is a unique type of data structure that contains the current status of the Smart 3G device. It is only used with devices that use the Smart3G connection protocol (e.g Smart 3G PLC). Device Data is global and can be shared between all running ladders on the Soft PLC. NOTE:

There are more device specific file types under device data.

To include a 3G device in LogicON SoftPLC, ensure that it is included in the “Scanner Configuration” of the LogicON project.

Scope Global

LogicON Keyword [<3GDeviceIP>]

Index

Attributes

ONLINE – returns 1 if the 3Gdevice is online, and 0 if otherwise (bit)

RxRPI – The actual receive response time. (REG)

OFC – Offline counter. Increments by 1 every time the device registers as offline. (REG)

Format [<DeviceIP>].<Attribute>

Usage

Page 21: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 20 www.vitalsystem.com

Examples

[192.168.0.10].ONLINE

[Dev71].RxRPI

[Net.10].OFC

(Dev71 and Net are defined in the tag database)

7.1 Inputs

Description Input states received from the Smart3G Device. (BIN values)

Scope Device

LogicON Keyword IN

Index Global: 1 to 8

Ladder Subroutine: 1 to <allocatedDevices * 8>

Attributes

Format Global: [<DeviceIP>]IN:<fileIndex>

Ladder Subroutine: IN:<fileIndex>

Usage Read

Examples [Dev71]IN:5

[192.168.0.30]IN:8

7.2 Outputs

Description

Output states that are written to the Smart3G Device. (BIN values) NOTE: To write to the 3G device’s outputs, ensure that the device is listed with the “RemoteI/O” set to true in the project’s Scanner Configuration.

Scope Device

LogicON Keyword OUT

Index Global: 1 to 8

Ladder Subroutine: 1 to <allocatedDevices * 8>

Attributes

Format [<DeviceIP>]OUT:<file index>

Usage Read, Write

Examples [Dev71]OUT:5

Page 22: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 21 www.vitalsystem.com

[192.168.0.30]OUT:7

7.3 Rx Outputs

Description Output states that are received from Smart3G Device. Normal outputs are the states transmitted to the device, while Rx Outputs are the output states that are actually on the device. (BIN values)

Scope Device

LogicON Keyword RxOUT

Index 1 – 8

Attributes

Format [<DeviceIP>]RxOUT:<file index>

Usage Read

Examples [Dev71]RxOUT:5

[192.168.0.30]RxOUT:8

7.4 Control Words

Description Special purpose 16-bit integers for device control. (16-bit integer)

Scope Device

LogicON Keyword CW

Index 1 and 2 are received from the device (read only); 9 and 10 are transmitted (write only)

Attributes Bit Indexing [0 – 15]

Format [<DeviceIP>]CW:<file index>.<attribute>

Usage Read, Write (refer to index due to special cases)

Page 23: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 22 www.vitalsystem.com

IV. LogicON Ladder Commands The real functionality of the LogicON Soft PLC relies on the ladder programs that it runs. A Ladder Program is comprised of multiple rungs that are executed from top to bottom rung. Each rung is comprised of two sets of commands, namely the inputs and outputs. Input commands are used to evaluate if the state of the rung (active or not) which affects the execution of the output commands. Output commands are commands that carry out actions in the ladder program such as writing to file values. Some output commands are not executed if the rung is inactive, while others will simply behave in a different manner.

1. Normally Open Command

Description An input command whose condition is true when the bit pointed to by the address is True (0 or high).

Command Type Input

Parameters Address – the referenced bit to read from.

Usage Read

File Types BIN

2. Normally Closed Command

Description An input command whose condition is true when the bit pointed to by the address is False (0 or low).

Command Type Input

Parameters Address – the referenced bit to read from.

File Types BIN

3. Compare Command

Page 24: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 23 www.vitalsystem.com

Description A command whose condition depends on the logical comparison of the numeric values of two referenced files. Can also use lexical comparison with 2 text values.

Command Type Input

Parameters

Arg1 – The first argument (referenced file or constant) for comparison

Arg2 – The second argument (referenced file or constant) for comparison

Operation – The logical comparison to make between the 2 arguments

Equal ( = ) – true if the 2 arguments are equal.

Not Equal ( != ) – true if the 2 arguments are not equal.

Greater Than ( > ) – true if Arg1 is greater than Arg2.

Less Than ( < ) – true if Arg1 is less than Arg2.

Greater Than or Equal to ( >= ) – true if Arg1 is greater than or equal to Arg2.

Less Than or Equal to ( <= ) – true if Arg1 is less than or equal to Arg2.

File Types BIN, REG, FLT, Text (see Text Formats section)

4. Output Command

Description This command sets the addressed bit to true or false. When the rung condition is true, the addressed bit or output is set to true (1 or high) and with rung condition false, the bit or output is set to false (0 or low).

Command Type Output

Page 25: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 24 www.vitalsystem.com

Parameters

Address – the referenced bit to write to.

Output Type – Controls the behavior of the command.

Normal ( ) – If the rung is active, it writes 1, otherwise it writes 0.

Latch ( L ) – If the rung is active, it writes 1, otherwise it does nothing.

Unlatch ( U ) – If the rung is active, it writes 0, otherwise it does nothing.

Latch Transition to True( ^ ) – Writes 1 only when the current rung state becomes

active and the previous rung state was inactive.

Latch Transition to False( v ) – Writes 1 only when the current rung state becomes

inactive and the previous rung state was inactive.

File Types Binary files (BIN, Device Outputs, Register Bits)

5. Timer/Counter Command

Description The Timer/Counter command times/counts until a preset value is reached.

Command Type Output

Parameters

ID – The timer or counter register that is bound to this command.

Preset – A 32-bit integer value that specifies when the command stops timing/counting. For timers, this value is in milliseconds. Type – Controls the behavior of the command. Timers have a resolution of 1 millisecond. Timer Types:

ON DELAY – This timer starts timing when the rung condition becomes true. As long as the rung condition is true, the accumulator keeps on timing until it reaches the preset value. When Accumulator is equal to Preset, the ‘Done’ bit is set and the Timing bit is reset. The Timer Enable bit follows the rung condition. The Done bit, Timing Bit and Enable Bit are reset

Page 26: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 25 www.vitalsystem.com

as soon as the rung condition becomes false. The Accumulator is reset to 0 until the rung condition becomes true again.

OFF DELAY – This timer starts timing when the rung condition becomes False. The enable bit follows the rung condition. When the rung condition becomes false, the Accumulator increments at a rate of 1 millisecond, until it reaches the preset value or the rung condition becomes true again. The Done bit is a combination of Enable bit and the Timing bit. The two bits are ‘OR’ together to generate the Done Bit. When the Accumulator is equal to the Preset value, the timing and done bits are reset. Counter Types:

UP COUNT – This result will count the rung state transitions from 0 to the preset value. Each transition of rung condition from false to true is registered by incrementing the accumulator by 1. When the accumulator is equal to the preset value, the Done Bit is set to true. The Enable Bit follows the rung condition. To reset the counter, Reset command is used. At reset, the accumulator and the Done Bit are set to zero. Please refer to Timer/Counter Reset element.

File Types TMR, CTR

6. Move Command

Description Copies a specified source file’s value into a specified destination file’s value while the rung is active.

Command Type Output

Parameters Source – The referenced file or constant value to be moved.

Destination – The file where the source file’s value is written.

File Types BIN, REG, FLT

Page 27: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 26 www.vitalsystem.com

7. Send Message Command

Description Sends a message over a network using a specified protocol, IP and port when the rung becomes active and the previous state was inactive.

Command Type Output

Parameters

IPandPort – Format: IP:Port. The IP address and port to send the message to. Smart3G protocol ignores the port value. Message Format – The formatted message to send.

Protocol – The protocol used to send the message over the network.

UDP

TCP

EthernetIP

Smart3G_Serial

Smart3G_Msg

File Types Text (see Text Formats section).

8. Math Command

Description Performs a binary and unary mathematical operations depending on how many arguments were specified and writes the result to a specified destination file while the rung is active.

Command Type Output

Parameters

Arg1 – The first argument. Arg2 – The second argument.

Binary Operation – operation to perform between the two arguments. All Bit manipulation values must be done with REG (integer) values. When float values are used, the values after the decimal point are dropped.

None – the result is the value of Arg1. Arg2 is ignored.

Addition

Subtraction

Multiplication

Division

Power/Exponentiation

BitAND - Bitwise AND

BitOR – Bitwise OR

Page 28: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 27 www.vitalsystem.com

BitXOR – Bitwise Exclusive OR

BitShiftLeft – Shifts Arg1’s bit value by a specified number of positions (Arg2’s value) to the left.

BitShiftRight – Shifts Arg1’s bit value by a specified number of positions (Arg2’s value) to the right.

Unary Operation – operation to perform on the result of the Binary Operation.

None

Negative – Negates the value.

Bitwise Inversion – Invert the bit value.

Absolute – Absolute value.

Square Root

Sine

Cosine

Tangent

Cosecant

Secant

Cotangent

Natural Logarithm

Common Logarithm

File Types REG, FLT

9. Reset Command

Description Resets a timer or counter when the rung becomes active and the previous state was inactive.

Command Type Output

Parameters Address – The timer or counter to reset.

File Types TMR, CTR

10. Event Log Command

Description Logs an Event Message to the LogicON Event Logger Application when the rung becomes active and the previous state was inactive.

Command Type Output

Parameters Remote IP – The IP address of the machine that is running the LogicON Event Logger.

Category – Category to filter events.

Page 29: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 28 www.vitalsystem.com

Message Format – The event’s message.

Fore Color – The font color of the event message.

Back Color – The background color of the event message.

File Types (see Text Formats section).

11. Data Convert Command

Description Converts data from a specified range of bytes in the Comms File Buffer and writes it to a specified destination while the rung is active.

Command Type Output

Parameters

Source – The Comms File buffer to read from.

Destination – The address of the file to save the data to.

Start Index – The start index of the range to read.

Length – The length (in bytes) of the range to read.

Convert Type – The conversion method to use.

Text – Convert the data as seen in the message. Ex. A received message “256”

converts to a numerical value of 256.

Bytes – Convert the bytes of the message into an integer. Ex. A received message of

“256” converts to a numerical value of 808858930.

File Types Comms File Buffer (read), REG or FLT (write)

12. Ladder Subroutine Command

Description Creates a Subroutine Ladder Program instance from the Ladder Class Library.

Command Type Output

Parameters

Call Name – The unique identifier for this instance. Must be unique across the project.

Ladder Subroutine – The Ladder Class to be used.

Master Device IP – The device whose network will be utilized for this subroutine.

Page 30: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 29 www.vitalsystem.com

Slave Device IDs – The devices in the same network as the master device that will be used to

extend the master device’s I/O.

Interlock[0 – 9] – The list of other Ladder Subroutine Commands to communicate with.

File Types Comms File Buffer (read), REG or FLT (write)

Page 31: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 30 www.vitalsystem.com

V. Text Formats Where messaging and text input or output is concerned, LogicON requires the use of text written in a particular format (specifically a format extended from the C# string Format).

Message with no Parameters Format:

“ <body of message> ” An unchanging text message simply requires the message to be enclosed within quotation marks. Example:

“Message Received”.

Message with Parameters Format with 1 parameter:

“<text here>{0}<text here>”, <parameter> Format with 2 parameters:

“<text here>{0}<text here>{1}”, <parameter0>, <parameter1> When using variables/parameters in a message, the location and parameter number (zero-based index) must be explicitly placed within the message body and enclosed in curly braces { }. After the message body (the part enclosed in quotation marks), parameters must be separated with the use of commas ( , ). A parameter’s address format must be used, meaning it has the file type and index specified. Any primitive file (REG, FLT, BIN and the Comms File Buffer) type can be used as a parameter, but complex files (TMR, CTR, and 3G device data) are not allowed, however their attributes may be used as they are primitive types (TMR:0.PR, CTR:4.AC, [192.168.0.10]OUT:1). Examples:

“Packages Acquired: {0}”, REG:5 Given REG:5 has a value of 512, The message is: Packages Acquired: 512

“Last Value: {0}, Current Value {1}”, FLT:0, FLT:1

Given FLT:0 has a value of 0.11, and FLT:1 has a value of 26.05, The message would be: Last Value: 0.11, Current Value 26.05

“Scan Time was {0} milliseconds”, TMR:2.AC

Given TMR:2 has an accumulated value of 9999, The message would be: Scan Time was 9999 milliseconds

Parameter Formatting Aside from message formatting, parameters may also be formatted within the message body. For a full listing on this, see the C# Standard Numeric String Format and the C# Custom Numeric String Format documentation on MSDN.

Page 32: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 31 www.vitalsystem.com

Below are some of the more commonly used Parameter Formats: Padding a Minimum Number of Zeroes Before a Number and After it’s Decimal Point:

“{0:<leading zeros>.<trailing zeros after decimal point>}” Example:

Given a value of 120 and a format of “{0:0000.00}”, the text value would be 0120.00 Getting A Substring from a Comms File Buffer:

“{0:<start index>,<length>}” Start Index – The index of the character to start the substring. Length – The number of characters in the substring. Example:

Given the message “abcdefg” is in the buffer of Comms File 0 (CMF:0), and the format: “{0:1,4}”. The text value would be: bcde

Given the message “0123456789” is in the buffer of Comms File 0 (CMF:0), and the format: “{0:0,7}”. The text value would be: 0123456.

Page 33: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 32 www.vitalsystem.com

VI. FAQs

1. Why switch from SuperLogic to LogicON?

Category SuperLogic LogicON

Platform Program Ladder Logic commands to a Smart3G device.

Run “Master-Level” Ladder Logic Programs from a PC to control multiple devices from one source.

Management Ladder programs must be monitored and downloaded on each individual Smart3G device in the system.

System-wide monitoring and control from one PC. Smart3G devices can be set to Remote I/O or run a local SuperLogic program while receiving commands from LogicON SoftPLC.

Network UDP, Modbus, and Serial data transmission.

Can utilize existing data transmission methods plus new SBP (Smart Broadcast Polling) Protocol managed through LogicON SoftPLC reduces network traffic by up to 75%.

Ladder Logic Use SuperLogic Application to develop and monitor Ladder Logic Programs for each Smart3G device.

Use of Subroutine Templates allows generic code to be reused in multiple instances.

More contact/command types.

More powerful Ladder Logic functionality.

User-defined tags make programs more user-friendly.

Advanced tools such as “Graphical System Design” for faster system installation and debugging.

Interoperability

Requires a third party application utilizing the Smart3G Scanner API to perform more complex tasks (e.g. database lookup when barcode received).

Built-in Smart3G Scanner API eliminates the need for third party applications. Existing applications can send messages to LogicON Soft PLC via Comms Files. LogicON can send Ethernet messages to existing applications and devices via the “Send Message” contact.

2. Where do I Start?

Creating your First Ladder Program

1. Click File, then New LogicON Project. You should then see the screen below

Page 34: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 33 www.vitalsystem.com

2. Right Click on the Ladder Programs folder and select Add New.

3. Type in the name of your new Ladder Program File.

4. You may now start editing your new Ladder Program. You can add contacts from the Toolbox Window

(Accessible from the View Toolbox Menu Highlighted in Red).

Page 35: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 34 www.vitalsystem.com

5. Your new project may be given a name when you save it. From the Menu Bar, click File -> SaveAs

Importing a Ladder Program

1. With a New or Existing LogicON Project, Right Click on either the “Ladder Programs” Folder or “Subroutine Templates” folder to start importing.

2. Select another LogicON Project or a SuperLogic Ladder Program

Page 36: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 35 www.vitalsystem.com

3. Imported SuperLogic Programs will most probably require a few conversions, some of which are performed automatically.

Page 37: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 36 www.vitalsystem.com

3. What are Ladder Subroutines and how do I use them? A Ladder Subroutine is a type of Ladder Program that only needs to be created once and can be used multiple times in a Ladder Program as well as multiple Ladder Programs. The use of subroutines can greatly minimize programming time due to the use of generic code. Ladder Subroutines also have the following special features: Master Device and Slaves – Allows Smart3G devices to be generically used within each ladder subroutine instance. The number of devices that can be used much match the value in the Subroutine Properties. Interlocks – Provides a means to share data amongst Ladder Subroutine instances. Each Ladder Subroutine instance has a set of 10 Interlocks with each Interlock being a shared 32-bit value. To use a Ladder Subroutine in an existing Ladder Program, you must first create the Ladder Subroutine File in the Ladder Class Library.

1. Right Click on the Ladder Class Library Folder and select Add New.

2. Enter the name for your new Subroutine and your new Subroutine will be ready.

3. Registers must be manually allocated to the new Ladder Subroutine File. This can be done by right-clicking in the ladder editor and selecting Ladder Properties. The Subroutine Allocation properties should be displayed in the Property Window. In the example below, the Ladder Subroutine will use 5 integer registers, 10 binary registers, 10 timers, and 1 device.

Page 38: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 37 www.vitalsystem.com

4. To Add your new Ladder Subroutine to an Existing Ladder Program, you must add a Ladder Subroutine Command (from the Toolbox) to the specified Ladder Program.

5. Select the new contact and view it’s properties (to open the property window, press the button highlighted in red). Give your new subroutine instance a new Call Name (this value must be unique across the entire project) in the CallName property. In the LadderSubroutine property, you should see a drop down list of all your Ladder Subroutines. Select the one you wish to use.

Page 39: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 38 www.vitalsystem.com

6. You can make any number of subroutine instances in your Main Ladder Program now. Any changes you make to the Ladder Subroutine File will reflect on all instances of the Ladder Subroutine.

4. What are Interlocks and how do I use them? Interlocks are shared 32-bit values that provide a means for Ladder Subroutine Instances to communicate data with each other. Ladder Subroutine Instances are given 10 Interlocking channels to use. Details:

- Two Ladder Subroutine Instances can only interlock through ONE channel. - Interlocking Channels may or may not be on the same index (Channel 1 may be interlocked with Channel

6) - Once a channel is already interlocked, other subroutine instances cannot use that channel.

To create an Interlock, simply input the Call Name of the subroutine instance to interlock with on a specific channel.

Page 40: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 39 www.vitalsystem.com

In the above figure, subroutine instance “test1” is interlocking with “test2” via channel 1, while “test2” interlocks with “test1” over channel 0. Whatever value is written to ILK:1 of “test1” will appear on ILK:0 of “test2”.

5. What is the Graphical System Designer and how do I use it?

Page 41: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 40 www.vitalsystem.com

The Graphical System Designer provides a system-wide schematic of the Ladder Program and it’s subroutine instances. The Designer can be used to plot and map the physical layout of the system and how the subroutine instances interlock with each other. It can be accessed by right-clicking any Ladder program in the Project Explorer and selecting “View Designer”. Details:

Provides an easier method to create and manage Ladder Subroutines.

Mouse-Oriented Interlocking and editing.

Build your Main Ladder Program with subroutines.

WARNING: Changes made in the Graphical System Designer will reflect in the Ladder Program Editor. Interlocking in the Graphical System Designer:

1. Select the first subroutine Instance

2. Click the number key (1 – 9) on your Keyboard to determine which channel to use (NumKey 1 in this example).

Page 42: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 41 www.vitalsystem.com

3. Select the subroutine instance to interlock with and click the number key on your keyboard to determine which channel will be used. (NumKey 0 used here).

In this example, whatever value is written to ILK:1 of “test1” will appear on ILK:0 of “test2” and vice versa. This can be done multiple times and with multiple instances. The only rule of thumb is that each subroutine instance only has 9 interlock channels, hence it may interlock with up to 9 subroutine instances.

Page 43: LogicON Software Suite User Guide

LogicON Software Suite User Guide

© 2012 Vital Systems, Inc. 42 www.vitalsystem.com

6. Is it possible to access the registers of a subroutine instance? Every Ladder Subroutine instance has a set of manually allocated registers which can be accessed with a “scope modifier” in the address format. General Format: [callName]fileType:fileIndex.attribute

In the example above, the output contact will write to the 0

th bit of Interlock[0] in Subroutine Instance “Accum1”.

Details

This can be done with all internal registers of the subroutine instance NOTE: Subroutine Templates cannot access the registers of a specific instance from within the template code. However, if there is a need to access the registers of a specific subroutine instance from template code, you may have the Main Program read the registers of a specific subroutine instance and write it to the global registers which can be read from template code.