Table of Contents

C1-R11-Fx BASE

C1-R11


All rights reserved on this manual. No part of this document can be copied or reproduced in any form without prior written authorisation. QEM does not insure or guarantee its contents and explicitly declines all liability related to the guarantee of its suitability for any purpose. The information in this document can be changed without notice. QEM shall not be held liable for any error or omission in this document. QEM® is a registered trademark.

1. Informations

Document: MIMC1R11F BASE
Description: Installation and maintenance manual
Editor: Riccardo Furlato
Approver Gabriele Bazzi
Link: http://www.qem.eu/doku/doku.php/en/strumenti/qmoveplus/C1R11/mimC1R11fx_base
Language: Italian
Document release Hardware release Description Note Date
01 01 New manual Valid for firmware release greater 5 23/04/2012
02 01 Inserted the FF model / 08/04/2013
03 01 Deleted the FC model / 16/04/2013
04 01 Adding the 1MG5F card / 29/10/2013
05 02 New manual and updated the link to 1MG3F card hardware release 02. Created the “BASE” version of this manual 17/02/2015
06 02 Added the “General information” section / 13/01/2016
07 02 Inserted the “FW” model / 28/06/2016

The controller has been designed for industral environments in conformity to EC directive 2004/108/CE.

  • EN 61000-6-4: Electromagnetic compatibility - Generic standard on emission for industrial environments
    • EN55011 Class A: Limits and measurement methods
  • EN 61000-6-2: Electromagnetic compatibility - Generic standard on immunity for industrial environments
    • EN 61000-4-2: Electromagnetic compatibility - Electrostatic discharge immunity
    • EN 61000-4-3: Immunity to radiated, radio-frequency electromagnetic field
    • EN 61000-4-4: Electrical fast transients
    • EN 61000-4-5: Surge immunity
    • EN 61000-4-6: Conducted disturbance induced by radio-frequency
  • Moreover the product is conform to the following standards:
    • EN 60529: Housing protection rating IP64
    • EN 60068-2-1: Environmental testing: Cold
    • EN 60068-2-2: Environmental testing: Dry heat
    • EN 60068-2-14: Environmental testing: Change of temperature
    • EN 60068-2-30: Environmental testing: Cyclic damp heat
    • EN 60068-2-6: Environmental testing: Sinusoidal vibration
    • EN 60068-2-27: Environmental testing: Shock vibration
    • EN 60068-2-64: Environmental testing: Random vibration

2. Description

C1-R11-F is the compact instrument for panel mounting of the Qmove+ range.

2.1 Product identification

:tip:The Ordering Code provides the exact product features.
Make sure that the product characteristics meet your requirements.

2.1.1 Product Identification

2.1.2 Ordering code

Model Features
C1-R11-FA-10
10 = Firmware version (00 = not installed)
F = Technology level
A = Hardware version
R = Rear panel mounting instrument
1 = Dimensions (198x178mm)
1 = Firmware-hardware correspondence
C1 = “Motion” Qmove family

2.1.3 Hardware Versions

These are hardware versions currently available:

Hardware versions
ABCDEFGYWZ
SLOT 2
(Base card)
USER PORT (RS232, RS422, RS485)1111111111
AUX1 PORT (RS232, RS422, RS485)--------11
AUX2 PORT (RS485)1111111111
CAN1 PORT1111111111
CAN2 PORT1)---------1
ETHERNET PORT1111111111
USB PORT2)----------
SLOT 3
(Specialization
cards)
Standard digital inputs-16161616161616-16
Rapid digital inputs3)-2222222-2
Analog inputs 12bit-2222222-2
Analog inputs 16bit----------
PT100 inputs 4)----------
Termocouple inputs 5)----------
Bidirectional counters 20KHz ABZ
(24V-PP, 5V-LD)
----------
Bidirectional counters 200KHz ABZ
(24V-PP, 5V-LD)
-26)27)44442-4
SSI counters------2---
Protected digital outputs-8168168168-8
Ralay digital outputs----------
Analog outputs 0-10V-12bit----------
Analog outputs +/-10V-16bit-2224444-4
Stepper outputs---2--44-4
Remote keyboard connector 8)-------1-1
Card software code
declared in SLOT 3
--

1), 2), 4), 5), 8) option not currently enabled
3) the “Z” inputs can be used as frequency meters in the “FREQ” device
6), 7) the connectors used are CN7 and CN8

2.1.4 Expansion cards manuals

2.1.5 Firmware versions

VersionDescription
10 Fully programmable with PLC functions
20 Fully programmable with PLC and Motion control functions
30 Fully programmable with PLC, Motion control, Camming and Interpolation functions

For more details about the firmware, consult Devices enabled in the controllers.

2.2 Product Configuration

2.2.1 Back terminal blocks

The C1-R11-F composed of a “base” card and an “expansion” card.

3. Technical features

3.1 General Features

Weight (maximum hardware configuration)1Kg
Material boxSheet metal
System led8
System keys3
Operating temperature0 ÷ 50°C
Transport and storage temperature-25 ÷ +70 °C
Relative humidity90% condensate free
Altitude0 - 2000m s.l.m.
Front panel protectionIP20

3.2 CPU (F level technology)

RISC microprocessor (32 bit)
Work frequency 200MHz
RAM 16MB
Flash 8MB

3.3 Dimensions

:info:Lengths in mm

3.4 Drilling template

4. Base card wiring

:tip:For details about cable sections and connectors, see application note AN021

4.1 Power Supply

:todo:The cabling must be carried out by specialist personnel and fitted with suitable anti-static precautions.
Before handling the controller, disconnect the power and all parts connected to it.
To guarantee compliance with EC regulations, the power supply must have a galvanic isolation of at least 1500Vac.

.

Power supply 24 Vdc
Voltage range 22 - 27 Vdc
Max. absorption 30W
CN1 TerminalSymbolDescription
1 + DC power positive
2 GROUND Gnd-PE (signals)
3 - DC power 0V

Connection examples

:todo:Use an isolated power unit with 24Vdc +/-5% output conform to EN60950-1.

.

Use two separate power units: one for the control circuit and one for the power circuit
For a single power unit, use two separate lines: one for the control and one for the power
DO NOT use the same lines for the power circuit and the controller

4.2 Serial Port Connections

4.2.1 PROG PORT

PROG PORTDescription
Serial port used for the transfer and debugging of the application program in the CPU.
Use only with IQ009 or IQ013.

4.2.2 USER PORT

CN2 TerminalRS232RS422RS485Description
1A - - A Terminal A - RS485
2A - - B Terminal B - RS485
3A 0V 0V 0V USER PORT common
4A 0V 0V 0V USER PORT common
5A TX - - Terminal TX - RS232
6A Terra
1B - RX - Terminal RX - RS422
2B - RXN - Terminal RX N - RS422
3B - TX - Terminal TX - RS422
4B - TXN - Terminal TX N - RS422
5B RX - - Terminal RX - RS232
6B Ground
Setup of USER PORT electric standard
SW2 Num.
Dip
Name
DIP
Setting
of DIP
Function
1 JP2 ON X1) X2) Termination RS485
2 JP3 ON X3) X4) Polarization RS485
3 JP1 ON X5) X6)
4 OFF ON OFF Selection of USER PORT electric standard
5 ON OFF OFF
6 OFF OFF ON
RS485 RS422 RS2327)

1), 2), 3), 4), 5), 6) X = setting not significant
7) the USER PORT can be used as PROG PORT with RS232 electric standard, setting ON in DIP-8 of SW1 and OFF in DIP-6 of SW2

4.2.3 AUX1 PORT

CN3 TerminalRS232RS422RS485Description
1A - - A Terminal A - RS485
2A - - B Terminal B - RS485
3A 0V 0V 0V USER PORT common
4A 0V 0V 0V USER PORT common
5A TX - - Terminal TX - RS232
6A Ground
1B - RX - Terminal RX - RS422
2B - RXN - Terminal RX N - RS422
3B - TX - Terminal TX - RS422
4B - TXN - Terminal TX N - RS422
5B RX - - Terminal RX - RS232
6B Ground
Setup of AUX1 PORT electric standard
SW3 Num.
Dip
Name
DIP
Setting
of DIP
Function
1 JP2 ON X1) X2) Termination RS485
2 JP3 ON X3) X4) Polarization RS485
3 JP1 ON X5) X6)
4 - OFF ON OFF Standard USER PORT settings
5 - ON OFF OFF
6 - OFF OFF ON
- - RS485 RS422 RS232

4.2.4 AUX2 PORT

CN4 TerminalSymbolDescription
cnn_3fv_p3.5_03.jpg 1 0V RS485 serial common
2 B Terminal RS485 B
3 A Terminal RS485 A
Setup of AUX2 PORT polarisation and termination resistances
SW4 Num.
Dip
Name
Dip
Setting
of DIP
Function
dip-4.jpg 1 JP3 ON Polarization RS485
2 JP2 ON Termination RS485
3 JP1 ON Polarization RS485
4 X7) None

1), 2), 3), 4), 5), 6) X = setting not significant
7) X = setting not significant

4.2.5 CANbus PORT

Connectors
CN5-CAN1 PORT
CN6-CAN2 PORT
TerminalSymbolDescription
cnn_3fv_p3.5_03.jpg 1 0V CAN common
2 CAN L Terminal CAN L
3 CAN H Terminal CAN H
Setup of CAN1 and CAN2 PORT Termination resistances
SW5 Num.
Dip
Name
Dip
Setting
of DIP
Function
dip-4.jpg 1 JP1 ON CAN1 Termination
2 JP2 ON
3 JP1 ON CAN2 Termination
4 JP2 ON
:todo:When activating the CAN1 port termination, set dip's JP1 and JP2 to ON.
When activating the CAN1 port termination, set dip's JP1 and JP2 to ON.

4.2.6 Ethernet

ETHERNET PORTDescription
Connector RJ45.

LED:
* LINK: green led = cable connected (led on signals the cable is connected to both ends)
* DATA: yellow led = data transmission (flashing led signals data transmission)

4.2.6.1 MMC/SD

Memory card slot (marked by an arrow)

5. Electrical Features

The electrical features of the hardware are given below.
Maximum and minimum frequency values and actual acquisition times, can still depend on any additional software filters, see for example the system “QMOVE:sys004” variable on the section System variables.

5.1 PROG PORT

Connector for IQ009 or IQ013

:important: The USB mini-B connector does not support USB electrical standards, it can only be used with an interface IQ009 or IQ013.

It is used for the transfer and debugging of the application program in the CPU.

Electrical standard TTL (Use serial interface IQ009 or IQ013)
Communication speedMin. 9.6 Kbaud - max 115200 Kbaud
settable by dip1 and 2 of the switch SW1
InsulationNone

.

Connection between Qmove+ e PC using the accessory IQ009

.

Connection between Qmove+ and a device fitted with a RS232 serial port (e.g. a MODEM), using the interface IQ013

5.2 RS232

Communication speed4800, 9600, 19200, 38400, 57600, 115200 baud
Communication modeFull duplex
Operating modeReferred to 0V
Max. number of devices connected on the line1
Max. cable length15 m
Input impedence> 3 Kohm
Short-circuit current limit7 mA

Internal wiring diagram of RS232

Cable connection diagram of RS232

5.3 RS422

Communication speed4800, 9600, 19200, 38400, 57600, 115200 baud
Communication modeFull duplex
Operating modeDifferential
Max. number of devices connected on the line1
Max. cable length1200 m
Input impedence> 12 Kohm
Short-circuit current limit35 mA

Internal wiring diagram of RS422

Cable connection diagram of RS422

Cable connection diagram of RS422

5.4 RS485

.

Communication speed4800 baud (only if used with SERCOM and/or MODBUS device),
9600 baud, 19200 baud, 38400 baud, 57600 baud
Communication modeHalf duplex
Operating modeDifferential
Max. number of devices connected on the line32
Max. cable length1200 m
Input impedence> 12 Kohm
Short-circuit current limit35 mA

Internal wiring diagram of RS485

Cable connection diagram of RS485

5.5 CANbus

To activate the internal termination resistance see paragraph Setup Termination resistances

.

Communication speed125, 250, 500, 1000 Kbit/s
Max. number of Drivers/Receivers on the line100
Max. cable lengths500m @ 125Kbit/s, 250m @ 250Kbit/s, 100m @ 500Kbit/s, 25m @ 1000Kbit/s
Input impedence>15Kohm
Short-circuit current limit45mA

Schema elettrico interno canbus

Schema del cavo di collegamento canbus

Esempio di collegamento CANbus

CAN BUS connection examples.

Caution:
Close DIP's JP1 and JP2 and insert the termination resistances (RL, RH) on the last device of the chain.

5.6 Ethernet

Ethernet Interface 10/100 Base T (IEEE 802.3) on RJ45 connector.

Connection between Qmove + and PC:

Qmove+ Cross-over cable EIA/TIA-568A/B PC

5.7 MMC/SD

Type of Memory Card to useMMC, SD and SDHC up to 8GB
For proper operation it is necessary that the device conforms to the standards set by “SD Association” (www.sdcard.org) or “Multi Media Card Association” (www.mmca.org).

.

:important:To use the Memory Cards they must first be formatted with FAT16 or FAT32 file system.

6. Settings, procedures and signals

Rear view to identify the devices illustrated in this chapter.

6.1 PROG PORT and USER PORT baud-rate selector

SW1 DipDIP settingsFunction
dip-8.jpg 1 OFF OFF ON ON Select PROG PORT transmission speed
2 OFF ON OFF ON
Baud-rate
38400
Baud-rate
115200
Baud-rate
19200
Baud-rate
57600
3 OFF OFF ON ON Select USER PORT transmission speed
4 OFF ON OFF ON
Baud-rate
38400
Baud-rate
115200
Baud-rate
19200
Baud-rate
57600
5 CANbus baud-rate selector. See paragraph CANbus baud-rate selector
6 OFF ON Select PROG PORT functioning mode
PROG PORT can also be used by SERCOM and MODBUS devicesPROG PORT cannot be used by SERCOM and MODBUS devices
7 CANbus baud-rate selector. See paragraph CANbus baud-rate selector
8 OFF ON Select the USER PORT as PROG PORT1)
PROG PORT normalPROG PORT on USER PORT connector

1) It is possible to use the USER PORT connector as PROG PORT with RS232 electric standard, doing this the mini-USB connector of the PROG PORT is disconnected (Setting USER PORT electric standard). For this function mode also set dip 6 of SW2 to OFF.

6.2 CANbus baud-rate selector

SW1 DipDIP settingsFunction
dip-8.jpg 1 - -
2 - -
3 - -
4 - -
5 OFF ON OFF ON Select speed of
CANbus transmission
7 OFF OFF ON ON
Baud-rate
125KB/S
Baud-rate
250KB/S
Baud-rate
500KB/S
Baud-rate
1MB/S
6 - -
8 - -

6.3 Led

The “pow, run, stop, err” are system leds.

The “L1, L2, L3 e L4” are user leds.

"System leds" alerts

Legend:

led_on.jpg Led ON

led_off.jpg Led OFF

led_lamp.jpg Led flashing

LedColorStateDescription
powGreenled_on.jpgDevice ON
led_on.jpgIf it is the only led on, reports the status of CPU reset
runGreenled_on.jpgRUN state of the CPU
led_lamp.jpgREADY state of the CPU
stopYellowled_on.jpgIf the pow led is in ON, reports the status of CPU STOP
If the pow led is in OFF, reports the status of CPU BOOT
errRedled_lamp.jpgIf the pow led is in OFF, report an hardware error. To see the section Hardware error codes
If the pow led is in ON, the flash number report the error type. To see the err led report section

Err led alerts


flashing
Error Description Recommended operations
1 Bus error Bus not configured as described in the application. To verify the correspondence between the configuration of the QMOVE application (BUS section of the configuration unit) and that of the productr (cards available in the BUS).
2 CheckSum Error The integrity check on the retentive variables has failed. (To see the Reset Error Checksum chapter) It is necessary to restore data from a backup machine (file with DAT extension) or clear the error with the function of the system and reintroduce the values manually.
3 Index Out of Bound Array index is pointed to a nonexistent element With Qview environment you can open the editor of a unit and with the “Edit→Go to PC” command you see the line that caused the error. Typically the value used as the index has a value less than 1 or greater than of the array size.
4 Program Over Range The selection index program within the DATAGROUP has attempted to access a non-existent program. With Qview environment you can open the editor of a unit and with the “Edit→Go to PC” commnand you see the line that caused the error. Typically the value used as the index has a value less than 1 or greater than of the array size.
5 Step Over Range The selection index step within the DATAGROUP has attempted to access a non-existent step. With Qview environment you can open the editor of a unit and with the “Edit→Go to PC” commnand you see the line that caused the error. Typically the value used as the index has a value less than 1 or greater than of the array size.
6 Division By Zero The denominator of a division operation of the user program has value zero. With Qview environment you can open the editor of a unit and with the “Edit→Go to PC” commnand you see the line that caused the error.
7 Syntax Error The application program has an invalid instruction his error may appear because the program counter met the QCL END statement.
8 Watch Dog Error A CAN module is not working properly, or an expansion card has a hardware problem. With Qview environment you can open the “Monitor→Bus” panel and in the “Watchdog Bus” column shows the card that caused the problem.
9 Stack Error The application program has used all levels of subroutine call permissions With Qview environment you can open the editor of a unit and with the “Edit→Go to PC” commnand you see the line that caused the error. Analyze the flow of execution of the unit. The nestings of subroutines have a limit, beyond which it generates this error.

Hardware error codes

If a malfunction is detected when starting of any peripheral devices, the system hangs and the error is reported by the blinking of the only led_lamp.jpg led err while all the other leds remain OFF. In the table you can see the number of flashes that indicates the error:

Number of flashesError
1 Display
2 FPGA
3 Media
4 Bootloader
5 FW
6 Bus
7 Inactive signal
8 Inactive signal
9 Exception

.

:important:Each of these reports indicates a serious error. The product must be sent to the customer support QEM.

“User Led” Alerts

LedColorDescription
led_on.jpg L1YellowProgrammable in the user program system variable QMOVE:sys003 and used by system functions
led_on.jpg L2
led_on.jpg L3
led_on.jpg L4

6.4 Keys

NameDescription
pulsante_6x6.jpgFUNCPress on startup of the controller to access the System functions
pulsante_6x6.jpgBOOTPress on startup of the controller to set the CPU in Boot status and then access the firmware update functions
pulsante_6x6.jpgRESETReset CPU. the system is restarted restoring the initial conditions (after a startup )

7. Operating Overview

7.1 Foreword

This chapter covers aspects and descriptions of the product functionalities that are often related to the firmware, which enable the functionalities that enable its operation as a QEM Qmove+ programmable system.

7.2 Organization of data and memories

To best understand the terms used in this chapter, it is important to know the organisation of data and memory in a QMOVE application. QMOVE applications are programs written in QCL language that, translated in binary code, are transferred onto QMOVE hardware and saved there. In the hardware, the microprocessor runs has a program called firmware that interprets the above binary code instructions and performs the operations associated to them.

A QCL application, in addition to the instructions, is also composed of variables that the QCL instructions act on.. Some of these variables are retentive, i.e. their values remain unaltered from shut-off to start up. The flow chart below illustrates the organisation of data in a QCL application transferred to the memory of any QMOVE hardware:

It can be noted that, the QMOVE hardware has several mass storage devices:

“Flash memory”, where the following is saved:

“Non volatile memory”, which stores:

“Volatile memory”, which stores:

The volatile data memory is also used as dynamic memory. i.e. the memory used by the firmware for internal operations and active HMI screen management.

“Mass storage internal device” is managed by a standard filesystem and is useful to save information by the DATASTORE device (read - write binary or csv files with recipes, logs, variuous setups, etc).
It 'also used to store the backup of the application QMOVE and other service files.

“Mass storage external device” is managed by a standard filesystem and is useful for loading the QMOVE application, data loading/saving, firmware update or to save informations by the DATASTORE device.

7.3 CPU states

The CPU has several operating statuses. The figure below shows the main status changes from the controller startup.
The main operating statuses are RESET, READY, RUN and STOP.
The CPU events that determine a transition from one status to another are mainly linked to commands being sent by the development environment: Run, Reset, Stop and Restart.
Application download is the development environment procedure that allows to transfer a QMOVE application to the CPU.

Stati della CPU

The BOOT state can be used to access the firmware updating functions.

During the startup, after scanning the system led's, the controller performs a series of self-diagnostic operations. When any faults are detected or the operator has to be informed of any given situation, the self-doagnosis procedure is temporarily interrupted, signalling the event.
The fault signal is made by led's L1, L2 and a message is given on display (if present).

System Messages
n.Led ONSystem Message (if display present)DescriptionType
1led_on.jpg L1System Data WRITE ERRORIndicates that a write error has occurred during the configuration data saving. B
2led_on.jpg L2System Data IS RESTORED FROM DEFAULTIndicates that the configuration data has been restores to the default settings. C
3led_on.jpg L1
led_on.jpg L2
System Data is updated
Please verify new data
Indicates that the configuration data has been converted into a new format. Check that the previous settings have been maintained. C
4led_on.jpg L3Firmware is updated
old: 1K31F10 1.001
new: 1K31F10 1.002
Indicates that a firmware update has been made. C

When the condition detected allows to continue to the start stage (type C) and waits for the FUNC button or for the F1 key to be pressed to continue the boot procedure.

If not provided with a display, the controller waits 5 seconds before continuing with the startup stage, without waiting for a button to be pressed.

When the situation does not allow to continue the startup stage (tipo B), the controller, if provided with a display, shows the message“PLEASE TURN OFF AND TURN ON THE SYSTEM” and remains in this state until you turn off. If the controller is not provided with a display, the led led_lamp.jpg err flashes continuously.

The SYSTEM FUNCTIONS status can be used to access the SYSTEM FUNCTIONS, which are special procedures that allow the user to perform various operations. For more details see the System Functions chapter.



Led statusled_on.jpgpow
led_off.jpgrun
Status causeNo application in memory.
The condition that can put the CPU in this statusRESET command.

This condition can only pass onto a READY status by downloading the applicaiton, using the Qview6 development environment.



Led statusled_on.jpgpow
led_lamp.jpgrun
Status causeApplication valid and waiting for execution.
Conditions that can put the CPU in this statusApplication download.

This condition can pass onto to the RUN or RESET statuses.



Led statusled_on.jpgpow
led_on.jpgrun
Status causeApplication in execution.
Condition that can put the CPU in this statusRUN command.

This condition can pass onto all other CPU statuses.



Led statusled_on.jpgpow
led_on.jpgstop » led_off.jpgrun
Status causeStop on application in execution.
Condition that can put the CPU in this statusA breakpoint has been encountered in the application code interpretation.

This condition can pass onto all other CPU statuses.

7.4 System Functions

:important:IMPORTANT: The use of these procedures could represent a risk (e.g. deletion of application), therefore it is highly recommended that they are performed by qualified experts.

The system functions are speficic procedures that allow the user to perform various operations, e.g. the configuration/calibration of peripherals, data and application save/restore on/from removable mass memory, deletion of the application and management of the mass memories.

All the system functions are listed below.
DEVICE indicates an external storage media. MMC / SD or USB for hardware that they have the port.

System Functions

n.Led ONSystem FunctionsDescription
1led_on.jpgL101 - Reset Error ChecksumReset checksum error.
NOTE: if the checksum error is present, the led led_on.jpg L1 flashes.
2led_on.jpgL202 - Copy all files DEVICE → NANDCopy all files from DEVICE to NAND Flash memory.
3led_on.jpgL1
led_on.jpgL2
03 - Copy all files NAND → DEVICECopy all files from NAND Flash memory to DEVICE.
4led_on.jpgL304 - Application deleteDelete the application.
5led_on.jpgL1
led_on.jpgL3
05 - Application upload from DEVICEUpload the application from DEVICE.
6led_on.jpgL2
led_on.jpgL3
06 - System SettingsNot implemented for this hardware
7led_on.jpgL1
led_on.jpgL2
led_on.jpgL3
07 - Downl. retentive data to DEVICESave the retentive data on DEVICE.
8led_on.jpgL408 - Set NEW PasswordNot implemented for this hardware
9led_on.jpgL1
led_on.jpgL4
09 - Remove all files from NAND FlashCancel all files stored on the NAND Flash memory.
10led_on.jpgL2
led_on.jpgL4
10 - Show NAND Flash filesNot implemented for this hardware
11led_on.jpgL1
led_on.jpgL2
led_on.jpgL4
11 - Touch CalibrationNot implemented for this hardware
12led_on.jpgL3
led_on.jpgL4
12 - Set Ethernet communic. parameterNot implemented for this hardware
13led_on.jpgL1
led_on.jpgL3
led_on.jpgL4
13 - Backup to NANDRun the backup of the QCL application, data and HMI application on NAND memory.
14led_on.jpgL2
led_on.jpgL3
led_on.jpgL4
14 - Restore from NANDRun the restore of the QCL application, data and HMI application from NAND memory.
15led_on.jpgL1
led_on.jpgL2
led_on.jpgL3
led_on.jpgL4
15 - Firmware UpgradeRun the firmware upgrade from DEVICE.
Available only in some hardware.

Note: To exit system functions press the keep the FUNC button for at least two seconds.

7.4.1 Access to system functions

:tip:To access the System Functions, start up the controller with FUNC button pressed.

The QMOVE application, if present, it not executed and the led L1 lights up.

:tip:Use FUNC button to scroll through the functions.
The selected function is indicated by the combination of L1-L2-L3-L4 leds lighted up.

The “System Functions” table gives the list of system functions and related led combinations.

:tip:Press BOOT button for 2 seconds to execute the selected function.
The POW led starts flashing to indicate that the selected function is being executed.

When the function ends the POW led stops flashing.

:tip:Press FUNC button to restart the controller.

If the function does not complete properly the POW stops and the ERR starts flashing.

The number of flashes indicates the type of error as shown in the table System Function Error Messages.



When a system function ends with an error, the number of led flashes led_lamp.jpg err indicates the type of error.
If there is a display, a message is given to describe the cause of the error.

System Function Error Messages
Error/Number of ERR led flashesMessage
1 Generic error
2 Open/Exist/Create file error
3 Read file error
4 Write file error
5 Out of Memory error
6 QMos Version error
7 Checksum Error
8 Symbols checksum No Match
9 Configuration / Symbols error
10 File format error
11 Format error
12 Device not present or unformatted
13 Application not present error
14 Touch calibration failure
15 File compression type not support
16 Target don't match project !
17 Fw version don't match project !
18 File copy error
19 File size error
20 Crypt operation error
21 Invalid Product Serial Number
22 Function is locked
23 Function not enabled

Description of the functions



The system runs an integrity control of retentive variables by the applicaiton of a CRC to the nonvolatile data memory. This detects any corruption and prevents the application from starting up, signalling the situation by flashing the led led_lamp.jpg err as shown in Err led signals.
For the application to function again, a new download of the application must be performed with the development environment, or the “Reset Error Checksum” system function. These operations delete the error status and zero-setsall retentive variables.

The procedure:

  • Check the error status and end the funciton if no error is present.
    In microQMove products, the presence of the QCL application is also checked.
  • Vengono azzerati i dati ritentivi e viene visualizzato il messaggio “Clear power down data…” fino al termine della procedura.
  • Resets the retentive data and the message “Clear power down data…” until the end of the procedure.
  • End of operation

This procedure copies all files in the root and “DS” directory of the external MMC/SD or USB card to the NAND internal mass storage.

The following table gives the sequence of operations and any possible errors:

MessageDescriptionPossible errors
Check DEVICE presenceChecking for the presence of the external mass storage card
On DEVICE appears MMC or USB, depending on what is selected
Device not present or unformatted
Mounting device…Mounting the external mass storage cardDevice not present or unformatted
Searching files…Searching for compatible filesNo Files Found
Copy <filename>….Making a copy of the files indicating the name currently in copy

This procedure copies all files contained in the root and “DS” directory of the NAND internal mass storage to the external MMC/SD or USB card memory.

The following table gives the sequence of operations and any possible errors:

MessageDescriptionPossible errors
Check DEVICE presenceChecking for the presence of the external mass storage card
On DEVICE appears MMC or USB, depending on what is selected
Device not present or unformatted
Mounting device…Mounting external mass storage deviceDevice not present or unformatted
Searching files…Searching for compatible filesNo Files Found
Copy <filename>….Copying the files indicating the name of the one currently in copy

This deletes the application and empties the nonvolatible data memory, deleting the QCL program and, if present, deleting the HMI program.

The following table gives the sequence of operations performed and any possible errors:

MessageDescriptionPossible errors
Reset retentive dataEmpty nonvolatible data memoryWrite file error
Delete QCL applicationDeletion of the QCL programWrite file error
Delete HMI applicationDelection of the HMI program (if display installed)Write file error



This loads an application from the external MMC/SD or USB mass memory card to the non volatile memory.

This allows to load all or one of the QCL program, HMI program and retentive data.

The external MMC/SD or USB mass memory card must contain at least one of the following files:

  • applic.bin for the compiled QCL program generated by the Qview development environment
  • applic.dat for the data file generated by the “Save Data…” procedure of the Qview development environment or by the Downl system function. for retentive data to DEVICE;
  • appqtp.bin for the compiled HMI program generated by the Qpaint development environment; it is generated by the special function “Download the project to File…”.
MessageDescriptionPossible errors
Check DEVICE presenceChecking for the presence of the external mass storage card
On DEVICE appears MMC or USB, depending on what is selected
Device not present or unformatted
Mounting device…Mounting external mass storage cardDevice not present or unformatted

If the applic.bin is present:

MessageDescriptionPossible errors
Upload QCL applicationUploading the QCL programOpen/Exist/Create file error
Write file error
Read file error
Out of Memory Error
QMos Version Error
Checksum Error
Symbols checksum No Match
Configuration / Symbols Error

If the applic.bin file is not present, an application must already be loaded in the nonvolatile memory otherwise the “Application not present” message is given.

If the applic.dat file is present:

MessageDescriptionPossible errors
Upload retentive dataUploading retentive data to the nonvolatile data memoryOpen/Exist/Create file error
Write file error
Read file error
Out of Memory Error
QMos Version Error
Checksum Error
Symbols checksum No Match
Configuration / Symbols Error
QTP File format error

The procedure performs the following steps:

  • Check the presence of the MMC/SD or USB card.
    The “Check DEVICE presence” message is given.
    On DEVICE appears MMC or USB, depending on what is selected.
  • Mounting MMC/SD or USB card.\\The “Mounting device…” message is given.
  • Uploading the QCL program (applic.bin), if contained in the removable mass storage device
    The “Upload QCL application” message is given.
  • Uploading retentive data of the QCL program (applic.dat), if contained in the removable mass storage device
    The “Upload retentive data” message is given.
    NOTE: if the applic.dat file is not found, the data in the system is maintained so long as the Symbol and Configuration checksums have not been varied. If they are varied all data will be set to zero.
  • Uploading the HMI program (appqtp.bin), if contained in the removable mass storage device
    The “Upload HMI application” message is given.
  • The file is closed and the operation ends.



This function creates a file on external mass storage (MMD/SD or USB) containing the retentive data values.
The file created is named “applic.dat” and is the same as the file obtained by the “Save Data…” procedure in the QView development environment. The function can only be performed if there is a valid QCL application in the controller.

The procedure performs the following steps:

  • Check the presence of the MMC/SD or USB card.
    The “Check DEVICE presence” message is given.
    On DEVICE appears MMC or USB, depending on what is selected.
  • Mounting the MMC/SD or USB card.
    The “Mounting device…” message is given.
  • Check the presence of the QCL program
    The “Checking application presence…” message is given.
  • Check the validity of the retentive data
    The “Checking retentive data…” message is given.
  • Open the applic.dat destination file on the external MMC/SD or USB card
    The “Open destination file…” message is given.
  • Write the headers in the destination file
    The “Write headers to destination file” message is given.
  • Write the retentive data in the destination file
    The “Write data to destination file”.
    NOTE: the percentage progress of the operation is given during this step
  • Close the file and end the operation



Delete all files contained on the internal NAND flash mass storage.
Unlike the “Format NAND Flash” function, this acts at a filesystem level aqnd can therefore be performed as many times as necessary.

The procedure performs the following steps:

  • Calculation of the number of files contained in the internal mass storage.
  • The “Searching files…” message is given.
  • If zero files are found, the “No Files Found” message is given and the function ends, otherwise the “Delete <filename>” is given indicating the delection of every file found.
  • Close the internal storage and end procedure



The backup procedure creates a copy of the QCL application in execution and a dump of the retentive data, as files saved in the NAND mass storage. The files created have the following names:

  • applic.qcy identifies the file containing the QCL application (CPU)
  • appdat.qcy identifies the file containing the retentive data of the QCL application

The procedure performs the following steps:

  • Check the presence of the QCL application.
  • Create and write in NAND the QCL application backup file: applic.qcy.
  • Check the presence and validity of retentive data of the QCL application.
  • Create and write in NAND the retentive data backup file of the QCL application: appdat.qcy.
  • Procedure end and system reboot.

The restore procedure allows to recover from the NAND mass storage, the saved backup files of the QCL application and an dump of the retentive data.

The procedure :

  • The NAND backup file of the QCL Application is read: applic.qcy.
  • The NAND backup file of the QCL Application retentive data is read : appdat.qcy.
  • Procedure end and system reboot.



The use of system functions Backup to NAND and Restore from NAND allows to save in backup and restore a QMOVE application.

The backup and restore operations use the NAND internal memory device. The backup procedure creates a file copy of the QCL program, the HMI program (if the controller has a Qem display) and an image of the ritentive data.

The files created:

  • applic.qcy containing the QCL program (QCL App)
  • appdat.qcy containing the ritentive data image (QCL Dat)
  • appqtp.qcy containing the HMI program (QTP App)

The files are encrypted and only the controller that generated them can run the Restore procedure so as to safeguard unauthorised data copies. The backup file copied to external memory such as MMC/SD or USB card can be carried out with the system function Copy all NAND files -> DEVICE. A directory named “QBK” is created in the MMC/SD or USB that contains the above files. In the same way backup files can be transferred to the controller using the system function Copy all files DEVICE -> NAND. In this case, the files in the MMC/SD or USB must always be contained in the directory “QBK”.

Backup/restore is an important function that can be used in the following cases:

  1. to restore the QMOVE application to a known situation (the situation at the time of the backup), if data has been changed by an operator or if the machine data has been altered for any reason.
  2. when testing a new application, a backup can be made of the original, stable version. If the new application being tested is not satisfactory, the restore command will recover the original version.

7.5 Information of programming

This chapter outlines all product information that is necessary for programming, in other words during the development of a QCL application.

7.5.1 Development Environments

The product programming requires the Qview-6 environments to program the QCL code and if the product has a graphic display, also the QPaint-6 environment to design the screen graphics. Noth these softwares are available in the Qworkbench software package that can be downloaded as freeware from the Qem website (in “Support” section).

The contoller has 3 slots. The slots 4 to 12 can be declared and must be used to address recources installed in the Canopen modules.

To use the terminal in a product that has a display, you must declare under INTDEVICE the device MMIQ2.

INTDEVICE
   Hmi	MMIQ2	2

To program with the QPaint-6 development environment it is important to select the correct target. To do so, in the environment select ProjectTarget Configuration then select the right controller according to the ordering code.

A typical BUS declaration to use in the BUS section of the configuration unit:

BUS
   1	1R11F	10
   2	.	.
   3	1MG5F	.

The firmware version must naturally correspond and the specialist card name at slot 3 must be correct. This name can be obtained from the far raight column of the table:Hardware versions

7.5.2 Memories used

This paragraph looks at how to measure an estimate of use of the product's memories. The non volatile memory is available to memorise the QCL program and has a capacity of 512KB.
The memory space occupied is equal to the size of the .BIN file generated by Qview. The percentage memory occupied can be viewed in the CPU panel of Qview under “Used CODE memory”, or this information can be obtained from the value of parameter “sizeapp” of the QMOS device.

The non volatile data memory used to memorise retentive variables, has a capacity of 819KB.
The percentage memory occupied can be viewed in the CPU panel of Qview, under “Used RETENTIVE”, or this information can be obtained from the value of parameter “sizeret” of the QMOS device.

The volatile data memory used to memorise non ritentive variables has a capacity that depends on various factors.

7.5.3 Communication ports

The PROG and USER serial ports implement the QEM proprietary communication protocol called BIN1.

The SERCOM and MODBUS devices can be used with all communication serial ports including PROG PORT. Use the following number settings during the device declaration to select the communication channel:

  0		PROG PORT
  1		USER PORT
  2		AUX1 PORT
  3		AUX2 PORT    (if available for this hardware)

When the SERCOM and MODBUS devices use the PROG PORT or USER PORT, they address the channel only if the communication status of the device is open (st_opencom = 1). When the channel of the device is closed (st_opencom = 0) in the serial, the BIN1 protocol returns active. To force the BIN1 protocol on the PROG port (thereby preventing the SERCOM device from occupying the channel) active the SW1 dip 6.

When using the MODBUS RTU protocol on serial port USER, AUX1 e AUX2 with RS485 electric configuration, remember that when the serial port is transmitting, the controller maintains the channel (DE) active for a longer time than the “MODBUS RTU” specification. To this must be consider a minimum time of 5 milliseconds after which it is possible to receive a new message. Also the SERCOM device, when it ends a transmission, has the same time the channel is active (DE).

The Ethernet communication port use the transport protocol TCP/IP, where the BIN1 protocol packets are encapsulated within TCP/IP data packets. There are two active connections identified by two communication ports can be freely set in the communication parameters of the Ethernet port. If the instrument is provided with a display, these values are displayed and modified using the system function 12 - Set Ethernet communic. parameter. Other ways to view and set these figures can be realized through special programs available within the development environment (QConfigurator-1 and QConfigurator-2).

The port set in “Port nr.1:” represents a communication channel equivalent to PROG PORT. The port set in “Port nr.2:” represents a channel equivalente to USER PORT. The ports 3 e 4 are not used.

The Ethernet port can also be used to establish a communication type Modbus TCP/IP with other networked devices. In this case the channel that identifies the Ethernet port can be set by entering the number 43.

mdbs   MODBUS   2   43

The 3 channels of Ethernet communication port (two with BIN protocol and one MODBUS TCP/IP) can be active simultaneously.

7.5.4 Firmware error messages

When downloading the Qmove application, the QView-6 development environment can give error messages that are not described in the development environment manual. These errors are special and the description string given by QView-6 is generated directly by the firmware.

The table below describes possible error messages generated by the firmware.

Firmware error messages
Possible error messageDescription
Error: SYSTEM + ARRSYS + DATAGROUP + INTDEVICE size overflow by 234bytes.Given when the retentive variables exceed the maximum limit.
Error: serial port not avaliable in SERCOM or MODBUS device declaration.Given when the wrong number is used during the device declaration to select the communication channel.
Error: CANOPEN device required if you use more than 3 slots.In the BUS definition more than 3 slots are being used and so the application requests the use of Canopen modules. To manage this, a CANOPEN device must be declared.
Error: incorrect bus fault mode in CANOPEN declaration.The CANOPEN device declaration indicates a fault mode (last value in the declaration) that is not supported.
Error: incorrect canbus speed in CANOPEN declaration.The CANOPEN device declaration indicates an invalid speed.
Error: too much CANOPEN device declaration.Only one CANOPEN device can be declared.
Error: absol. encoder resource num in ABSCNT device declar. is not avail.The ABSCNT device declaration indicates an inexistent resource.
Error: COUNT in ABSCNT device declaration is not a simulated counter.The counter address used in the ABSCNT device declaration cannot be a simulated type (e.g. 1.CNT01).
QMos version error. Unsupported instructions set.One or more statements in the project QCL are not supported by the firmware.
Error: compression file type not support.The compression of the compiled QCL program is not supported by the firmware.
Error: too mutch slots in bus declarations.They were declared under BUS more slots than those allowed by the hardware.



The development environment provides a series of ready-made variables that can be used by putting the word “QMOVE.” before the name. For example “QMOVE.is_suspend”, “QMOVE.sys001”, etc. This paragraph is designed to illustrate the 16 system variables called sys001-sys016, whose meaning depends on the firmware that is being used.

sys001

This is a read only variable that indicates the status of the FUNC (bit 0) and BOOT (bit 1) buttons. The following settings are possible:
0 = no button pressed.
1 = FUNC button pressed.
2 = BOOT button pressed.
3 = FUNC and BOOT buttons pressed.

sys002

This variabile allows to read a dump of the SW1 dip-switches. The dump is acquired only after the controller is powered. The Bit 0 corresponds to dip 1 and so on.

NOTE: Some dips are not connected to the microprocessor and is therefore always read at logic level 0.

sys003

This variable allows the command of led's L1-L2-L3-L4. The bit 0 corresponds to L1, the bit1 to L2 and so on.

sys004

This variable allows toxet the anti-glitch filter on the phase signals in the two-way counters. The setting is expressed in KHz and refers to the signal frequency of one phase. The setting range is 30-220. The default setting is 220KHz. The variable can also be reread. The filter can be modified at any time.

sys005-16

Not used.

7.5.5 The devices

The term device identifies a category of software devices designed to perform more or less complex support and control actions, to solve problems tied to the automation of systems. There are two types of device: internal and external. Internal devices have their codes residing and performed by the firmware of the actual product. External devices have the code residing and executed in the “intelligent” specialist cards that have their own calculation capability. The controller can only manage internal type devices . The list of devices implemented in the firmware depends on the firmware version. This paragraph is designed to illustrated the list and characteristics of the devices available.

Firmware version 10 implements the following devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
ABSCNT12508,31
ANINP125014,25
CALENDAR--0
CANOPEN1250100
COUNTER312505,94
DAC--0
DATASTORE12090,5
FREQ12504,75
MODBUS125032,07
QMOS--0
RECDATA12505,34
SERCOM12509,26

Firmware version 20 implements the following extra devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
ANPOS212508,31
EANPOS125055,94
HEAD2125023,75
OOPOS3125027,91

Firmware version 30 also implements the following devices:

Device nameSampling time
minimum (msec)
Sampling time
maximum (msec)
Execution time (%)
CAMMING3125055,94
INTERP125035,63
JOINT1)125095,01

1) The actual sampling time is double respects set

7.5.5.1 Details of devices

This section describes additional information about devices. This information complement and complete the maintenance manual of the device available on the Qem.

7.5.5.1.1 CANOPEN

If the device declaration CANOPEN indicates the zero speed, then it can be set by SW1 dip's 5 and 7. The first slot to address resources that reside in Canopen modules is 4.

DATASTORE

The files processed by the device DATASTORE are all contained in the /DS directoty. If this directory does not exist, it is created automatically. The device DATASTORE can operate both with the MMC/SD card and with the internal NAND memory (not removable). To define which mass memory to operate the priority paramenter is used (0=MMC/SD, 1=NAND). If the application has to access the two supported devices frequently and the physical removal of the MMC/SD card is not required, a special setup can be used for the priority parameter that avoids having to continuously run the memory MOUNT UMOUNT. In pratice, when wanting to change memory, before running the UMOUNT command, set “priority = -1”. This avoids the UMOUNT phase is avoided in the device, making the next MOUNT command to the memory very fast.

An example of QCL code to change device:

SUB SETMMC
  WAIT NOT data.st_busy
  IF data.st_mount
    data.priority = -1
    data.UMOUNT
    WAIT NOT data.st_mount
    CALL CHECK_ERR_WRN
  ENDIF
  data.priority = 0
  data.MOUNT
  WAIT data.st_mount
ENDSUB
 
SUB SETNAND
  WAIT NOT data.st_busy
  IF data.st_mount
    data.priority = -1
    data.UMOUNT
    WAIT NOT data.st_mount
    CALL CHECK_ERR_WRN
  ENDIF
  data.priority = 1
  data.MOUNT
  WAIT data.st_mount
  CALL CHECK_ERR_WRN
ENDSUB

There is a particular setting of the parameters that allows to check the existence of a file in the device. Use the “filenum” parameter set to -1 and with the OPENFILE command the device, instead of opening the file, it searches for the first file in the “/DS/” directory of the selected memory. When it is found, the file name is set by the device in the parameter “filenum” (and its type in the parameter “filetype”). Setting -1 in “filenum” again and running the OPENFILE command, the next file name is found and so on. Every time an OPENFILE operation is run with filenum different to -1, the search loog is closed. When the search has ended and there are no more files present, then the device will set as answer to the command OPENFILE “filenum = -2”. The execution of the command is signalled by the flag st_busy = 0. If the file extension is not HEX or CSV, the file is ignored by the search. If the file name is not compatible with those managed by DATASTORE (numbers 0 to 9999999) then “filenum” will remain set to -1 and a warning is given.

The “disksize” and “diskfree” parameters are represented in KB.

7.5.5.1.2 RECDATA

The device can memorise up to 10000 step.

7.5.5.1.3 QMOS

The parameter “frwuvalue01” contains the number value of the product serial number.

7.5.5.1.4 FREQ

To define the input associated to the device FREQ use the number field provided in the device declaration. The availability of frequency inputs has to be checked with the hardware version of the product. To ricavare the relation between number and terminal pin, use the information contained in the “Address” column given in the terminal tables.

7.5.5.1.5 CAMMING3

The parameters related to the sectors (CodeQm, CodeQs…) are not retentive. On startup they always take on the value 0.

8. Accessories available