INOS
|
The TFT display doesn't need to be enabled, the necessary files are always part of an inos project.
The functions to access the display directly are documented in cinossiotft.h. The explorer functionality is in cinossiotftexp.h
The TFT display is connected via RS232 (SIO). Therefore a .dt2 config file is needed to configure the COM-port for the TFT display.
hw-mas-sio.dt2
This port then needs to be given to the TFT display driver so it knows how to communicate with the display hardware. The TFT name can be chosen freely but needs to be valid for registering in the INCO tree. If the internal explorer application should be used then another .xml config file is needed for the content of the explorer. The name of this file also needs to be passed to the display driver.
tftdisplay.xml
The simplest form of the explorer is in text form and looks like a table with the variable names on the left, the values in the middle and the units on the right, similar to the desktop INCOExplorer application. The registered call procedures are shown at the bottom of the display.
tftexplorer.xml
A standard xml file header.
Needed in every file to form a valid xml file.
The file needs a standard xml file header as all xml files do. All explorer items are contained in a node named Inco. This includes all folders, variables, procedures, images, languages etc. The Inco node itself
The explorer application can have some global settings. At startup the system can check that the TFT application burned into the display is correct. If it's not then it's possible to load the MacroFile into the display.
Attribute | Description | Required |
---|---|---|
TFTProject | Name of the project to check for in the TFT display. | |
MacroFile | Name of the file to load into the TFT display if necessary. | |
UserLayout | Set to one if the layout should not be the standard explorer layout. | |
Debug | Switch on debugging: Eventlog traces, borders around visual elements. |
Depending on the UserLayout setting the attributes can be very different.
Attribute | Description | UserLayout |
---|---|---|
Name | Name of the folder. | Always required |
ValueColumn | Text column of variable values. | 0 |
UnitColumn | Text column of variable unit. | 0 |
BitmapActive | Number of bitmap for active state. | 1 |
BitmapInactive | Number of bitmap for inactive state. | 1 |
PosX | X coordinate of folder image. | 1 |
PosY | Y coordinate of folder image. | 1 |
SizeX | Width of folder image. | 1 |
SizeY | Height of folder image. | 1 |
ColBack | Background color for folder image. Use 255 for parent color. | 1 |
LangX | Translation for language X. | 0/1 |
Depending on the UserLayout setting the attributes can very different.
Attribute | Description | UserLayout |
---|---|---|
Name | Name of the variable. | Optional |
Type | If no Path is given then the type must define the type of the variable: title, static, bitmap, nop. | 0/1 |
Path | Inco path of registered variable. | 0/1 |
ReadOnly | Don't allow writing to variable. | 0/1 |
Min | Minimum value for writing variable. | 0/1 |
Max | Maximum value for writing variable. | 0/1 |
Digits | Number of digits of shown variable value. | 0/1 |
Char | Characteristics of shown variable value. | 0/1 |
Value | Type static: Fixed value to show. | 0/1 |
KeyBoard | Keyboard layout to use for editing variable. | 0/1 |
Bitmap | Number of bitmap for variable. | 0/1 |
BitmapActive | Number of bitmap for active state. | 1 |
BitmapInactive | Number of bitmap for inactive state. | 1 |
PosX | X coordinate of variable image. | 1 |
PosY | Y coordinate of variable image. | 1 |
SizeX | Width of variable image. | 1 |
SizeY | Height of variable image. | 1 |
ColFore | Foreground color for variable. Use 255 for parent color. | 0 |
ColBack | Background color for variable. Use 255 for parent color. | 0/1 |
LangX | Translation for language X. | 0/1 |
Depending on the UserLayout setting the attributes can very different.
Attribute | Description | UserLayout |
---|---|---|
Name | Name of the procedure. | Optional |
Path | Path of registered Inco procedure. | Required |
Bitmap | Number of bitmap for variable. | 0/1 |
PosX | X coordinate of variable image. | 1 |
PosY | Y coordinate of variable image. | 1 |
SizeX | Width of variable image. | 1 |
SizeY | Height of variable image. | 1 |
ColFore | Foreground color for variable. Use 255 for parent color. | 0 |
ColBack | Background color for variable. Use 255 for parent color. | 0/1 |
Align | Align variable value. | |
Frame | Draw a frame around variable. | 1 |
Font | Font to use for this variable | 1 |
LangX | Translation for language X. | 0/1 |
The language translations of the various visual elements can be given directly in the xml node of the element in the explorer xml definition file. However it might be cleaner and easier to handle if the translations are all kept in a separate file (one per language). In this case the used trnalsation files need to be given to the explorer application with Lang xml nodes.
If both LangX=".." and language files are present then the entry in the node gets priority over the file. Like this it is possible to have a general translation in the file and still use a different text for some special items.
The format of the language files need to be like this: Name <TAB> Translation <EOL>
This is chosen to keep the handling as well as the parsing as simple as possible.
Attribute | Description | Required |
---|---|---|
Name | Name of the language. | X |
File | Name of text file as stored in the DatabaseTables. | X |
Example german.txt
Example english.txt
Only for UserLayout="1" it is possible to define the look of buttons.
Attribute | Description |
---|---|
ColNormFill | Color in normal state for filling. |
ColNormOut | Color in normal state for outline. |
ColNormIn | Color in normal state for inline. |
ColSelFill | Color in selected state for filling. |
ColSelOut | Color in selected state for outline. |
ColSelIn | Color in selected state for inline. |
Frame | Number of frame to use. |
FontNr | Number of font to set. |
FontZoomX | Zoom factor in horizontal direction. |
FontZoomY | Zoom factor in vertical direction. |
ColNormFont | Text color in normal state. |
SizeX | Horizontal size of button. |
SizeY | Vertical size of button. |
The display is connected to a COM-port, the commands are sent in a text protocol. If there are errors in the transmission then the sent commands are not valid anymore. However the display will still try to interpret them as valid and may do something that was not intended e.g. change from text mode to graphics mode. First try to remedy the situation is by sending a reset command to the display which it hopefully still understands: CINOSSioTft::ResetDisplay.
It's also possible that the display controller will get completely asynchronous and not accept any command anymore. In this case it helps to switch off and on the TFT display.
If even switching the display off and on doesn't help then it's possible that the macro file that was burned into the display got corrupt and prevents the display from starting up correctly. In this case there's a jumper/bridge on the back that can be set before power on.
If this makes the display boot up again normally then the macro file can be burned again over the SIO cable. If this still doesn't help then the hardware might be at fault.