Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:devices:mmiq [2016/12/20 16:42] – [6. Esempio applicativo] qem103 | en:software:devices:mmiq [2020/07/13 14:57] (current) – qem103 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DEVICE MMIQ ====== | ||
+ | |||
+ | |||
+ | ====== - Introduction ====== | ||
+ | |||
+ | The MMIQ device is need to create a human-machine interface system (HMI) programmable using the development environment Qpaint.\\ | ||
+ | The device provides a range of information on the interface panel with a speed of update can be set by means of the sampling time. | ||
+ | |||
+ | |||
+ | ===== - Installazione ===== | ||
+ | |||
+ | ==== - DEVICE DECLARATION IN THE CONFIGURATION UNIT (.CNF) ==== | ||
+ | |||
+ | In the configuration unit, in the BUS section, must be declared an instrument whose firmware contains the MMIQ device.\\ | ||
+ | In the INTDEVICE section must be add the following definition: | ||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | <device name> | ||
+ | </ | ||
+ | |||
+ | where: | ||
+ | |<device name> | ||
+ | |MMIQ|Keyword that identifies the device.| | ||
+ | |Tcamp|Time sampling device (1÷10 ms).| | ||
+ | |||
+ | === - Example === | ||
+ | |||
+ | <code QCL> | ||
+ | ; | ||
+ | ; Internal device declaration | ||
+ | ; | ||
+ | INTDEVICE | ||
+ | DEV | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== - Operation ===== | ||
+ | |||
+ | ==== - KEYSTROKES ==== | ||
+ | |||
+ | The //key// and //keyf// parameters are used to recognise which key was pressed. The values associated with each key are given in the chapter of this manual " | ||
+ | Any bit of the //key// and //keyf// parameters is associated with a button, so if you want to determine the pressing of several keys it helps to check that these parameters assume a value equal to the sum of the values associated with the keys. | ||
+ | |||
+ | ==== - LEDS ==== | ||
+ | |||
+ | The //leds// and // | ||
+ | Normally there is one led for each function key.\\ | ||
+ | To access (or flashing) and turn off the led you must assign to the code associated with the function key.\\ | ||
+ | Every bit of the //leds// and // | ||
+ | |||
+ | |||
+ | ===== - Commands and parameters table ===== | ||
+ | |||
+ | ==== - Symbols used ==== | ||
+ | |||
+ | The **name** of the parameter, state or command is shown at the left of the table. | ||
+ | |||
+ | **R**\\ | ||
+ | Indicates if the parameter or state is retentive (upon initialization of the device maintains the previously defined state), or the state assumes upon initialization of the device.\\ | ||
+ | If the device does not need to initialize the " | ||
+ | R = Retentive\\ | ||
+ | 0 = Upon initialization of the device the value is forced to zero.\\ | ||
+ | 1 = Upon initialization of the device the value is forced to one.\\ | ||
+ | - = Upon initialization of the device is presented significant value. | ||
+ | |||
+ | **D**\\ | ||
+ | Indicates the **size of the parameter**.\\ | ||
+ | F = Flag\\ | ||
+ | B = Byte\\ | ||
+ | W = Word\\ | ||
+ | L = Long\\ | ||
+ | S = Single Float | ||
+ | |||
+ | === - Conditions === | ||
+ | |||
+ | Are described all the **conditions that must exist is considered correct or because the command is accepted**.\\ | ||
+ | In some cases, limit values are specified for the acceptance of the parameter: If there are any values outside the limits set, the data is in any case accepted; therefore appropriate controls of the application must be provided to ensure the proper functioning.\\ | ||
+ | To run a command, all conditions must be met; otherwise the command is not sent. | ||
+ | |||
+ | **A**\\ | ||
+ | Indicates the **access mode**.\\ | ||
+ | R = Read.\\ | ||
+ | W = Write.\\ | ||
+ | R-W= Read / Write.\\ | ||
+ | |||
+ | ==== - Commands / Parameters for the keyboard ==== | ||
+ | |||
+ | ^Name^D^R^A^Conditions^Description^ | ||
+ | |key|L|-|R|-|**Key**\\ Represents the state of the keys at all times. Each key is represented by one bit.\\ For the bit assignments refer to the following: | ||
+ | |keyf|L|-|R|-|**Function Key**\\ Represents the state of the function keys at all times. Each key is represented by one bit.\\ For the bit assignments refer to the following: | ||
+ | |||
+ | ==== - Commands / Parameters for the leds ==== | ||
+ | |||
+ | ^Name^D^R^A^Conditions^Description^ | ||
+ | |leds|L|0|R-W|-|**Leds status**\\ Parameter that is used to turn on the function key LED.\\ Every bit of this parameter is associated with a LED.\\ For the value associated with //keyf// parameter.| | ||
+ | |blinkleds|L|0|R-W|-|**Blink Leds status**\\ Parameter used to blink the leds of function keys.\\ Every bit of this parameter is associated with a LED.\\ | ||
+ | |||
+ | ==== - Generic Commands / Parameters ==== | ||
+ | |||
+ | ^ Name ^ D ^ R ^ A ^ Conditions | ||
+ | | language | ||
+ | | Reverse | ||
+ | | contrast | ||
+ | | clrtime | ||
+ | | error | B | 0 | R | - | **Error**\\ Indicates if there are any errors in device. In detail:\\ **0** = no error\\ **1** = no application present\\ **2** = checksum no match\\ **3** = file format no match\\ **4** = incorrect display size\\ **5** = out of memory\\ **6** = error readin the page\\ **7** = error in erase operation\\ **8** = internal error\\ **9** = error in write memory\\ **10** = error in read operation\\ **11** = internal error\\ **12** = image present but not possible\\ **13** = font not supported\\ **14** = internal error | | ||
+ | | memuse | ||
+ | |||
+ | |||
+ | ===== - Limitations ===== | ||
+ | |||
+ | No limitation. | ||
+ | |||
+ | |||
+ | ===== - Application example ===== | ||
+ | |||
+ | <code QCL> | ||
+ | ; Switching ON of a LED at the function key pressed | ||
+ | ; (only power ON the F1 LED and everyone else power OFF). | ||
+ | |||
+ | IF | ||
+ | | ||
+ | ELSE | ||
+ | | ||
+ | ENDIF | ||
+ | |||
+ | ; Swithing ON of two LED at the two function keys pressed | ||
+ | ; (is only ON/OFF the LED relative to the key pressed). | ||
+ | |||
+ | IF | ||
+ | | ||
+ | ELSE | ||
+ | | ||
+ | ENDIF | ||
+ | |||
+ | IF | ||
+ | | ||
+ | ELSE | ||
+ | | ||
+ | ENDIF | ||
+ | </ | ||
+ | |||