In SciLab, use format en:Alarms,sk:Alarmy,cz:Alarmy
In PHP files, use function LANG('text')
example:
$component->set_label(LANG( 'Label:'));
$var_label = LANG('Subgroup left');
Pozadie s názvom application_11.png uložiť do adresára process/images
V adresári process je súbor _settings.php, kde sa nastavujú veci pre celú vizošku, napríklad aj blinking.
Veci špecifické pre jednotlivé súbory sa píšu úplne na začiatok príslušného súboru.
Setting | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$GLOBALS['security_lowest_level'] = 15; |
|
||||||||||||
$GLOBALS['security_exception_ids'] = array(1,7,10); |
|
||||||||||||
$GLOBALS['theme_color_background'] = '#FF0000'; |
|
||||||||||||
$GLOBALS['theme_color_text'] = '#00FF00'; |
|
||||||||||||
$GLOBALS['show_header'] = false; |
|
||||||||||||
$GLOBALS['show_header'] = false; |
|
||||||||||||
$GLOBALS['show_panel_errors'] = false; |
|
||||||||||||
$GLOBALS['show_panel_alarms'] = false; |
|
||||||||||||
$GLOBALS['show_panel_time'] = false; |
|
||||||||||||
$GLOBALS['panel_time_step_unit'] = 60; |
|
||||||||||||
$GLOBALS['panel_time_step'] = 10; |
|
||||||||||||
$GLOBALS['variable_refresh_time_local'] = 1000; |
|
||||||||||||
$GLOBALS['parameter_refresh_time_local'] = 10000; |
|
||||||||||||
možnosť klikať na komponenty bez hesla - neprihlásený user Môžete aj vypnúť header- $GLOBALS['show_header'] = false; |
session_start(); $_SESSION['dcuUserId'] = 8; //nastavíte v Designtoole v časti Visialization Structure - DCU User ID $_SESSION['dcuUserSecurity'] = 15; //nastavíte v Designtoole v časti Visialization Structure - DCU User Security $_SESSION['dcuUserPassword'] = 'heslo'; //nastavíte v Designtoole v časti Visialization Structure - DCU User Password session_write_close(); |
Declaration with common presets | stare Hynkove bolo: |
---|---|
$component = new component_text($initialization_component); $component = new component_text($initialization_component); $component = new component_text($initialization_component, 'function'); |
$disp_txtlink_template $disp_siglink_template $disp_cfun_template |
$component = new component_number($initialization_component); $component = new component_number($initialization_component, 'rtudpio_server'); |
$disp_realval_template $disp_realval_rtudpio_template |
$component = new component_image($initialization_component); |
$disp_imglink_template $disp_actionbutton_template |
$component = new component_animation($initialization_component); $component = new component_animation($initialization_component); $component = new component_animation($initialization_component, 'rtudpio_server'); |
$disp_realvalimg_template $disp_realvalinlimitsimg_template $disp_realvalimg_rtudpio_template |
$component = new component_binary($initialization_component); |
$disp_binval_template $disp_binvalimg_template $disp_binvalimg_autoswitch_template $disp_binvalimg_autoswitch_rtudpio_template |
$component = new component_interval($initialization_component); |
$disp_realvaltext_template $disp_realvalinlimitsimg_rtudpio_template $disp_realvaltext_rtudpio_template |
$component = new component_graph($initialization_component); | $disp_signal_template |
$component = new component_batchserver($initialization_component); | $disp_batchserversetup_template |
$component = new component_DB_export($initialization_component); | |
$component = new component_DB_import($initialization_component); | |
$component = new component_map($initialization_component); |
the value of the variable must be in a format 483535859174099000 (nine digits for North, nine digits for East) |
type | value | example |
---|---|---|
'variable' | default; gets value from actual_values.txt or DB | |
'variable_graph' | default for component_graph; gets value from DB | |
'variable_param' |
gets value from variable alarm value - calls ucc |
$component = new component_number($initialization_component, 'variable_param'); $dispvars[] = $component; $component->set_left($left); $component->set_top($top); $component->set_dcu_id(1); $component->set_id(19); $component->set_param_id(0); $component->set_label('0th ALARM as number:'); |
'function_param' | gets value from function param value - calls ucc |
$component = new component_number($initialization_component, 'function_param'); $dispvars[] = $component; $component->set_left($left); $component->set_top($top); $component->set_dcu_id(1); $component->set_id(19); $component->set_param_id(0); $component->set_label('0th FUNCTION PARAMETER as number:'); |
'static' |
default for component_text, component_image, component_DB, component_DB_import, component_DB_export. Does not change value |
|
'function' | does not change value; used only for onclick | |
'rtudpio_server' | gets value from DB from rtVirtualIO table | |
'batchserver' | not implemented yet |
Label: | 7.700 2 | °C |
Method | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$component->set_left(10); |
|
||||||||||||||||||||||||||||||||||
$component->set_top(10); |
|
||||||||||||||||||||||||||||||||||
$component->set_additional_refresh(100); |
|
||||||||||||||||||||||||||||||||||
$component->set_font_family('Roboto'); |
|
||||||||||||||||||||||||||||||||||
$component->set_font_style('italic'); |
|
||||||||||||||||||||||||||||||||||
$component->set_font_color('#333'); |
|
||||||||||||||||||||||||||||||||||
$component->set_font_size(45); |
|
||||||||||||||||||||||||||||||||||
$component->set_font_background('orange'); |
|
||||||||||||||||||||||||||||||||||
$component->set_onclick('autoswitch'); |
|
||||||||||||||||||||||||||||||||||
$component->add_onclick(); | adds another onclick, use set_onclick_.... function afterwards | ||||||||||||||||||||||||||||||||||
$component->add_next_binary_value(0,1000); $component->add_next_binary_value(1,1000); |
component_binary value set to 0 after 1000msecs component_binary value set to 1 after another 1000msecs |
||||||||||||||||||||||||||||||||||
$component->add_next_real_value(8,1000); $component->add_next_real_value(6,1000); |
|||||||||||||||||||||||||||||||||||
$component->set_onclick_tooltip('Do the autoswitch!'); |
|
||||||||||||||||||||||||||||||||||
$component->set_onclick_target('_self'); |
|
||||||||||||||||||||||||||||||||||
$component->set_faceplate_width(900); $component->set_faceplate_height(530); |
|
||||||||||||||||||||||||||||||||||
$component->set_onclick_security_lowest_level(15); |
|
||||||||||||||||||||||||||||||||||
$component->set_onclick_security_exception_ids(array(1,7)); |
|
||||||||||||||||||||||||||||||||||
$component->set_display_security_lowest_level(15); |
|
||||||||||||||||||||||||||||||||||
$component->set_display_security_exception_ids(array(1,7)); |
|
||||||||||||||||||||||||||||||||||
$component->add_faceplate_parameter('VP1',11);
for any component with onclick |
|
||||||||||||||||||||||||||||||||||
$component->set_arithmetic_transformation("x/3+x*2+4"); |
|
Label: | 7.700 2 | °C |
Method | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
$component->set_label('Label:'); |
|
||||||||
$component->set_label_font_family('Comic Sans MS'); |
|
||||||||
$component->set_label_font_color('#008500'); |
|
||||||||
$component->set_label_font_size(40); |
|
Label: | 7.700 2 | °C |
Method | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$component->set_dcu_id(1); |
|
||||||||||||
$component->set_id(0); use only one - either set_id or set_name |
|
||||||||||||
$component->set_name('cfn:: Bin.Zero_out0'); use only one - either set_id or set_name |
|
||||||||||||
$component->set_multi_id( array( array(1,'cfn:: Physical AI11_out0','teplota exterieru'), array(1,3,'teplota interieru'), array(1,8,'vlhkosť vzduchu') ) ); for component_graph class use only one - either set_dcu_id + set_id (for one variable) or set_multi_id (for one or more variables) |
|
||||||||||||
$component->set_param_id(0); |
|
||||||||||||
$component->set_overwrite(7.7); |
|
||||||||||||
$component->set_value_font_family('Courier New'); |
|
||||||||||||
$component->set_value_font_color('pink'); |
|
||||||||||||
$component->set_value_font_size(40); |
|
||||||||||||
$component->set_msg_icon('WRONG_ID','<strong>!!!</strong>'); |
|
||||||||||||
$component->set_msg_font_family('Courier New'); |
|
||||||||||||
$component->set_msg_font_color('red'); |
|
||||||||||||
$component->set_msg_font_size(40); |
|
||||||||||||
$component->set_msg_font_size(40); |
|
||||||||||||
$component->set_min_value(7); $component->set_max_value(14); |
|
||||||||||||
$component->set_random_decimal_precision(7); |
|
||||||||||||
$component->set_number_format('%5.3f'); for component_number class |
|
||||||||||||
$component->set_scale_x(400); $component->set_scale_y(400); for component_number class for component_image class |
|
||||||||||||
$component->set_time_frame(2000); for component_graph class for variable_graph onclick |
|
||||||||||||
$component->set_archiveonly('yes'); for component_graph class for variable_graph onclick |
|
||||||||||||
$component->set_digitsAfterDecimal(15); for component_graph class for variable_graph onclick |
|
||||||||||||
$component->set_image('images/spritesheet_numbered.png'); for component_image class for component_animation class |
|
||||||||||||
$component->set_width(20); $component->set_height(20); for component_image class for component_animation class for component_map class |
|
||||||||||||
$component->set_nrows(4); for component_animation class |
|
||||||||||||
$component->set_ncolumns(4); for component_animation class |
|
||||||||||||
$component->set_zero_image('images/button_off.png', 'OFF'); $component->set_one_image('images/button_on.png', 'ON'); for component_binary class |
|
||||||||||||
$component->set_zero_text('OFF'); $component->set_one_text('ON'); for component_binary class |
|
||||||||||||
$component->set_zero_font_family('Roboto'); $component->set_zero_font_color('#EEE'); $component->set_zero_font_size(20); $component->set_zero_image_width(20); $component->set_zero_image_height(20); $component->set_one_font_family('Roboto'); $component->set_one_font_color('#EEE'); $component->set_one_font_size(20); $component->set_one_image_width(20); $component->set_one_image_height(20); for component_binary class |
|||||||||||||
$component->set_interval_font_family('Roboto'); $component->set_interval_font_color('#EEE'); $component->set_interval_font_size(20); $component->set_interval_image_width(20); $component->set_interval_image_height(20); for component_interval class |
|||||||||||||
$component->add_interval_text($to=0.5, $text='OFF'); $component->add_interval_text($to=1.5, $text=LANG('ON')); $component->add_interval_image($to=0.5, $image='images/button_off.png'); for component_interval class |
|||||||||||||
$component->rotate_according_to_my_own_value(); for component_number class for component_image class |
no parameter the value of the variable is used as degrees |
||||||||||||
$component->set_map_zoom(0.05); for component_map class |
|
Label: | 7.700 2 | °C |
Method | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
$component->set_unit('°C'); for component_number class |
|
||||||||
$component->set_unit_font_family('Roboto'); |
|
||||||||
$component->set_unit_font_color('#000000'); |
|
||||||||
$component->set_unit_font_size(20); |
|
Method | Description | ||||||
---|---|---|---|---|---|---|---|
$component->set_DB_host('127.0.0.1'); for component_DB_export class for component_DB_import class |
|
||||||
$component->set_DB_user('root'); for component_DB_export class for component_DB_import class |
|
||||||
$component->set_DB_password('heslo'); for component_DB_export class for component_DB_import class |
|
||||||
$component->set_DB_name('somename'); for component_DB_export class for component_DB_import class |
|
||||||
$component->set_category('somename'); for component_DB_export class for component_DB_import class |
|
||||||
$component->set_DB_tables(array('table1', 'table2', 'table3')); for component_DB_export class |
|
message name | default icon | other icon examples and codes | old PHP |
---|---|---|---|
'OVERRIDE' (ucc info) | none $component->set_msg_icon('OVERRIDE', ''); | $dispvar[$inx]['msg_icon_OVERRIDE']= ''; | |
'ALARM' (ucc info) |
⚠ $component->set_msg_font_color('red'); $component->set_msg_icon('ALARM', '⚠'); // https://www.w3schools.com/charsets/ref_emoji.asp |
$dispvar[$inx]['msg_icon_ALARM']= ''; | |
'MISSED_CONNECTIONS' (ucc info) |
❶ ❶ ➀ ➀ ➊ ➊ |
$dispvar[$inx]['msg_icon_MISSED_CONNECTIONS']= ''; | |
'OVERWRITE' (visualization info) | ℹ ℹ | $dispvar[$inx]['msg_icon_OVERWRITE']= ''; | |
'VALUE_BELOW_MIN' (visualization info) | $dispvar[$inx]['msg_icon_VALUE_BELOW_MIN']= ''; | ||
'VALUE_ABOVE_MAX' (visualization info) | $dispvar[$inx]['msg_icon_VALUE_ABOVE_MAX']= ''; | ||
'WRONG_DCU' (error) | $component->set_msg_icon('ALARM', '⊗'); | $dispvar[$inx]['msg_icon_WRONG_DCU']= ''; | |
'WRONG_ID' (error) | $dispvar[$inx]['msg_icon_WRONG_ID']= ''; | ||
'WRONG_NAME' (error) | $dispvar[$inx]['msg_icon_WRONG_NAME']= ''; | ||
'WRONG_PARAM_ID' (error) | $dispvar[$inx]['msg_icon_WRONG_PARAM_ID']= ''; | ||
'NO_DATA' (error) | $component->set_msg_icon('NO_DATA', '<img src="content/examples/images/no_data.png" width="20" alt="no_data.png" />'); | $dispvar[$inx]['msg_icon_NO_DATA']= ''; | |
default (other error) |
❓ ❓ ? $component->set_msg_font_color('red'); $component->set_msg_icon('default', '?'); |
$dispvar[$inx]['msg_icon_default']= ''; |