You are on page 1of 106

 

Nexgenie PLC User Manual 
Document No.: ED-2002-126 Version: 1.6  

___________________________________________________________________________________
Revision:

Version Date Description

1.0 Aug.2009 Nexgenie PLC User Manual first release

1.1 Nov, 2009 Nexgenie PLC User Manual updated


Updated with new features related information
- Interrupt events
1.2 Jan, 2010
- Pulse Train Output
- Graphical symbols in Visual Access Window
Updated with new features related information
- PTO compare Interrupt events
1.3 Mar, 2010
Added power consumption of base and expansion
units in General Specifications
1.4 April, 2010 Updated General Specifications

1.5 May, 2010 Updated Safety Precautions

Included Nexgenie base unit NG16ADL/N and


1.6 May, 2010
NG14ARL/N related information

___________________________________________________________________________________
Thanks for choosing Nexgenie product, the general purpose Programmable Logic
Controller. .Please refer this manual for Safety precautions, Installations, Instructions
& for diagnose.

Safety Precaution:

Danger Specifies that If proper precautions are not taken shall lead to
Hazardous state resulting in death depending on the circumstance
or severe injuries or substantial property damage.

ƒ Read and understand the manual carefully before use to avoid damages to persons, property &
environments and ensure safe & proper usage of this product.
ƒ The qualified personnel should only install & operate the product. The personnel should be
aware of all safety of automated products & completely familiar with all associated
documentation for the said product.
ƒ Manual should be located at the easily retrievable location for reference. Also provide this
manual to the user of this product.

General Operation:

Danger
ƒ Protect the product from conductive dust, corrosive gases, wire debris,
flammable gases, rain and fluid from entering into the product through ventilation
slits; this may cause malfunction, damage, fire, electrical shock & deterioration to
the product.
ƒ Product should not be exposed to high explosive risk, excessive magnetic
interference & inflammable substances.
ƒ Do not paint the product.
ƒ Switch OFF and unplug the connector from the power terminal for any changes
in the connections.
ƒ Use the product under normal environmental temperature condition meeting the
specification, under pollution degree 2.
ƒ Do not touch the conductive parts directly, this may cause malfunction, electric
shock.
ƒ If this product emit smoke or an unusual odor or unusual sound or unusual
operation, immediately switch OFF the power to the product. If the product is
continued in operation under such state, this shall result in fire & damage the
product. Contact the nearest authorized Sales / Repair agency of this product.
ƒ The peripheral equipment used should be appropriate for the application with this
product.
ƒ Do not modify, dismantle, re construction and repair the product. For repair
contact the nearest authorized Sales / Repair agency.

___________________________________________________________________________________
Servicing & Installation Safety:

ƒ Before touching the module, always touch grounded metal, etc. to discharge
static electricity from human body.
ƒ Provide external interlock circuit like emergency stop or protective circuit to keep
the systems safe in case there is problem in the PLC.
ƒ For output, place fail safe protective circuit external to PLC to ensure product
operates safety in case of PLC fault condition. Also built external output
monitoring circuit to identify the output to which the problem has occurred.
ƒ All maintenance should be carried out in accordance with established safety
practices.
ƒ Any commissioning or service engineer must be of a competent nature, trained
and qualified to the local and national standards required to fulfill that job. These
engineers should also be trained in the use and maintenance of the completed
product. This includes being All operators of the completed equipment should be
trained to use that product in a safe and coordinated manner in compliance to
established safety practices. The operators should also be familiar with
documentation, which is connected with the actual operation of the completed
equipment.

Note: The term ‘completed equipment’ refers to a third party constructed device,
which contains or uses the product associated with this manual.

Disposal, Dismantling and Scrapping of Product:

ƒ This product does not contain any intentionally added mercury or cadmium.
ƒ In case this product is required to be disposed off, it should be done treating it as
“industrial waste” and disposed off adhering to relevant local and national laws of
the concerned country.
ƒ The following components contain substances that might be hazardous to health
and the environment:
- Electrolytic capacitor and LCD.

___________________________________________________________________________________
Content
1 Overview........................................................................................................1

2 System Configuration and Specifications ......................................................2


2.1 Ordering Information.................................................................................................. 2
2.2 Nomenclature............................................................................................................. 3
2.3 Specifications............................................................................................................. 4
2.3.1 General Specifications ............................................................................................................ 4
2.3.2 Technical Specifications ......................................................................................................... 6
2.3.3 Digital Input (DI/ HSC) Specifications ..................................................................................... 8
2.3.4 Digital Input (DI/ AI) Specifications........................................................................................ 10
2.3.5 Transistor Output Specifications ........................................................................................... 11
2.3.6 Relay Output Specifications .................................................................................................. 12

3 Installation and Wiring .................................................................................13


3.1 Installation................................................................................................................ 13
3.1.1 Dimensional Details .............................................................................................................. 13
3.1.2 Mounting ............................................................................................................................... 14
3.1.3 Interfacing Expansion ........................................................................................................... 15
3.1.4 Installation Recommendations .............................................................................................. 16
3.2 Wiring....................................................................................................................... 17
3.2.1 Wiring of Power Supply (24 VDC)......................................................................................... 17
3.2.2 Wiring of Digital (DI/HSC) Inputs........................................................................................... 18
3.2.3 Wiring of Digital (DI/AI) Inputs............................................................................................... 19
3.2.4 Wiring of Transistor Outputs ................................................................................................. 20
3.2.5 Wiring of Relay Outputs ........................................................................................................ 20
3.2.6 Troubleshooting of Base Unit using LED Indications ............................................................ 22
3.3 Expansion Unit......................................................................................................... 24
3.3.1 Functioning ........................................................................................................................... 24
3.3.2 Troubleshooting of Expansion Unit using LED Indications.................................................... 25

4 Programming ...............................................................................................26
4.1 Set up....................................................................................................................... 26
4.2 PLC Configuration ................................................................................................... 30
..Content
5 PLC Memory................................................................................................31
5.1 Input Process Image................................................................................................ 31
5.2 Output Process Image ............................................................................................. 31
5.3 Marker Memory........................................................................................................ 31
5.4 Data Memory ........................................................................................................... 32
5.5 I/O Memory Mapping ............................................................................................... 32
5.6 Addressing Range ................................................................................................... 34
5.7 Retained Memory .................................................................................................... 35
5.8 System Variables..................................................................................................... 36
5.9 Application Program Memory .................................................................................. 37

6 Serial Communication Ports ........................................................................39


6.1 PG/ Port 1 ................................................................................................................ 40
6.2 Port 2 ....................................................................................................................... 41

7 Real Time Clock ..........................................................................................42

8 High Speed Counter ....................................................................................44


8.1 Single Phase Counter with Software Direction........................................................ 45
8.2 Encoder A B Phase ................................................................................................. 47
8.3 Encoder A B Phase with Z Pulse............................................................................. 49

9 Frequency Measurement.............................................................................51

10 Interrupt Events ...........................................................................................52


10.1 Handling Interrupt Events ........................................................................................ 53
10.2 Periodic interrupt event............................................................................................ 54
10.3 Counter compare interrupt event ............................................................................. 55
10.4 Hardware input interrupt event ................................................................................ 56
10.5 PTO compare interrupt event .................................................................................. 57

11 Pulse Train Output.......................................................................................58

12 System Variables.........................................................................................60
..Content
13 Visual Access Window ................................................................................65
13.1 VAW Screen Handling ............................................................................................. 66
13.1.1 Screen Navigation................................................................................................................. 66
13.1.2 Functionality of Keys ............................................................................................................. 67
13.1.3 Typical Example: PLC Data Modification .............................................................................. 68
13.2 System Menu ........................................................................................................... 71
13.2.1 Log Out ................................................................................................................................. 72
13.2.2 Log In .................................................................................................................................... 73
13.2.3 System Info ........................................................................................................................... 76
13.2.4 I Monitor ................................................................................................................................ 77
13.2.5 Q Monitor .............................................................................................................................. 79
13.2.6 M Monitor .............................................................................................................................. 80
13.2.7 Clock ..................................................................................................................................... 81
13.2.8 PSW Modify .......................................................................................................................... 83
13.2.9 VAW Setup ........................................................................................................................... 86

14 Updating Operating System ........................................................................87

15 Memory Cassette ........................................................................................89


15.1 Configuration of Memory Cassette .......................................................................... 89
15.2 Sending Application Program to Cassette............................................................... 92
15.3 Sending Application Program to CPU ..................................................................... 93

16 PLC Instructions Performance.....................................................................94

17 Troubleshooting and Maintenance ..............................................................96


___________________________________________________________________________________
Overview

1 Overview

Nexgenie PLC is a compact and genius PLC suitable for small size machine control.

Highlighting Features

1. Variety of base units and expansion units to choose from onboard digital inputs,
analog inputs and digital outputs (transistor and relay)
2. Up to 4 expansion units to expand up to 80 digital I/Os maximum
3. Configurable digital inputs in the base unit
• Up to 6 single phase counters with software direction and start/stop control.
4 counters (I00, I01, I03, I04) up to 20 KHz and 2 counters (I02, I05) up to 5
KHz
• Up to 2 Quadrature ABZ encoders
• Encoder interface supports up to 10 KHz input frequency on individual phase.
• Additionally all high speed inputs can be individually configured for
• Hardware input interrupt
• Frequency measurement function (time period measurement with 1µs
resolution) up to 5 KHz input frequency.
4. Provides 1 Pulse Train Output channel (pulse and direction)
• 24 VDC source type
• Output frequency from 1 Hz to 2000 Hz
5. Supports interrupt events to provide fast and predictable response to external
events from the field such as. digital input interrupt, counter count match, etc
• One periodic interrupt event with 0.5/ 1 ms resolution. Periodic interrupt can be
set from 0.5/ 1ms to 1250/2500 ms.
• Up to 4 high speed counter compare interrupts
• Up to 6 hardware input rising edge and falling edge interrupts
• Pulse Train Output compare interrupt and Pulse Train Output done interrupt.
6. Two serial ports
• Port 1 / PG Port (RS232/485) with modem interface
• Port 2 (RS232/422/485) with modem interface
7. Transistor outputs with short circuit protection
8. Built-in Real Time Clock
9. Optional Visual Access Window (VAW) for monitoring and setting PLC data,
display machine status and fault status
• 128 x 64 pixel graphics LCD with white backlit
• 4 system keys
• Supports text and graphical symbols
10. PLC input power is 24 VDC
11. Common programming platform i.e. Windows based IEC 61131-3 compatible
programming software CoDeSys

____________________________________Page 1 of 106__________________________________
System Configuration and Specifications

2 System Configuration and Specifications

This chapter discusses about variants of base unit and expansion unit and
specifications in detail.

2.1 Ordering Information

Ordering Information Ordering


Code
Nexgenie PLC Base Unit – 24 VDC Powered
8 pt 24VDC inputs and 8 pt 300mA 24VDC outputs with VAW* NG16DL
8 pt 24VDC inputs and 8 pt 300mA 24VDC outputs NG16DN
8 pt 24VDC inputs and 6 pt 500mA Relay outputs with VAW* NG14RL
8 pt 24VDC inputs and 6 pt 500mA Relay outputs NG14RN
8 pt 24VDC inputs (4 DI/HSC + 4 DI/AI) and 8 pt 300mA 24VDC outputs with NG16ADL
VAW*
8 pt 24VDC inputs (4 DI/HSC + 4 DI/AI) and 8 pt 300mA 24VDC outputs NG16ADN
8 pt 24VDC inputs (4 DI/HSC + 4 DI/AI) and 6 pt 500 mA Relay outputs with NG14ARL
VAW*
8 pt 24VDC inputs (4 DI/HSC + 4 DI/AI) and 6 pt 500 mA Relay outputs NG14ARN
Nexgenie PLC Expansion Units
8 pt 24 VDC inputs and 8 pt 300mA 24VDC outputs NE16DX
8 pt 24VDC inputs and 6 pt 500mA Relay outputs NE14RX
8 pt 24VDC inputs NE08IX
6 pt 500mA Relay outputs NE06RX
8 pt 300mA 24VDC outputs NE08DX
Accessories & Spares – Nexgenie PLC
Programming cable for Nexgenie PLC series- Length= 3 meters 1910
Pre- wired cable- with L type D connector- Length = 300 mm for interfacing 1911
rd
3 party device via Serial Ports
Serial Link cable- with loose conductors - Length= 3 meters for interfacing 3rd 1912
party device via Serial Ports.
Memory cassette - For copying and downloading CoDeSys application 9904
program and source code
Programming Software 'CoDeSys' 9920
For creating Nexgenie PLC application program.
3 – pin Terminal connector for PSU 1951
10 pin I/O connector for I/Os (Screw Types) 1952
9 pin D connector shell 1953
Terminator resister Plug 1955
Screw Driver Taparia 932 9984

* Visual Access Window

____________________________________Page 2 of 106__________________________________
System Configuration and Specifications

2.2 Nomenclature
The figure below shows the front view of the Nexgenie base unit along with
nomenclature.

3 2 1

14

4 13

12
5
11
6
10
7
9
8

Figure 1: Front view of Nexgenie base unit

1 4 system keys of Visual Access Window (VAW) optional


2 2”, 128 x 64 pixel graphical LCD with backlit
CPU status indication LEDs POWER( ), RUN (R), CPU Error (C),
3 IO Error (IO), MEM Error (M), SYSTEM Error (S)
4 Flap to cover power supply connector and serial port connectors
630 mA Type 372 Little fuse miniature glass fuse for incoming supply
5
protection
6 24 VDC power connector (3 pin removable) 24 V, GND, EARTH
7 Serial port1/ Programming port (RS232C/ 485) connector (9 pin D type male)
8 Serial port2 (RS232C/ 422/ 485) connector (9 pin D type male)
9 DIN clip to hold base unit on standard DIN rail TS 35 /7.5 mm
10 I/O terminal block ejector. Pull upward to remove I/O terminal block
11 Connector for expansion unit (bottom side) or terminating resistor cap interface
I/O status LEDs for individual I/Os. Green LEDs for inputs and Red LEDs for
12
outputs
13 Two removable 10 pin I/O terminal blocks.
14 I/O terminal block flap with wiring label on its back side (removed )

____________________________________Page 3 of 106__________________________________
System Configuration and Specifications

2.3 Specifications
Subsequent sections provide Nexgenie PLC specifications in details

2.3.1 General Specifications


24 VDC (18 to 30 V ripple included)
Base unit NG16DL, NG16ADL 95 mA at 24 VDC
Power Supply Base unit NG14RL, NG14ARL 120 mA at 24 VDC
Expansion unit NE16DX 30 mA at 24 VDC
Expansion unit NE14RX 60 mA at 24 VDC
Fuse: Common for base and expansions 630 mA Type 372
Over current
Protection Little fuse.
Reverse Polarity Protected by series diode up to 40 V.
Electro Static Discharge (ESD) (IEC 61000-4-2) :
±8 KV Air discharge, ±4KV contact discharge
Electrical Fast Transient (EFT) (IEC 61000-4-4) :
Power line : ±2 KV,
Digital I/O : ±1 KV,
Analog and communication I/O : ±1 KV
EMC - Immunity : as required
by Radiation Susceptibility (RS) (IEC 61000-4-3) :
IEC 61131-2, 80 MHz ~ 2.7 GHz, 10 V/m to 1 V/m, 80% AM at 1 KHz
IEC 61000-6-2
Conducted by Radio Frequency (CRF) (IEC 61000-4-6) :
0.15 MHz~80 MHz,10V/m, 80% AM at 1 KHz
Surge :(IEC 61000-4-5) :
Power line : ±0.5 KV, Digital I/O : ±1 KV,
Analog and communication I/O :±1 KV
Power Frequency Magnetic field (IEC 61000-4-8): 30 A/m,
50 /60 Hz
EMC - Emission : As required Radiated Emission (CISPR 16-2-3) : 30 MHz ~ 1000 MHz
by
Conducted Emission: (CISPR 16-2-1, CISPR 16-1-2):
IEC 61131-2,
Power lines : 0.15 MHz -30 MHz.
IEC 61000-6-4
Operating Temperature 5 °C to 55 °C
Humidity 10 to 95 % RH non condensing, pollution degree 2
As required by
EN- 61131-2,
Vibration, Shock
IEC 60068 -2-6 (test Fc),
IEC 60068-2-27 test Ea
Class of equipment Open type; to be used inside protective panels

IP protection IP20

____________________________________Page 4 of 106__________________________________
System Configuration and Specifications

General specifications…

Base unit – 118 x 97 x 58 mm.


Height –102 mm inclusive of DIN clip.
Dimensions (W x H x D)
Expansion unit – 65 x 97 x 58 mm.
Height –102 mm inclusive of DIN clip.
Mounting Clamp on to standard TS 35 DIN rail

Recommended I/O wires 0.5 mm square copper, single or multi stand


For 0.5 mm square, insertion length 8 mm,
I/O Termination lugs
Jainson Type 50-508-L8 or equivalent
wiring
Suggested tool Flat blade screwdriver 1.5 mm wide such as Taparia 932

Base Unit : 300 grams nominal


Weight
Expansion unit : 175 grams nominal
CoDeSys software compliant to IEC/ EN 61131-3 and
Programming software
running on IBM compatible PC
Approvals CE

____________________________________Page 5 of 106__________________________________
System Configuration and Specifications

2.3.2 Technical Specifications

Processor 16 bit microcontroller

BOOL 0.3 µsec


Execution time
BYTE/WORD/DWORD/REAL MOVE 0.3/0.3/0.1/0.1 µsec

Number of I/O points 40 input points and 40 output points

Expansions Supported 4 maximum

Marker Memory 4 Kbytes

Data Memory 24 Kbytes

300 bytes of marker memory (%MB3700 to %MB3999) and


700 bytes of data memory can be retained as per user
Retained Memory choice.
Input and Output data memory cannot be retained.
Stored in FRAM type of memory. Battery free operation.

128 Kbytes flash


Application program memory
384 Program Organization Units (POUs) maximum

1 Mbytes flash
Source code memory Stores project file with symbolic names, comments,
visualization screens , libraries (optionally)

Available for application program back up and transport.


Memory cassette
(Ordering code 9904) User can transfer application program to CPU through serial
port 1 without any need of programming software.

Unlimited number of instances can be called.


Number of Timers Resolution of 1 ms
(TON, TOF, TP) Max time that can be preset is 49d17h2m47s295ms
Supported by user definable retentive feature

Number of Counters Unlimited number of instances can be called.


(CTD, CTU, CTUD) Supported by user definable retentive feature.
Built-in.
Real Time Clock
Backed up by super capacitor for 2 weeks nominal

RS232C/485/ Modem interface,


Port 1
Programming port
Communication
Port 2 RS232C/422/485/ Modem interface
ports
Baud rate Selectable up to 115.2 Kbps for both ports
Connector 9-pin male D connector

____________________________________Page 6 of 106__________________________________
System Configuration and Specifications

Technical specifications..

1 (EVENT_PERIODIC)
Periodic 05/ 1ms resolution
Settable from 0.5/ 1ms to 1250/2500 ms.
Up to 4
Counter compare ( EVENT_HSC0_CMP, EVENT_HSC1_CMP,
EVENT_HSC3_CMP, EVENT_HSC4_CMP )
Up to 6 Rising edge and falling edge
Interrupt events
( EVENT_IX0_R_TRIG to EVENT_IX5_R_TRIG and
Hardware input EVENT_IX0_F_TRIG to EVENT_IX5_F_TRIG )
Pulse ON time: 100 µsec minimum
Pulse OFF time: 2 msec minimum

Up to 3
PTO compare ( EVENT_PTO1_CMP, EVENT_PTO2_CMP,
EVENT_PTO1_DONE )

System Information Available as system variables


Yes. via PC based Bootstrap Utility (version 1.02.07
Download operating system
onwards) through serial port 1
Password protection supported for
Application program security - Project file/ POU read or write
- Source code upload
Software Function Block
PID
Unlimited loops (limited only by program and data memory)
Operating Modes RUN, STOP, Single cycle, Bootstrap load
- POWER
- RUN
Diagnostic LED indications - CPU
on base unit - I/O
- MEM
- SYS
Display 2”, 128 x 64 pixel graphics LCD with white backlit
Visual
Access 4 system keys for parameter settings and display navigation.
Window (VAW)
Keys Useful for monitoring and setting PLC data.
Optional
Can trigger machine status and fault messages.
Standard IEC 61131-3
Programming Software Windows based ‘CoDeSys’ version 2.3.9.13 onwards
Languages IL, LD, FBD, SFC, ST, CFC
Diagnostics Off line simulation, Single cycle mode, Data flow,
Visualization, Forcing, Writing, Watch and Receipt for PLC
Debugging and online monitoring
variables

____________________________________Page 7 of 106__________________________________
System Configuration and Specifications

2.3.3 Digital Input Specifications


Base units: NG16DN/L, NG14RN/L, NG16ADL/N *1
Models NG14ARL/N
Expansion units: NE16DX, NE14RX, NE08IX
Number of Inputs 8, 2 groups of 4 inputs each
Voltage rating 24 VDC (18 to 30 V including ripple)
ON voltage : 18 VDC minimum
ON / OFF voltage
OFF voltage : 5 VDC maximum
Current rating 6 mA at 24 VDC

OFF Current 3.8 mA max

Input impedance 5.2 KΩ


Sink or source
Mode
All inputs in one group to be in same mode
Optical 1.5 KV between input and internal bus,
Isolation 1.5 KV between groups,
Nil between input points in a group.
Recommended wire
0.5 mm square copper, single or multi stand
specifications
Method of termination Removable screw type 10 pin terminal block
Transition delay 7 ms to 14 ms (Digital filter)
LED indication Green LED per input point
Special functions of inputs
6 input points,
- 4 inputs (I00, I01, I03 and I04) with 20 KHz max.
Single phase counters Pulse ON / OFF time is 20 µsec minimum.
- 2 inputs (I02 and I05) with 5 KHz max.
Pulse ON / OFF time is 50 µsec minimum.
2 ( I00/I03 : A phase, I01/I04 : B phase, I02/I05 : Z pulse)
10 KHz max. (for individual phase)
Quadrature encoders
Pulse ON / OFF time for A and B phase is 20 µsec minimum.
Pulse ON / OFF time for Z marker pulse is 50 µsec minimum
With 1 µsec resolution.
Configurable for 6 high speed inputs individually.

Frequency measurement 5 KHz maximum


*2 Sum of frequencies for all channels enabled shall not exceed 10
KHz
Pulse ON / OFF time (for frequency measurement) is 50 µsec
minimum.

____________________________________Page 8 of 106__________________________________
System Configuration and Specifications

Digital input specifications..

4
Counter
( EVENT_HSC0_CMP, EVENT_HSC1_CMP,
compare
EVENT_HSC3_CMP, EVENT_HSC4_CMP )
Interrupt 6 Rising edge and falling edge
Events ( EVENT_IX0_R_TRIG to EVENT_IX5_R_TRIG and
Hardware EVENT_IX0_F_TRIG to EVENT_IX5_F_TRIG )
input
Pulse ON time: 100 µsec minimum *3
Pulse OFF time: 2 msec minimum

*1 – Digital input specifications above are applicable for first 4 inputs (I00 to I03) in Nexgenie
base unit NG16ADL/N and NG14ARL/N.

Hence, Nexgenie base unit NG16ADL/N and NG14ARL/N supports


1. 4 single phase counter inputs
• 3 inputs (I00, I01 and I03) with 20 KHz max.
• 1 input (I02) with 5 KHz max.
2. 1 Quadrature encoder interface (I00 : A phase, I01 : B phase, I02 : Z pulse)
10 KHz max. (for individual phase)
3. 3 counter compare interrupt events
EVENT_HSC0_CMP, EVENT_HSC1_CMP and EVENT_HSC3_CMP
4. 4 Rising edge and falling edge
EVENT_IX0_R_TRIG to EVENT_IX3_R_TRIG and
EVENT_IX0_F_TRIG to EVENT_IX3_F_TRIG

*2 - Any high speed input does not support frequency measurement and falling/rising edge
interrupt simultaneously.

*3 - Input OFF time required is 2 msec minimum to cater input falling edge interrupts. Input ON
time required is 50 µsec minimum in this case.
All the six high speed inputs can support rising edge input interrupt occurred
simultaneously. In this case, Input ON time required is 100 µsec X number of inputs
configured. Otherwise, input ON time can be 100 µsec. Input OFF time should be 2 msec.

____________________________________Page 9 of 106__________________________________
System Configuration and Specifications

2.3.4 Digital Input (DI/AI) Specifications


Models Base unit: NG16ADL/N, NG14ARL/N
Number of Inputs 4 (I04 to I07)
Voltage rating 24 VDC (18 to 30 V including ripple)
ON voltage : 18 VDC minimum
ON / OFF voltage
OFF voltage : 5 VDC maximum
Current rating 2 mA at 24 VDC

OFF Current 0.8 mA max

Input impedance 12.2 KΩ


Mode Sink only
No isolation between input point and internal logic.
Isolation
PLC input power supply (24 VDC) ground and input common is
connected together internally
Recommended wire
0.5 mm square copper, single or multi stand
specifications
Method of termination Removable screw type 10 pin terminal block
Transition delay 7 ms to 14 ms (Digital filter)
LED indication Green LED per input point
Analog specifications
Number of inputs 4; single ended, non-isolated
Input type 0 to 10 VDC, uni-polar
Output data 0 to 1023 (stored in inputs image memory %IW16 to %IW22)
Resolution 10 bit, 9.8 mV

Conversion method Successive approximation

Update time 4 msec max for all the 4 channels; updated in Input scan

± 0.2 % of full scale reading at 25 ºC


Overall accuracy
± 0.3 % of full scale reading at 55 ºC
Input impedance 12.2 KΩ

Channel to channel
Isolation Channel to internal logic Nil

Channel to PLC power supply

Maximum input voltage 30 VDC

____________________________________Page 10 of 106__________________________________
System Configuration and Specifications

2.3.5 Transistor Output Specifications


Base units: NG16DN/L, NG16ADL/N
Models
Expansion units: NE16DX, NE08DX
Number of Outputs 8
Voltage rating 24 VDC (18 to 30 V including ripple)
300 mA per output, 1.5 Amp max through common.
Current rating
Up to 4 channels can be paralleled at a time
Type of output MOSFET in source mode

LED indication Red LED for individual output

ON voltage drop 2 V DC maximum

OFF voltage 1.5 V DC maximum


OFF to ON 0.1 ms,
Response Time
ON to OFF 0.4 ms
Inrush current 600 mA for 700 µsec duration

Off state leakage current 10 µA maximum


- Reverse voltage
Protection - Output short circuit protection
- Fast demagnetization for inductive loads

Isolation 1.5 KV optical from internal bus

External power supply 18 to 30 VDC including ripple for control circuit

Special functionality of output (for base units only)

Number 1, Pulse (output Q00) and Direction (output Q01)

Output type 24 VDC source type


Pulse
Train Frequency 1 Hz to 2000 Hz *
Output
3
Interrupt
events ( EVENT_PTO1_CMP, EVENT_PTO2_CMP,
EVENT_PTO1_DONE )

* - Pulse Train Output duty cycle varies across the frequency range. It varies from 50% to 70%
as output frequency changes from 500 Hz to 2 KHz.

____________________________________Page 11 of 106__________________________________
System Configuration and Specifications

2.3.6 Relay Output Specifications


Base units: NG14RL/N, NG14ARL/N
Models
Expansion units: NE14RX, NE06RX
Number of Outputs 6; grouped as 2+2+2
Voltage rating 24 to 250 VAC, 47-53 Hz, 30 VDC max
Non latching normally open (NO) contact.
Type of output/ Device
Electro-mechanical relay.
LED indication Red LED for individual output
Contact rating 500 mA at 250 VAC and 30 VDC,
(for resistive load) 1 Amp max current through common terminals
OFF to ON 10 ms,
Response Time
ON to OFF 5 ms
Minimum load 1 mA
Electrical life : Refer table below
Contact life
Mechanical life: min 20,000,000 (180 cpm)
Isolation Galvanic
Connection 10 pin removable screw type terminal block

Electrical life of relay


Voltage Current Type of load Electrical life (20 cpm)
Resistive 500,000
1 Amp
Inductive 30,000
250 VAC
Resistive 10,00,000
500 mA
Inductive 80,000
Resistive 600,000
1 Amp
Inductive 150,000
30 VDC
Resistive 10,00,000
500 mA
Inductive 3,80,000

The graph shown is provided by


relay manufacturer specification sheet
There may be some degree of variation
in relay characteristics depending on
ambient and type of load.
So this data should be used only
for reference purpose.

____________________________________Page 12 of 106__________________________________
Installation and Wiring

3 Installation and Wiring

This chapter discusses about installation and wiring of base unit and expansion unit.

3.1 Installation
Both base and expansion unit can be mounted on standard TS 35 DIN rail

3.1.1 Dimensional Details


The figure below shows base unit views with dimensions. All dimensions are in mm.
58 118

97

Left View Front View

Figure 2: Dimensional details of base unit

The figure below shows expansion unit views with dimensions. All dimensions are in
mm.
58 65

97

Left View Front View

Figure 3: Dimensional details of expansion unit

The figure below shows dimensions of standard TS 35 DIN rail. All dimensions are in
mm.
1

35

7.5
Figure 4: Dimensional details of standard DIN rail

____________________________________Page 13 of 106__________________________________
Installation and Wiring

3.1.2 Mounting
To mount the PLC Base as well as Expansion on the DIN rail,
1. Pull the DIN clip downwards till it clicks
2. Hook base unit on the rail and push down on the rail
3. Push the DIN clip upward till it clicks
4. The unit will clamp on the rail.
The figure below shows back side view of base and expansion unit after mounting on
DIN rail.

Hooks on PLC

DIN Rail

DIN Clip

Expansion unit Base unit

Figure 5: Back view of unit mounted on DIN rail

To prevent horizontal dislocation in transit or in anticipated vibration in the installation,


the DIN rail mounted units may be locked in place using end clamps on either side.
Recommended types: -
ELMEX: SCKU / SCUN
CONNECTWELL: CA702/802/202
WAGO 249-116/117
To remove unit from the rail the reverse of process given above is to be followed

____________________________________Page 14 of 106__________________________________
Installation and Wiring

3.1.3 Interfacing Expansion


Up to 4 expansion units can be interfaced to a base unit. Expansion unit has interface
cable (300 mm length flat cable) with polarized plug on the left side. This interface
cable can be connected to a base unit or another expansion unit. It also has a socket
on the right side to which another expansion unit can be connected.
The figure below shows expansion unit interfaced to a base unit.

Socket on right Interface cable with


side of base unit polarized plug
Base unit Expansion unit

Figure 6: Expansion unit connection

Follow the steps below to connect expansion unit to base unit or to another expansion
unit
1. Remove terminator plug of the base or previous expansion unit
2. Pull the DIN clip of expansion unit downwards till it clicks
3. Hook expansion unit on the rail and push down on the rail
4. Insert interface cable plug into the socket of the earlier unit till it fits snugly at
the end of the cable
5. Slide the expansion unit towards the earlier one.
6. Push the DIN clip upward till it clicks
7. The unit will clamp on the rail.
8. Repeat this process for other expansion units
9. Ensure that the terminator plug is in place on the last expansion unit

Expansion unit connection in power on condition is not permitted.

____________________________________Page 15 of 106__________________________________
Installation and Wiring

3.1.4 Installation Recommendations


The PLC assembly is required to be panel mounted taking care of the following points
Only horizontal mounting is permitted. Vertical or suspended from panel roof or floor
mounting is not allowed for thermal considerations. The required clearances around
the unit are given in figure 6 below. A 50 mm clearance is also required on the front
side of the unit.

On Ceiling

D = 50 mm
Horizontal Vertical On Floor

Figure 7: PLC Installation DOs and DON’Ts

1. In case of small sized panels care shall be taken to keep more clearances on right
side so as to facilitate proper viewing of the label on the underside of the flap.
2. The unit is designed as an 'open type unit' which requires it to be installed in a
suitable panel protecting from heat, dust and water.
3. If only base unit (without any expansion unit) is installed, ensure that the terminator
plug is fitted on expansion connector on its right side.
4. The expansion units should be connected to the base unit in tandem with the supplied
flat cables. It is necessary to remove terminator plug from Base unit and fix it on the
last unit on its right side. This is mandatory for system operation.
5. In case of possible vibrations/shocks to the panels in use, the unit shall be required to
be protected from sliding movement in the rail by use of clamps from both sides of the
unit to avoid dislocation of wires and connectors causing malfunction.
6. For performance that is least susceptible to external EMI the low voltage and high
voltage noise prone wires should be physically isolated and laid out separately in the
panel. In cases where crossing is found to be inevitable the cables should cross at
right angles to avoid cross talk.
7. A strip of paper of width 50mm or so is recommended to be wrapped around the unit
sides during installation and wiring to avoid small pieces of wire ends or strands or
washers or drilling burr et cetera from falling into the unit and getting trapped on
boards causing severe damage mechanical or electrical shorts in the miniature
electronic components on the boards. The paper should be removed without fail
before putting the system in use
8. Individual connector wires may be dressed to leave the unit from top and bottom
sides so as to give natural isolation between input and output sides or clubbed
together to leave from one side of unit.
9. Use shielded cable for communication with external device & proper termination of
shield to be done to the earth.

____________________________________Page 16 of 106__________________________________
Installation and Wiring

3.2 Wiring

3.2.1 Wiring of Power Supply (24 VDC)

3-pin removable connector is provided to connect PLC power supply. The figure
below shows connections of 24 VDC power supply to base unit

24V +DC

24V–DC
EARTH

Figure 8: PLC power connections

Expansion units are powered on with same 24 VDC. It gets connected through
expansion cable.
+,-, E Connections
24 VDC supply (18 to30 VDC including ripple) is connected between + and –
terminals.
Earth should be connected to a good quality factory ground. For this matter the
complete PLC installation should have a single electrical grounding point, which can
be called a reference ground. This can be either grounding point of an electrical
cabinet or the main earth bus-bar. The earth line on unit should be connected to this
ground by copper wire with a size of 1mm². This connection should be direct,
continuous and permanent.
Refer General specifications to know power consumption by different base and
expansion units.
Power ON indication
Marked as .Power ON LED glows when proper input 24Vdc power supply is
connected and internal 5Vdc supply is generated.
It is OFF if internal 5 VDC is not generated or input power 24 VDC not connected or
incoming fuse blown off.
Fuse protection
Miniature glass fuse protection (630 mA) is provided on board to protect incoming 24
VDC supply. This fuse is soldered on PCB. It is recommended to connect a Miniature
Circuit Breaker (MCB) of proper rating in series with mains as additional protection
and to serve as a manual isolator.

____________________________________Page 17 of 106__________________________________
Installation and Wiring

3.2.2 Wiring of Digital Inputs

The figure below shows how to interface field inputs like potential free push buttons
and limit switches for sink and source operation. Either group can be wired for sink or
source. Connection details as below are provided on the back side of the connector
cover.

PNP proximity switch NPN proximity switch

Current Current

I00 I00
I01 I01
I02 I02
I03 I03
C0 C0

24 VDC input supply 24 VDC input supply

Source type of connections Sink type of connections

Figure 9: Digital input connections

The figure shows how to interface PNP and NPN type of proximity switches as an
example in one of the inputs. In normal course where the proximity switch–off current
is below 1.5 mA the bleeder resistor would not be required. In case the off currents
are greater than 1.5 mA typically the excess current would have to be bled through
the bleeder resistor [Rb = Vin / (loff-1.5)] (Rb in Kilo-ohms, Vin in Volts and loff in mili
amperes).
Base unit NG16DL/N and NG14RL/N provides 6 (I00 to I05) high speed inputs where
as base unit NG16ADL/N and NG14ARL/N provides 4 (I00 to I03) high speed inputs

____________________________________Page 18 of 106__________________________________
Installation and Wiring

3.2.3 Wiring of Digital (DI/AI) Inputs

Nexgenie base unit NG16ADL/N and NG14ARL/N provides 4 inputs (I04 to I07) as
digital or analog input points. One can interface either digital input (for source
operation only) or analog voltage (0 to 10 VDC) signal to these inputs.
The figure below shows how to interface field inputs like potential free push buttons
and limit switches for source operation. This group can be wired for source operation
only.
The figure below also shows how to interface analog voltage (0 to 10 VDC) to inputs
I06 and I07 for an example. Analog input interface is single ended.
Connection details as below are provided on the back side of the connector cover.

PNP proximity switch

Current

I04
I05
I06 + Digital inputs (DI/AI)
V
I07 + V can be interfaced for
source operation only
C1

24 VDC input supply

Figure 10: Digital input (DI/AI) connections

There is no isolation between DI/AI and internal logic. Input common point C1 and
PLC power supply ground are connected together internally.
When analog voltage signal interfaced at DI/AI input is more than 9.5 VDC, then
respective input LED (green) indication turns ON.
The figure shows how to interface PNP type of proximity switches as an example in
one of the inputs. In normal course where the proximity switch–off current is below
1.5 mA the bleeder resistor would not be required. In case the off currents are greater
than 1.5 mA typically the excess current would have to be bled through the bleeder
resistor [Rb = Vin / (loff-1.5)] (Rb in Kilo-ohms, Vin in Volts and loff in mili amperes)

____________________________________Page 19 of 106__________________________________
Installation and Wiring

3.2.4 Wiring of Transistor Outputs

The figure below shows the connection details for transistor output. Connection
details as below are provided on the back side of the connector cover

Current

Q00
L
Q01
L
Q02
L
Q03
L
Q04
L
Q05
L
Q06
L
Q07
L
V
G
24 VDC load supply

Figure 11: Transistor output connections

3.2.5 Wiring of Relay Outputs

The figure below shows the connection details for relay outputs.
First terminal is not used. Then 2 consecutive outputs are grouped together with one
common.
Connection details as below are provided on the back side of the connector cover

Fuse external

Q00
L
Q01
L
C0
Q02
L
Q03
L
C1
Q04
L
Q05
L
C2

AC load supply
Figure 12: Relay output connections

____________________________________Page 20 of 106__________________________________
Installation and Wiring

Guidelines for using relay outputs


External fuse links or fused terminals are recommended to be used for relay output
wiring to avoid any burnout of internal tracks due to excessive current arising out of
external short circuits, overloads or inductive surges.
The life of relay contacts can be enhanced by the use of RC snubber (spark
quenchers) across the AC load. A suggested combination for of the R and C could
be R=220Ω/ Half watt and C=0.1 µF / 1000 Volts. Alternatively, these could be
bought out from Messung under order Code HRC1PH
For DC loads a free-wheeling diode such as 1N4007 should be used in reverse
polarity as shown to avoid effects of back EMFs generated by inductive load
The diode and the snubber should be positioned and wired up as near as possible
to the external loads for maximum effect.

RC snubber for AC load Free wheeling diode for inductive DC load


Applicable for transistor or relay output

____________________________________Page 21 of 106__________________________________
Installation and Wiring

3.2.6 Troubleshooting of Base Unit using LED Indications

Base unit provides PLC status indicating LEDs and base I/O status LEDs. Six LEDs
are provided on the left top of the base unit to provide status and diagnostic
information of total system.
The table below explains the significance of CPU diagnostics related LEDs
LED Color Status Description
ON Power supply (internal 5 VDC) is healthy
Power supply (5 VDC) is not generated
Power Green
OFF Input power 24 VDC not connected

Incoming fuse is blown off.

ON CPU in 'RUN' mode i.e. executing application program

CPU is in 'STOP' mode


R RUN Green OFF Application program fault
CPU watch dog fault i.e. CPU has a fatal error

Flashing Forcing / Writing any PLC variable from CoDeSys

OFF CPU is healthy

CPU hardware fault


C CPU Red
ON CPU watchdog fault
CPU put in OS download / update mode
Expansion unit/s is/are healthy and communicating with
OFF CPU once detected by CPU
No expansion unit is detected by CPU

Expansion unit is not available after detection by CPU due


I/O to following reason
IO Red
ERR - Expansion unit disconnection
ON - Faulty expansion cable
- Expansion hardware fault

Terminator plug missing or lose on base unit or last


expansion unit
OFF Application program is healthy

Application program is invalid


M MEM Red ON
Application program download in process.
Flashing Scan time exceeds beyond permissible limit

OFF No system miscellaneous faults

Input power low / insufficient


ON
Power supply section fault
S SYS Red
RTC invalid due to loss of super capacitor back up
Refer chapter 13.2.7 to know how to set RTC through
Flashing VAW.
Source code hardware fault

____________________________________Page 22 of 106__________________________________
Installation and Wiring

The table below explains the significance of input output related LEDs
LED Color Status Description
Input I00 to I07 ON Input is ON
Green
(marked as 0, 2, 4, 6)
OFF Input is OFF

ON Output is ON
Output Q00 to Q07
Red
(marked as 0, 2, 4, 6)
OFF Output is OFF

Input and output LED indications are updated after an interval of 130 ms. Hence, user
should not co relate LED indication for input and output switching ON OFF at faster
rate.

____________________________________Page 23 of 106__________________________________
Installation and Wiring

3.3 Expansion Unit


Expansion unit provides up to 16 digital I/O points. Users can attach up to 4
expansion units to a base unit. Different varieties of Expansion units are available.

3.3.1 Functioning

After power ON, when ever expansion unit is connected, CPU detects it and starts I/O
data exchange. Some system variables are updated to provide the status of base and
expansion units as below

_AMODULEORDERINGCODE This array holds string of ordering codes for base and
expansions.
ARRAY [0..4] OF STRING (10)
_AMODULEORDERINGCODE[0] indicates ordering code
for base, _AMODULEORDERINGCODE[1] indicates
ordering code for Expansion1 (in slot1) and so on.

_W_IOERR Holds slot error status of slot 0 to 4. Least significant bit


(bit 0) is status bit for slot 0 i.e. base unit. Bit 4 is status bit
WORD for slot 4 i.e. expansion 4.
After power ON, CPU detects connected expansion unit
and starts I/O data exchange. Later on if CPU does not
get response from expansion unit within 2 sec duration
due to physical disconnection or hardware fault or power
disconnection, etc, then IO error is declared for that slot.
IO LED on front of base unit glows. System variable
_W_IOERR indicates faulty expansion unit.
After that if user installs any expansion unit (even other
than earlier one), respective fault bit is reset
In short, I/O error is declared only for the expansion unit
which is registered after power ON.

_W_REG_STATUS Holds slot registration status of slot 0 to 4. Least


significant bit (bit 0) is status bit for slot 0 i.e. base unit. Bit
WORD 4 is status bit for slot 4 i.e. expansion 4. This bit is TRUE
when ever CPU detects unit in the slot.

As long as CPU continues I/O data exchange with expansion unit, one Yellow LED
indication (named as E) on expansion unit remains OFF. If CPU is not communicating
with expansion unit, then ‘E’ LED glows and all the outputs on that expansion unit are
switched to a safe state i.e. OFF. One of the common causes is when CPU is put in
STOP mode.

I/O data exchange between CPU and expansion units takes place either on change
or elapse of 1 sec duration.

Expansion unit connection in power on condition is not permitted.

____________________________________Page 24 of 106__________________________________
Installation and Wiring

3.3.2 Troubleshooting of Expansion Unit using LED Indications

Digital expansion unit provides unit status and I/O status LED indications as shown in
the table below

LED Color Status Description


ON Expansion unit is powered ON

Expansion unit is not interfaced to base unit


Expansion Unit
Power Status
Yellow Expansion unit is interfaced to base unit but not
OFF powered ON due to expansion cable fault or
P
expansion unit hardware fault

Base unit power supply fuse blown off

CPU is communicating with expansion unit and


exchanging I/O data
OFF
Expansion Unit Expansion is not interfaced to base unit and is not
Communication powered ON
status Green
CPU not communicating with expansion unit due
to
E
1. CPU is put in STOP mode
ON
2. Expansion cable fault
3. Expansion unit hardware fault
4. Base unit hardware fault

Input I00 to I07 ON Input is ON


Green
(marked as 0, 2, 4, 6)
OFF Input is OFF

Output Q00 to Q07 ON Output is ON


Red
(marked as 0, 2, 4, 6)
OFF Output is OFF

____________________________________Page 25 of 106__________________________________
Programming

4 Programming

PLC programming software CoDeSys version 2.3.9.13 onwards is recommended for


programming a Nexgenie PLC. This chapter describes set up and initial steps of
programming.

4.1 Set up

PLC serial port1 provides RS232C/ RS485 interface and is used as programming
port. Connect one end of programming cable (ordering code 1910 or 9910) to port1
and another end to PC COM port as shown below

PLC Port1 PC COM Port

Programming cable
1910/ 9910

Figure 13: Programming set up

Run programming software CoDeSys Start Æ Programs Æ Messung Systems Æ


CoDeSys V2.3 Æ CoDeSys V2.3

Execute menu command File Æ New to create new PLC program. ‘Target Setting’
dialogue box appears as shown below.

____________________________________Page 26 of 106__________________________________
Programming

Select ‘Nexgenie Tm.n’ from drop down list of Configuration and click on OK button.
m and n shows target version’

‘New POU’ window is popped up for program type POU ‘PLC_PRG’. Select language
of POU and click on OK button.

____________________________________Page 27 of 106__________________________________
Programming

Ladder editor is displayed as shown below

PLC variable declaration window

Ladder program

Message window

Menu command Program Æ Rebuild all/ Build displays compilation errors if any in
Messages window.
Once compilation is successful (0 Error(s)), program can be downloaded to PLC.
To download program, it is necessary to set communication parameters. Click on
menu Online Æ Communication parameters to pop up a window as shown below

____________________________________Page 28 of 106__________________________________
Programming

Select PC COM port (from choice of COM1 to COM31) by double clicking on Port
value field or using up/ down arrow keys and click on OK button
To download program to PLC, execute menu command Online Æ Login.
During download, following message box is displayed.

Once download is complete, following dialogue box is displayed.

Click on Yes or No button so that a new dialogue box is popped up as shown below

Click on Yes button to download source code to PLC. Downloading of source code
is mandatory.
Once, source code download is over, put PLC in RUN mode
PLC starts executing application program and update inputs and outputs.
To upload application program from PLC, execute menu command File Æ Open Æ
Open project from PLC. But upload is possible only if source code is downloaded
earlier.

____________________________________Page 29 of 106__________________________________
Programming

4.2 PLC Configuration


There is no need of PLC configuration for base unit and expansion units. Just Plug
and play. For base as well as expansion units, digital input/output memory map is
fixed. Special features on base unit like HSC, serial port, etc as applicable is handled
by software functions and function blocks in the application program.
Slot number for expansion unit is as per the sequence of connection. First expansion
unit has Slot1 and second expansion unit has slot2 and so on. Base brick has slot
number 0. Expansion unit interfaced to base brick is Expansion 1 and has slot
number 1. Expansion unit interfaced to Expansion 1 is Expansion 2 with slot number
2.
Expansion unit connection in power on condition is not permitted.
Digital and analog (on base unit) I/O memory mapping is fixed with respect to base
unit and expansion units. This I/O memory mapping is fixed irrespective of type of
base and expansion unit. If any I/O points are not used, respective I/Os, I/O LED
indications are redundant. If any expansion is not used, respective input/output
memory is redundant and input byte holds 0 permanently where as if output byte is
modified in application program there is no action.
Unit Slot Digital input Digital output Analog input
number address address address
Base 0 %IB00 to %IB03 %QB00 to %QB03 %IW16 to %IW22

Expansion 1 1 %IB04, %IB05 %QB04, %QB05 Not available

Expansion 2 2 %IB06, %IB07 %QB06, %QB07 Not available

Expansion 3 3 %IB08, %IB09 %QB08, %QB09 Not available

Expansion 4 4 %IB10, %IB11 %QB10, %QB11 Not available

____________________________________Page 30 of 106__________________________________
PLC Memory

5 PLC Memory

When programming a PLC, it is important to understand the different types of


memory in the PLC and how to access it. In Nexgenie PLC, two types of memory is
used; RAM (volatile memory) and Flash (permanent memory). RAM type of memory
holds PLC variable data (input, output, marker, data and system variable) where as
Flash type of memory holds application program code and source code. The table
below shows utilization of RAM and Flash memory.

Memory Description Addressing Size


RAM Input process image Addressable as %I 32 Bytes
Output process image Addressable as %Q 32 Bytes
Marker Addressable as %M 4 Kbytes
Data Addressable by user defined 24 Kbytes
symbolic names
System variables Addressable by implicit System
symbolic names memory
Flash Application program code Not addressable 128 Kbytes
Application program Not addressable 1 Mbytes
source code
User can declare some part of marker memory and data memory as retentive as per
application need. Retentive data is stored in FRAM.

5.1 Input Process Image


The Processor scans all the input points from base as well as expansion/s in input
scan and stores the status in input process image. The application program then
refers this status in the logic scan. During logic scan, instruction ‘Refresh_In’ can read
the input status from a particular slot and update input process image if required.
Input process image is addressable global memory. Hence, external devices like HMI
and SCADA can access it via protocols like Modbus RTU, Nexgen protocol. In
Nexgenie PLC, input memory size is 32 bytes and is addressed from %IB0 to %IB31.
The input process image is not retained.

5.2 Output Process Image


The Processor updates the status of output points as per the application program in
the logic scan and stores the updated status in the output process image. After logic
scan, the processor executes output scan. The output scan activates the actual
outputs on base as well as expansion/s as per the output process image. During logic
scan, instruction ‘Refresh_Out’ can activate outputs on a particular I/O slot if required.
Output image is addressable global memory. Hence, external devices like HMI and
SCADA can access it via protocols like Modbus RTU, Nexgen protocol. In Nexgenie
PLC, output memory size is 32 bytes and is addressed from %QB0 to %QB31. The
output process image is not retained.

5.3 Marker Memory


Marker memory holds the intermediate results in the application program. This is
addressable global memory. Hence, external devices like HMI and SCADA can
access it via protocols like Modbus RTU, Nexgen protocol. In Nexgenie PLC, marker
memory size is 4000 bytes and is addressed from %MB0 to %MB3999. By default,
marker memory from %MB3700 to %MB3999 is retained.

____________________________________Page 31 of 106__________________________________
PLC Memory

5.4 Data Memory


Data memory holds the intermediate results and Function Block instance data. This
memory is addressed by user defined symbolic name. The programming software
‘CoDeSys’ assigns the address to such PLC variable during compilation of the
application program. This address may change during number of compilations at the
time of application program development. So the addresses of such variables are not
fixed and external devices like HMI and SCADA cannot access it via protocols like
Modbus RTU, Nexgen protocol.

5.5 I/O Memory Mapping


Digital and analog (on base unit) I/O memory mapping is fixed with respect to base
unit and expansion unit.
This I/O memory mapping is fixed irrespective of type of base and expansion unit. If
any I/O points are not used, respective I/Os, I/O LED indications are redundant. If any
expansion is not used, respective input/output memory is redundant and input byte
holds 0 permanently where as if output byte is modified in application program there
is no action.

Unit Slot Digital input Digital output Analog input


number address address address
Base 0 %IB00 to %IB03 %QB00 to %QB03 %IW16 to %IW22

Expansion 1 1 %IB04, %IB05 %QB04, %QB05 Not available

Expansion 2 2 %IB06, %IB07 %QB06, %QB07 Not available

Expansion 3 3 %IB08, %IB09 %QB08, %QB09 Not available

Expansion 4 4 %IB10, %IB11 %QB10, %QB11 Not available

Instructions Refresh_In and Refresh_Out can update digital I/Os (not analog I/Os)
immediately in logic scan.
Input image of digital inputs in base unit is updated even if inputs are configured for
special functionality like high speed counter but it may not be useful in the application.
Nexgenie base unit NG16ADL/N and NG14ARL/N provides 4 inputs (I04 to I07) as
digital or analog input points. One can interface either digital input (for source
operation only) or analog voltage (0 to 10 VDC) signal to these inputs.
Nexgenie base unit NG16ADL/N and NG14ARL/N converts analog voltage input
signal (0 to 10 VDC) to digital output and stores in input image memory. This analog
input data (0 to 1023) proportional to analog input signal is stored in input image as
shown below
Input Analog data
I04 %IW16

I05 %IW18

I06 %IW20
I07 %IW22

____________________________________Page 32 of 106__________________________________
PLC Memory

Addressing I/Q/M memory


The figure below shows the addressing of input, output and marker memory.

%MXmmmm.n
% denotes fixed Bit position within byte.
memory address It can be 0 to 7.

Defines memory type Decimal point


I Input needed to address
Q Output bit within byte
M Marker

Defines data type Defines memory address


X (optional) BOOL Memory Address
B BYTE type range
W WORD I 0 to 31
D DWORD Q 0 to 31
M 0 to 3999

Figure 14: Addressing of PLC variables

The figure below shows memory mapping and significance of BOOL, BYTE, WORD
and DWORD data type.

7 6 5 4 3 2 1 0
0000 ↕%MB0 %MW0 %MD0
0001 ↕%MB1
0002 ↕%MB2 %MW2 %MD2
0003 ↕%MB3

3996 ↕%MB3996 %MW3996 %MD3996


3997 ↕%MB3997
3998 ↕%MB3998 %MW3998
3999 ↕%MB3999
%MX3999.0
%MX3999.1

%MX3999.7

Figure 15: Memory mapping

____________________________________Page 33 of 106__________________________________
PLC Memory

Points to remember
1. In Nexgenie PLC, memory mapping is byte wise. All the 8 bits (0 to 7) within a
byte can be addressed.
2. When memory is addressed as word, then two consecutive bytes are accessed.
Byte at start address is lower byte and next byte is higher byte. Memory words
can be accessed only with even address e.g.%MW0,%QW2,%MW4 etc and not
%IW1,%MW3, etc
3. When memory is addressed as double word, then two consecutive words (i.e.
four consecutive bytes) are accessed. Word at start address is lower word and
next word is higher word. Memory double words can be accessed only with even
address e.g.%ID0,%QD2,%MD4,%MD3996, etc and not %ID1,%QD3,%MD3991
etc.

5.6 Addressing Range


The following table shows addressing range supported by Nexgenie PLC.

PLC Memory Type Data Type Range


%IX0.0 to %IX0.7
%IX1.0 to %IX1.7
Input BOOL I X

%IX31.0 to %IX31.7
Input BYTE I B %IB0, %IB1, %IB2 to %IB31
Input WORD I W %IW0, %IW2, %IW4 to %IW30
Input DWORD I D %ID0, %ID4, %ID8 to %ID28
%QX0.0 to %QX0.7
%QX1.0 to %QX1.7
Output BOOL Q X

%QX31.0 to %QX31.7
Output BYTE Q B %QB0, %QB1, %QB2 to %QB31
Output WORD I W %QW0, %QW2, %QW4 to %QW30
Output DWORD I D %QD0, %QD4, %QD8 to %QD28
%MX0.0 to %MX0.7
%MX1.0 to %MX1.7
Marker BOOL M X

%MX3999.0 to %MX3999.7
Marker BYTE M B %MB0, %MB1, %MB2 to %MB3999
Marker WORD M W %MW0, %MW2, %MW4 to %MW3998
Marker DWORD M D %MD0, %MD2, %MD4 to %MD3996

____________________________________Page 34 of 106__________________________________
PLC Memory

5.7 Retained Memory


Retentive memory is a memory that is declared by the user to maintain values
through a power cycle or warm initialization. Nexgenie PLC allows 1000 bytes of
memory to retain. The table below shows memory type and maximum size of memory
that can be retained

Data memory 700 bytes

Marker memory 300 bytes (from %MB3700 to %MB3999)

Retained data is stored in FRAM type of memory. Cold initialization resets entire
memory (including retentive memory) to 0 or user defined initial value.
Points to remember
1. User can define PLC variable as retentive using keyword VAR RETAIN. Local as
well as global variable can be declared as retentive.
e.g.
VAR RETAIN
Data1: WORD;
END_VAR
Here, variable declared with symbolic name Data1 is retained.
2. Marker memory form %MB3700 to %MB3999 is retained by default if user
accesses it directly by marker memory address (and not declared with some
symbolic name). Whereas remaining marker memory from %MB0 to %MB3699 is
cleared at warm initialization.
3. If any variable with symbolic name is mapped at marker memory address from
%MB3700 to %MB3999, it is cleared at warm initialization as shown below
VAR
Data1 AT%MW3700: WORD;
END_VAR
To retain this variable, user has to declare it as retentive as below
VAR RETAIN
Data1 AT%MW3700: WORD;
END_VAR
4. Any variable mapped outside specified marker memory is not retained even
though declared as retentive.
e.g.
VAR RETAIN
Data10 AT%MW1000: WORD;
Op2 AT%QB2: BYTE;
END_VAR
Here, variables Data10 and Op2 will never be retained.

____________________________________Page 35 of 106__________________________________
PLC Memory

5. If user declares function block instance as retentive, then the complete instance of
the function block (all the data of function block instance) is retained.
e.g.
VAR RETAIN
T1: TON;
END_VAR
If instance T1 of ON delay timer TON is declared as retentive, then 15 bytes of
data memory is retained.
6. During application program compilation, programming software ‘CoDeSys’ checks
PLC variables declared by symbolic name (and not mapped at I/Q/M memory) for
retained size limit of 700 bytes. If retained size exceeds 700 bytes, it displays
compilation error as
Error 3802: <POU Name>(<line number>): Out of retain memory. Variable
‘<name>’, <number> bytes
But for PLC variables mapped at marker memory (as well as for input and output
memory), it does not check for retained size limit of 300 bytes. It does not display
any compilation error for user mistake.

5.8 System Variables


The system variables are implicitly defined global variables. These variables
exchange the information between CPU and application program. Each system
variable has a unique name which starts with underscore ‘_’.These system variables
are useful to know the system status and for diagnostics.
For more details, refer chapter 12.

____________________________________Page 36 of 106__________________________________
PLC Memory

5.9 Application Program Memory


Nexgenie PLC stores application program in flash memory in form of code and source
code.

Application Program Code (Boot Project)

The programming software ‘CoDeSys’ downloads complied project when


1. Menu command OnlineÆ_Download is executed or
2. Menu command Online Æ _Login Alt+F8___ is executed and there is
mismatch between complied project and PLC project.
This complied project is called the application program code or boot project which is
executed by the processor.
Maximum application program code size is 128 kbytes
Points to remember
1. Application program code (boot project) is not retrievable i.e. cannot be uploaded
as ‘CoDeSys’ project file
2. CoDeSys downloads application program code in flash memory of Nexgenie
PLC. In case of unresolved external POUs (POUs in external library those are not
supported by CPU OS), CoDeSys prompts programmer at the end of download
and PLC remains in STOP mode indicating memory error. At this point,
programmer must download a valid application program code and put PLC in
RUN mode. Instead if programmer recycles PLC power, PLC may start
executing application code containing unresolved external POUs and may
malfunction.

Application Program Source Code

The programming software ‘CoDeSys’ enables user to develop the application


program using various IEC languages. This application program is saved as
<Project_Name>.pro file on computer hard disk. The project file contains all project
related information e.g. POUs in various languages, program comments, variable
declarations with symbolic name and comments, password, libraries (optional) etc. It
is necessary to store all this information called as Source code in PLC in the format
defined by user.
Menu command OnlineÆ_Sourcecode download_ downloads application program
source code to flash memory. Source code download is possible when CoDeSys is in
Online monitoring mode.
Menu command FileÆ_Open Ctrl+O_ Æ Open project from PLC uploads project
file from PLC and present it in .pro file format.
Maximum source code size is 1 Mbytes.

____________________________________Page 37 of 106__________________________________
PLC Memory

Points to remember
1. Download source code is mandatory so that entire application project remains
with PLC and can be retrieved later on whenever required.
2. Programmer can restrict unauthorized uploading of source code by programming
read protection password and write protection password.
3. During source code download / upload, Visual Access Window screen is not
updated.
4. During Update OS or downloading New OS using PC based Bootstrap utility,
application program code (User Ladder Code) can be erased as per choice but
source code can not be erased.
5. Source code hardware fault is indicated by blinking ‘S’ LED after PLC power ON.
Replace base unit in such case.

The block diagram below shows CoDeSys menu commands to download and upload
application program.

Complied Flash Memory


project
Application program
OnlineÆLogin_ code

ÆDownload 128 Kbytes

ÆSourcecode download Application program


source code
Project file
FileÆOpenÆOpen project from PLC 1 Mbytes
_

Figure 16: CoDeSys menu commands

____________________________________Page 38 of 106__________________________________
Serial Communication Ports

6 Serial Communication Ports

Nexgenie PLC provides two serial communication ports which can communicate to
different third party devices. The figure below shows the part of Nexgenie PLC with
both serial ports.

Figure 17: Serial communication ports on base unit

Two serial ports (port1 and Port2) are provided with two 9-pin D male connectors
located on the front side. Both serial ports are open ports and various baud rates up
to 115.2 Kbps are supported. Both serial ports support modem interface. For both
ports, serial communication handling functions and FBs like OpenPort, SendByte,
ReceiveByte, Port_Status are supported in Nexgenie.lib library.

____________________________________Page 39 of 106__________________________________
Serial Communication Ports

6.1 PG/ Port 1


Serial port 1 is RS232C/485 port with connection details as below.

RS232C interface signals


TxD at pin 3,
RxD at pin 2 and RS485 interface signals
Ground at pin 5 D+ and D- on pins 9 and 7

5 9
GND: 5
9: D+ (RS485)
+5V: 4
8: Reserved
TxD (RS232C): 3 7: D- (RS485)
RxD (RS232C): 2 6: TR selection
Carrier Detect (RS232C): 1 6
1

Terminating resistor is provided on board


Pin 1 provides Carrier Detect signal and can be connected in RS485 network by
status when modem is interfaced. connecting pin 6 (TR selection) and pin 7
Function Block Port_Status from (D- RS485) together whenever required.
Nexgenie.lib provides the status of
carrier detect signal.

Figure 18: Port 1 connection details

User can interface memory cassette (ordering code 9904) to port 1 using patch cable
(ordering code 1911). Then user can transfer application program code and/or source
code from memory cassette to CPU without any need of programming software. 5
VDC supply between pins 4 and 5 is used to power up the memory cassette.
Programming software ‘CoDeSys’ is interfaced to port1 using programming cable
(ordering code 9910) for downloading application program and for online monitoring.
For programming, default communication parameters are 38.4 Kbps, Odd, 8, 1.
By default, port 1 supports Nexgen_Slave protocol with communication parameters
as 9.6 Kbps, Odd, 8, 1, half duplex mode. User has to program protocol Function
Block in application program if s/he wants different protocol or different
communication parameters.

____________________________________Page 40 of 106__________________________________
Serial Communication Ports

6.2 Port 2
Serial port2 is RS232C/422/485 port with connection details as below.

RS232C interface signals For RS485 interface,


TxD at pin 3, D+: Connec pin 4 (Tx+) and pin 9 (Rx+) together.
RxD at pin 2 and D- : Connect pin 7 (Tx-) and pin 8 (Rx-) together.
Ground at pin 5

GND: 5 5 9
9 :Rx+ (RS422)
Tx+ (RS422): 4
8 :Rx- (RS422)
TxD (RS232C): 3
7 :Tx- (RS422)
RxD (RS232C): 2 6 :TR sélection
Carrier Detect (RS232C): 1
6
1

Pin 1 provides Carrier Detect signal


status when modem is interfaced.
Function Block Port_Status from Terminating resistor is provided on board and
Nexgenie.lib provides the status of can be connected in RS485 network by
carrier detect signal. connecting pin 6 (TR selection) and pin 8 (D-
RS485) together whenever required.
For RS422 network, terminating resistor can
be connected between Rx- and Rx+ signals
by connecting pin 6 (TR selection) and pin 8
(Rx- Rs422) together whenever required.

Figure 19: Port 2 connection details

By default, port 2 supports Modbus RTU Slave protocol with communication


parameters as 9.6 Kbps, Odd, 8, 1, half duplex mode. User has to program protocol
Function Block in application program if s/he wants different protocol or different
communication parameters.

____________________________________Page 41 of 106__________________________________
Real Time Clock

7 Real Time Clock

Nexgenie PLC has a built-in real time clock (RTC).


Clock time resolution is 1 sec.
Clock time updation rate is 500 ms.
RTC is backed up by super capacitor and back up time is 2 weeks nominal.
If RTC is currupted due to loss of back up or due to any reason, then it is initialized
to date of January 1, 1970 and time of 00H:00M:00S:00MS and red LED indication
‘S’ starts blinking. In such case user has to ensure that super capacitor back up is
restored and proper value of RTC is set again.
Current clock time is available in system variables as shown in the table below and
can be referred in the application program.

System Variable Data Type Description


_BREADSECS BYTE Holds current “Seconds” value of RTC
_BREADMINS BYTE Holds current “Minutes” value of RTC
_BREADHRS BYTE Holds current “Hours” value of RTC
_BREADDATE BYTE Holds current “Date” value of RTC
_BREADMONTH BYTE Holds current “Month” value of RTC
_BREADYEARL BYTE Holds current “Year” value (lower byte) of RTC
_BREADYEARH BYTE Holds current “Year” value (higher byte) of RTC
_BRTCINVALID BYTE TRUE, if RTC is corrupted or invalid

Nexgenie library supports various functions to read from and write to Real Time
Clock through application program as shown below.

Description
Returns RTC Date in IEC data type DATE format
Returns RTC Date and Time in IEC data type DT format
Returns RTC Time in IEC data type TIME format
Writes new Date to RTC
Writes new Date and Time to RTC
Writes new Time to RTC

Refer Nexgenie Library User Manual to know more about usage of such functions in
the application program

____________________________________Page 42 of 106__________________________________
Real Time Clock

Additionally, user can set and monitor Real Time Clock on Visual Access Window
(VAW). System menu provides the screen as shown below.

System Menu __►


Z7:Clock
Z8:PSW Modify
Z9:VAW Setup

Tm=13:37:25
hh:mm:ss
Dt=2009-01-30 Time is shown in format
Date is shown in format HH:MM:SS
YYYY-MM-DD yyyy-mm-dd▲

Refer chapter 13 for more details related to VAW operations.

____________________________________Page 43 of 106__________________________________
High Speed Counter

8 High Speed Counter

In Nexgenie PLC base unit, first 6 digital inputs are high speed inputs. These digital
inputs can be configured for different modes of counter operation and frequency
measurement operation. The numbering of counters and different modes of
operation with maximum frequency allowed as well as necessary program blocks is
explained in the table below.
Inputs I00 I01 I02 I03 I04 I05
Description
Single phase counter with HSC0 HSC1 HSC2 HSC3 HSC4 HSC5
software direction control
20 KHz 5 KHz 20 KHz 5 KHz

Quadrature encoder A ENCAB0 - ENCAB3 -


phase, B phase 10 KHz - 10 KHz -
Quadrature encoder A ENCABZ0 ENCABZ3
phase, B phase with Z
pulse 10 KHz 10 KHz
FREQ0 FREQ1 FREQ2 FREQ3 FREQ4 FREQ5
Frequency measurement
5 KHz 5 KHz 5 KHz 5 KHz 5 KHz 5 KHz

NOTE : All the counters are 32-bit bi-directional counters.

____________________________________Page 44 of 106__________________________________
High Speed Counter

8.1 Single Phase Counter with Software Direction


All the six high speed inputs can be configured for single phase counter operation
(32-bit bi-directional) and counting direction can be changed through the application
program.
The figure below shows how to connect proximity sensor to base unit

PNP proximity switch NPN proximity switch

I00 I00
I01 24 VDC I01 24 VDC
input supply input supply
I02 I02
I03 I03
C0 C0
I04 I04
I05 I05

Source type of connections Sink type of connections

Figure 20: Connections of high speed signals to base unit

Inputs I00, I01, I03 and I04 can count input frequency up to 20 KHz.
Pulse ON and OFF time allowed for inputs I00, I01, I03 and I04 is 20 µsec
minimum.
Inputs I02 and I05 can count input frequency up to 5 KHz.
Pulse ON and OFF time allowed for inputs I02 and I05 is 50 µsec minimum.
Necessary program block to configure the functionality is “HSCn” in Nexgenie_Util
library where n is counter number (and input number) as 0 to 5. The picture below
shows program block “HSC0” with its input and output parameters.

____________________________________Page 45 of 106__________________________________
High Speed Counter

The figure below shows action of Reset and Direction control on single phase
counter.

RESET

DIR

I00-I05
5
4 4 3
3 3 2
2 2 1
1 0 1
Count 0
CV -1
-2

Figure 21: Functioning of single phase counter

If RUN is TRUE, counter starts counting. If RUN is FALSE, counter does not count
and counter current value CV holds last value.
At rising edge (OFF to ON) at input, count increments by 1 if counting direction set
is FALSE.
At rising edge (OFF to ON) at input, count decrements by 1 if counting direction set
is TRUE.
Counter current value is reset to 0 as long as Reset is TRUE.
User can modify counter current value at any time and counter starts counting from
modified value afterwards.

____________________________________Page 46 of 106__________________________________
High Speed Counter

8.2 Encoder A B Phase


Base unit provides up to 2 encoder interfaces. Counter provides 32 bit bi-directional
count.
Two inputs I00 (A phase) and I01 (B phase) provide one encoder interface as
ENCAB0.
Two inputs I03 (A phase) and I04 (B phase) provide another encoder interface as
ENCAB3.
In this mode of operation, inputs I02 and I05 can be used as normal input or can be
configured for single phase counter operation.
The figure below shows how to connect encoder to base unit

I00 A phase

I01 B phase

I03 A phase
C0
I04 B phase

C1

Figure 22: Connections of encoder signals to base unit

For sink and source type of connections, refer figure 19.


Encoder interface can count input frequency up to 10 KHz (for individual phase).
Necessary program block to configure the functionality is “ENCABn” in
Nexgenie_Util library where n is counter number (and input number) as 0 or 3. The
picture below shows program block “ENCAB0” with its input and output parameters.

____________________________________Page 47 of 106__________________________________
High Speed Counter

The figure below shows action of Reset and direction control depending upon phase
shift beteen A phase and B phase.

RESET

I00/I03
A phase

I01/I04
B phase
11

Count 1 0
CV
-3
-4

Figure 23: Functioning of AB encoder

If RUN is TRUE, counter starts counting. If RUN is FALSE, counter does not count
and counter current value CV holds last value.
At rising edge (OFF to ON) as well as falling edge (ON to OFF) at A phase and at
rising edge (OFF to ON) as well as falling edge (ON to OFF) at B phase, count
increments by 1 if A phase is leading B phase.
At rising edge (OFF to ON) as well as falling edge (ON to OFF) at A phase and at
rising edge (OFF to ON) as well as falling edge (ON to OFF) at B phase,count
decrements by 1 if A phase is lagging B phase.
Counter current value is reset to 0 as long as Reset is TRUE.
User can modify counter current value at any time and counter starts counting from
modified value afterwards.

____________________________________Page 48 of 106__________________________________
High Speed Counter

8.3 Encoder A B Phase with Z Pulse


Base unit provides up to 2 encoder interfaces. Counter provides 32-bit bi-directional
count.
Two inputs I00 (A phase), I01 (B phase) and I02 (Z marker pulse) provide one
encoder interface as ENCABZ0.
Two inputs I03 (A phase), I04 (B phase) and I05 (Z marker pulse) provide one
encoder interface as ENCABZ3.
User can program Z input to reset counter current value on occurance.
The figure below shows how to connect encoder to base unit

I00 A phase

I01 B phase
I02 Z pulse
I03 A phase
C0
I04 B phase

I05 Z pulse

C1

Figure 24: Connections of encoder signals to base unit

For sink and source type of connections, refer figure 19.


Encoder interface can count input frequency up to 10 KHz (for individual phase).
For Z marker pulse, minimum ON and OFF time required is 50 µsec.
Necessary program block to configure the functionality is “ENCABZn” in
Nexgenie_Util library where n is counter number (and input number) as 0 or 3. The
picture below shows program block “ENCABZ0” with its input and output
parameters.

____________________________________Page 49 of 106__________________________________
High Speed Counter

The figure below shows action of Reset and Z input on encoder count.

RESET

Z_En

I02/I05
Z pulse

I00/I03
A phase

I01/I04
B phase
12

6
5

Count 1 0
CV
-1

On occurrence of Z, Current value


CV is reset if Z_EN is active

Figure 25: Functioning of ABZ encoder

If RUN is TRUE, counter starts counting. If RUN is FALSE, counter does not count
and counter current value CV holds last value.
At rising edge (OFF to ON) as well as falling edge (ON to OFF) at A phase and at
rising edge (OFF to ON) as well as falling edge (ON to OFF) at iB phase, count
increments by1 if A phase is leading B phase.At rising edge (OFF to ON) as well as
falling edge (ON to OFF) at A phase and at rising edge (OFF to ON) as well as
falling edge (ON to OFF) at B phase,count decrements by 1 if A phase is lagging B
phase.Counter current value is reset to 0 as long as Reset is TRUE.
If user enables Z action then counter current value gets reset to 0 on occurrence of
Z pulse. It remains 0 as long as Z marker pulse in ON.
User can modify counter current value at any time and counter starts counting from
modified value afterwards.

____________________________________Page 50 of 106__________________________________
Frequency Measurement

9 Frequency Measurement

User can individually configure the six high speed inputs to measure input pulse
frequency. In fact it measures time period (T) between consecutive rising edges.
Time measurement resolution is 1 µsec. It is carried out after elapse of sample
period. This sampling period is stored in system variable _SAMPLING_PERIOD
which holds 1 by default and it corresponds to 10 msec. Any high speed input can
be configured for frequency measurement and pulse counting simultanously.
Maximum pulse rate for time duration measurement is 5 KHz for individual input.
Additionally, sum of input frequencies for all channels should not exceed 10 KHz.
Minimum pulse ON and OFF time (for frequency measurement) is 50 µsec.
Necessary program block to configure the functionality is “Freqn” where n is counter
number (and input number) as 0 or 5. The picture below shows instruction “Freq0”
with its input and output parameters.

Programmer can set Minimum frequency (taken into account sampling period; 10
msec by default) so that if input frequency is less that set MinFrequency then
program block returns 0. Do not keep MinFrequency > 50 Hz for default sampling
period is 10 msec.

Any high speed input does not support frequency measurement and falling/rising
edge interrupt simultaneously

____________________________________Page 51 of 106__________________________________
Interrupt Events

10 Interrupt Events

In the design of a real time system, the designer requires flexible and configurable
control over the execution of different Program Organization Units (POUs) of the
application program. Program type POU PLC_PRG is executed in freewheeling
mode. Some POUs may get executed cyclically after predefined time interval. For
some POUs, execution can be in response to the particular high priority interrupt
event which is non-cyclic. Interrupt event can be periodic timer interval elapse,
hardware input changing its state, high speed counter value matching the preset
value, etc. Interrupt events require immediate action. It stops normal freewheeling
execution called as PLC scan, performs specific POU execution, returns back to
suspended point and resumes from the point where normal freewheeling execution
was interrupted.
Nexgenie PLC supports several interrupt events. In case of multiple interrupt
events, execution needs to be prioritized. Such interrupt events are queued and
executed one by one depending upon the priority.

____________________________________Page 52 of 106__________________________________
Interrupt Events

10.1 Handling Interrupt Events


The interrupt events are configured, activated and controlled dynamically by various
functions provided in Nexgenie library. Each interrupt event has following
configuration information associated with it:
1. PROGRAM type POU that is executed on the occurrence of the event.
2. Interrupt event priority.
3. Event related additional parameters in the system variables.
4. Other functions and function blocks related to interrupt event.
Further following control on execution of various events is possible via the
application programs:
1. Hold the execution of any other event execution while handling critical tasks
or accessing shared memory.
2. Dynamically attaching and detaching interrupt event.
3. Dynamically change the attached POU to change the control and sequence
over the application as needed.
Following are the important points to remember while using interrupt events:
If any interrupt event is occurred, it is queued and kept pending in the
following cases:
1. If high priority interrupt is under execution.
2. If maximum nesting depth (which is 4) of interrupt events is crossed. This is
possible if more than 4 higher priority interrupt events are occurred one
after another before completing execution of earliest interrupt event.
3. If interrupt events are hold in the application program.
The interrupt event occurred is lost and not executed in the following cases:
1. If pending interrupt events are more than 32.
2. If multiple interrupt events are generated from the same source before the
execution.
The interrupt event execution is hold by the system in following cases:
1. During input and output scan.
2. During execution of function Refresh_In and Refresh_Out.
3. While accessing expansion modules by executing functions like IM_Read,
IM_Write, Read_Diagnostic, etc.
Hence, all such functions should be handled carefully in the application program to
get fast response to the interrupt events. The subsequent sections discuss different
types of interrupt events supported as below
• Periodic
• Counter compare
• Hardware input

____________________________________Page 53 of 106__________________________________
Interrupt Events

10.2 Periodic interrupt event


Nexgenie PLC supports one periodic interrupt event; EVENT_PERIODIC. PLC
automatically interrupts the currently executed program (normally program
PLC_PRG) after every preset time interval (defined by _EVENT_WPERIOD ) and
jumps to execute assigned POU. After executing this POU, it returns back to the
point previously left from.
Details are listed below in tabular form.

1
No. of periodic interrupt
Event number ENUM
events
1 EVENT_PERIODIC
Resolution _EVENT_BPERIODIC_RESOLUTION

Time interval resolution 1 ms FALSE


0.5 ms TRUE

Minimum time interval 1 / 0.5 ms

Maximum time interval 2500 / 1250 ms

_EVENT_WPERIOD
Associated system variables
_EVENT_BPERIODIC_RESOLUTION

Timing diagram below explains behaviour of periodic interrupt event.

EVENT_PERIODIC
POU execution

PLC scan PLC scan

Time duration =_EVENT_WPERIOD

Figure 26: Periodic Interrupt event execution

When EVENT_PERIODIC is attached by executing function EVENT_ATTACH,


preset is loaded with the value of _EVENT_WPERIOD and timer starts from 0.
When time is equal to (_EVENT_WPERIOD x Resolution) msec, associated POU is
executed. At the same time, time restarts from 0. This cycle continues as long as
periodic interrupt event is not detached. If interrupt events are hold, then
EVENT_PERIODIC is not executed but is queued. During hold, if multiple interrupt
events of same source are occurred, only one occurrence is queued and others are
lost. If the queue (of 32 events) is full, further interrupt events are lost.

____________________________________Page 54 of 106__________________________________
Interrupt Events

10.3 Counter compare interrupt event


Nexgenie PLC supports 6 high speed inputs. It supports 4 counter compare
interrupts corresponding to base inputs I00, I01, I03 and I04. PLC interrupts the
currently executed program (normally program PLC_PRG) whenever counter
current value equals to the predefined value (set by executing function
SET_HSC_CMP) and jumps to execute assigned POU. After executing this POU, it
returns back to the point previously left from.
Counter compare value can be changed at any time. It is necessary to ensure that
the counter current value is not crossed the new comparison value before modifying
it. Here, input pulse frequency, priority of HSC compare interrupt event, execution
time of POU associated with that HSC compare event plays important role.
Details are listed below in tabular form.

4
Event number ENUM

No. of HSC compare 2 EVENT_HSC0_CMP *2


interrupt events *1 3 EVENT_HSC1_CMP

4 EVENT_HSC3_CMP *2
5 EVENT_HSC4_CMP
Time interval between 1 ms minimum (additionally depends upon assigned POU
successive interrupt events execution time)
Associated function and
function blocks
HSC_SET_CMP

*1 – Refer ED-2002-223 Nexgenie_Util library manual for configuring and handling base inputs
for different modes of counter operations.

Compare interrupt events EVENT_HSC0_CMP to EVENT_HSC4_CMP are applicable when


base inputs I00, I01, I03 and I04 are configured as single phase counters by executing program
blocks HSC0, HSC1, HSC3 and HSC4 respectively.

Compare interrupt events are not supported for single phase counters at I02 and I05

*2 – EVENT_HSC0_CMP and EVENT_HSC3_CMP are also applicable when base inputs


I00+I01 and I03+I04 are configured for encoder interface by executing program blocks
ENCAB0/ENCABZ0 and ENCAB3/ENCABZ3 respectively.

____________________________________Page 55 of 106__________________________________
Interrupt Events

10.4 Hardware input interrupt event


Nexgenie PLC supports 6 high speed inputs (base inputs I00 to I05). PLC interrupts
the currently executed program (normally program PLC_PRG) whenever there is
rising edge and/ or falling edge at high speed input and jumps to execute assigned
POU. After executing this POU, it returns back to the point previously left from.

6
Event number ENUM

6 EVENT_IX0_R_TRIG (Base input I00)


No. of hardware input 7 EVENT_IX0_F_TRIG (Base input I00)
interrupts (Rising edge
and Falling edge) *1

16 EVENT_IX5_R_TRIG (Base input I05)

17 EVENT_IX5_F_TRIG (Base input I05)

100 µs minimum for rising edge interrupt event *2


Pulse ON time
50 µs minimum for falling edge interrupt event

Pulse OFF time 2 ms minimum

*1 - Any high speed input does not support frequency measurement and falling/rising
edge interrupt simultaneously

*2 - All the six high speed inputs can support rising edge input interrupt occurred
simultaneously. In this case, Input ON time required is 100 µsec X number of inputs
configured. Otherwise, input ON time can be 100 µsec. Input OFF time should be 2
msec.

____________________________________Page 56 of 106__________________________________
Interrupt Events

10.5 PTO compare interrupt event

Base unit outputs Q00 and Q01 (consider base unit models with transistor outputs)
can be configured as PTO (2 KHz maximum) of 24 VDC source output type. Base
output Q00 is a pulse output and Q01 is a direction output. For more details, rfer
chapter 11 Pulse Train Output
Apart from pulse generation, PLC offers interrupt generation in case of following
events
1. when ever PTO current value equals to the predefined value (set by executing
function SET_PTO_CMP1 and SET_PTO_CMP2).
2. when ever pulse generation is completed as per set PV of program block PTO0.
This is possible when input parameter OP of program block PTO0 is FALSE.

3
Event number ENUM
No. of PTO compare
interrupt events 18 PTO1_DN

19 EVENT_PTO1_1

20 EVENT_PTO1_2

Associated function and


SET_PTO_CMP
function blocks

____________________________________Page 57 of 106__________________________________
Pulse Train Output

11 Pulse Train Output

Many lower end automation applications require Pulse Train Output up to 2 KHz to
control stepper motor. Nexgenie base unit offers cost effective solution for such
applications.
Apart from normal digital output, first two outputs on base unit can be configured as
Pulse Train Output channel (pulse and direction). Output Q00 acts as pulse output
and output Q01 acts as direction output.
It provides 24 VDC source type of PTO.
It can generate PTO from 1 Hz to 2 KHz.
The figure below shows connection diagram for base unit NG16DL

Q00 Pulse
Q01 Direction
Q02 Fwd Rev
Q03
Q04
Q05
Q06
Q07
V
G
24 VDC load supply

Figure 27: PTO connection diagram

Only transistor outputs can function as PTO.


If relay outputs are configured as PTO and pulses are generated, relay contact of
output Q00 may get damaged.
Pulse Train Output duty cycle varies across the frequency range. It varies from 50%
to 70% as output frequency changes from 500 Hz to 2 KHz.

As output LED indications are updated after an interval of 130ms, output LED
indications for Q00 and Q01 has no relevance when configured as PTO channel.

____________________________________Page 58 of 106__________________________________
Pulse Train Output

Necessary program block to configure the functionality is PTO0 in Nexgenie_Util


library The picture below shows instruction PTO0 with its input and output
parameters.

Normally base outputs Q00 and Q01 act as normal digital outputs. Once program
block PTO0 is called and executed in the application program, base outputs Q00 and
Q01get configured as PTO channel and are controlled by executing program block
PTO0 only. Afterwards even if PTO0 is not executed, outputs Q00 and Q01 are not
updated (switched ON / OFF) as per output image (%QX0.0 and %QX0.1) in output
scan.
When RUN is TRUE, program block generates pulse train output as per programmed
frequency (FREQ) and preset number of pulses (PV). Once pulse generation is
completed, DONE bit becomes TRUE. DIR decides direction and if DIR is FALSE,
Q01 remains OFF and if DIR is TRUE, Q01 remains ON.
OP decides mode of pulse generation. If it is FALSE, program block generates
number of pulses as per PV. If it is TRUE, pulses are generated continuously as long
as RUN is TRUE.
Status of DIR and OP is detected at rising edge of RUN only. Once pulse generation
is started, any change in DIR and OP is ignored.

____________________________________Page 59 of 106__________________________________
System Variables

12 System Variables

The system variables are implicitly defined global variables, which exchange the information between the CPU and the application program. Each
system variable has a unique Name, which starts with underscore ‘_’. The table below explains the significance of system variables –

Data
Name of System Variable Access Description
Type
_BINITSTATUS Holds the status of CPU initialization. This byte is updated whenever related action is executed.
Hot Initialization
_BINITSTATUS holds 1, if system detects a power break for less than 15 ms but greater than 10 ms. In this
case PLC functioning is normal as if there is no power disturbance.
Warm Initialization
_BINITSTATUS holds 2 on healthy power ON, if system detects a power break for more than 15 ms. It
results resetting of data, which is not retained.
BYTE Read only CoDeSys menu command Online Æ Reset causes warm initialization
Cold Initialization
_BINITSTATUS holds 3,
1. if system detects any change in the application program. If a new application program is downloaded,
cold start is observed.
2. Destroying of retentive data because of hardware fault.
3. Any related fault in power supply section
4. CoDeSys menu command Online ÆReset Cold
_WCOLDSTARTCOUNTER WORD Read Only Holds number of cold start initialization occurrences. This variable is persistent.
_WWARMSTARTCOUNTER WORD Read Only Holds number of warm start initialization occurrences. This variable is persistent.
_WCURSCANTIME WORD Read Only Holds scan time of last scan (in ms). The value is updated at the end of each scan.
_WMINSCANTIME Holds minimum scan time (in ms) in all previous PLC scans after power ON or warm or cold initialization.
WORD Read Only
The value is updated at the end of each scan.
_WMAXSCANTIME Holds maximum scan time (in ms) in all previous PLC scans after power ON or warm or cold initialization
WORD Read Only
with 1ms resolution.
_WLIMITMAXSCAN This is the maximum limit for scan time. If current scan exceeds this limit, PLC is put in STOP mode and
‘MEM’ LED starts flashing. Default value of limit is 250 ms and it is loaded before logic-scan.
Read /
WORD If user needs change in scan time limit, s/he can modify the value at the beginning of logic scan. Maximum
Write
scan time limit allowed is 1 sec. The new value is applicable for that scan only. Next scan is checked for
default value unless this system variable is modified again to new limit.

____________________________________Page 60 of 106__________________________________
System Variables

Significance of system variables….


Data
Name of System Variable Access Description
Type
_BREADSECS BYTE Read only Holds current “Seconds” value of RTC
_BREADMINS BYTE Read only Holds current “Minutes” value of RTC
_BREADHRS BYTE Read only Holds current “Hours” value of RTC
_BREADDATE BYTE Read only Holds current “Date” value of RTC
_BREADMONTH BYTE Read only Holds current “Month” value of RTC
_BREADYEARL BYTE Read only Holds current “Year” value (lower byte)
_BREADYEARH BYTE Read only Holds current “Year” value (higher byte)
_BRTCINVALID RTC is backed up by super capacitor and back up time is 2 weeks nominal.
This bit is TRUE if RTC is corrupted due to loss of back up due to any reason. RTC is then initialized to date
BYTE Read only
of January 1, 1970 and time of 00H:00M:00S:00MS and red LED indication ‘S’ starts blinking. In such case
user has to ensure that super capacitor back up is restored and set proper value of RTC again.
_W_IOERR
Holds slot error status of slot 0 to 4. Least significant bit (bit 0) is status bit for slot 0 i.e. base unit. Bit 4 is
status bit for slot 4 i.e. expansion 4.
After power ON, CPU detects connected expansion unit and starts I/O data exchange. Later on if CPU does
not get response from expansion unit within 2 sec duration due to physical disconnection or hardware fault
WORD Read only or power disconnection, etc, then IO error is declared for that slot.
IO LED on front of base unit glows. System variable _W_IOERR indicates faulty expansion unit.
After that if user installs any expansion unit (even other than earlier one), respective fault bit is reset
In short, I/O error is declared only for the expansion unit which is registered after power ON.
_W_REG_STATUS Holds slot registration status of slot 0 to 4. Least significant bit (bit 0) is status bit for slot 0 i.e. base unit. Bit
WORD Read only 4 is status bit for slot 4 i.e. expansion 4. This bit is TRUE when ever CPU detects unit in the slot.

____________________________________Page 61 of 106__________________________________
System Variables

Significance of system variables….


Data
Name of System Variable Access Description
Type
_BCPUSTATUS BYTE Read only Holds status of the CPU. The significance of individual bit is explained below.
Bit Status Significance
TRUE CPU in RUN mode
0
FALSE CPU in STOP mode
1 XX Reserved
TRUE Forcing of any PLC variable is active.
2
FALSE No forcing of any PLC variable is done.
TRUE I/O error
3
FALSE No I/O error
TRUE RTC Error. User should set RTC again.
4
FALSE RTC value is valid as RTC back-up is healthy
5,6,7 XX Reserved
_BCPUSTOPCAUSE BYTE Read only Indicates the reason for CPU to go in STOP Mode. It is cleared while going to 'RUN' Mode.

Bit Significance Details Corrective Action

Invalid application program. It is User has to download a valid


1 Memory Error
indicated by putting ‘M’ LED ON. application program
Scan time exceeds the value of User has to find out cause of scan error
2 Scan Error _WLIMITMAXSCAN. It is indicated by in application program and download a
blinking ‘M’ LED. valid and corrected application program
Low PLC power (< 18 VDC). It is
indicated by putting ‘S’ LED ON. In this User must switch off the PLC power
3 PFNMI Error case, PLC can’t communicate with and restore it again such that PLC
programming software CoDeSys. User power is > 18 VDC.
can not monitor System Menu on VAW

User initiated STOP mode command User should put CPU in RUN mode via
4 User Stop
via programming software CoDeSys programming software
User has to find out the cause of invalid
Odd address is assigned to data type
address assignment in application
5 Address error other than BOOL and BYTE. It is
program and download a valid and
indicated by blinking ‘M’ LED.
corrected application program

____________________________________Page 62 of 106__________________________________
System Variables

Significance of system variables….


Data
Name of System Variable Access Description
Type
_ADRRXPORT1 DWORD Read only This variable holds start address of receive buffer of serial port 1. Buffer size is 256 bytes.
_ADRTXPORT1 DWORD Read only This variable holds start address of transmit buffer of serial port 1. Buffer size is 256 bytes.
_ADRRXPORT2 DWORD Read only This variable holds start address of receive buffer of serial port 2. Buffer size is 256 bytes.
_ADRTXPORT2 DWORD Read only This variable holds start address of transmit buffer of serial port 2. Buffer size is 256 bytes.
Array of starting addresses of various segments –
_ASEGMENTPTR [0]: Input
ARRAY _ASEGMENTPTR [1]: Output
_ASEGMENTPTR [0..5] OF Read only _ASEGMENTPTR [2]: Marker
DWORD _ASEGMENTPTR [3]: Data
_ASEGMENTPTR [4]: Reserved
_ASEGMENTPTR [5]: VAW buffer.
Array of Maximum lengths of various segments –
_ASEGMENTLEN [0]: Input
ARRAY _ASEGMENTLEN [1]: Output
_ASEGMENTLEN [0..5] OF Read only _ASEGMENTLEN [2]: Marker
WORD _ASEGMENTLEN [3]: Data
_ASEGMENTLEN [4]: Reserved
_ASEGMENTLEN [5]: VAW buffer
Read / Holds time interval of periodic interrupt event. Resolution can be 1 ms or 0.5 ms. The value should be from
_EVENT_WPERIOD WORD
write 1 to 2500 corresponding to 1/0.5 ms to 2500/1250 ms.
_EVENT_BPERIODICRESOL Read / Decides resolution of time interval of periodic interrupt event. If FALSE, resolution is 1 ms. If TRUE,
BYTE
UTION write resolution is 0.5 ms
_EVENT_BCUR_EVENT BYTE Read only Holds event number under execution.
_EVENT_BLOG_INDEX BYTE Read only This byte holds index of array _EVENT_ALOG which gives the event number recently executed.
This is array of 32 bytes which holds event number executed sequentially. The event number of executed
ARRAY
events is logged in the array starting from _EVENT_ALOG[0] to _EVENT_ALOG[31]. If array is full,
_EVENT_ALOG [0..31] OF Read only
executed events are logged again from _EVENT_ALOG[0]. The last event executed can be found using
BYTE
array index provided by system variable _EVENT_BLOG_INDEX
ARRAY This is array of 256 bytes which corresponds to the interrupt event numbers from 0 to 255. Individual byte
_EVENT_BLOST_COUNTER [0..255] Read only holds number of interrupt events lost. e.g. _EVENT_BLOST_COUNTER[1] holds number of periodic events
OF BYTE lost.
_EVENT_PSYS DWORD Read only For internal use.

____________________________________Page 63 of 106__________________________________
System Variables

Significance of system variables….


Data
Name of System Variable Access Description
Type
_SRTSVERSION STRING Read only This string holds CPU RTS version.
_AMODULEORDERINGCODE ARRAY Read only This array holds string of ordering codes for base and expansions.
[0..4] OF _AMODULEORDERINGCODE[0] indicates ordering code for base, _AMODULEORDERINGCODE[1]
STRING indicates ordering code for Expansion1 (in slot1) and so on.
_SAMPLING_PERIOD BYTE Read/ This gives sampling period (in resolution of 10 msec) for time duration measurement. By default, it is 1 i.e.
Write 10 msec.
_STW WORD Read/ Screen Trigger Word. _STW holds screen number to be displayed on LCD. _STW gets modified through
Write application program. If user is modifying PLC variable, then screen is not updated on change of _STW.
When user exist modification mode after validation or escape from modification mode, then change in
_STW is detected and new screen is shown on LCD.
If user is in System Menu, screen is not updated as per _STW. Once, user exits System Menu, change in
_STW is detected and new screen is shown on LCD.
_SCREENNUM WORD Read only System stores the currently displayed screen number, irrespective of source of trigger (STW / User settings
navigation via GoTo object, etc.
_BKEYSTATUS BYTE Read only This byte holds status of 4 system keys. Bit 0- , Bit 1- . , Bit 2 - , Bit 3 -
_BKEYSSIMULATED BYTE Read/ User can modify status of 4 system keys to ON/OFF through application program.
Write Bit 0 - , Bit 1- . , Bit 2 - , Bit 3 –
User can modify these bits to TRUE/FALSE through application program and simulate pressing/ releasing of
system keys
_BACKLITTIMEOUT BYTE Read/ Decides LCD backlit timeout in minutes. Back lit is turned OFF if no key is pressed for set duration. After
Write that if any key is pressed, backlit is turned ON again.
If it is set to 0, backlit is ON permanently. By default, backlit OFF time is 5 minutes. Back lit is controlled by
_BACKLITTIMEOUT only if _BACKKLITCTRL is set to 0.
_BACKLITCTRL BYTE Read/ Controls backlit ON/OFF.
Write
1. If 0, backlit is controlled as per _BKLITTIMEOUT
2. If 1, backlit is ON
3. If 2, backlit is OFF
User can switch ON/ OFF backlit via application program by writing 1 or 2 to this system variable.
_PSWLOGINLEVEL BYTE Read only Holds user login password Level as 1 to 4. If user has not login, then it holds 0.
_LCDCONTRAST BYTE Read/ Defines LCD contrast value. LCD is provided with contrast adjustment feature. By default,
Write _LCDCONTRAST value is 29. User can modify this value from 20 to 40.
The value is stored in permanent memory

____________________________________Page 64 of 106__________________________________
Visual Access Window

13 Visual Access Window

Nexgenie PLC provides optional Visual Access Window (VAW). It consists of 128 x 64
pixel graphical LCD with backlit and four system keys. VAW is designed to add
functionality and value to Micro size Nexgenie PLC with little cost addition. It provides
the operator interface required for many small size applications. It has very powerful
display and setting capability. However, it is limited if compared with a true HMI.
Programmer should go through the features of PLC and capability of VAW. It can make
wonders and offer cost effective solution to many applications.

The highlighting features of VAW are:

• 2”, 128 x 64 graphical LCD with backlight and view size 45 x 27 mm. 4 system keys
for data entry and display navigation
• Supports up to 64 user defined screens
• User can program static text and dynamic text. VAW provides number of special
characters for the effective use of display
• VAW supports different font types: single size, double size and complimentary.
• VAW supports graphical symbols; in-built symbols (about 76 numbers) as well as
custom symbols (16 maximum)
• User can monitor/ modify PLC data with different data types like
o BOOL (TRUE/FALSE text and graphical symbol)
o BYTE, WORD, DWORD, INT, DINT
o TIME is seconds and TIME is minutes
o TIME OF DAY (TOD), DATE and DATE_AND_TIME(DT)
o RTC TIME and RTC DATE
• User can define PLC data attributes like number of digits to be displayed, decimal
point position, display format, maximum and minimum limit and allow modification
selectively
• GoTo object facilitates user to switch to different screens with simple key operations
• There is no virtual limitation on number of PLC data objects (modifiable or non
modifiable) in a screen
• User can provide screen level password (4 digits numerical) to restrict any
unauthorized access to critical parameter settings / screen. VAW supports 4
password levels from 1 to 4 with 4 as higher priority level.
• User can control backlit timeout and adjust display contrast.
• VAW provides built in system menu (even when CPU is in STOP mode due to any
reason).
o To log in, log out and modify password
o For system debug information like CPU status, expansion unit status, RTC
error, etc useful for diagnostics
o To view system information like PLC scan time, current password level logged
in, firmware version
o To monitor input and output status of base as well as expansion units. User
can monitor marker memory bit status also.
o To monitor and set Real Time Clock
o To set VAW related parameters
• VAW screens are defined in PLC application program using simple VAW functions. As PLC
application program contains screen definition, there is no need to maintain separate
program file for VAW.
____________________________________Page 65 of 106__________________________________
Visual Access Window

13.1 VAW Screen Handling


VAW supports up to 64 user screens where in user can monitor and set his/her data and
show machine/ process status and alarm messages. It provides System Menu screens
which are predefined screens useful to monitor system status and diagnostics.
After power ON, system carries initial self tests. Once initial self tests are OK, then CPU is
put in RUN mode and starts execution of the application program. VAW displays screen
triggered from Screen Trigger Word (_STW) modified via PLC application program. User
can switch to different screens by selecting GoTo object programmed in the screen.
Typically, GoTo object is displayed as arrow characters like ►,¨ Character for GoTo
object is a VAW programmer’s choice. VAW updating time is 100ms.

System Menu is available even when CPU is in stop mode due to any reason. During
source code download / upload, VAW screen is not updated.

13.1.1 Screen Navigation


User Home screen (screen 0) is mandatory for the functioning of VAW. From any
user screen, user can switch to User Home screen by pressing key for > 3 sec
duration. From User Home screen, user can switch to System Menu by pressing
key for > 3 sec duration.

Keep pressed > 3 sec

Machine_Name ►
Company_Name
DT=2008-04-02
TM=06:24:34

Keep pressed > 3 sec

System Menu __►


Z1:Log Out
Z2:Log In
Z3:SystemInfo

With suitable application program, user can program screens with different
objects, make menu structure for user settings, monitoring screens, etc as per the
application need. Further, user can monitor machine/ process status, provide
guidance to the operators and trigger alarm messages.
VAW can handle PLC data of different data types. User can monitor/ modify timer
delays, counters, temperatures, speed of the machine, production count, machine
running hours and various machine/ process parameters. User can select mode
of operations like auto/ manual selection, start/ stop any sequence, enable/
disable machine accessories. User can schedule and control activities day wise,
week wise dependant on built-in Real Time Clock. User can log alarm data with
time stamp.
All these features are VAW programmer specific.

Note: When user is monitoring System Menu, change in Screen Trigger Word (_STW) via
application program is ignored. To monitor screens triggered by application
program user has to switch to User Home first.

____________________________________Page 66 of 106__________________________________
Visual Access Window

13.1.2 Functionality of Keys


System keys have multiple functionality depending on display mode. User has no
access to these keys. Each system key acts after release of that key i.e. at falling
edge of the key press signal. The table below provides functionality of four keys.

Key Display Mode Modification Mode

User Home Escape


At any screen , press and hold the key for Exit modification mode, ignoring change
3 sec duration to switch to User Home in data if any
screen (screen number 0)
System Home
At User Home screen, press and hold the
key for 3 sec duration and switch to
System Home screen
Back
Switch to previously displayed screen.
VAW keeps log of last 32 screens. This
log is cleared when user is at User Home
screen or System Home screen
Not used Digit Select
Selects individual digit of PLC data
object under modification. Digit
selection is from left to right. Blinking
block cursor ( _ ) marks selected digit.
Object select Digit Increment
Line cursor ( _ ) shifts to next modifiable Increments selected digit by 1
object. Sequence of line cursor movement Press and hold the key, digit increments
is VAW programmer specific. at faster rate. After 9, digit value
becomes 0.
Sign character (for INT and DINT data
type), toggles between ‘+’ and ‘-‘
In case of BOOL data type, BOOL
status toggles between TRUE and
FALSE
Enter Validate
Enter into modification mode for the Validates and modifies PLC data and
object highlighted by line cursor. exits modification mode.
After entering into modification mode, If modified value is not within range,
blinking block cursor ( _ ) appears at first modification is ignored and old value is
digit/ character of the object restored.

Note : During password entry and password modification, selected digit is


displayed and all other digits are masked by *.

Note: When user is monitoring System Menu, change in Screen Trigger Word
(_STW) via application program is ignored. To monitor screens triggered by
application program, user has to switch to User Home first.

Note: Modification mode is exit automatically, if no key operation is carried out for
30 sec duration.

____________________________________Page 67 of 106__________________________________
Visual Access Window

13.1.3 Typical Example: PLC Data Modification


VAW programmer allows modification of PLC data useful for machine or process
settings. This section explains how to modify such data with a typical example.

In this example, from User Home, one can switch to screen number 1 which
provides three settings as

Set Position – 0 to ±999.00 mm which is double integer data


Delay1 – 0 to 99 sec which is byte data
Mode – Manual / Auto which is bit data

Position ¨
= 350.00 mm
Delay1 =15 Sec
Mode =Manual

In this screen,

User wants to modify Position from +350.00 mm to -440.10 mm


User wants to modify Delay1 from 15 sec to 20 sec.
User wants to modify manual mode to Auto.

Flow chart on next page shows how to switch to this screen and the steps to
modify required data

____________________________________Page 68 of 106__________________________________
Visual Access Window

Example for Data Modification

Line cursor position shows


object that can be modified.
Press key to switch to Machine_Name ►
new screen programmed Company_Name
for this GoTo object DT=2008-04-02
TM=06:24:34

For Position data, leading Position ¨ Position ¨


zeros are not displayed as = +350.00 mm =+0450.00 mm
per programmer choice Delay1 =15 Sec Delay1 =15 Sec
Mode =Manual Mode =Manual

Key shifts line cursor to Position ¨ Press key 9 times


next modifiable object = +350.00 mm
Delay1 =15 Sec Position ¨
Mode =Manual =+0440.00 mm
Delay1 =15 Sec
Mode =Manual

When user enters into Position ¨


object modification mode =+0350.00 mm
by pressing key, blinking Delay1 =15 Sec Position ¨
block cursor appears on Mode =Manual =+0440.00 mm
first digit.
Delay1 =15 Sec
Mode =Manual

Key selects next digits Position ¨


for modification =+0350.00 mm
Delay1 =15 Sec Position ¨
Mode =Manual =+0440.00 mm
Delay1 =15 Sec
Mode =Manual

Key increments digit Position ¨


value by 1. If it is 9, it =+0450.00 mm
becomes 0. Delay1 =15 Sec Position ¨
Mode =Manual =+0440.10 mm
Press and hold key for 1 Delay1 =15 Sec
sec duration and digits Mode =Manual
increments at faster rate

____________________________________Page 69 of 106__________________________________
Visual Access Window

Position ¨ Position ¨
=+0440.10 mm = -440.10 mm
Delay1 =15 Sec Delay1 =25 Sec
Mode =Manual Mode =Manual

Press key 5 times

Position ¨ Position ¨
=+0440.10 mm = -440.10 mm
Delay1 =15 Sec Delay1 =20 Sec
Mode =Manual Mode =Manual

Position ¨ Position ¨
=-0440.10 mm = -440.10 mm
Delay1 =15 Sec Delay1 =20 Sec
Mode =Manual Mode =Manual
Key validates
modification and PLC data

Exists from modification Position ¨ Position ¨


mode and line cursor = -440.10 mm = -440.10 mm
remains at same object Delay1 =15 Sec Delay1 =20 Sec
Mode =Manual Mode =Manual

key shifts cursor to next Position ¨ Position ¨


modifiable object. = -440.10 mm = -440.10 mm
Delay1 =15 Sec Delay1 =20 Sec
Mode =Manual Mode =Manual
key toggles bit status
and displays
TRUE / FALSE text.
Position ¨ Position ¨
= -440.10 mm = -440.10 mm
Delay1 =15 Sec Delay1 =20 Sec
Mode =Manual Mode =Auto

Position ¨ Position ¨
= -440.10 mm = -440.10 mm
Delay1 =25 Sec Delay1 =20 Sec
Mode =Manual Mode =Auto

____________________________________Page 70 of 106__________________________________
Visual Access Window

13.2 System Menu


System Menu screens are predefined screens useful to monitor system status and
diagnostics. At User Home (screen 0), press and hold key for 3 sec time duration,
VAW displays System Home screen. Following System Menus are provided.
1. Log In – To log in any password level
2. Log Out – To log out after password protected PLC data modification
3. System Info – To monitor PLC status and diagnostic information
4. I Monitor – To monitor input status of base and expansion units
5. Q Monitor - To monitor output status of base and expansion units
6. M Monitor – To monitor marker memory bits
7. Clock – To monitor and set Real time Clock
8. PSW Modify – To modify password of different levels
9. VAW Setup – To set VAW related parameters

System Menu is available even when CPU is in stop mode due to any reason

User can scroll through system menus using and keys as shown below.

User Home Machine_Name ►


Company_Name
DT=2008-04-02
TM=06:24:34

>3 sec
>3 sec

System Home System Menu __►


Press key when Z1:Log Out
cursor is at ► to view Z2:Log In
various system menus Press key to scroll
Z3:System Info through system menus
and cursor shifts to that
System Menu _► system menu
Z1:Log Out
System Menu_ _►
Z2:Log In
Z4:I Monitor
Z3:System Info
Z5:Q Monitor
Z6:M Monitor To select any system
menu,press key when
System Menu_ _► cursor is at Z preceding
Z1:Log Out respective menu.
System Menu_ _►
Z2:Log In
Z7:Clock Z3:System Info
Z8:PSW Modify
Z9:VAW Setup
Log In_______
Level: 1
System Menu_ _►
PSW : ****
Z1:Log Out
Curr Login : 0
Z2:Log In
Z3:System Info

Various system menus are discussed in details in subsequent sections.

____________________________________Page 71 of 106__________________________________
Visual Access Window

13.2.1 Log Out


User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu Log Out and follow the steps below to logout.
System Menu_ _►
Z1:Log Out
Z2:Log In
Z3:System Info

Log Out__ ____


Press ► key to
LogOut!
At any stage, user can press
key momentarily to switch
to System Menu.

After successful log out, Log Out___ ___ System Menu_ _►


‘Logout Done!’ Press ► key to Z1:Log Out
message is displayed LogOut! Z2:Log In
momentarily LogOut Done! Z3:System Info

2 sec delay

Log Out_____ _
Press ► key to
LogOut!

After password login, if user does not carry any key operation for 3 minutes
duration, then password is logout automatically.
Use can login one password level at a given time. Whenever user login any
password level, previously login level is logout.

____________________________________Page 72 of 106__________________________________
Visual Access Window

13.2.2 Log In
VAW supports screen level password protection to restrict unauthorized access to
screen or parameters. VAW programmer can program password level for GoTo
object. It provides 4 levels of password protection; from 1 to 4. Fourth level is
highest priority password level. Password is 6 digit numeric password. Default
passwords are as below.
Level Default password
0 No password protection
1 1000
2 2000
3 3000
4 4000

System variable _PSWLOGINLEVEL shows current login password level. If user


has not login, it holds 0.
User can login via System Menu as explained on next page.
If password is not login and if user enters at GoTo object in any user screen
which is password protected, then VAW displays Log In screen and prompts user
for login. After successful login, VAW switches to the new screen defined by
respective GoTo object.
Password level 4 has higher priority over other password levels.
If higher level password is login, then all the lower level passwords are login
automatically. e.g. if password level login is 3, user can access screens protected
by password levels 1 and 2 but not the screens protected by password level 4.
After password login, if user does not carry any key operation for 3 minutes
duration, then password is logout.
User can login one password level at a given time. Whenever user login any
password level, previously login level is logout.

____________________________________Page 73 of 106__________________________________
Visual Access Window

User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu Log In. The steps below show how to login
password level 2 assuming that password is 1211 for level 2.

Press key when cursor System Menu_ _► Log In____ ___ Key selects next
is at Z preceding Log In Z1:Log Out Level: 2 digit for modification
menu Z2:Log In PSW : 1***
Z3:System Info

VAW provides 4 level Log In_____ __ Log In___ ____


password protection. Level: 1 Level: 2
If user enters Level as 0, PSW : **** PSW : *0**
it becomes 1. Curr Login : 0 Curr Login : 0
If user enters Level as >4,
it becomes 4

Log In_____ __ Log In_____ __


Key increments
Level: 1 Level: 2
selected digit by 1 each
PSW : **** PSW : *1**
time. After 9, digit
becomes 0. Curr Login : 0 Curr Login : 0

Log In_____ __ Log In______ _


Level: 2 Level: 2
PSW : **** PSW : *2**
Curr Login : 0 Curr Login : 0

Log In_____ __ Log In_____ __


Level: 2 Level: 2
PSW : **** PSW : **0*
Curr Login : 0 Curr Login : 0

Log In___ ____ Log In_____ __


Level: 2 Level: 2
PSW : **** PSW : **1*
Curr Login : 0 Curr Login : 0

User can modify individual Log In___ ____ Log In___ ____
digit. Selected digit is Level: 2 Level: 2
displayed and all other PSW : 0*** PSW : ***0
digits are masked by *. Curr Login : 0 Curr Login : 0

Note: User can press key momentarily to escape from modification mode.

____________________________________Page 74 of 106__________________________________
Visual Access Window

Log In_____ __
Level: 2
PSW : ***1
Curr Login : 0
When password is entered and key
is pressed,
‘LogIn Done!’ Message is displayed
momentarily if password is matched
Log In_____ __
else
Level: 2
‘LogIn Failed!’ message is displayed
PSW : ****
LogIn Done!

2 sec delay

Log In_____ __
Level: 2
PSW : ****
Curr Login : 2

System Menu_ _► After login, user can press key


Z1:Log Out momentarily to switch back to System
Z2:Log In Menu i.e. System Home
Z3:System Info

____________________________________Page 75 of 106__________________________________
Visual Access Window

13.2.3 System Info


User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu System Info.
VAW displays first system information screen i.e. CPU Status.
Further user can scroll through system information screen using and keys as
shown below.
System Menu_ _► a Shows CPU mode as RUN or STOP. In RUN mode, CPU
Z1:Log Out executes application program.
Z2:Log In b CPU status
Displays CPU initialization status when CPU is in RUN
Z3:System Info
mode and displays cause of STOP if CPU is in STOP mode
HotInit- If power fail has occurred for < 25 ms duration. CPU
continues to function normally as if there is no power fail
a b WarmInit- If power fail has occurred for > 25 ms duration or
CPU Status__ _► if CoDeSys menu command Online Æ Reset is issued. Non
RUN WarmInit retained data is reset to 0 or user defined initial value.
c ForceOFF Retained data holds last value before power OFF. This is
ExpOK RTCOK ▲ healthy initialization.
d e ColdInit- This is faulty initialization and all the data is reset to
0 or user defined initial value. Cause may be hardware fault
or external EMI
Exp1:OK ► User- If programmer puts CPU is STOP mode intentionally
Exp2:OK through programming software
f Mem Err – If application program code is invalid
Exp3:OK
Scan Err – If CPU is in STOP mode due to scan time
Exp4:OK ▲ exceeds its set limit (by default it is 250ms)
PFNMI Err –If PLC power < 18 VDC
OddAdrErr – If odd address is passed to data type other
than BOOL or BYTE
Exp1:NE16D ► It is necessary to download valid and corrected application
Exp2:NE16D program again in case of Mem Err, Scan Err and OddAdrErr.
g
Exp3: c Shows if any PLC variable is forced using programming
Exp4: ▲ software ‘CodeSys’. In this case, RUN LED on base unit
starts blinking
d Shows the status of expansion
units as ExpOK or ExpFlt. For more details, refer next
screens
CPU Scan Time ►
e Shows Real Time Clock status as
Cur:001ms
h RTCOK if RTC data is valid.
Max:007ms RTCErr if RTC data is not valid due to loss of super
Min:00ms ▲ capacitor backup due to any reason
f Shows status of individual expansion unit.
Shows OK if CPU detects expansion unit once and is
functioning thereafter.
Warm Counter _► Shows Fault if CPU detects expansion unit once and is not
00010 communicating afterwards.
i Shows – if expansion is never detected.
Cold Counter_
00005 ▲ g Shows ordering code of expansion unit once detected by
CPU. If Exp status is Faulty, ordering code of previously
detected expansion unit is displayed.
It displays – if expansion is never detected.
h Shows CPU scan time in msec.
Source code H/W
Cur shows current scan time
OK
j Max shows maximum scan time after power ON
Firmware Ver. Min shows minimum scan time after power ON
V0.03.20 i Shows number of occurrences of warm initializations and
cold initialization until now. User can modify these values.
j Shows Source code hardware status as OK or FAULT.
At any stage, if key is pressed
Shows firmware version
when cursor is at ▲, then screen
switches to System Menu screen

____________________________________Page 76 of 106__________________________________
Visual Access Window

13.2.4 I Monitor
User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu I Monitor. VAW displays following screen.

System Menu __►


Z4:I Monitor
Z5:Q Monitor
Z6:M Monitor

Address of input byte.


Bit wise status as 0/1
User can modify it Input Monitor_ can be monitored
2 consecutive input bytes are IB00:10100001
monitored on a screen IB01:11100000 This bit 0 i.e. %IX1.0
76543210 ▲
This bit 7 i.e. %IX1.7

User can modify first input address displayed by pressing key directly. User can
scroll between input address 0 to maximum number of input bytes supported by
respective PLC model as shown below.
Input Monitor_
IB00:10100001
IB01:11100000
765 43210 ▲

Input Monitor_
At any stage, if key is pressed
Input byte addresses IB01:11100000
when cursor is at ▲, then screen
are changed IB02:00000001
switches to System Menu screen
765 43 210 ▲

Input Monitor_
IB02:00000001
IB03:10101001
765 43 210 ▲

____________________________________Page 77 of 106__________________________________
Visual Access Window

Instead of scrolling i.e. by pressing key , user can modify input address directly.
The steps below show how to modify input address from %IB00 to %IB05.

Input Monitor_ Input Monitor_


IB00:00000110 IB00:00000110
IB01:10100001 IB01:10100001
76543210 76543 210 ▲

Press key 5 times
momentarily or press
and hold key for 1
Press key 5 times sec duration to
Input Monitor_
IB00:00000110 increment digits at
Input Monitor_ faster rate
IB01:10100001 IB05:00000110
76543210 ▲ IB01:10100001
76543 210 ▲ After 9, digits value
becomes 0.

When input byte address is Input Monitor_


modified and validated, IB05:10001001
address displayed on next IB06:00000001
line is also changed. 76543210 ▲

When user is in I Monitor menu, user can modify first input address directly. In
modification mode and keys act as Digit Increment and Next Digit keys
respectively.
If user modifies input address, which is greater than maximum number of input
bytes supported by PLC, then address becomes 0.
System remembers modified input address (by scrolling or directly) as long as
PLC is powered ON. Whenever user enters into I Monitor menu again, user can
monitor input byte with previously monitored input address.

____________________________________Page 78 of 106__________________________________
Visual Access Window

13.2.5 Q Monitor
User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu Q Monitor. VAW displays following screen.

System Menu__ ►
Z4:I Monitor
Z5:Q Monitor
Z6:M Monitor

Address of output byte.


Bit wise status as 0/1
User can modify it Output Monitor can be monitored
2 consecutive output bytes QB00:11000000
are monitored on a screen QB01:10000011 This bit 0 i.e. %QX1.0
76543210 ▲
This bit 7 i.e. %QX1.7

User can modify first output address displayed by pressing key directly. User
can scroll between output address 0 to maximum number of output bytes
supported by respective PLC model as shown below.
Output Monitor
QB00:11000000
QB01:10000011
76543210

Output Monitor
At any stage, user can press key
Output byte addresses QB01:10000011 for > 3 sec duration to switch to
are changed. QB02:00100001 System Home
765 43 210

At any stage, if key is pressed
when cursor is at ▲, then screen
switches to System Menu screen
Output Monitor
QB02:00100001
QB03:11110000
765 43 210

Instead of scrolling i.e. by pressing key, user can modify output address
directly. User can modify output address for e.g. from %QB00 to %QB06 just like
any PLC data. For the same refer chapter 13.2.4 I Monitor.

____________________________________Page 79 of 106__________________________________
Visual Access Window

13.2.6 M Monitor
User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu M Monitor. VAW displays following screen.

System Menu_ _►
Z4:I Monitor
Z5:Q Monitor
Z6:M Monitor

Address of Marker
byte. User can modify it Bit wise status as 0/1
Marker Monitor can be monitored
2 consecutive marker bytes 0000:00000110
are monitored in a screen 0001:10100001 This bit 0 i.e. %MX1.0
76543210 ▲
This bit 7 i.e. %MX1.7

User can modify first marker address displayed by pressing key directly. User
can scroll between marker address 0 to maximum number of marker bytes
supported by respective PLC model as shown below.

Marker Monitor
0000:00000110
0001:10100001
7654 3210

Marker Monitor At any stage, user can press key


Marker byte addresses 0001:10100001 for > 3 sec duration to switch to
are changed 0002:11100001 System Home
76543 210 ▲
At any stage, if key is pressed
when cursor is at ▲, then screen
switches to System Menu screen
Marker Monitor
0002:11100001
0003:10000001
76543 210 ▲

Instead of scrolling i.e. by pressing key , user can modify marker address
directly. User can modify marker address for e.g. from %MB0000 to %MB2000
just like any PLC data. For the same refer chapter 13.2.4 I Monitor.

____________________________________Page 80 of 106__________________________________
Visual Access Window

13.2.7 Clock
User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu Clock. Screen displays current time and date.
User can modify time and date, and the steps below shows how to change
e.g. time from 13 hours 37 minutes 25 seconds to 10 hours 45 minutes 25
seconds

System Menu__ ►
Z7:Clock
Z8:PSW Modify
Z9:VAW Setup

Time is shown in 24 hours


format HH:MM:SS
Tm=13:37:25 Tm=10:37:25
hh:mm:ss hh:mm:ss
Dt=2009-01-30 Dt=2009-01-30
Date is shown in format yyyy-mm-dd ▲ yyyy-mm-dd ▲
YYYY-MM-DD

Tm=13:37:25 Tm=10:47:25
hh:mm:ss hh:mm:ss
Dt=2009-01-30 Dt=2009-01-30
yyyy-mm-dd ▲ yyyy-mm-dd ▲

Key selects next digit for


modification
Tm=13:37:25 Tm=10:47:25
hh:mm:ss hh:mm:ss
Dt=2009-01-30 Dt=2009-01-30
yyyy-mm-dd ▲ yyyy-mm-dd ▲

Key increments selected


digit by 1 each time. After 9,
digit becomes 0. Press key 7 times Press key 8 times

Tm=10:37:25 Tm=10:45:25
hh:mm:ss hh:mm:ss
Dt=2009-01-30 Dt=2009-01-30
yyyy-mm-dd ▲ yyyy-mm-dd ▲
At any stage, if key is
pressed when cursor is
at ▲, then screen
switches to System
Tm=10:45:25 Menu screen
hh:mm:ss
Dt=2009-01-30
yyyy-mm-dd ▲

During RTC time modification, error is displayed for following values:


Hour>23, Minute> 59, Second> 59

____________________________________Page 81 of 106__________________________________
Visual Access Window

Clock screen shows current time and date. User can modify time and date, and
the steps below shows how to change
e.g. date from 30th Jan 2009 to 20th Feb 2009

At any stage, user can Tm=10:45:25 Tm=10:45:25


press key momentarily to hh:mm:ss hh:mm:ss
switch back to System Dt=2009-01-30 Dt=2009-02-30
Menu yyyy-mm-dd yyyy-mm-dd ▲

Tm=10:45:25 Tm=10:45:25
hh:mm:ss hh:mm:ss
Dt=2009-01-30 Dt=2009-02-30
yyyy-mm-dd ▲ yyyy-mm-dd ▲

Press key 9 times


Tm=10:45:25
hh:mm:ss Tm=10:45:25
Dt=2009-01-30 hh:mm:ss
yyyy-mm-dd ▲ Dt=2009-02-20
yyyy-mm-dd ▲
Key selects next digit for
modification
Press key 5 times

Tm=10:45:25 At any stage, if key is


Tm=10:45:25
hh:mm:ss pressed when cursor is at
hh:mm:ss
Dt=2009-01-30 ▲, then screen switches
Dt=2009-02-20
yyyy-mm-dd ▲ to System menu screen.
yyyy-mm-dd ▲
Key increments selected
digit by 1 each time. After 9,
digit becomes 0.

During RTC time modification, error is displayed for following values:


Year>2099, Month>12,
Date> 31,
Invalid date for particular month is adjusted automatically. e.g. if user modifies
date as 2009-09-31 (31 date for September month) then it is automatically set as
2009-10-01 (1s date of October month)

____________________________________Page 82 of 106__________________________________
Visual Access Window

13.2.8 PSW Modify


User can program screen level password protection to restrict access to screen to
authorized users only. User can modify the password. Password is stored in the
permanent memory.
User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu PSW Modify. Follow the steps below to modify
password (level 3) to 1002 from default value 3000.

System Menu_ _►
Z7:Clock
Z8:PSW Modify
Z9:VAW Setting C

Level : 1 Level : 3
CurPSW: **** CurPSW: ****
NewPSW: **** NewPSW: ****
CnfPSW: **** ▲ CnfPSW: **** ▲

Level : 1 Level : 3
CurPSW: **** CurPSW: 0***
NewPSW: **** NewPSW: ****
CnfPSW: **** ▲ CnfPSW: **** ▲

Level : 2 Level : 3
CurPSW: **** CurPSW: 1***
NewPSW: **** NewPSW: ****
CnfPSW: **** ▲ CnfPSW: **** ▲

Level : 3 Level : 3
CurPSW: **** CurPSW: 2***
NewPSW: **** NewPSW: ****
CnfPSW: **** ▲ CnfPSW: **** ▲

E
Level : 3 Level : 3
CurPSW: **** CurPSW: 3***
NewPSW: **** NewPSW: ****
CnfPSW: **** ▲ CnfPSW: **** ▲

____________________________________Page 83 of 106__________________________________
Visual Access Window

Level : 3 Level : 3
CurPSW: *0** CurPSW: ****
NewPSW: **** NewPSW: **0*
CnfPSW: **** ▲ CnfPSW: **** ▲

Level : 3 Level : 3
CurPSW: **0* CurPSW: ****
NewPSW: **** NewPSW: ***0
CnfPSW: **** ▲ CnfPSW: **** ▲

Key increments selected


digit by 1 each time. After 9,
Press key 2 times
Level : 3 digit becomes 0.
CurPSW: ***0 Level : 3
NewPSW: **** CurPSW: ****
CnfPSW: **** ▲ NewPSW: ***2
CnfPSW: **** ▲

N Current password Level : 3


matched? CurPSW: ****
NewPSW: ****
Y CnfPSW: **** ▲
Level : 3 Level : 3
CurPSW: **** CurPSW: ****
NewPSW: **** NewPSW: ****
CurPSW Invalid CnfPSW: **** ▲ D
2 sec delay

Level : 3
C
CurPSW: ****
NewPSW: 0***
CnfPSW: **** ▲

Level : 3
CurPSW: ****
NewPSW: 1***
CnfPSW: **** ▲

Level : 3
CurPSW: ****
NewPSW: *0**
CnfPSW: **** ▲

____________________________________Page 84 of 106__________________________________
Visual Access Window

Level : 3 Level : 3
CurPSW: **** CurPSW: ****
NewPSW: **** NewPSW: ****
CnfPSW: 0*** ▲ CnfPSW: ***0 ▲

Level : 3 Press key 2 times


CurPSW: ****
Level : 3
NewPSW: ****
CurPSW: ****
CnfPSW: 1*** ▲
NewPSW: ****
CnfPSW: ***2 ▲

Level : 3
CurPSW: ****
NewPSW: **** Password N
CnfPSW: *0** ▲ Confirmed?

Y
Level : 3 Level : 3 Level : 3
CurPSW: **** CurPSW: **** CurPSW: ****
NewPSW: **** NewPSW: **** NewPSW: ****
CnfPSW: **0* ▲ PSW Modified Failed

2 sec delay 2 sec delay

Level : 3
CurPSW: ****
E
NewPSW: ****
CnfPSW: **** ▲

User can press key, when


cursor is at ▲, then press
screen switches to System
Menu screen.

If new password programmed as 0000 is not accepted and old password value is
maintained.

____________________________________Page 85 of 106__________________________________
Visual Access Window

13.2.9 VAW Setup


User can navigate through System Menu using and keys. Press key when
cursor is at Z preceding menu VAW Setup.
System Menu__ ►
Z7:Clock
Z8:PSW Modify
Z9:VAW Setup

BackLitTimeOut
By default, backlit timeout Backlit timeout can be set
05 Minutes
is 5 minutes from 0 to 99 minutes
ContrastAdjust
By default, LCD contrast 29 ▲
is set to 29 LCD contrast can be
adjusted from 20 to 40

In menu VAW Setup, user modify backlit timeout (0 to 99 minutes) and adjust
LCD contrast (from 20 to 40).
LCD is provided with white backlit. Typical backlit life is 10,000 hours. To save
backlit life, it is switched OFF when VAW is not in use i.e. any key is not pressed
for certain time duration (in minutes) defined by system variable
_BACKLITTIMEOUT. By default, _BACKLITTIMEOUT value is 5 minutes. User
can modify this value from 0 to 99 minutes. If modified as 0, backlit is never
turned OFF by the system.
LCD is provided with contrast adjustment feature. LCD contrast is set via system
variable _LCDCONTRAST. By default, _ LCDCONTRAST value is 29. User can
modify this value from 20 to 40.
Both modified values are remembered permanently.

____________________________________Page 86 of 106__________________________________
Updating Operating System

14 Updating Operating System

PC based Bootstrap utility (version 1.03.00 onwards) is interfaced to serial port 1


(RS232C) to update CPU Operating System (OS). The programming cable (ordering
code 1910) is used to interface PC COM port to PLC port 1. The subsequent section
explains how to update CPU OS using Bootstrap utility.

After executing bootstrap.exe file, main dialog box gets invoked as shown below –

The main dialog box has various components as follows –

Comm Port: This is a combo box that facilitates selection of desired COM port of the
PC for communication with PLC.
PLC: This is a combo box that facilitates selection of desired PLC for which the OS is
to be updated. For Nexgenie PLC, the selected PLC type shall be ‘Nexgenie’.
File: This is an edit field, which indicates the selected file name for the CPU OS. The
file name is indicated along with its path.
Browse: Click on this button invokes the “File open” dialog with default file type as
“.bin”. User can browse through folder list and select the required binary file for
particular OS version. After selecting the file, click on “Open” button to close the
dialog. The selected file name is then displayed in “File” field, as explained above.
Erase Selection: This section has check boxes to select the erasing options during
OS updating. User has option to selectively erase “User Ladder Code” (application
program code) and “User Source Code” (application program source code) before
downloading the OS.
User source code is not erased even though option is checked.
Update OS: With click on this button, the sequence of operations for updating
existing OS is initiated. In order to update the OS, the DIP switch positions on CPU
PCB need not be changed. DIP switch positions should be in same position as that of
normal operation of the PLC.
New OS: Available only for Messung authorized servicing personnel.
Exit: Click on this button will terminate the bootstrap utility.

____________________________________Page 87 of 106__________________________________
Updating Operating System

File

Under ‘File’ menu, commands ‘Open’ and ‘Exit’ are provided

With click on ‘Open’, a dialog for opening a file with ‘.bin’


extension gets invoked. Once the required binary file for
specific version of OS is browsed and selected, dialog gets
closed and selected file name along with its path appears in
the field named as “File” on main dialog.
Same action is taken with click on “Browse” button of main
dialog.
Command ‘Exit’ terminates the bootstrap utility.

Online

Under ‘Online’ menu, commands ‘New OS’, ‘Update OS’ and ‘Erase’ are provided –

These three commands initiate the same action as that of


buttons provided on main dialog for “New OS”, “Update OS”
and “Erase”.

After downloading the OS in “Update OS” mode, the system gets reset and if the
application program code is erased (“User Ladder Code” option is checked), then ‘MEM’
LED becomes on. The normal operation of the Nexgenie can be resumed after
downloading a valid application program through CoDeSys. If application code is not
erased (“User Ladder Code” option is un-checked), then CPU goes in RUN mode and
starts execution.

____________________________________Page 88 of 106__________________________________
Memory Cassette

15 Memory Cassette

The memory cassette is used to store the application program code and the source
code. So the application program can be transported easily and then can be transferred
to CPU without need of programming software. This is a flash type of intelligent memory
cassette. PC based PLC programming software ‘CoDeSys’ can download the
application program code and or source code to the cassette. ‘CoDeSys’ can upload the
source code from the cassette when ever required. The figure below shows the memory
cassette interfaced on serial port1.

Figure 28: Memory Cassette

The front side provides a push button and two LED indications for the user interface.
The backside provides 9-pin D female connector for the interface with the PC/ PLC. The
table below illustrates the cassette and related accessories ordering codes.

Item Ordering Code


Memory cassette 9904
Cassette adapter kit 9911
Programming Cable 9910/1910

Before downloading the application program to the cassette, the cassette need to be set
using the PC based software ‘Memory Cassette Configuration Utility’. The subsequent
discussion explains how to set / configure the cassette for a particular PLC type and the
application program transfer related to the cassette.

15.1 Configuration of Memory Cassette


The application program code and/or source code can be downloaded to the blank
cassette. Prior to that, it is necessary to set the cassette using PC based software
‘‘Memory Cassette Configuration Utility”. This utility is useful
• to erase the cassette
• to set the cassette for a particular PLC type
• to read the configuration of the cassette
• to set the required cassette size.

____________________________________Page 89 of 106__________________________________
Memory Cassette

To set the memory cassette, cassette adapter kit is required. It consists of two items.
1. Cassette adapter – It has two 9-pin D male connectors at the both ends. One
end is connected to PC using programming cable 1910 and other end to the
cassette. It provides one socket to connect 5 VDC externally to power up the
memory cassette.
2. 5 VDC power supply unit – It is 230 VAC to 5 VDC converters, which can be
directly mounted on 3-pin 230 VAC socket and provides 5 VDC through 1-pin
jack.
The figure below shows the entire set up.

Memory Cassette Cassette adapter Programming cable PC COM Port

5 VDC power supply adapter

to 230 VAC

Figure 29: Set up to configure and program memory cassette

Run Memory Cassette Configuration Utility.exe, The Menus ‘Settings’ and ‘Cassette’
are related to the memory cassette.
Settings
Menu command Setting Æ Comm Port,
selects PC communication port number

Menu command Settings Æ Select PLC


pops up dialog box ‘Select PLC’, which
provides drop down options as Nexgen
2000, Nexgen 5000, Nexgen522x,
Nexgen523x,Nexgenie, etc. Selected PLC
type is displayed in the text box.

____________________________________Page 90 of 106__________________________________
Memory Cassette

Cassette
In the menu Cassette, the cassette
can be set and the configuration of
the cassette can be read. This menu
provides various options as shown in
the screen below.

Set PLC
Click on ‘Set PLC’ to set the memory cassette for the PLC type already selected.
With the commands, first connection with the cassette is established displaying the
message ‘Checking Cassette’.
Once the connection is established and the cassette is set correctly, the message
‘PLC is set’ is displayed.
Then the flash PROM is erased displaying message ‘Erasing Flash PROM……’. It
takes few seconds to erase the entire flash PROM and after erasing, the message
‘Cassette is erased’ is displayed.
Erase Code Area
With the command ‘Erase Code Area’, the application program code and source code
is erased in flash PROM. During this period, the message ‘Erasing Flash PROM……’
is displayed. After erasing, the message ‘Cassette is erased’ is displayed.
Read PLC Name
With the command ‘Read PLC Name’, PLC type already set for the cassette is
displayed. The message ‘PLC is <PLC type>’ is displayed.
Read Configuration
With the command ‘Read Configuration’, the cassette information is displayed as:
• Cassette size – Displays cassette size as per memory cassette type.
• PLC type – Displays PLC type already set for the cassette.
• Cassette OS version – Displays memory cassette OS version.
• Ladder code status – Displays the status of application program code as blank
or Invalid or valid. If code is valid, it displays the size of the code
• Source code status –Displays the status of application program source code as
blank or Invalid or valid. If code is valid, it displays the size of the code.
The relevant error messages are displayed if the cassette physical interface or serial
communication with the PC is not healthy. The status of the application program code
is indicated by two LEDs provided on the front side of the cassette.
LED
Status
Green Red
Blinking OFF Application program code is blank.
ON OFF Application program code is valid.
OFF ON Application program code is invalid
Once the cassette is set, the programming software ‘CoDeSys’ can download the
application program codes and source codes.

____________________________________Page 91 of 106__________________________________
Memory Cassette

15.2 Sending Application Program to Cassette


CoDeSys can download an application program with the set up as shown in the
figure 26. If the code area is blank, Green LED on the cassette blinks and Red LED
is put OFF.
First, set the communication parameters for ‘CoDeSys’ using menu ‘Online’Æ
‘Communication Parameters’. Select serial (RS232) communication port as COM1
onwards. Other settings are 38.4 K baud, none parity, 8 data bits and 1 stop bit.
Then download the application program code by executing menu command Online Æ
Login. If the PLC type of the cassette and target setting of the application program is
not matching, the error message is displayed as shown below. In this case,
downloading is not possible and the cassette should be set for the PLC type selected
in target setting of the application program.

If the cassette is set properly and the connection is established, relevant dialog box
will pop up. Press button ‘Yes’ to download the application program code
While downloading the code to the cassette, the message box displays the total size
of the code as shown below. While downloading the code, green LED on the cassette
flickers with high frequency.

If a valid or invalid code is already present in the cassette, when download is initiated,
Red LED on the cassette flickers for 3-4 seconds and ‘CoDeSys’ logs out displaying
the error message “Communication error (#0): logout Performed”. When entire code
is downloaded, the dialog box pops up as shown below.

Here, press any button to complete the downloading process and hence login
process. After successful download, green LED on the cassette stops flickering and
starts blinking indicating valid application program code in the cassette.

The application program source code can be downloaded to the cassette using
command Online Æ Source code download once login is complete. This command
starts downloading the source code and the status is displayed as shown.

____________________________________Page 92 of 106__________________________________
Memory Cassette

While downloading the source code, green LED on the cassette flickers with low
frequency. It stops flickering after successful download
If communication is not established between the cassette and ‘CoDeSys’ the error
message “Communication Error (#0): Logout Performed” is displayed. The cause can
be problem in physical connection or the previous application program code is not
erased completely.
If user tries to download the source code without erasing source code area, the error
message “Error received to last online service!” is displayed. In this case, red LED on
the cassette flickers with high frequency for 3-4 seconds.
The valid application program source code can be uploaded from the memory
cassette using ‘CoDeSys’. The command ‘File’ Æ ‘Open’ Æ ‘PLC’ uploads the entire
source code from the cassette.

15.3 Sending Application Program to CPU


The application program code and source code can be transferred to the CPU. For
transfer, the memory cassette is fixed on the serial port 1 with 9-pin D connector
plugged in. CPU supplies 5 VDC supply to power up the memory cassette. The
application program code and/or source code if valid is transferred to CPU. The
status of the application program code is indicated by two LEDs provided on the front
side of the cassette.
LED
Status
Green Red
Blinking OFF Application program code is blank.
ON OFF Application program code is valid.
OFF ON Application program code is invalid
Press push button provided on the front side of the cassette twice to initiate transfer.
There are three different conditions as below:
• Valid application program code only – In this case, the CPU is put in STOP
mode first and the code is downloaded. While downloading, green LED on the
cassette starts flickering at faster rate. ‘MEM’ LED on CPU glows. The CPU is put
is RUN mode after completing the transfer. Green LED on the cassette glows
permanently after successful transfer.
If code transfer is initiated, red LED flickers with higher rate for 3-4 seconds, in
following cases –
o Invalid application program code.
o PLC type of the cassette and the Processor module mismatch.
o The application program code in the cassette consists of any POU from
external library not supported by Processor operating system.
These are error conditions and the transfer is aborted. The earlier code is preserved.
• Valid application program source code only - In this case, the source code is
downloaded to the CPU without putting CPU in STOP mode. During transfer,
green LED starts flickering at slow rate.
• Valid application program code and source code - In this case, the CPU is put
in STOP mode and the code is downloaded. Once the code transfer is completed,
source code is transferred and the CPU is put in Run mode after completing the
transfer.

____________________________________Page 93 of 106__________________________________
PLC Instructions Performance

16 PLC Instructions Performance

The tables in this chapter provide execution time and program memory consumption
of various PLC instructions

Frequently used IEC operators:

IEC Instruction Execution Time ( µs), Application program memory (bytes)


Operators BOOL BYTE WORD INT DWORD DINT REAL
0.3 µs, 0.3 µs, 0.3 µs, 0.4 µs, 0.1µs, 0.1µs, 0.1µs,
MOVE
36 bytes 36 bytes 36 bytes 36 bytes 56 bytes 56 bytes 56 bytes
0.2 µs, 0.2 µs, 0.2 µs, 0.3 µs, 0.3 µs, 3.6 to 7.2 µs,
ADD --
58 bytes 58 bytes 58 bytes 92 bytes 92 bytes 112 bytes
0.2 µs, 0.2 µs, 0.2 µs, 0.3 µs, 0.3 µs, 3.7 to 7.9 µs,
SUB --
58 bytes 58 bytes 58 bytes 92 bytes 92 bytes 112 bytes
0.2 µs, 0.2 µs, 0.2 µs, 0.4 µs, 0.4 µs, 3.3 to 5.4 µs,
MUL --
66 bytes 62 bytes 62 bytes 110 bytes 110 bytes 112 bytes
0.6 µs, 0.6 µs, 0.6 µs, 2.2 µs, 4.2 µs, 6.3 µs,
DIV --
70 bytes 66 bytes 66 bytes 112 bytes 112 bytes 112 bytes
AND, OR, 0.2 µs, 0.2 µs, 0.2 µs, 0.3 µs,
-- -- --
XOR 58 bytes 58 bytes 58 bytes 92 bytes
0.4 µs, 0.4 µs, 0.4 µs, 0.2 µs,
NOT -- -- --
38 bytes 38 bytes 38 bytes 38 bytes
SHL, 0.8 µs, 0.6 µs, 1.5 µs,
-- -- -- --
SHR 76 bytes 74 bytes 120 bytes
ROL, 0.2 µs, 0.2 µs, 1.2 µs,
-- 66 bytes 60 bytes -- 114 bytes -- --
ROR
0.3 µs, 0.3 µs, 0.3 µs, 0.3 to 0.6µs, 1µs, 1µs, 4.7 to 6.2 µs,
LT 66 bytes 66 bytes 66 bytes 66 bytes 90 bytes 90 bytes 100 bytes
0.3 µs, 0.3 µs, 0.3 µs, 0.3 to 0.6µs, 1µs, 1µs, 5.1 to 6.2 µs,
GT 66 bytes 66 bytes 66 bytes 66 bytes 90 bytes 90 bytes 100 bytes
0.6 µs, 0.6 µs, 0.6 µs, 0.6 µs, 1µs, 1µs, 6 to 7 µs,
EQ 66 bytes 66 bytes 66 bytes 66 bytes 90 bytes 90 bytes 100 bytes
31 to 66 µs,
SIN -- -- -- -- -- -- 440 bytes
29 to 70 µs,
COS -- -- -- -- -- --
440 bytes
46 to 101µs,
TAN -- -- -- -- -- -- 100 bytes
6.7 µs,
SQRT -- -- -- -- -- -- 138 bytes
11 to 194 µs,
EXPT -- -- -- -- -- -- 160 bytes
83 µs,
LOG -- -- -- -- -- -- 138 bytes
74.6µs,
LN -- -- -- -- -- -- 138 bytes

____________________________________Page 94 of 106__________________________________
PLC Instructions Performance

Frequently used Numeric Converters:

Instruction Execution Time ( µs),


Numeric Converters Application program memory (bytes)
BYTE_TO_WORD 0.4 µs, 108 bytes
BYTE_TO_INT 0.4 µs, 108 bytes
BYTE_TO_DWORD 0.1 µs, 120 bytes
BYTE_TO_DINT 0.1 µs, 120 bytes
BYTE_TO_REAL 2.2 µs, 132 bytes
WORD_TO_INT 0.4 µs, 106 bytes
WORD_TO_DWORD 0.1 µs, 118 bytes
WORD_TO_DINT 0.1 µs, 134 bytes
WORD_TO_REAL 2.1 µs, 130 bytes
INT_TO_WORD 0.4 µs, 106 bytes
INT_TO_DWORD 0.5 µs, 128 bytes
INT_TO_DINT 0.5 µs, 128 bytes
INT_TO_REAL 2.5 µs, 140 bytes
DWORD TO_WORD 0.1 µs, 116 bytes
DWORD _TO_DINT 0.5 µs, 126 bytes
DWORD _TO_INT 0.1 µs, 116 bytes
DWORD _TO_REAL 2.4 to 2.8µs, 138 bytes
DINT_TO_WORD 0.1 µs, 116 bytes
DINT_TO_DWORD 0.5 µs, 126 bytes
DINT_TO_INT 0.1 µs, 116 bytes
DINT_TO_REAL 2.4 µs, 138 bytes

____________________________________Page 95 of 106__________________________________
PLC Instructions Performance

17 Troubleshooting and Maintenance

Switch OFF the power to PLC before doing any changes in the connections.

Self Test
The Nexgenie is designed for working in industrial environment and does not require
regular maintenance.
The processor, during the power ON and during the normal course of Program
execution, continuously carries out specific self tests to ensure the healthy and
trouble free operation of the PLC. In case processor detects any fatal error in the PLC
hardware, depending upon the type of error, it either generates some alarm signals
for user program or goes in STOP mode to avoid any accident onto automated
system. The result of these tests are displayed or indicated by the LEDs .The status
of the indications enable operator to diagnose the cause of the failure and take the
appropriate action.
The trouble shooting guidelines and LED indications refer chapter 3.2.5 for base unit
and chapter 3.3.2 for expansion unit.

____________________________________Page 96 of 106__________________________________
MESSUNG SYSTEMS
EL – 2, J - Block, MIDC, Bhosari,
PUNE – 411 026. INDIA
Tel. – (+91) – 020 – 27102000
Fax. – (+91) – 020 – 27102100

Nexgenie PLC User Manual  

Document No. ED‐2009‐126 Ver. 1.6 

You might also like