A.2.3. concept example programs, A.2.3.1. lpbkcncp, A.2.3.2. scancncp – Comtrol Modbus TCP User Guide User Manual

Page 94: A.2.3.1. lpbkcncp a.2.3.2. scancncp

Advertising
background image

94 - Appendix A. Programming the PLC via Concept

DeviceMaster UP Modbus/TCP User Guide: 2000447 Rev. I

Concept Example Programs

A.2.3. Concept Example Programs

Disclaimer: Comtrol supplies example PLC programs for demonstration purposes only.
They are intended for the sole purpose of an example loop-back demonstration in a
controlled lab environment. They are not intended for use in a production environment
and may not function correctly on all PLCs. Comtrol does not warrant these example
programs or any part thereof. The user assumes all liability for any modification to and
use of a modified example program.

The following PLC programs have been included with the released binary. They are designed to interface to a
DeviceMaster UP 1-port or port one of a DeviceMaster UP 2- or 4-port. Additional programming will be
required to interface to additional ports on a DeviceMaster UP 2- or 4-port.

Note: The following example programs were developed with version 2.6 of Concept and a Schneider Electric

Momentum PLC.

A.2.3.1. LPBKCNCP

This example program demonstrates a loop-back PLC program using Read Holding Registers and Write
Multiple Registers
messages in a standard “polling” type receive method. This program initializes receive and
transmit data sequence numbers at startup and then loops raw data via a loop-back plug on the serial port.
The data is transmitted and received and the sequence numbers are incremented.

The following files apply:

LPBKCNCP.SEC – Ladder logic and variable definitions in Concept programming format.

LPBKCNCP.CCF – Configuration file.

LPBKEXPL.RDF – Reference data template file.

See

Appendix B. LPBKCNCP Example Program

on Page 103 for more information.

A.2.3.2. SCANCNCP

This example program demonstrates a loop-back PLC program using the I/O Scanner utility on the Concept
PLC programming software. This program uses the I/O Scanner to send and receive serial data at a
predefined rate. The data is transmitted and received and the sequence numbers are incremented.

The following files apply:

SCANCNCP.SEC – Ladder logic and variable definitions in Concept programming format

SCANCNCP.CCF – Configuration file

LPBKEXPL.RDF – Reference data template file.

Note: The DeviceMaster UP should be reset before starting a PLC program using the I/O Scanner due to PLC

program execution scheduling. If the DeviceMaster UP is not reset, the sequence numbers may be out of
sync. This may result in receiving outdated raw serial data as well as an unexpected transmission of
serial data. A Transmit Unexpected Sequence Number error may also occur.

See

Appendix C. SCANCNCP Example Program

on Page 109 for more information.

Caution

Advertising