Programmable Logic Controller














Project:                      PLC Ascon4-ANA

Author:                      Dipl. Ing. Uwe Prahm

Copyright ©:            Dipl. Ing,  Uwe Prahm


Version:                    2.00

Letzte Änderung:    29.10.2019

Prahm Microcomputer Systems

  Gätgensstrasse 6

82587 Hamburg













First version




Ascon4-Ana with ARM Cortex M3 microcontroller MB9BF514N from Cypress




Ascon4-Ana with ARM Cortex M4 and ARM Cortex M0



1        Introduction.. 5

1.1       The purpose of the device tester 5

1.2       Contents of pictures. 7

1.3       Content of tables. 7

1.4       Abbreviations. 8

2        General description.. 9

2.1       Purpose of the Ascon4-Aan PLC.. 9

2.1.1       The Industrial Controller 9

2.1.2       The features of the digital IO capabilities. 9

3        The Microcontroller 10

3.1       The Main Controller 10

3.1.1       General features. 10

3.1.2       The features in detail 10

3.2       The Watchdog Controller 11

3.2.1       General features. 11

3.2.2       The features in detail 11

3.2.1       The SPI Interface between Master and Watchdog. 11

3.3       PCB Data. 12

3.3.1       The Ascon4-ANA Board. 12

3.3.2       The Casing of the Ascon4-ANA Board. 12

4        Serial Busses. 13

4.1       The CAN Bus. 13

4.1.1       The isolated CAN bus power supply. 14

4.1.2       Termination resistor 14

4.1.3       Attention – no double termination.. 14

4.1.4       Capacitive noise suppression.. 14

4.1.5       CAN protocol of the PMS Device Tester 14

4.2       The LIN Bus. 15

4.3       The Interfaces. 16

4.3.1       The LED display. 16

4.3.2       The reset button.. 16

4.4       The HBUS.. 16

5        Realisation of the signals. 17

5.1       The Analog Inputs. 17

5.1.1       The 12 analog inputs. 18

5.2       The Analog Outputs. 18

5.2.1       The SPI Interface to the DAC.. 18

5.2.2       The 4 Buffered Analog Outputs. 18

5.2.3       The 4 Programmable Resistor Outputs. 18

6        Further hardware. 19

6.1       Power supply. 19

6.2       Reset circuit 19

6.3       Power down recognition.. 19


1      Introduction

1.1      The purpose of the device tester

This is the specification of the Programmable Logic Controller (PLC) Ascon4-ANA, which offers 16 analog inputs and 8 analog outputs for the Ascon4 system.
Reference documents


 [EMV-1]:        Richtlinie 2004/108/EG des europäischen Parlaments UND DES RATES vom 15. Dezember 2004 zur Angleichung der Rechtsvorschriften der Mitgliedstaaten über die elektromagnetische Verträglichkeit und zur Aufhebung der Richtlinie 89/336/EWG

[EMV-2]:         Gesetz über die elektromagnetische Verträglichkeit von Betriebsmitteln (EMVG) vom 26.02.2008.

[EMV-3]:         DIN EN 61000-6-4: Elektromagnetische Verträglichkeit (EMV), Teil 6.4: Fachgrundnormen – Fachgrundnorm Störaussendung  für Industriebereiche. September 2007.

[EMV-4]:         DIN EN 61000-6-2: Elektromagnetische Verträglichkeit (EMV), Teil 6.2: Fachgrundnormen – Fachgrundnorm Störfestigkeit für Industriebereiche März 2006.

[EMV-5]:         DIN EN 61000-6-3: Elektromagnetische Verträglichkeit (EMV), Teil 6.3: Fachgrundnormen – Fachgrundnorm Störaussendung - Wohnbereich, Geschäfts- und Gewerbebereich sowie Kleinbetriebe. September 2007.

 [SI-1]:             Richtlinie 2006/95/EG des Europäischen Parlaments und des Rates vom 12. Dezember 2006 zur Angleichung der Rechtsvorschriften der Mitgliedsstaaten betreffend elektrische Betriebsmittel zur Verwendung innerhalb bestimmter Spannungsgrenzen.

[SI-2]:              DIN EN 60950-1: Einrichtungen der Informationstechnik – Sicherheit. Teil 1: Allgemeine Anforderungen. Ausgabe 11/2006.



1.2      Contents of pictures

Figure 1 - The top view of the Ascon4-ANA Board......................................................... 12


1.3      Content of tables

Table 1 - Features of microcontroller 10

Table 1 – The features of the LPC81xM microcontroller 11

Table 2 - The subd-9 connector for the CAN interface. 13

Table 4 - The analog inputs on the microcontroller 17


1.4      Abbreviations

DTC                                       Diagnostic Trouble Code (Fehlerspeicher)

ECU                                      Electronic Control Unit (Microcomputersteuerung)

Eigendiagnose                    Self test oft he system by the ECUs

EOL                                       End of life

MO                                         message object

Node                                     Feldbus-, CAN- Knoten

OCV                                      Off current voltage

OC                                         Over current, excessive high current

OT                                          Over temperature, excessive high temperature

RC                                         Residual Capacity, Resetkapazität

SID                                        Service ID, Geräteadresse, Node Address

SOC                                      State of charge, Ladezustand, 0% leer bis 100% voll

SOH                                      State of Health

SOF                                       State of Functioning

TBD                                       To be defined, muss noch definiert werden.

UT                                          Under temperature, excessive low teperature

UV                                         Under voltage, excessive low voltage

2      General description

2.1      Purpose of the Ascon4-Aan PLC

2.1.1     The Industrial Controller

The PMS Programmable Logic Controller (PLC)  Ascon4-ANA  features very fast industrial analog control with response times within microseconds. It offers 16 analog inputs and 8 analog outputs to the Ascon4-ANA System. Up to 16 Ascon4-ANA  and Ascon4-DIG  PLCs can be connected to the Ascon4 backplane bus. The size of memory for control application is up to 500 kBytes. Control applications can either run compiled binary code or IEC-61131- statement list interpreter code.

2.1.2     The features of the digital IO capabilities

The Ascon4-ANA PLC has the following  IO capabilities:

  1. 12 analog 12V inputs with 12 bit accuracy
  2. 8 analog 12V outputs with 10 bit accuracy
  3. 4 programmable resistors

Almost unlimited digital and analog  IOs are available by connecting more Ascon4 PLCs to the Ascon4 H bus.


All analog inputs and outputs can easily be configured by the PMS Ascon Configurator. The IOs can be configured by the user in many ways so that they exactly meet the customer requirements.


3      The Microcontroller

3.1      The Main Controller

3.1.1     General features

The ARM Cortex M4 microcontroller is processing the digital and analog data, doing measurement and controling and communicates via CAN, LIN and USB with the other ASCON4 boards and the outer world. This microcontroller has the following advantages:

  1. Up-to-date 32 bit RISC technology (ARM Cortex M4)
  2. Very high price-performance relation
  3. Many second source suppliers ensure a long term availability
  4. Small 100 pin SMD package outline, leaving much space for IO components
  5. Ascon4-ana generates from the 12 V supply voltage input the internaly needed 5V and +3.3V voltages
  6. Low power consumption, control of power consumption via settable clock rates
  7. Fast 32- Bit floating point arithmetic functions on the M4 controller.


3.1.2     The features in detail

The XMC4500-F100x1024 microcontroller has the following features:

CPU features

MF timer

Further IOs


1MB Flash

12 PWM inputs

18 12-bit ADC

2 x Full CAN

32 kB SRAM

12 PWM outputs



40 Mhz clock

3 revolution encoder


100 mBit/s Ethernet

+3,3V supply

8 base timers




3 multi function timers




Wake up timer




Watchdog timer



Table 1 - Features of microcontroller

3.2      The Watchdog Controller

3.2.1     General features

The main task of the ARM Cortex M0 watchdog microcontroller is the supervion of the ARM Cortex M4 main controller via a fast SPI connection. The main and the watchdog controller are constantly superving each other in 100 msec intervals.


Both the main and the watchdog controllers can signal an alarm via the wired-or signal on the HBUS interconnecting the Ascon4 ECUs. The alarm signal can trigger an alarm action as for example a power off by a proper relais.


The ARM Cortex M0 microcontroller has the following features:

  1. Up-to-date 32 bit RISC technology
  2. Low-cost with very high price-performance relation
  3. Many second source suppliers ensure a long term availability
  4. Small 16 pin SMD package outline, leaving much space for IO components
  5. Very low power consumption, control of power consumption via settable clock rates

3.2.2     The features in detail

The LPC81xM watchdog microcontroller has the following features:

CPU features

MF timer

Further IOs


16 kB Flash

4 MRT timers




Watchdog timer

8 Interrupts


30 Mhz clock

Wake up timer

Flexible configuration

1 I2C

+3,3V supply




Table 1 – The features of the LPC81xM microcontroller


3.2.1     The SPI Interface between Master and Watchdog

The SPI interface between the master controller and Arm Cortex M0 Watchdog is implemented by a fast serial interface.



3.3      PCB Data

3.3.1     The Ascon4-ANA Board

Figure 1 - The top view of the Ascon4-ANA Board


3.3.2     The Casing of the Ascon4-ANA Board

The Ascon4-Ana board is delivered in a Phoenix Contact case.

4      Serial Busses

4.1      The CAN Bus

The isolated CAN Transiver isolates the COM board from the CAN bus for voltages up to 2500 Vrms. The transceiver meets all industrial requirements.


On the front panel the CAN bus is connecting the COM board with the PMS Diagnoser running on a PC. The pin layout of the 9-pin Subd connector looks like this:

9 pin subd connector











Table 2 - The subd-9 connector for the CAN interface

4.1.1     The isolated CAN bus power supply

The isolated CAN bus power supply can supply the CAN bus side with an isolated 5V voltage. The CAN bus power supply can also origin from the CAN bus cable. The decision from where the driver voltage shall come from, is done by the solder jumpers JMP1 and JMP2.

4.1.2     Termination resistor

The CAN bus must be terminated on its two physical endings by a 120 Ohm resistor.

4.1.3     Attention – no double termination

The CAN bus termination resistors can only be assembled on the COM board, when the COM board is the physical termination and when no other termination resistor is placed on this side of the CAN cable (twisted pairs).

4.1.4     Capacitive noise suppression

The capacitor C65 is responsible for the capacitive noise suppression close to the CAN connector. The capacitor should not be assembled, when high baud rates are required.

4.1.5     CAN protocol of the PMS Device Tester

The UDS- CAN bus protocol is described in the PMS Device Tester software specification.

4.2      The LIN Bus


The ARM Cortex M4 is the LIN master, so all devices on the LIN bus are bus slaves.

The LIN driver buffers the serial interfaces before the LIN signal is led to the subd-9 connector X3.


The EN (enable) input pin enables the LIN transceiver with an active high signal. When set low by the controller, the transceiver will go into a sleep state. The WAKE input pin features a wake up by setting this line low by the external switch, which is connected to the pin connector X10.


The pull up resistor and the polarity protection diode are only needed, when the LIN interface on this COM board is the LIN master. Both components should not be assembled, when the LIN interface is a LIN slave. The INH (inhibit) output pin can set the +5V power supply into a sleep mode. This feature is not applied here, so this pin is left unconnected.


4.3      The Interfaces

4.3.1     The LED display

On the upper part of the front panel two LEDs are placed. They signal the following:

  1. The lower red LED is on when the Ascon4-ANA card is sourced by VCC = 5V
  2. The upper green LED shows the state of the Ascon4-ANA card:
    LED off: Sleep mode, low power consumption mode

LED on: Run mode, the board is running at full speed

LED blinking: An error has ocured, use the diagnosis interface to find the cause of the error

4.3.2     The reset button

The reset button is placed on the lower part of the front panel.


4.4      The HBUS

The HBUS directly connects all Ascon4-ANA controllers at the mounting chain. It consists of a 16 pin bus, which offers the following features:

  • The HBUS connectors are standard 16 pin 100 mil (2,54mm) male-female connectors
  • Each pin can carry up to 2 A and 100 V
  • Both the power supply voltages and  bus signals can be carried by the HBUS


The Ascon4-ANA HBUS carries the following power supply voltages and bus signals:

  1. CAN1H and CAN1L, the field bus interface for all Ascon4-ANA PLCs
  2. RESET, the reset signal can originate from any Ascon4-ANA controller
  3. +5V power supply
  4. +12V and -12V power supply voltages
  5. Alarm signal, a wired or alarm line
  6. GND, the digital ground



5      Realisation of the signals

5.1      The Analog Inputs

Analog inputs

Pin name


ADC inputs













ADC trigger inputs








power & volt reference


A/D converter analog power


ADC reference voltage


A/D converter GND

Table 4 - The analog inputs on the microcontroller




5.1.1     The 12 analog inputs

The 12 analog inputs are buffered by the voltage follower operational amplifier. A resistor and capacitor are filtering away high frequencies. Also on the input of the OP diodes protect the circuit against excessive voltages. On the output side of the OP two resistors are downscaling the 12 V into 3,3 V for the ADC of the microcontroller.


5.2      The Analog Outputs

5.2.1     The SPI Interface to the DAC

The 8 DAC outputs are transmitted via a SPI interface. The DAC chip converts the data from the SPI into 8 analog outputs. It offers fast 10 bit analog outputs.


5.2.2     The 4 Buffered Analog Outputs

Serial connected resistors and a diode arrays protect against excessive voltages from the outside. A low pass filter protects the output drivers againt spikes.


5.2.3     The 4 Programmable Resistor Outputs

The 4 programmable resistor outputs are implemented by the 8 channel Digital to Analog Converter. The voltages are set by the microcontroller via the SPI interface of the DAC device.


An operational amplifier works as a voltage follower, isolating the analog voltage and driving the power transistor to implement the programmable resistor. Proper potentiometers can calibrate the in- and outputs of the operational amplifier.



6      Further hardware

6.1      Power supply

The +5V and 3,3V power supplies can be supplied by on board LDOs . The maximum current of the microcontroller is 100 mA. The resulting worst case power dissipation (24V-5V) * 0,1A is 1,9W, which should not cause heating problems.

6.2      Reset circuit

Reset can either origin from the H-Bus bus pin RESET or from the reset switch.

6.3      Power down recognition

The POWER_FAIL input of the Ascon4-Ana board will recognise a power fail at an early stage.