WinCC ProgRef EnUS en-US
WinCC ProgRef EnUS en-US
C scripting 2
Runtime API 3
SIMATIC HMI
System Manual
Online documentation
11/2022
Online documentation
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended or
approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance
are required to ensure that the products operate safely and without any problems. The permissible ambient
conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
1 VB scripting.......................................................................................................................................... 25
1.1 System functions ............................................................................................................... 25
1.1.1 AcknowledgeAlarm............................................................................................................ 25
1.1.2 ActivatePLCCodeViewer ..................................................................................................... 25
1.1.3 ActivatePreviousScreen ...................................................................................................... 27
1.1.4 ActivateScreen................................................................................................................... 28
1.1.5 ActivateScreenByNumber................................................................................................... 29
1.1.6 ActivateSystemDiagnosticsView ......................................................................................... 30
1.1.7 ArchiveLogFile ................................................................................................................... 31
1.1.8 Back up RAM file system ..................................................................................................... 32
1.1.9 CalibrateTouchScreen......................................................................................................... 33
1.1.10 ChangeConnection ............................................................................................................ 34
1.1.11 ChangeConnectionEIP........................................................................................................ 35
1.1.12 ClearAlarmBuffer................................................................................................................ 37
1.1.13 ClearAlarmBufferProtool ..................................................................................................... 38
1.1.14 ClearDataRecord ................................................................................................................ 39
1.1.15 ClearDataRecordMemory ................................................................................................... 40
1.1.16 ClearLog ............................................................................................................................ 41
1.1.17 CloseAllLogs ...................................................................................................................... 42
1.1.18 ControlSmartServer ........................................................................................................... 42
1.1.19 ControlWebServer.............................................................................................................. 43
1.1.20 CopyLog ............................................................................................................................ 44
1.1.21 DecreaseTag ...................................................................................................................... 45
1.1.22 EditAlarm .......................................................................................................................... 46
1.1.23 Encode .............................................................................................................................. 46
1.1.24 EncodeEx........................................................................................................................... 47
1.1.25 ExportDataRecords ............................................................................................................ 48
1.1.26 ExportDataRecordsWithChecksum...................................................................................... 51
1.1.27 ExportImportUserAdministration........................................................................................ 53
1.1.28 GetBrightness .................................................................................................................... 54
1.1.29 GetDataRecordFromPLC ..................................................................................................... 55
1.1.30 GetDataRecordName.......................................................................................................... 56
1.1.31 GetDataRecordTagsFromPLC............................................................................................... 58
1.1.32 GetGroupNumber .............................................................................................................. 59
1.1.33 GetPassword...................................................................................................................... 59
1.1.34 GetUserName .................................................................................................................... 60
1.1.35 GoToEnd ............................................................................................................................ 61
1.1.36 GoToHome......................................................................................................................... 61
1.1.37 ImportDataRecords ............................................................................................................ 62
1.1.38 ImportDataRecordsWithChecksum ..................................................................................... 64
1.1.39 IncreaseTag ....................................................................................................................... 65
1.1.40 InverseLinearScaling .......................................................................................................... 66
1.1.41 InvertBit............................................................................................................................. 68
1.1.42 InvertBitInTag..................................................................................................................... 69
1.1.43 LinearScaling ..................................................................................................................... 71
1.1.44 LoadDataRecord................................................................................................................. 73
1.1.1 AcknowledgeAlarm
Description
Acknowledges all selected alarms.
This system function is used when the HMI device does not have an ACK key or when the
integrated key of the alarm view should not be used.
This system function can only be used for function keys.
Parameter
--
1.1.2 ActivatePLCCodeViewer
Description
Performs a screen change to the given screen with the PLC code view. The PLC code view shows
the program code of the relevant network.
You configure the ActivatePLCCodeView system function at the "Click PLC code view button"
event of a GRAPH overview or at an event of a button.
Screen change from the GRAPH overview
You configure the system function at the "Click PLC code view button" event in a GRAPH
overview to display the GRAPH step sequencer in the PLC code view. If no error is pending,
the sequence of the GRAPH step sequencer is displayed.
If an error occurs, the faulty step is displayed in the PLC code view after jump of the faulty
step. If multiple errors have occurred, the first faulty step of the sequencer is displayed after
the jump. If you have corrected the error, the next faulty step is automatically displayed in
the view. In the detail view, the transition or the interlock is displayed depending on the type
of error.
Screen change from an alarm
You configure the system function at an event of a button. When the button is pressed
in Runtime, the system function checks whether the alarm selected last in the configured
alarm view is a supervision alarm or a GRAPH alarm. If a jump is possible for this alarm, the
configured PLC code view is opened with the corresponding program code.
The jump from an alarm in the alarm view to the PLC code view is made possible for the
following supervision alarms:
• With global supervisions, only for interlock supervisions (Interlock)
• With local supervisions, for all basic supervisions at input parameters
You can find more information on supervisions in the section "Programming PLC >
Supervising machinery and plants with ProDiag".
The jump to the PLC code view is possible for all GRAPH alarms. After the jump, the GRAPH
sequencer and the faulty step are displayed in the PLC code view.
If a supervision alarm and an interlock alarm are pending simultaneously for the same step,
the interlock network is always displayed first after triggering the system function in the PLC
code view regardless of whether the supervision alarm or the interlock alarm was selected.
For the jump from a supervision alarm to the PLC code view, the instance name must
conform to the following naming convention when using supported local operands in a
function block: <FB-Name>_DB.
The jump to a function or an organization block is only possible if only global operands are
used.
Note
The jump in connection with the alarm buffer or the alarm log is not supported.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Note
The version of the GRAPH block must be at least V3.0 for the jump into the GRAPH sequencer via
the "ActivatePLCCodeView" system function.
Note
Use of the system function "ActivatePLCCodeView" in a VB script has no effect at a GRAPH
overview.
Parameters
Screen name
Name of the screen that contains the PLC code view.
Note
Screen change to a pop-up screen or a slide-in screen is not supported.
Screen object
Object name of the PLC code view.
1.1.3 ActivatePreviousScreen
Description
Performs a screen change to the screen which was activated before the current screen. The
screen change is not performed if no screen was activated beforehand.
The last 10 screens that were called up are saved. A system alarm is output when you change
to a screen which is no longer saved.
Note
If you want to use the system function, the screen to which you change has to be used in the
navigation structure.
Parameter
--
1.1.4 ActivateScreen
Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent area or vice versa.
Parameters
Screen name
Name of the screen to which you change.
Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
Example
The following program code activates "Screen_2" with the ActivateScreen function, for example,
when you click a button.
Sub ActivateScreen_2()
'User-defined code
'' i. e. when pressing a button
ActivateScreen "Screen_2",0
1.1.5 ActivateScreenByNumber
Description
Performs a screen change to a screen depending on a tag value.
The screen is identified by its screen number.
Parameter
Screen number
Tag which contains the screen number of the destination screen.
When a change from the root screen to the permanent area is desired, specify "0" or "-1":
0 = Change from root screen to permanent area.
-1 = Change from permanent area to root screen
Object number
The number of the screen object which receives the focus in the given screen after the
screen change. The number of the operator control element is to be determined using the
tabulator sequence during configuration.
When "0" is specified:
• If the focus is in the permanent area when the system function is called up, the permanent
area maintains the focus.
• If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
1.1.6 ActivateSystemDiagnosticsView
Description
Activates the system diagnostics view. The system diagnostics view shows the detail view of the
device concerned.
Parameters
Screen name
Name of the screen contained in the system diagnostics view.
Screen object
Object name of the system diagnostics view.
1.1.7 ArchiveLogFile
Description
This system function moves or copies a log to another storage location for long-term logging.
Prior to "ArchiveLogFile", always run the "CloseAllLogs" system function.
After this system function has been completed, run the "OpenAllLogs" system function.
In "Copy log" mode, the logs are not reopened until the log has been successfully copied or if
a timeout occurs during the copy.
In "Move log" mode, the logs to be moved are renamed and the new logs are opened
immediately. To move the renamed logs, a job is submitted which attempts to move them
every 300 seconds if the target directory cannot be accessed. The job is also retained after
Runtime is restarted until it is executed. Therefore, before you move a log, you should check
whether the target directory is accessible.
With Audit Trails, always use the "Move" (hmiMove) mode, otherwise you will be violating
the FDA guideline by duplicating the data stored.
Parameters
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive)= Audit trail log available for GMP compliant projects. Additional
information is available under "Activating GMP-compliant configuration".
Log
Name of the log being archived.
Directory name
Path for saving the log.
Mode
0 (hmiCopy) = Copy log
Application example
You want to move a log file from a local storage medium to the server in order to generate a
backup copy of this file at cyclic intervals.
Notes on configuring
Set up a task in the scheduler which is executed at a specific time on a daily basis. Configure
the following function list for the task:
Description
Backs up the RAM file system in the memory medium of the HMI device.
After restarting the HMI device, the data is automatically reloaded in the RAM file system.
Applications such as the Internet Explorer save data (e.g. the last web sites called up)
temporarily to the DRAM file system of the HMI device.
Parameter
--
1.1.9 CalibrateTouchScreen
Description
Calls a program for calibrating the touch screen.
During the calibration process, there is a prompt to touch five positions on the screen
display. Touch the screen display within 30 seconds, to confirm the calibration process. If the
calibration is not completed within this time span, the calibration settings are discarded. The
user prompt is in English.
Use this system function the first time you start the HMI device.
Note
The direct keys are reset by the system function.
Parameter
--
Note
The CalibrateTouchScreen system function cannot be simulated.
1.1.10 ChangeConnection
Description
Disconnects the connection to the PLC currently in use and establishes a connection to a PLC
with another address. The newly connected PLC must belong to the same device class (S7-300,
S7-400, etc).
Note
When changing to another address, ensure that the address is not already being used by another
HMI device.
Parameters
Connection
Name of the connection that is disconnected. The name is set during configuration, for
example, in the "Connections" editor.
Address
MPI/PROFIBUS or IP address of the PLC to which the connection will be established.
Note
Set the address by means of a tag. The objects list displays the tags of all data types. Select only
tags of the following data types:
• Ethernet connection: "String" data type
• MPI connection: "Int" data type
Slot
Slot of the PLC to which the connection will be established.
Rack
Rack of the PLC to which the connection will be established.
Application example
You want to operate one HMI device on several machines. Configure a controller in the project.
When changing the PLC, the connection to the PLC in use is disconnected. Then the connection
to the new PLC with other address parameters is reestablished. All tags in this connection are
now updated from the new controller.
The PLC which you have indicated when creating the project will be used as default.
1. Enter the name and address of the PLC in the "Connections" editor.
2. Configure a button in the process screen.
3. Configure the "ChangeConnection" system function on the "Press" event.
4. Enter the name of the connection and address of the PLC as parameters.
1.1.11 ChangeConnectionEIP
Description
Terminates the connection to the Allan Bradley controller currently in use and establishes a
connection to another Allan Bradley controller in Runtime. "EIP" stands for "Ethernet/IP".
The newly connected controller must belong to the same device class (Allen Bradley).
For the connection to be established, the CPU type of the controller to be connected must
match the CPU type of the controller already connected, for example, both controllers have
the CPU type "SLC/Micrologix PLC".
Note
When changing to another address, ensure that the address is not already being used by another
HMI device.
Parameters
Connection
Name of the connection that is disconnected. The name is set during configuration, for
example, in the "Connections" editor.
Address
IP address of the controller to which the connection is being established.
Note
Set the address by means of a tag. The objects list displays the tags of all data types. Select only
tags of the following data type "String".
Note
The stored IP address must consist of 4 decimal numbers with the value range 0 to 255.
Communication path
CIP path from the Ethernet module to the controller to which the connection is being
established.
You specify the communication path either with a String tag or an HMI tag of the "String"
data type.
Application example
You want to operate one HMI device on several machines. To do so, you configure a PLC in the
project. When changing the PLC, the connection to the PLC in use is disconnected. Then the
connection to the new PLC with other address parameters is reestablished. All tags of this
connection are now updated from the new PLC.
1. Enter the name and address of the PLC in the "Connections" editor.
2. Configure a button in the process screen.
3. Configure the "ChangeConnectionEIP" system function on the "Press" event.
4. Enter the name of the connection and address of the PLC as parameters.
1.1.12 ClearAlarmBuffer
Description
Deletes alarms from the alarm buffer on the HMI device.
Note
Alarms which have not yet been acknowledged are also deleted.
Parameter
Note
Device dependency
Alarms of alarm class "Diagnosis Events" are not available on Basic Panels.
1.1.13 ClearAlarmBufferProtool
Description
The system function exists to ensure compatibility.
It has the same functionality as the "ClearAlarmBuffer" system function, but uses the old
ProTool numbering.
Parameter
Note
Device dependency
Alarms of alarm class "Diagnosis Events" are not available on Basic Panels.
1.1.14 ClearDataRecord
Description
Deletes a recipe data record.
Several data records can be deleted from one or more recipes.
Parameters
Recipe number/name
Number or name of the recipe from which recipe data records are deleted. "0" is specified if
you want to delete recipe data records from all available recipes.
Confirmation
Determines whether the operator should confirm the deletion:
0 (hmiOff) = Off: Deletion is begun without confirmation.
1 (hmiOn) = On: The starting of the deletion process must be confirmed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
1.1.15 ClearDataRecordMemory
Description
Deletes all recipes data records from the specified storage medium.
Parameters
Storage location
Determines the storage location:
0 (hmiFlashMemory) = Flash memory: Internal flash memory of the HMI device
1 (hmiStorageCard) = Storage card
2 (hmiStorageCard2) = Storage card 2
3 (hmiStorageCard3) = Storage card MultiMediaCard
4 (hmiStorageCard4) = Storage card
With confirmation
Determines whether the operator should confirm the deletion:
0 (hmiOff) = Off: Deletion is begun without confirmation.
1 (hmiOn) = On: The starting of the deletion process must be confirmed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.16 ClearLog
Description
Deletes all data records in the given log.
Parameter
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail log. Available for GMP-compliant projects Additional
information is available under "Activating GMP-compliant configuration".
Log
Name of the log from which all entries are deleted.
1.1.17 CloseAllLogs
Description
Disconnects the connection between WinCC and all logs.
Parameter
--
Application example
You are in runtime and want to change the data medium on which the process values are logged.
Notes on configuring
Configure the "CloseAllLogs" system function on the "Close Archive" button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When you press the "Close Archive" button, the opened logs are closed. The data medium
can be changed. The logging continues during the change of the data medium. The process
values to be logged are cached. You open all logs with the "Open Archive" button. The
logging process will continue in the specified log. The buffered process values are later added
to the log.
1.1.18 ControlSmartServer
Description
Starts or stops the Sm@rtServer.
Parameter
Mode
Specifies whether the Sm@rtServer is started or stopped.
-1 (hmiToggle) = Toggle: Toggles between the two modes
0 (hmiStop) = Stop: Sm@rtServer is stopped
1 (hmiStart) = Start: Sm@rtServer is started
1.1.19 ControlWebServer
Description
Starts or stops the Web server.
Parameter
Mode
Specifies whether the Web server is started or stopped.
-1 (hmiToggle) = Toggle: Toggles between the two modes
0 (hmiStop) = Stop: The Web server is stopped.
1 (hmiStart) = Start: The Web server is started.
1.1.20 CopyLog
Description
Copies the contents of a log to another log. Tag values can only be copied to other data logs and
alarms only to other alarm logs, however.
Note
If you copy a log using the "CopyLog" system function, it is possible that external applications will
be unable to read certain country-specific special characters in the logged message text of the
log copy. This does not apply to WinCC Runtime. WinCC Runtime can read the copied log files
without errors.
Note
80% of the log entries are copied when copying the circular logs. 20% of entries are not copied
because the space is reserved for buffer overflow by default.
Parameter
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
Destination log
Name of the log into which the entries are copied (Destination log).
Source log
Name of the log from which the entries are copied (Source log).
Mode
Determines what is done with copied entries in the destination log:
0 (hmiOverwrite) = Overwrite: Existing entries are overwritten.
2 (hmiAppend) = Append: The entries are inserted at the end of the destination log. When
the configured size of the log has been reached, the destination log is treated like a circular
log.
1.1.21 DecreaseTag
Description
Subtracts the given value from the tag value.
X=X-a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. The auxiliary tags are assigned to the tag
value with the "SetTag" system function.
If you configure the system function on the events of an alarm and the tag is not being used
in the current screen, it is not ensured that the actual value of the tags is being used in the
PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameter
Tag
The tag from which the given value is subtracted.
Value
The value which is subtracted.
1.1.22 EditAlarm
Description
Triggers the "Edit" event for the selected alarm or for the last selected alarm in case of multiple
selection. If the alarms to be edited have not yet been acknowledged, they are acknowledged
automatically when this system function is called.
This system function can only be used for function keys.
Parameters
--
1.1.23 Encode
Description
Adapts the "String" data type of a tag for transfer to the automation system (AS). The tag of
WinCC data type "String" is converted into the AS data type "Array of byte". The result is written
to a tag.
Parameter
Byte array
The tag that contains the converted value.
Note
The Byte array must be twice the size of the string length + 2. The Byte array must contain 242
array elements if the string has a length of 120 characters.
Characters are either truncated or not converted if the size is insufficient.
String
The tag of data type "String" that is converted.
Encode
0 (hmiEncodeUTF16LE) - String is encoded in UTF16LE (Unicode 16 Little Endian).
1.1.24 EncodeEx
Description
Adapts the "String" data type of a tag for transfer to the automation system (AS). The tag of
WinCC data type "String" is converted into the AS data type "Array of byte". The result is written
to a tag.
By contrast to the Encode system function, you can define the Line break parameter. Using
the Line break parameter you can delete line breaks or replace these with predefined
characters.
Parameter
Byte array
The tag that contains the converted value.
Note
The byte array must be twice the size of the string length +2. If the string has a length of 120
characters, the byte array must contain 242 array elements.
Characters are either truncated or not converted if the size is insufficient.
String
The tag of data type "String" that is converted.
Encoding
0 (hmiEncodeUTF16LE) - String is encoded in UTF16LE (Unicode 16 Little Endian).
Line break
All line breaks are either deleted or replaced with predefined characters. Do not replace line
breaks if set as the default value.
0 (replace with "\r\n' (0x000D, 0x000A)) - the line break is replaced with "\r\n".
1 (replace with "\n' (0x000A)) - the line break is replaced with "\n".
2 (do not replace) - the line break is not replaced.
3 (remove line breaks) - the line breaks are removed.
1.1.25 ExportDataRecords
Description
Exports one or all data records of a recipe to a CSV file or a TXT file.
One file is created per recipe.
Parameters
Recipe number/name
Number or name of the recipe from which the data records are exported. Specify "0" if recipe
data records are to be exported from all available recipes.
File name
Name of the file to which the recipe data records are exported. Enter the name, including the
storage location and the file extension (*.csv or *.txt), for example "C:\TEMP\Orange.csv". If a
folder does not exist, it is created during the export.
If you do not enter the file name fully, the response depends on the number of configured
recipes:
• If multiple recipes are configured and
you only specify one file name and no path, the file is saved in a system directory, for example,
"C:\Documents and Settings\[User]".
When only a path and no file name is specified, the file name is automatically created from the
recipe name. It is a requirement that the folder "D:\Data\", for example, has been created in
the specified folder. If the "D:\Data" folder has not been created, the folder name will be used
as the prefix for the file name, for example, "Data_Recipe name.csv".
• If only one recipe is configured and only one path and no file name is specified,
a file with the folder name is created if the folder does not exist. However, this has no file
extension.
the export is aborted with an error message if the folder exists.
If a memory card is used as storage location, specify the storage location as follows:
"\StorageCard\<Name>".
For Basic Panel, enter the file name as follows: "\USB_X60.1\<Name>"
Overwrite
Determines whether an existing export file with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: Export file will not be overwritten. The export process will
not be carried out.
1 (hmiOverwriteAlways) = Yes: Export is overwritten without a prompt for confirmation.
2 (hmiOverwriteWithPrompting) = With confirmation: Export file is not overwritten until
confirmed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
Application example
You want to export all data records using a key.
Notes on configuring
Configure the "ExportDataRecords" system function on the "Press" event for the desired key.
Transfer the following parameters:
• Recipe number/name = 1
• Data record number/name = 0
• File name = c:\temp\orange.csv (for Basic Panels "\USB_X60.1\orange.csv")
• Overwrite = 1
• Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data records are exported.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated. All data records of Recipe 1 are exported to the orange.csv file. If the file already
exists, it will be overwritten.
After exporting the data records, a system event is output.
1.1.26 ExportDataRecordsWithChecksum
Description
Exports one or all data records of a recipe to a CSV file and generates a checksum for each line
in the file.
One file is created per recipe.
Parameters
Recipe number/name
Number or name of the recipe from which the data records are exported. Specify "0" if recipe
data records are to be exported from all available recipes.
File name
Name of the CSV file to which the recipe data records are exported. Enter the path and the
file extension e.g. "C:\TEMP\Orange.CSV".
If a storage card is used as storage location, specify the storage location as follows:
"\StorageCard\<FileName>".
If you define only a file name without specifying a path, the file is saved to the directory from
which Runtime was started. If write access to this directory is not enabled in the Windows 7
operating system, the file is saved to the "VirtualStore" folder of the user directory.
When only one path for the export is specified, the file name is automatically created from
the respective recipe name. This requires, for example, that the directory "D:\Temp\" has been
created. If the directory "D:\Temp" does not exist, the directory name is used as the prefix for
the file name, Temp_Recipe names.csv.
Overwrite
Determines whether an existing CSV file with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: CSV file will not be overwritten. The export process will not
be carried out.
1 (hmiOverwriteAlways) = Yes: CSV file is overwritten without a prompt for confirmation.
2 (hmiOverwriteWithConfirmation) = With confirmation: CSV file is not overwritten until
confirmed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
Application example
Using a key, you want to export all data records and assign a checksum.
Notes on configuring
Configure the "ExportDataRecordsWithChecksum" system function on the "Press" event for
the desired key. Transfer the following parameters:
• Recipe number/name = 1
• Data record number/name = 0
• File name = c:\temp\orange.csv
• Overwrite = 1
• Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data records are exported.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated. All data records of Recipe 1 are exported to the orange.csv file and assigned
checksums. If the file already exists, it will be overwritten.
After exporting the data records, a system event is output.
1.1.27 ExportImportUserAdministration
Description
Exports all users of the user administration of the currently active project to the specified file or
imports the users from the specified file to the currently active project.
Users, their passwords and rights are saved in the user administration.
The export/import of the user administration configuration encompasses all the settings.
Existing objects (users, groups, logon settings, authorization levels) are overwritten during
the import.
The imported users are valid immediately.
Parameter
File name
Name of the file which contains the passwords or to which the passwords are written. Enter
the file location and the file extension (*.txt), for example, "C:\TEMP\Passwords.txt".
Note
If a storage card is used as file location, specify the file location as follows:
"\StorageCard\<FileName".
Direction
Specifies whether passwords are exported or imported:
0 (hmiExport) = Export: Passwords are exported.
1 (hmiImport) = Import: Passwords are imported.
1.1.28 GetBrightness
Description
Reads the value of the brightness.
Parameter
Brightness
The tag to which the value is written.
1.1.29 GetDataRecordFromPLC
Description
Transfers the selected recipe data record from PLC to the storage medium of the HMI device.
Parameters
Recipe number/name
Number or name of the recipe from which recipe data records are transferred.
Overwrite
Determines whether an existing recipe data record with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data record is not overwritten. The transfer process
will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data record is overwritten without prompting.
2 (hmiOverwriteWithPrompting) = With confirmation: Recipe data record is not overwritten
until confirmed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
Application example
You want to transfer a data record from the PLC to the data medium of the HMI device using a
key.
Notes on configuring
Configure the "GetDataRecordFromPLC" system function on the "Press" event for the desired
key. Transfer the following parameters:
Recipe number/name = 1
Data record number/name = 1
Overwrite = 1
Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data record is transferred from the PLC.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated and the first data record of Recipe 1 is transferred from the PLC to the data medium
of the HMI device. If the recipe data record already exists, it will be overwritten.
A system event is output after the transfer.
1.1.30 GetDataRecordName
Description
Writes the name of the specified recipe and recipe data record to specified tags.
Note
If the recipe or the recipe data record do not exist, wildcards ("###") are written to the tags.
Note
Only internal tags or external tags are supported as tags.
Parameters
Recipe number
Number of the recipe whose name is written in the specified tag.
Recipe name
The tag to which the recipe name is written. The tag must be of the STRING type.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
Application example
You want to output the names of the displayed recipes and the name of the displayed recipe data
record on the HMI device.
Configure the following tags:
• "RecNumber" of type INTEGER
• "RecDataNumber" of type INTEGER
1.1.31 GetDataRecordTagsFromPLC
Description
Transfers the values of the recipe data record loaded in the PLC to the corresponding recipe
tags.
This system function is used, for example, during teach-in mode on a machine.
Parameters
Recipe number/name
Number or name of the recipe data record whose values are written from the PLC to the tags.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.32 GetGroupNumber
Description
Reads the number of the group to which the user logged on to the HMI device belongs, and
writes it to the given tag.
Parameter
Tag
The tag to which the number of the group is written.
1.1.33 GetPassword
Description
Writes the password of the user currently logged on to the HMI device in the given tag.
Note
Make sure that the value of the given tag is not displayed in another place in the project.
Note
The passwords of SIMATIC Logon users cannot be read.
Note
The "ReadPassword" system function is not available for devices as of device version 14.0.0.0.
If this system feature is used in a project older than version V14, it is removed after migration to
V14. The event linked to the system function is thereby invalidated. The "ReadPassword" system
function appears to be faulty in the configuration. A warning is generated during compiling. The
"ReadPassword" system function is no longer included in the compiled Runtime project.
Parameter
Tag
The tag to which the password is written.
1.1.34 GetUserName
Description
Writes the user name of the user currently logged on to the HMI device in the given tag.
If the given tag has a control connection, the user name is also available in the PLC
connection. This system function makes it possible, for example, to implement a user-
dependent release of certain functionalities.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameter
Tag
The tag to which the user name is written.
1.1.35 GoToEnd
Description
Executes the key function <End> on the HMI device.
This system function is used when the HMI device does not have this functionality by default.
The system function can only be used for the following function keys.
Parameter
--
1.1.36 GoToHome
Description
Executes the key function <Home> on the HMI device.
This system function is used when the HMI device does not have this functionality by default.
The system function can only be used for the following function keys.
Parameter
--
1.1.37 ImportDataRecords
Description
Imports one or all data records of a recipe from a CSV file or a TXT file.
When a path is specified, all records of the given directory are imported.
Note
No check of import file for inconsistencies
The import function doesn't check whether values that were changed in the CSV file between the
export and import are still valid, e.g. whether these are still within the defined limits.
Parameters
File name
Name of the file from which the recipe data records are imported. Also specify the storage
location and the file extension (*.csv or *.txt), e.g. "C:\TEMP\Orange.csv".
For a Basic Panel, specify the file name as follows: "\USB_X60.1\<Name>"
For additional devices: If a memory card is used as the storage location, specify the storage
location as follows: "\StorageCard\<Name>".
To import all recipe data records, specify only the path to the storage location without a file
name: "C:\TEMP\". The system function imports all CSV files from this storage location.
Overwrite
Determines whether existing recipe data records are to be overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data records are not overwritten. The import
process will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data records are overwritten without prompting.
2 (hmiOverwriteWithPrompting) = With confirmation: Recipe data records are not
overwritten until confirmed.
Processing status
Returns the processing status of the system function. Use the return value, for example, to
ensure that this system function has been successfully completed before executing other
system functions:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
Configurable objects
Object Event
Tag Value change
High limit violated
Low limit violated
Function key (global) Release
Press
Function key (local) Release
Press
Screen Loaded
Cleared
Object Event
Screen object Press
Release
Click
Change (or toggle for switch)
Switch on
Switch off
Enable
Disable
Scheduler Time expired
1.1.38 ImportDataRecordsWithChecksum
Description
Imports one or all data records of a recipe from a CSV file with checksum and verifies the
checksum.
Parameters
File name
Name of the CSV file from which the recipe data records are imported. Enter the path and the
file extension, for example, "C:\TEMP\Orange.CSV".
If a storage card is used as storage medium, specify the storage location as follows:
"\StorageCard\<FileName>".
If you specify a directory instead of an individual CSV file, all files in the specified directory
will be imported.
Overwrite
Determines whether existing recipe data records are to be overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data records are not overwritten. The import
process will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data records are overwritten without prompting.
2 (hmiOverwriteWithConfirmation) = With confirmation: Recipe data records are not
overwritten until confirmed.
Processing status
Returns the processing status of the system function. Use the return value, for example, to
ensure that this system function has been successfully completed before executing other
system functions:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
Verify checksum
Determines if the checksum should be verified during import:
0 (hmiFalse) = No: Checksum is not verified.
1 (hmiTrue) = Yes: Checksum is verified.
1.1.39 IncreaseTag
Description
Adds the given value to the value of the tags.
X=X+a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, help tags must be used. You can use the "SetTag" system function to
assign the tag value to the auxiliary tags.
If you configure the system function on the events of an alarm and the tag is not being used
in the current screen, it is not ensured that the actual value of the tags is being used in the
PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameter
Tag
The tag to which the given value is added.
Value
The value that is added.
1.1.40 InverseLinearScaling
Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the linear
function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
X
The tag which is assigned the value calculated from the linear equation.
Y
The tag that contains the value used for calculation.
b
The value which is subtracted.
a
The value through which is divided.
Example
The following program code assigns a value to the varX tag by means of the InverseLinearScaling
function.
{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
1.1.41 InvertBit
Description
Inverts the value of the given tag of the "Bool" type:
• If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
Parameters
Tag
The tag whose bit is set.
Example
The following program code inverts the value of the Boolean tag bStatus and outputs the result
along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Invert Bit
InvertBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Invert variable
invertBit(bStatus);
1.1.42 InvertBitInTag
Description
Inverts a bit in the given tag:
• If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.
Parameters
Tag
The tag in which the given bit is set.
Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted
from right to left. The counting begins with 0.
Example
The following program code inverts a bit at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bStatusWord;
BYTE bsaved = bStatusWord;
BYTE bitposition = 2;
1.1.43 LinearScaling
Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the linear
function Y= (a *X) + b.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
Y
The tag which is assigned the value calculated from the linear equation.
a
The value with which is multiplied.
X
The tag that contains the value used for calculation.
b
The value that is added.
Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.
{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);
1.1.44 LoadDataRecord
Description
Loads the given recipe data record from the memory medium of the HMI device in the recipe
tags. This system function is used, for example, to display a recipe data record in the recipe
screen.
Activate the "Synchronize recipe view and recipe tags" option in the synchronization settings
of the recipe. If this option is deactivated, the system function has no effect.
Parameters
Recipe number/name
Number or name of the recipe from which a recipe data record is loaded.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.45 LogOff
Description
Logs off the current user on the HMI device.
Parameter
--
1.1.46 Logon
Description
Logs on the current user on the HMI device.
Parameter
Password
The tag from which the password for the user logging on is read. If the user is logged on, the
password in the tag is deleted.
User name
The tag from which the user name for the user logging on is read.
1.1.47 LookupText
Description
Identifies an entry from a text list. The result depends on the value and on the selected runtime
language. The result is saved to a tag of data type "String".
Parameters
Output text
The tag to which the result is written.
Index
The tag that defines the value of the list entry.
Language
Defines the runtime language in which the list entry is identified.
• Runtime language
Language code as per VBScript reference, for example, "de-DE" for German (Germany) or "en-
US" for English (United States of America). The selection depends on the activated runtime
languages.
• Tag
The tag that contains the language. Enter the runtime language as decimal value of the
country ID, for example, 1031 for German - Standard, 1033 for English - USA. Details are
available in the VBScript basics, "Locale identifier (LCID) diagram".
• Integer
The number that corresponds to the order of runtime languages for language switching.
The selection depends on the activated runtime languages, for example, "0" for the language
that appears when you first start runtime. You can find more information under the topic of
"Languages in Runtime".
Text list
Defines the text list. The list entry is read from the text list.
1.1.48 NotifyUserAction
Description
This system function is used to log user actions that are not automatically logged in the Audit
Trail. You can also use this system function to require the user to enter an acknowledgment
or an electronic signature and a comment for the operator action. A requirement for the use
of the system function is that the GMP-compliant configuration is activated under "Runtime
settings > GMP".
If you use the "NotifyUserAction" system function in a function, the debugger may open if
you cancel your input by clicking "Cancel". To compensate for this reaction, you can use the
"On Error Resume Next" statement in a function. With this instruction, the next instruction is
executed after a runtime error. If you use the "On Error Resume Next" statement, output of
system events is also suppressed.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameter
Confirmation type
Establishes how the action must be confirmed
0 = (None): No confirmation required, an entry is created in the Audit Trail
1 = (Acknowledgement): Acknowledgment, the user must acknowledge the action; an entry
is created in the Audit Trail
2 = (Digital Signature): Electronic signature; a dialog window opens in which the user must
enter the electronic signature - an entry is created in the Audit Trail
Mandatory commenting
Establishes if the user has to enter a comment. The comment is logged in the Audit Trail.
0 = (True): True; a dialog window opens in which the user must enter a comment
1 = (False): False; no comment required
Category
Category or class name of the modified object
Object name
Name of the modified object
Description
Text which describes the archiving user action.
1.1.49 OpenAllLogs
Description
Reestablishes the connection between WinCC and the logs. Logging can be continued.
Note
Run the "StartLogging" system function in order to restart logging.
Parameter
--
Application example
You are in runtime and want to change the data medium on which the process values are logged.
Notes on configuring
Configure the "StopLogging" and "CloseAllLogs" system functions on the "Close Archive"
button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When the button "Close Archive" is pressed, the specified log is stopped and all open logs are
closed. The data medium can be changed. You open all logs with the "Open Archive" button.
Logging will be continued in the specified log.
1.1.50 OpenCommandPrompt
Description
Opens a Windows system prompt.
This function is used, e.g., to copy files or to call up another application.
Parameter
--
1.1.51 OpenControlPanel
Description
Opens a dialog that you can use to edit selected Control Panel settings.
This system function lets you set the following on the HMI device:
• Properties and value of the IP address
• User identification on the network
• WinCC Internet settings
Note
Project security
The "OpenControlPanelDialog" system function is used to bypass the SecureMode on the HMI
device. Take the corresponding precautions to ensure the security of your project.
Parameters
Dialog
Sets the Control Panel dialog to be opened.
• PROFINET_X1: Setting of the IP address and Ethernet parameters
• PROFINET_X3: Setting of the IP address and Ethernet parameters; only for Comfort Panel KP
1500, TP 1500; TP1900, TP2200
• WinCC Internet settings: Setting for Web Server, e-mail notification, provided the HMI device
supports these functions
• Network ID: Setting for identification on the network, provided the HMI device supports these
functions
1.1.52 OpenInternetExplorer
Description
Opens the Internet Explorer on the HMI device.
If the Internet Explorer is already open, it will be closed and reopened when you call the
system function.
Note
The Internet Explorer saves data temporarily in the DRAM file system of the HMI device, e.g. the
last web sites that were be called up.
This data can be saved using the "BackupRAMFileSystem" system function so that it is still
available when the HMI device is restarted.
Parameter
Start page
The page which is loaded when Internet Explorer is started, e.g. "www.siemens.com".
1.1.53 OpenScreenKeyboard
Description
Hides or shows the screen keyboard.
The screen keyboard remains open until the screen keyboard is explicitly closed. In this way,
the screen keyboard can also be used in other applications.
Parameter
Display mode
Specifies whether the window is opened minimized or maximized with the screen keyboard:
0 (hmiScreenKeyboardMinimized) = Minimized
1 (hmiScreenKeyboardMaximized) = Maximized
1.1.54 OpenTaskManager
Description
Shows the task manager.
The task manager allows changing to other open applications on the HMI device.
Note
The appearance of the task manager depends on the operating system installed.
Parameter
--
1.1.55 PageDown
Description
Executes the key function <Pagedown> on the HMI device.
This system function can only be used for function keys.
Parameter
-
1.1.56 PageUp
Description
Executes the key function <PageUp> on the HMI device.
This system function can only be used for function keys and tasks with a time trigger.
Parameter
-
1.1.57 PrintReport
Description
Prints the given report from the printer which is connected to the HMI device. The report is
printed in the language which is set on the HMI device.
Note
If runtime is closed whilst log data are being printed using the system function, the report will
cease to be supplied with data as soon as runtime stops.
Parameter
Report
Name of the report to be printed.
Note
If you have set up via the "Function list" dialog box a new report for the "PrintReport" function,
when compiling, the following warning appears: "The report "Report_1" has no printed pages."
In order to remedy the warning, open the "Report_1" via the project view and recompile the
project.
1.1.58 PrintScreen
Description
Prints the screen currently being displayed on the HMI device from the printer which is
connected to the HMI device.
Note
The printer settings are taken over from the current settings in the Windows operation system.
Parameter
--
1.1.59 ResetBit
Description
Sets the value of a "Bool" type tag to 0 (FALSE).
Parameters
Tag
The BOOL type tag which is set to 0 (FALSE).
Example
The following program code sets the value of the Boolean tag bStatus to 0 by means of the
ResetBit function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=1
myTag.Value=bValue
'Reset Bit
ResetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 1;
BOOL bSaved = bStatus;
//Reset bit
ResetBit (bStatus);
1.1.60 ResetBitInTag
Description
Sets a bit in the specified tag to 0 (FALSE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.
Parameters
Tag
The tag in which a bit is set to 0 (FALSE).
Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Example
The following program code sets a bit to 0 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
'Reset Bit
bitposition=2
ResetBitInTag myTag, bitposition
bValue=myTag.Value
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 2;
bSaved = GetTagByte("bStatusWord");
1.1.61 SafelyRemoveHardware
Description
Checks whether there is read or write access to the external storage medium. If there is no
access, the external storage medium can be removed without data loss.
Parameters
Result
The tag in which the result is entered.
TRUE: The storage medium can be removed safely. A corresponding system alarm will be
output.
FALSE: The storage medium cannot be removed safely. A corresponding system alarm will be
output.
Path
Path of storage medium, e.g. \Storage Card USB\
1.1.62 SaveDataRecord
Description
Saves the current values of the recipe tags as data record to the memory medium of the HMI
device.
This system function is used, for example, to save a recipe data record in the recipe screen.
Data records are only saved if the "Synchronization" option is activated in the recipe.
• When "Synchronization" is not activated, no data records are saved.
To save data records, use either the "Save" button in the recipe control or the system function.
Parameters
Recipe number/name
Number or name of the recipe to which a recipe data record is saved.
Overwrite
Specifies whether an existing data record is overwritten:
0 (hmiOverwriteForbidden) = No: The recipe data record is not overwritten, the data record is
not saved.
1 (hmiOverwriteAlways) = Yes: The recipe data record is overwritten without a prompt for
confirmation.
2 (hmiOverwriteWithConfirmation) = With confirmation: The recipe data record is overwritten
only with confirmation by the user.
Processing status
Returns the processing status of the system function. You can use the return value, for
example to delay execution of other system functions, until this system function has been
successfully completed.
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.63 SendEMail
Description
Sends an e-mail from the HMI device to the given addressee.
This system function is used, for example, when, in the case of service, the alarm is to be
passed on directly to the service technician.
Note
To send alarms as e-mails, the HMI system must have an e-mail client at its disposal.
Parameter
Address
The e-mail address of the addressee.
Subject
The subject line of the e-mail.
Text
The text sent in the e-mail.
Return address
The e-mail address to which the addressee of this e-mail should send the reply.
1.1.64 SetAcousticSignal
Description
Configures the acoustic feedback of touch screen operation on the HMI device.
Note
The configuration that was set at Switch off is reestablished when restarting the HMI device.
Parameter
Volume
Determines whether and how loud an acoustic signal is emitted:
-1 (hmiToggle) = Toggle: Toggles the emission of the acoustic signal as follows: Muted >
Quiet > Loud.
0 (hmiMuted) = Mute: no acoustic signal
1 (hmiQuiet) = Quiet: quiet acoustic signal
2 (hmiLoud) = Loud: loud acoustic signal
1.1.65 SetAlarmReportMode
Description
Switches the automatic reporting of alarms on the printer on or off.
Parameter
Mode
Determines whether alarms are reported automatically on the printer:
0 (hmiDisablePrinting) = Reporting off: Alarms are not printed automatically.
1 (hmiEnablePrinting) = Reporting on: Alarms are printed automatically.
-1 (hmiToggle) = Toggle: Toggles between the two modes.
1.1.66 SetBit
Description
Sets the value of a "Bool" type tag to 1 (TRUE).
Parameters
Tag
The BOOL type tag which is set to 1 (TRUE).
Example
The following program code sets the value of the Boolean tag bStatus to 1 by means of the SetBit
function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=0
myTag.Value=bValue
'Set Bit
SetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Set bit
SetBit (bStatus);
1.1.67 SetBitInTag
Description
Sets a bit in the given tag to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system function
instead.
Parameters
Tag
The tag in which a bit is set to 1 (TRUE).
Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Note
The guaranteed update of the tags used with actual process values is absolutely conditional in
terms of reliable functionality. You should therefore configure the tag in an I/O field or assign the
system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.
Example
The following program code sets a bit to 1 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 1;
bSaved = GetTagByte("bStatusWord");
1.1.68 SetBrightness
Description
Determines the brightness of the display.
Note
The configuration that is set in the Control Panel / Start Center will be reestablished when you
restart the HMI device.
For Basic Panels 2nd Generation, Mobile Panels and Comfort Panels:
The value for the system function "SetBrightness" can be set between 0% and 100%. The
set value is transferred to the HMI device. The brightness settings on the HMI device can
be viewed and edited in "Start Center > Settings > Display". The HMI devices support a
brightness setting between 10% and 100%.
If the system function "SetBrightness" is assigned a value of 0%, the display of the HMI device
is switched off by default in Runtime. If the operator touches the display, the display switches
to the previous brightness setting.
If the system function "SetBrightness" is assigned a value between 1% and 10% and the
operator opens the display settings in the Start Center, brightness is reset to 10%.
Parameter
Value
New value for the brightness.
1.1.69 SetConnectionMode
Description
Connects or disconnects the given connection.
Note
A connection to the PLC cannot be established until the "Online" operating mode has been set
on the HMI device. Use the "SetDeviceMode" system function for this purpose.
If the connection is loaded in "Offline" mode, the connection is closed again each time the mode
switches to "Offline". To re-establish the connection after switching to "Online" mode, set the
connection again to "Online" mode.
Note
Good Manufacturing Practice
The use of the "SetConnectionMode" system function in user-defined functions is not GMP
compliant.
When using the "SetConnectionMode" system function in user-defined functions, disable the
Good Manufacturing Practice in the runtime settings of the HMI device.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameters
Mode
Specifies whether a connection to the PLC is established or disconnected. For devices with
Windows CE and for Runtime Advanced, this parameter cannot be supplied via a tag of the
data type BOOL.
0 (hmiOnline) = online: Connection is established.
1 (hmiOffline) = offline: Connection is disconnected.
Connection
The PLC to which the HMI device is connected. You specify the name of the PLC in the
connection editor.
Application example
Two typical application examples for this system function are as follows:
• Test
As long as no PLC is connected to the HMI device, no error messages will be output during the
test on the HMI device. If the HMI device is connected to a PLC, the connection to the PLC can
be established by pressing a key.
• Commissioning
Several PLCs are to be configured for a system. At first, all PLCs except one are configured
"Offline". After commissioning of the first PLC, the connection to each of the other PLCs is
established by pressing a key. In this way, the other PLCs are started up one after another.
1.1.70 SetDataRecordTagsToPLC
Description
Transfers the values of the recipe tags to the PLC. The recipe tags contain the values of the data
record which is displayed on the HMI device.
Parameters
Recipe number/name
Number or name of the recipe from which recipe data record is transferred to the PLC.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.71 SetDataRecordToPLC
Description
Transfers the given recipe data record directly from the data medium of the HMI device to the PLC
with which the HMI device is connected.
Note
The values of the recipe data record don't need to be displayed on the HMI device.
Parameters
Recipe number/name
Number or name of the recipe from which recipe data record is transferred to the PLC.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.72 SetDaylightSavingTime
Description
The system function "SetDaylightSavingTime" changes the setting of the HMI device from
daylight saving to standard time and vice versa.
Time settings will take place immediately following system function.
Note
The "SetDaylightSavingTime" system function does not support time zones without daylight
saving time.
Note
Windows 7
The system function "SetDaylightSavingTime" is not supported for PC-based HMI devices under
Windows 7.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameters
1.1.73 SetDeviceMode
Description
Toggles the operating mode on the HMI device. The following types of operation are possible:
"Online", "Offline" and "Loading".
Parameter
Operating mode
Specifies the operating mode of the HMI device. For devices with Windows CE, this parameter
cannot be supplied via tag of data type BOOL.
0 (hmiOnline) = online: The connection to the PLC is established. The configured connection
status is always set in this process. The states that were last used in Runtime are not
considered.
1 (hmiOffline) = offline: The connection to the PLC is disconnected.
2 (hmiTransfer) = Load: A project can be transferred from the configuration computer to the
HMI device.
Note
If you use a PC as an HMI device, the runtime software will be exited when you switch operating
mode after "Load".
1.1.74 SetDisplayMode
Description
Changes the settings of the screen in which the runtime software runs.
The runtime software runs in full-screen mode as default. The Windows task switch is
disabled.
Parameter
Display mode
Determines the settings for the screen in which the runtime software runs.
1 (hmiScreenFull): Full screen: Title bar of the screen is not visible
2 (hmiScreenMaximized): Maximized
3 (hmiScreenRestore): Restore: The last used screen setting is used. This layout can only be
used when the window is displayed minimized or maximized.
4 (hmiScreenMinimized): Minimized
5 (hmiScreenAutoAdjust): Automatic: The size of the window is set so that all screen objects
in it will be visible.
6 (hmiScreenOnTop): Foreground; either the window appears in the foreground or the
program icon associated with the window flashes on the taskbar depending on the Windows
setting. The setting can be changed in the Windows configuration and applies to all Windows
applications.
1.1.75 SetLanguage
Description
Toggles the language on the HMI device. All configured text and system events are displayed on
the HMI device in the newly set language.
Parameter
Language
Determines which language is set on the HMI device. The following specifications are
possible:
• -1 (hmiToggle) = Toggle: Changes to the next language. The sequence is determined during
configuration in the "Project languages" editor.
• Number you have defined under "Languages and fonts" in the "Runtime Settings" editor.
Changes to the language with the given number.
• Language you have defined under "Languages and fonts" in the "Runtime Settings" editor.
• Language abbreviation in accordance with the VBScript5 reference: This changes to the
language corresponding to the specified language code, e.g. "de-DE" for German (Germany)
or "en-US" for English (United States).
An overview of the language abbreviations is available in the basic information of VBScript
under the topic "Area diagram-ID (LCID) Diagram".
1.1.76 SetPLCDateTime
Description
Changes the data and the time of the linked PLC
The system function "SetPLCDateTime" can only be configured for the following PLCs:
• SIMATIC S7-1200
• SIMATIC S7-1500
Parameters
Connection
Connection of PLC and HMI device.
Time
Transfers the date and the time of the HMI device to the PLC. The PLC applies the date and
the time of the HMI device.
1.1.77 SetRecipeTags
Description
Changes the status of the recipe tags from "Online" to "Offline" and vice versa.
This system function is used, for example, when recipe data record values are fine tuned
when starting up a machine.
Parameters
Recipe number/name
Number or name of the recipe in which the recipe data record is saved.
Status
Determines the status of the recipe tags:
0 (hmiOnline) = online: Value changes of the recipe tags are transferred immediately to the
PLC connected to the HMI device.
1 (hmiOffline) = offline: Value changes to the recipe tags are only transferred to the PLC
connected to the HMI device when, for example, the "SetDataRecordTagsToPLC" system
function is executed.
Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.
You can only use an HMI tag for the parameter.
1.1.78 SetScreenKeyboardMode
Description
Enables or disables the automatic display of the screen keyboard on the HMI device.
This system function is also used to prevent the display of the screen keyboard, e.g. because
an external keyboard is connected to the HMI device.
Note
To enable the "SetScreenKeyboardMode" ("SetScreenKeyboardMode") system function on an
HMI other than a Touch Panel device, set the "Use on-screen keyboard" check box in the "Runtime
settings" dialog of the device settings.
Parameter
Mode
Determines whether the screen keyboard is hidden or shown:
0 (hmiOff) = Off: Screen keyboard is hidden
1 (hmiOn) = On: Screen keyboard is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes.
1.1.79 SetTag
Description
Assigns a new value to the given tag.
Note
This system function can be used to assign strings and numbers, depending on the type of tag.
Parameters
Tag
The tag to which the given value is assigned.
Value
The value which the given tag is assigned.
Note
The "SetTag" system function is only executed after a connection has been established.
Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.
{
BOOL ok;
BOOL bvalue;
1.1.80 ShiftAndMask
Description
This system function converts the input bit pattern of the source tags into an output bit pattern
of the target tags. This involves bit shifting and masking.
Note
If the source and target tag have a different number of bits, using the system function in the
target tag can result in a violation of the value range.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameter
Source tag
The tag includes the input bit pattern. Integer-type tags, e.g. "Byte", "Char", "Int", "UInt",
"Long" and "ULong" are permitted.
Example: The actual value 72 is set at the 16-bit integer source tag: 0000000001001000.
Target tag
The output bit pattern is saved in the tag. Integer type tags, e.g. "Byte", "Char", "Int", "UInt",
"Long" and "ULong" are permitted.
Example: The shifted input bit pattern is multiplied by the bit mask, with bit-by-bit logical
AND operation: 0000000000001001. The resultant decimal value "8" is saved to the target
tag.
Please note the following:
• The source and target tags have the same number of bits.
• The number of bits to shift is less than the number of bits in the source tag and target tag.
• Bits to mask does not have more bits than the source tag and the target tag.
Bits to shift
Number of bits by which the input bit pattern is shifted right. A negative value shifts the
input bit pattern to the left.
Example: "Bits to shift" has the value "+3". The input bit pattern is shifted right by three bits
when the system function is called: 0000000000001001.
Bits to the left are padded with "0". Three bits are truncated on the right. The new decimal
value is "9".
Note
The left bit is "1" in a source tag of the data type with negative signed integer. This sign bit is
padded with "0" when the bits are shifted right. The sign changes to "+".
Bits to mask
An integer serves as bit mask. The bit pattern is used to multiply the shifted input bit pattern.
Example: Integer "2478" with the bit pattern "0000100110101110".
Note
If you change the device version of the target HMI device after configuration (e.g."13.1.0" to
"13.0.0" or vice versa), you must check and test the parameters of this system function.
You can use the "Char" and "Word" data types for the "Source tag" and "Target tag" parameters as
of device version 13.1.0. In the device versions before 13.1.0, these parameters must be
assigned other data types:
• Use "SInt" instead of "Char"
• Use "Int" instead of "Word"
Otherwise, there may be unwanted effects, for example incorrect or unexpected behavior of the
configured system functions.
1.1.81 ShowAlarmWindow
Description
Hides or shows the alarm window on the HMI device.
Parameter
Object name
Name of the alarm view which is hidden or shown.
Display mode
Determines whether the alarm window is hidden or shown:
0 (hmiOff) = Off: Alarm view is hidden
1 (hmiOn) = On: Alarm view is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes
1.1.82 ShowOperatorNotes
Application
Displays the tooltip configured for the selected object.
If the system function is configured on a function key, the tooltip for the screen object that
currently has the focus is displayed. If a tooltip is configured for the screen itself, you can
switch to this text by pressing <Enter> or by double-clicking on the help window.
If the system function is configured on a button, only the tooltip for the current screen is
displayed. If a tooltip is configured on the button itself, initially only the tooltip for the button
is displayed. You can press <Enter> or double-click on the help window to switch to the
tooltip for the current screen.
Note
No other screen object can be used while the help window is open. To use the screen object,
close the help window.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameter
Display mode
Determines whether the configured tooltip is hidden or shown:
0 (hmiOff) = Off: Configured tooltip is hidden
1 (hmiOn) = On: Configured tooltip is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes
1.1.83 ShowPopUpScreen
Description
Opens the pop-up-screen, for example, when a button is pressed.
You can enter a constant value or assign a tag as coordinates.
If the configured pop-up screen is not visible or only partially visible, the coordinates are set
to 0.0.
Regardless of the size of the permanent area, the start position of the coordinates is always
0.0.
Parameters
X coordinate
Position of the pop-up screen in the current screen on the X axis
Y coordinate
Position of the pop-up screen in the current screen on the X axis
Display mode
Specifies the mode for the pop-up screen:
Switching
Off
On
Animation
Specifies the direction from which the pop-up screen is shown:
Off
Left
Top
Right
Bottom
Animation speed
Specifies the speed at which the pop-up screen is shown:
Slow
Medium
Fast
1.1.84 ShowPopupScreenSizable
Description
Opens the pop-up screen with a defined size. You can open a pop-up screen in a different size
with this system function; the scroll bars are displayed for navigating in the content of the pop-
up screen.
You can enter a constant value or assign a tag as coordinates. If the configured pop-up screen
is not visible or only partially visible, the coordinates are set to 0.0. Regardless of the size of
the permanent area, the start position of the coordinates is always 0.0.
You also define the displayed width and height of the pop-up screen, which can deviate from
the sizes of the configured pop-up screen. The scroll bars are displayed in the pop-up screen
in this case.
Note
Operation on HMI devices with keys
You scroll in pop-up screens using the keyboard shortcut <ALT>+<arrow key>.
Parameters
X coordinate
Position of the pop-up screen in the current screen on the X axis
Y coordinate
Position of the pop-up screen in the current screen on the X axis
Width
Specifies the width of the pop-up screen. The maximum width must not exceed the screen
width of the configured HMI device.
Height
Specifies the height of the pop-up screen. The maximum height must not exceed the screen
height of the configured HMI device.
Display mode
Specifies the mode for the pop-up screen:
Switching
Off
On
Animation
Specifies the direction from which the pop-up screen is shown:
Off
Left
Top
Right
Bottom
Animation speed
Specifies the speed at which the pop-up screen is shown:
Slow
Medium
Fast
1.1.85 ShowSlideInScreen
Description
Calls the slide-in screen, for example, when operating a button.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameters
Screen name
Specifies the slide-in screen that appears in Runtime when a button is pressed:
Top Slide-in screen
Bottom Slide-in screen
Left Slide-in screen
Right Slide-in screen
Mode
Specifies the mode for the slide-in screen:
Switching
Off
On
1.1.86 ShowSoftwareVersion
Description
Hides or shows the version number of the runtime software.
Use this system function if during servicing, for example, you required the version of the
runtime software used.
Parameter
Display mode
Determines whether the version number is shown:
1.1.87 ShowSystemAlarm
Description
Displays the value of the parameter passed as a system event to the HMI device.
Parameter
Text/Value
The text or the value, which was output as a system alarm.
1.1.88 ShowSystemDiagnosticsWindow
Description
Hides or shows the system diagnostic window on the HMI device. The system diagnostic view is
only available in the global screen for Comfort Panels and for WinCC Runtime Advanced.
Parameters
Screen object
Name of the system diagnostic window which is hidden or shown.
1.1.89 StartLogging
Description
Starts the logging of data or alarms in the specified log. The function can also be applied to audit
trails.
You can interrupt logging at runtime using the "StopLogging" system function.
Parameter
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail
Log
Name of the log which is started.
1.1.90 StartNextLog
Description
Stops the logging of data or alarms for the given log.
Logging is continued in the next log of the segmented circular log you configured for the
specified log.
If you did not configure a segmented circular log for the specified log, the system function
has no effect.
Parameter
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
Log
Name of the log for which the logging is stopped and continued in the next log.
1.1.91 StartProgram
Description
Starts the specified program on the HMI device.
The runtime software continues running in the background. Alarms continue to be output
and data continues to be updated.
When the given application is exited, the screen which was active during the performance of
the system function is displayed on the HMI device.
This system function is used, for example, to edit recipe data records in MS Excel on the HMI
device.
Note
If Windows CE is installed on the HMI device, during the configuration it must be checked
whether the desired application can be started with this system function.
This system function allows all applications to be started which can be started in the "Execute"
dialog of Windows CE.
The application to be started must be installed on the HMI device.
Note
If an application is not executed via the "StartProgram" function on a Mobile Panel or Comfort
Panel, check the path specification of the system function. On Mobile Panels and Comfort
Panels, some applications are located in the folder "\flash\addons".
Parameter
Program name
Name and path of the program which is started. Upper and lower case are taken into account
in this parameter.
Note
If the path contains spaces, the program can only be started correctly if the path is specified in
inverted commas, e.g. "C:\Program Files\START\start.exe".
Program parameters
The parameters you transfer at the start of the program, for example a file that is opened
after the start of the program.
The description of the necessary parameters is found in the documentation of the program
to be started.
Display mode
Determines how the program window is displayed on the HMI device:
0 (hmiShowNormal) = Normal
1 (hmiShowMinimized) = Minimized
2 (hmiShowMaximized) = Maximized
3 (hmiShowMinimizedAndInactive) = Minimized and inactive
Note
The "Wait for program to end" parameter is only available for Runtime Advanced and Panels.
1.1.92 StopLogging
Description
Stops the logging of process values or alarms in the specified log. The function can also be
applied to audit trails.
The "StartLogging" system function is used to resume logging at runtime.
Note
When logging is stopped, a connection between WinCC and the log files or log database still
exists. Use the "CloseAllLogs" system function to disconnect this connection.
Parameter
Log type
Determines the type of log:
0 (hmiTagArchive) = Tag log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail
Log
Name of the log that is stopped.
Application example
You are in runtime and want to change the data medium on which the process values are logged.
Notes on configuring
Configure the "StopLogging" and "CloseAllLogs" system functions on the "Close Archive"
button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When the button "Close Archive" is pressed, the specified log is stopped and all open logs
are closed. The data medium can be changed. The "Open Archive" button opens all logs and
continues logging in the specified log.
1.1.93 StopRuntime
Description
Exits the runtime software and thereby the project running on the HMI device.
Parameters
Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)
Example
The following program code shuts down Runtime and the operating system.
1.1.94 TerminatePROFIsafe
Description
Disconnects the PROFIsafe connection for fail-safe operation between a KTP Mobile Panel and
the PLC.
After execution of the system function "TerminatePROFIsafe", the connector of the KTP
Mobile Panel can be removed from the PLC without the system signaling an error.
Parameters
--
1.2.1 ActivateScreen
Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent area or vice versa.
Parameters
Screen name
Name of the screen to which you change.
Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
• If the focus is in the permanent area when the system function is called up, the permanent
area maintains the focus.
• If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
Note
If the "Reach margin" event is assigned to the "ActivateScreen" system function, only the
value "0" is valid for the "Object number" parameter. The active object is not defined by the
object number, but rather by the X position it had prior to the screen change.
Example
The following program code activates "Screen_2" with the ActivateScreen function, for example,
when you click a button.
Sub ActivateScreen_2()
'User-defined code
'' i. e. when pressing a button
ActivateScreen "Screen_2",0
1.2.2 ActivateScreenInScreenWindow
Description
Performs a screen change to the specified screen in a specified screen window.
Parameters
Screen name
Name of the screen to be displayed in the screen window.
Screen window
Name of the screen window in which the new screen is to be displayed.
Example
The ActivateScreenInScreenWindow function is used in the following program code to activate
the "Screen_2" screen when you click a button.
{
// User defined code
// i.e. when pressing a button
ActivateScreenInScreenWindow (GetParentScreen(screenName),
GetParentScreenWindow(screenName), "Screen_2");
...
}
1.2.3 DecreaseTag
Description
Subtracts the given value from the tag value.
X=X-a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system function
to assign the tag value to the auxiliary tags.
If you configure the system function for events of an alarm and the tag is not being used in
the current screen, it is not ensured that the actual tag value is being used in the PLC. You
can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag
The tag from which the given value is subtracted.
Value
The value which is subtracted.
Example
The following program code decrements the value at the varX tag by the value at the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.
{
BYTE varX;
BYTE value;
//user input
...
BYTE old_value = varX;
//Decrease tag
DecreaseTag(varX, value);
1.2.4 ExportImportUserAdministration
Description
Exports all users of the user administration of the currently active project to the given file or
imports the users from the given file into the currently active project.
Users, their passwords and rights are saved in the user administration.
All users are overwritten when importing. The imported users are valid immediately.
Note
Exporting and importing of the user administration from V14 is not supported on HMI devices
with a Runtime version older than V14.
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".
Parameter
File name
Name of the file which contains the passwords or to which the passwords are written. Enter
the file location and the file extension (*.txt), for example, "C:\TEMP\Passwords.txt".
Note
If a storage card is used as file location, specify the file location as follows:
"\StorageCard\<FileName".
Direction
Specifies whether passwords are exported or imported:
0 (hmiExport) = Export: Passwords are exported.
1 (hmiImport) = Import: Passwords are imported.
1.2.5 GetParentScreen
Description
The function determines the name of the parent screen from a specified screen path.
Parameters
Screen
The structure of the transferred "Screen" parameter must correspond to that formed by the
graphics system for screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Screen
_name>...
If you use the object list in the function list to specify the parameter, the screen name is
entered instead of the screen path.
Note
The "." character is used to distinguish between screen and screen object names. The ":"
character is used for the hierarchy structuring. Therefore, use only the "-" or "_" as a delimiter in
the name designations.
Return value
Name of the parent screen.
Principle
A "Screenwindow_1" screen window is in a "Screen_1" screen. In the screen window, the screen
becomes "Screen_2" with the "Screenwindow_2" screen window, etc.
Screen path: Screen_1.Screenwindow_1:Screen_2.Screenwindow_2:Screen_3
GetParentScreen returns:
• "Screen_2", if the system function is called in the "Screen_3" screen.
• "Screen_1", if the system function is called in the "Screen_2" screen.
GetParentScreenwindow returns:
• "Screenwindow_2", if the system function is called in the "Screen_3" screen.
• "Screenwindow_1", if the system function is called in the "Screen_2" screen.
1.2.6 GetParentScreenWindow
Description
The function determines the name of the parent screen window from a transferred screen path.
Parameters
Screen
The structure of the transferred "Screen" parameter must correspond to that formed by the
graphics system for screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Screen
_name>...
If you use the object list in the function list to specify the parameter, the screen name is
entered instead of the screen path.
Note
The "." character is used to distinguish between screen and screen object names. The ":"
character is used for the hierarchy structuring. Therefore, use only the "-" or "_" as a delimiter in
the name designations.
Return value
Name of the parent screen window.
Principle
A "Screenwindow_1" screen window is in a "Screen_1" screen. In the screen window, the screen
becomes "Screen_2" with the "Screenwindow_2" screen window, etc.
Screen path: Screen_1.Screenwindow_1:Screen_2.Screenwindow_2:Screen_3
GetParentScreen returns:
• "Screen_2", if the system function is called in the "Screen_3" screen.
• "Screen_1", if the system function is called in the "Screen_2" screen.
GetParentScreenwindow returns:
• "Screenwindow_2", if the system function is called in the "Screen_3" screen.
• "Screenwindow_1", if the system function is called in the "Screen_2" screen.
1.2.7 IncreaseTag
Description
Adds the given value to the value of the tags.
X=X+a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system function
to assign the tag value to the auxiliary tags.
If you configure the system function for events of an alarm and the tag is not being used in
the current screen, it is not ensured that the actual tag value is being used in the PLC. You
can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag
The tag to which the given value is added.
Value
The value that is added.
Example
The following program code increments the value of the varX tag by the value in the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.
{
BYTE varX;
BYTE value;
//user input
...
BYTE old_value = varX;
//Increase tag
IncreaseTag(varX, value);
1.2.8 InverseLinearScaling
Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the linear
function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
X
The tag which is assigned the value calculated from the linear equation.
Y
The tag that contains the value used for calculation.
b
The value which is subtracted.
a
The value through which is divided.
Example
The following program code assigns a value to the varX tag by means of the InverseLinearScaling
function.
{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
1.2.9 InvertBit
Description
Inverts the value of the given tag of the "Bool" type:
• If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
Parameters
Tag
The tag whose bit is set.
Example
The following program code inverts the value of the Boolean tag bStatus and outputs the result
along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Invert Bit
InvertBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Invert variable
invertBit(bStatus);
1.2.10 InvertBitInTag
Description
Inverts a bit in the given tag:
• If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.
Parameters
Tag
The tag in which the given bit is set.
Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted
from right to left. The counting begins with 0.
Example
The following program code inverts a bit at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bStatusWord;
BYTE bsaved = bStatusWord;
BYTE bitposition = 2;
1.2.11 LinearScaling
Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the linear
function Y= (a *X) + b.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
Y
The tag which is assigned the value calculated from the linear equation.
a
The value with which is multiplied.
X
The tag that contains the value used for calculation.
b
The value that is added.
Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.
{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);
1.2.12 LookupText
Description
Identifies an entry from a text list. The result depends on the value and on the selected runtime
language. The result is saved to a tag of data type "String".
Parameters
Output text
The tag to which the result is written.
Index
The tag that defines the value of the list entry.
Language
Defines the runtime language in which the list entry is identified.
• Runtime language
Language code as per VBScript reference, for example, "de-DE" for German (Germany) or "en-
US" for English (United States of America). The selection depends on the activated runtime
languages.
• Tag
The tag that contains the language. Enter the runtime language as decimal value of the
country ID, for example, 1031 for German - Standard, 1033 for English - USA. Details are
available in the VBScript basics, "Locale identifier (LCID) diagram".
• Integer
The number that corresponds to the order of runtime languages for language switching.
The selection depends on the activated runtime languages, for example, "0" for the language
that appears when you first start runtime. You can find more information under the topic of
"Languages in Runtime".
Text list
Defines the text list. The list entry is read from the text list.
1.2.13 ResetBit
Description
Sets the value of a "Bool" type tag to 0 (FALSE).
Parameters
Tag
The BOOL type tag which is set to 0 (FALSE).
Example
The following program code sets the value of the Boolean tag bStatus to 0 by means of the
ResetBit function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=1
myTag.Value=bValue
'Reset Bit
ResetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 1;
BOOL bSaved = bStatus;
//Reset bit
ResetBit (bStatus);
1.2.14 ResetBitInTag
Description
Sets a bit in the specified tag to 0 (FALSE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.
Parameters
Tag
The tag in which a bit is set to 0 (FALSE).
Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Example
The following program code sets a bit to 0 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
'Reset Bit
bitposition=2
ResetBitInTag myTag, bitposition
bValue=myTag.Value
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 2;
bSaved = GetTagByte("bStatusWord");
1.2.15 SetBit
Description
Sets the value of a "Bool" type tag to 1 (TRUE).
Parameters
Tag
The BOOL type tag which is set to 1 (TRUE).
Example
The following program code sets the value of the Boolean tag bStatus to 1 by means of the SetBit
function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=0
myTag.Value=bValue
'Set Bit
SetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Set bit
SetBit (bStatus);
1.2.16 SetBitInTag
Description
Sets a bit in the given tag to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system function
instead.
Parameters
Tag
The tag in which a bit is set to 1 (TRUE).
Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Note
The guaranteed update of the tags used with actual process values is absolutely conditional in
terms of reliable functionality. You should therefore configure the tag in an I/O field or assign the
system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.
Example
The following program code sets a bit to 1 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 1;
bSaved = GetTagByte("bStatusWord");
1.2.17 SetLanguage
Description
Toggles the language on the HMI device. All configured text and system events are displayed on
the HMI device in the newly set language.
Parameter
Language
Determines which language is set on the HMI device. The following specifications are
possible:
• -1 (hmiToggle) = Toggle: Changes to the next language. The sequence is determined during
configuration in the "Project languages" editor.
• Number you have defined under "Languages and fonts" in the "Runtime Settings" editor.
Changes to the language with the given number.
• Language you have defined under "Languages and fonts" in the "Runtime Settings" editor.
• Language abbreviation in accordance with the VBScript5 reference: This changes to the
language corresponding to the specified language code, e.g. "de-DE" for German (Germany)
or "en-US" for English (United States).
An overview of the language abbreviations is available in the basic information of VBScript
under the topic "Area diagram-ID (LCID) Diagram".
1.2.18 SetPropertyByConstant
Description
Specifies the value of an object property as a string.
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property is changed.
Value
The value assigned to the property.
Example
The SetPropertyByConstant function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object is
set to the value 26.
{
//Programming language: C
//Name of the picture: Trends
//Name of the f(t) trend view control: Control_1
{
//Programming language: C
//Name of the picture: Trends
Alternatively, use the password ZERO or a space string instead of the second parameter
(object).
1.2.19 SetPropertyByProperty
Description
Specifies the value of an object property with another object property.
Parameters
Screen name
Name of the screen that contains the object.
Object
Name of the object whose property value is transferred to the target object.
Property name
Name of the property whose value is transferred to the target object.
Example
The following program code uses the SetPropertyByProperty function to set the property
"ToolbarButtonClick" of the object "Control_1" in the original screen Trend_1": on the
corresponding property in the destination screen "Trend_2".
{
//Programming language: C
//Name of source picture: Trend_1
//Name of target picture: Trend_2
//Name of the f(t) trend view control: Control_1
1.2.20 SetPropertyByTag
Description
Specifies the value of an object property with a tag value.
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object containing the property to be set with the tag value.
Tag name
Name of the tag that contains the value of the property.
Example
The SetPropertyByTag function is used in the following program code to change an object
property: When you click on the object, the object name and the screen in which the object is
located are transferred. The CaptionText in the screen window contains the value of the
HMI_value_1 tag.
{
//Programming language: C
SetPropertyByTag (screenName, objectName, "CaptionText", "HMI_value_1");
Example
The SetPropertyByTag function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object is
set to the value 26.
{
//Programming language: C
//Name of the picture: Trends
//Name of the f(t) trend view control: Control_1
1.2.21 SetPropertyByTagIndirect
Description
Writes the value of an indirect addressed tag to an object property. The tag transferred as
parameter contains the name of a second tag the value of which is read.
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property you want to change.
Tag name
Name of the tag which, in turn, contains the name of the tag whose value is read.
Example
The SetPropertyByTagIndirect function is used in the following program code to change an
object property: .
{
//Programming language: C
SetPropertyByTagIndirect (GetParentScreen(screenName), GetParentScreenWindow(screenName),
"ScreenName", "HMI_value_1");
1.2.22 SetTag
Description
Assigns a new value to the given tag.
Note
This system function can be used to assign strings and numbers, depending on the type of tag.
Parameters
Tag
The tag to which the given value is assigned.
Value
The value which the given tag is assigned.
Note
The "SetTag" system function is only executed after a connection has been established.
Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.
{
BOOL ok;
BOOL bvalue;
1.2.23 SetTagByProperty
Description
Specifies a tag value with the value of an object property. The change is also logged in the alarm
system.
Parameters
Tag name
Name of the tag whose value is specified by the object property.
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property supplies the tag value.
Example
The following program code returns the value of the selected text when you click in a combo box.
{
char* rt_value;
...
}
1.2.24 SetTagByTagIndirect
Description
Writes the value of an indirect addressed tag to a tag. The tag transferred as parameter contains
the name of a second tag the value of which is read. The change in the alarm system is logged
via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag which supplies the tag value.
Example
The following program code writes the value of the tag Tag4 to the tag Tag1.
{
SetTag ("IndirectRead", "Tag4");
SetTagByTagIndirect ("Tag1", "IndirectRead", hmiWithoutOperatorEvent);
...
}
1.2.25 SetTagIndirect
Description
Writes a value to an indirect addressed tag. The tag transferred as output parameter contains the
name of a second tag the value of which is changed by the function. The change in the alarm
system is logged via an operator input alarm.
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Value
Value which is to be written.
Example
The following program code writes the value "value" to the tag Tag3.
{
int value;
1.2.26 SetTagIndirectByProperty
Description
Writes the value of an object property to an indirectly addressed tag. The tag transferred as
output parameter contains the name of a second tag the value of which is changed by the
function. The change in the alarm system is logged via an operator input alarm.
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property supplies the value.
Example
The following program code writes the value of the object property "Background color" to the tag
Tag2.
{
SetTag ("IndirectWrite", "Tag2");
SetTagIndirectByProperty ("IndirectWrite", screenName, objectName, "BackColor",
hmiWithoutOperatorEvent);
...
}
1.2.27 SetTagIndirectByTagIndirect
Description
Writes the value of an indirectly addressed tag to an indirectly addressed tag. The tag transferred
as output parameter contains the name of a second tag the value of which is changed by the
function. The tag transferred as parameter contains the name of a second tag the value of which
is read. The change in the alarm system is logged via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Tag name
Name of the indirect tag that returns the tag value.
Example
The following program code writes the value of the tag "Tag4" to the tag "Tag2".
{
SetTag ("IndirectWrite", "Tag2");
SetTag ("IndirectRead", "Tag4");
SetTagIndirectByTagIndirect ("IndirectWrite", "IndirectRead");
...
}
1.2.28 SetTagWithOperatorEvent
Description
Specifies the value for a tag. The change is also logged in the alarm system.
Parameters
Value
Value written to the tag.
Example
The following program code transfers the value from the "value" tag to the "result" tag when you
click the corresponding button.
//Programming language: C
{
SetTagWithOperatorEvent ("result", "value");
...
}
1.2.29 ShowBlockInTIAPortalFromAlarm
Description
Switches from the alarm view to the affected program code of the selected project in the
engineering system. Changing from the alarm view to the project in the TIA Portal enables
further analysis of the program code, for example, search for a missing contact in the interlock.
You configure this system function at a screen object, for example, a button or a button of
the toolbar in an alarm view. When you click the button, the necessary context is stored by
the system and the corresponding location is automatically displayed in the program code
after switching to the engineering system. You use the Write protection parameter to specify
which authorization is required to enable the switch to the engineering system.
If you have configured the system function to a button, the TIA Portal is started in the mode
that was specified with the write protection parameter. To enable different levels of security
when accessing the system function, configure the buttons with two different authorizations:
• For the first button, configure the authorization for unlimited access by setting the write
protection parameter to FALSE.
• For the second button, configure the authorization so that data cannot be changed by setting
the write protection parameter to TRUE.
Parameters
Write protection
Specifies whether the project is opened in read-only mode.
TRUE (default): TIA Portal is opened in read mode, the user cannot make any changes.
FALSE: TIA Portal is opened with read and right authorization.
Offline mode
Specifies whether the project is opened in offline mode.
TRUE: The TIA Portal does not go to online mode after the block is opened.
FALSE (default): Online mode is started after the block is opened.
Error tag
If an error occurs, information about the error is provided by the error tag.
1.2.30 ShowLogonDialog
Description
Opens a dialog on the HMI device with which the user can log on to the HMI device.
Parameters
--
1.2.31 ShowPLCCodeViewFromAlarm
Description
Switches from the alarm view with the selected ProDiag alarm or selected GRAPH alarm to the
PLC code view with the respective network. The screen that contains the PLC code view is either
opened in a root screen or in a screen window. No commas are permitted in the name of the PLC
from which the alarm originates.
Parameters
Error tag
If an error occurs, information about the error is provided by the error tag.
Error messages
The following errors can be reported back using the error tag:
1.2.32 StopRuntime
Description
Exits the runtime software and thereby the project running on the HMI device.
Parameters
Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)
Example
The following program code shuts down Runtime and the operating system.
VBScript
If you have worked with Visual Basic or Visual Basic for applications, then VBScript will seem
familiar to you. If you do not know Visual Basic and are getting familiar with it, then you will learn
all Visual Basic programming languages at once. The step-by-step guides from Microsoft Press
are a good introduction to programming.
You will find fundamental information on VBScript language elements on the Microsoft
homepage:
http://msdn.microsoft.com/en-us/library/t0aew7h6.aspx
Local ID (LCID)
An overview of all language codes can be found on the Microsoft homepage:
http://msdn.microsoft.com/en-us/goglobal/bb964664
Local ID (LCID)
An overview of all language codes can be found on the Microsoft homepage:
http://msdn.microsoft.com/en-us/goglobal/bb964664 (http://msdn.microsoft.com/en-us/
goglobal/bb964664)
1.4.2 CreateObject
Function
This function generates a reference to an automation object.
Syntax
CreateObject (object)
Parameters
Object
A string that contains the ProgID of the object to be generated.
Return value
Outputs a reference to an automation object.
Notes
Use the CreateObject function to generate invisible ActiveX controls in Runtime. CreateObject
cannot be used to generate graphic objects such as TreeView Control or ListView Control. The
objects generated with CreateObjekt do not respond to events. To generate objects that respond
to events, use the CreateObjectWithEvents function. The following table shows the ProgIDs for
ActiveX Controls without events:
Control ProgID
Microsoft CE File control 6.0 .file
Microsoft CE FileSystem control 6.0 .filesystem
Microsoft CE ImageList control 6.0 CEimageList.imagelistctrl
Example
Dim f, fwModeAppend
Set f = CreateObject("FileCtl.File")
fwModeAppend=8
f.Open "\Storage Card\testfile.txt", fwModeAppend
f.Close
Library
FILECTLdtl
DLL
Mscefile.dll
• LOF
• Seek
The File control element supports the following properties:
• Close (File)
• Get
• Input
• Input
• InputFields
• LineInputString
• LinePrint
• Open
• Put
• WriteFields
1.4.4 Properties
1.4.4.1 Attr
Function
This property outputs a number that identifies the file mode that was used to open the file.
Syntax
File.Attr
Parameters
File
Reference to a "File" control.
Return values
The values shown in the following table indicate the access mode. If the return value is 0, the
file is closed.
Constant Value
None 0
fsModeInput 1
fsModeOutput 2
fsModeRandom 4
fsModeAppend 8
fsModeBinary 32
Notes
"Attr" is a read-only property. Use the Open method of the "File" control to specify the file mode.
1.4.4.2 EOF
Function
This property outputs True when the end of a file is reached which was opened for random or
sequential input.
Syntax
File.EOF
Parameters
File
Reference to a "File" control.
Notes
Use the EOF property to avoid errors that occur due to reading after the end of a file.
The EOF property outputs False until the end of the file is reached. For files which were
opened with fsModeRandom or fsModeBinary, False is output until the last executed Get
statement returns no complete data record.
For files that were opened in the fsModeBinary mode, an attempt is made to read the file
with the input function until EOF outputs True and an error is generated. If you want to
read binary data with input, use the properties LOF and LOC instead of EOF or use Get in
conjunction with EOF. For files that were opened with fsModeOutput, EOF always outputs
True.
1.4.4.3 Loc
Function
This property outputs a number that names the current read/write position.
Syntax
File.Loc
Parameters
File
Reference to a "File" control.
Notes
For files which were opened with fsModeRandom, Loc outputs the last entry that was read or
written as number. For files which were opened in all other modes, Loc outputs the position of
the last read or written byte.
1.4.4.4 LOF
Function
This property outputs the size of a file, in bytes as number.
Syntax
File.LOF
Parameters
File
Reference to a "File" control.
Notes
The LOF property can be used in combination with the Loc property to to ensure that a read
operation does not extend beyond the end of a file.
1.4.4.5 Seek
Function
This property sets the next position that is to be read or written in a file and outputs this.
Syntax
File.Seek [= Position]
Parameters
File
Reference to a "File" control.
Position
Numerical address that describes the position in a file.
Notes
The Seek property writes the next file position, by contrast the Loc property describes the current
file position. The number output for Seek is always one higher than that for Loc. The only
exception to this is when a file was opened new; in this case, both Seek and Loc output one.
An error is output if Seek produces a negative value or zero.
1.4.5 Methods
1.4.5.1 Close
Function
This method closes an open "File" control.
Syntax
File.Close
Parameters
File
Reference to a "File" control.
Output values
None.
Notes
Use the Open method to open a file.
1.4.5.2 Dir
Function
This method outputs the name of a file or a directory that fits in a specific pattern or contains a
specific attribute.
Syntax
FileSystem.Dir (Pathname,[Attributs])
Parameters
File
Reference to a "FileSystem" control.
Pathname
Optional: A character string expression that describes the file name or path.
Attributs
Optional: A numerical expression whose sum describes the file attribute. If this was omitted,
all files that are in the corresponding path are output.
The following table shows the parameter settings of the attribute.
Output values
String. A file name made up of the path name and the attributes. Dir outputs a zero length string
("") if the path name is not found.
Notes
Dir supports the use of multi-character wildcards (*) and single-character wildcards (?) for the
description of files that exist multiple times. When used for the first time, you must specify the
path name of the Dir method. If you specify attributes, the path name must also be included.
The Dir method outputs the first file name that matches the path name. If you want to output
additional file names that match the path name, execute Dir again without parameters.
If no further matching file names can be found, Dir returns a zero-length string (""). If a
zero-length string was output, specify the path name by subsequent calling.
1.4.5.3 FileCopy
Function
This method copies the content of a file to another file.
Syntax
FileSystem.FileCopy PathName, NewPathName
Parameters
FileSystem
Reference to a "FileSystem" control.
PathName
Character string that contains the path and the file name.
NewPathName
Character string that contains the file name and the path of the new file.
Output values
None.
Notes
FileCopy outputs an error if the new file does not exist.
1.4.5.4 FileDateTime
Function
This method outputs a Variant (date) that contains the date and the time at which the file was
created or last edited.
Syntax
FileSystem.FileDateTime(Pathname)
Parameters
Filesystem
Reference to a "FileSystem" control.
Pathname
Character string expression that names the file name. The path name may contain a directory.
Output value
Indicates the date on which the file was last edited.
Notes
If a new file does not exist, FileDateTime outputs an error.
1.4.5.5 FileLen
Function
This method outputs the value that describes the length of file in bytes.
Syntax
FileSystem.FileLen(Pathname)
Parameters
Filesystem
Reference to a "FileSystem" control.
Pathname
Character string that describes the file name. The path name may contain a directory.
Output values
Indicates how many bytes a file consists of.
Notes
If the specified file is already open when FileLen is called, the value indicates the size of the file
before this is opened.
1.4.5.6 Get
Function
This method reads data from an open file into a tag.
Syntax
File.Get Data, [Recnumber]
Parameters
File
Reference to a "File" control.
Data
Variant tag into which the data is read.
Recnumber
Optional: Number at which reading begins. For files that were opened in binary mode,
Recnumber defines the byte position.
Output values
None.
Notes
Data that is read with the Get method is usually written to the file with the Put method. The first
data record or the first byte in a file is in position 1, the second in position 2 and so on. If you skip
Recnumber, the next data record or the next byte that follows the last Get or Put method (or
which was referred to by the Seek method) is read.
The following rules apply to files which were opened in random mode:
• If the length of the read data is shorter than the length defined in length clause of the Open
method, Get reads the following data records in the length of the data record limit. The space
between the end of a data record and the start of the next data record is filled the content of
the file buffer. Because it is not possible to precisely determine the scope of the filled data, it
is advisable that the length of the data records matches the length of the data to be read.
• If the data is a numeric type variant, Get reads 2 bytes to determine the VarType of the variant
and then reads the data that is written to the tag. If, for example, a variant of type VarType3
reads 6 bytes with Get, 2 bytes identify the variant as VarType 3 (long) and 4 bytes contain
long data. The data record length is defined in the length clause. When the open method is
used, the data record length must be at least 2 bytes larger than the number of bytes required
to save the tag.
• The Get method can be used to read a variant array from the memory. However, it cannot be
used to read a scalar variant that contains an array. No objects can be read from the memory
with Get.
• If the variant that is to be read is type VarType 8 (string), Get reads 2 bytes and identifies the
variant as VarType 8, 2 additional bytes define the length of the string and the data of the
string is then read. The data record length of the open method defined by the length clause
must be at least 4 bytes greater than the length of the string.
• If the tag to be written is a dynamic array, Get reads the descriptor whose length is 2 plus 8
times the number of dimensions (2 + 8 * NumberOfDimensions). The data record length of
the open method defined by the length clause must be greater than or equal to the sum of
bytes required to read the array data and the array descriptor.
For files which are opened in binary mode, the length clause of the open method
has no effect. Get reads all tags jointly from the memory without filling between the
files.
1.4.5.7 GetAttr
Function
This method outputs a value that describes the attributes of a file or folder.
Syntax
FileSystem.GetAttr(Pfadname)
Parameters
FileSystem
Reference to a "FileSystem" control.
Pathname
Character string that describes the file name or folder name. The path name may contain a
directory.
Output values
A numerical expression whose sum describes the attributes of a file or folder. The following table
shows the possible values.
Notes
To specify the set attributes, use the And operator to execute a bitwise comparison of the values
returned by GetAttr and the values of the attribute selected by you.
1.4.5.8 Input
Function
This method outputs a string that contains the characters from a file opened in input or binary
mode.
Syntax
File.Input(Number)
Parameters
File
Reference to a "File" control.
Number
Numerical expression that defines the number of output characters.
Output values
A character string that consists of characters read from a file.
Notes
Data that is read with the Input method is generally written to the file with LinePrint or Put
methods. Use this method only for files which were opened in input or binary mode.
In contrast to the LineInputString method, the Input method outputs all read characters, for
example commas, carriage returns, line feeds, quotation marks and leading spaces.
Any attempt to read the file with the Input method before the EOF function returns "True" will
cause an error in files that were opened for binary access. To avoid this error, use the LOF and
Loc functions instead of the EOF function to read binary files with the Input method or use
Get in combination with the EOF function.
1.4.5.9 InputB
Function
This method returns bytes from a file opened in input or binary mode.
Syntax
File.InputB(Number)
Parameters
File
Reference to a "File" control.
Number
Each valid numerical expression that describes the number of output bytes.
Output values
An array that contains the bytes read out from the file.
Notes
Files that are read with the InputIB method are usually written with the LinePrint or Put methods.
Use this method only for files which were opened in Input or Binary mode.
1.4.5.10 InputFields
Function
The method reads data from an open sequential file and outputs a one-dimensional variant data
field.
Syntax
File.InputFields(Number)
Parameters
File
Reference to a "FileSystem" control.
Number
Number of fields which are delimited by commas and are to be read from a file.
Output values
An array that contains fields read from the file.
Notes
Data that is read with the InputFields method is usually written with WriteFields. Use this method
only in files opened in Binary or Input mode. InputFields reads standard string or numeric data
without modifications. The following table shows how InputFields reads other input data:
1.4.5.11 Kill
Function
This method deletes files and folders from the hard disk.
Syntax
FileSystem.Kill Pathname
Parameters
FileSystem
Reference to a "FileSystem" control.
Pathname
A character string that names one or more files that are to be deleted. The path name may
contain a folder.
Output values
None.
Notes
The Kill method supports the use of multi-character wildcards (*) and single-character wildcards
(?) to identify multiple files.
An error is output if you try to delete an open file using the Kill method.
1.4.5.12 LineInputString
Function
This method reads a single line from an open sequential file and links it with a string tag.
Syntax
File.LineInputString
Parameters
File
Reference to a "File" control.
Output values
None.
Notes
Data that is read with LineInput string is usually written to a file with Line Print.
The LineInputString method reads a file character by character until a carriage return sequence
(Chr(13)) or carriage-return/line-feed (Chr(13) + Chr(10)) is reached. Carriage return and line
feed sequences are more often skipped than appended to the character string.
1.4.5.13 LinePrint
Function
This method writes a single line to an open sequential file.
Syntax
File.LinePrint Output
Parameters
File
Reference to a "FileSystem" control.
Output
A character string that is written to the file.
Output values
None
Notes
Data that is written to a file with LinePrint is usually read out with LineInput string.
A carriage return sequence (Chr(13) + Chr(10)) is appended at the end of the string.
1.4.5.14 MkDir
Function
This method creates a new folder.
Syntax
FileSystem.MkDir Pathname
Parameters
FileSystem
Reference to a "FileSystem" control.
Pathname
A character string that contains the folder name.
Output values
None.
Notes
MkDir returns an error if the directory already exists.
1.4.5.15 MoveFile
Function
The method renames an already existing file or a directory and all subdirectories.
Syntax
FileSystem.MoveFile PathName, NewPathName
Parameters
FileSystem
Reference to a "FileSystem" control.
PathName
A character string that contains the file name.
NewPathName
A character string that contains the file name to be copied.
Output values
None.
1.4.5.16 Open
Function
The method opens a file. The following file modes are available: Input (1), Output (2), Random
(4), Append (8), or Binary (32).
Syntax
File.Open Pathname, Mode, [Access], [Lock], [Reclength]
Parameters
File
Reference to a "FileSystem" control.
Pathname
A character string that contains the file name.
Mode
Specifies the file mode: Input (1), Output (2), Random (4), Append (8), or Binary (32).
Access
Optional: Not permitted with open file: Read, Write, or ReadWrite [default]. (1, 2, 3)
Lock
Optional: Actions on the open file that are blocked by other processes: Shared, LockRead,
LockWrite [default] and LockReadWrite. (1, 2, 3, 0).
Reclength
Optional: A number in bytes that is lower than 32,767. For files that were opened with
random access, this value corresponds to the sentence length. For sequential files, this value
is the number of buffered characters.
Output values
None.
Note
The reclength parameter is ignored in Binary mode. If a file was opened in Random mode, you
must define a file size that is greater than zero; otherwise, an error is output.
1.4.5.17 Put
Function
This method writes data from a tag to a file.
Syntax
File.Put Data, [Recnumber]
Parameters
Data
A variant tag that contains data that is to be written to the file.
Recnumber
Optional. Variant (long). Data record number (random mode files) or byte number (binary
mode files) with which the write process starts.
Output values
None.
Notes
Data that is written with Put is usually read out from a file with Get.
The first data record or the first byte in a file is in position 1, the second in position 2 and so
on. If you skip Recnumber, the next data record or the next byte that follows the last Get or
Put method, or which was referred to by the Seek method, is read.
The following rules apply to files that were opened in random mode:
• If the length of the data to be written is shorter than the length defined in the length clause
of the Mopen method, Put writes the following data records in the length of the data record
limit. The space between the end of a data record and the start of the next data record is
filled with the content of the file buffer. Because it is not possible to precisely determine the
length of the filled data, it is advisable that the length of the data records matches the length
of the data to be written. If the length of the data to be written is longer than the length of
the Open method defined in the length clause, an error is output.
• If the tag to be written is a numerical type variant, Put first writes 2 bytes to declare the variant
as VarType and the tag is then written. If, for example, a VarType 3 variant is written, Put
writes 6 bytes, 2 bytes identify the variant as VarType 3 (long) and 4 bytes contain the long
data. The data record length of the open method defined in the length clause must be at least
2 bytes greater than the number of bytes required to save the tag.
• The Pet method may be used to write a variant array to the memory. However, it cannot be
used to write a scalar variant that contains an array. Objects cannot be written with Put to the
hard disk.
• If the version that is to be written is type VarType 8 (string), Put writes 2 Bytes and identifies
the variant as VarType 8, 2 additional bytes define the length of the string and the data of the
string is then written. The data record length of the open method defined by the length
clause must be at least 4 bytes greater than the length of the string.
• If the tag to be written is a dynamic array, Put writes the descriptor whose length is 2 plus 8
times the number of dimensions (2 + 8 * NumberOfDimensions). The data record length of
the open method defined by the length clause must be greater than or equal to the sum of
bytes required to write the array data and the array descriptor.
For files which are opened in binary mode, the length clause of the open method has no
effect. Put writes all tags jointly from the memory with filling between the files.
1.4.5.18 RmDir
Function
This method deletes an empty directory.
Syntax
FileSystem.RmDir Pathname
Parameters
FileSystem
Reference to a "FileSystem" control.
PathName
A character string that contains the file name.
Output values
None.
Notes
The directory must be empty in order to be deleted. A complete path must be specified.
1.4.5.19 SetAttr
Function
This method set the attribute data of a file.
Syntax
FileSystem.SetAttr Pathname, Attributes
Parameters
FileSystem
Reference to a FileSystem Control
Pathname
A character string that contains the file name.
Attributes
A numerical expression that contains the sum of the file attributes. The following table shows
the possible values.
Output values
None.
Notes
A runtime error occurs if you try to set the attributes of an open file.
1.4.5.20 WriteFields
Function
This method writes data to a sequential file.
Syntax
File.WriteFields [Data]
Parameters
File
Reference to a "File" control.
Data
Optional: Variant to be written to a file or variant array of a numerical string or a string
expression.
Output values
None.
Notes
Data that is written with WriteFields is usually read from the file with InputFiles.
If you omit data, a blank line is written to the file.
• The full stop is written as decimal delimiter for numerical data.
• Either #TRUE# or #FALSE# are output for Boolean data. The True and False keywords are not
compiled, regardless of location.
• The time data is written to the file in the universal date format. If either the date or the time
is missing or null, only the existing information is written to the file.
• If the data is empty, nothing is written to the file.
• If the data is null, #NULL# is written to the file.
The WriteFields method adds commas and quotation marks around the strings that are
written to the file. Delimiters do not have to be added to the list. WriteFields inserts a line
break in the form of a carriage-return/line-feed (Chr(13) + Chr(10))- after it has written the
last character of the data to the file.
$FWLYH3URMHFW
$FWLYH6FUHHQ
'DWD6HW
'DWD,WHP
+0,5XQWLPH
/RJJLQJ $ODUPORJV
'DWDORJV
$ODUPV 3URFHVVYDOXHV
$ODUP 3URFHVVYDOXH
6FUHHQV
6FUHHQ $FWLYH6FUHHQ,WHP
'DWD6HW
'DWD,WHP
/D\HUV
/D\HU
6FUHHQ,WHPV
6FUHHQ,WHP
7DJV 7DJ6HW
7DJ 7DJ
Use the WinCC object model of the graphic Runtime system to access objects and tags in
Runtime.
Objects
Objects and lists are provided for access to all the objects in the graphic Runtime systems:
• Display and operating objects
• Screens
• Layers
• Tags
Properties
You can specifically change the display and operating objects and tags in Runtime via the
properties of the individual objects. For example, you can enable a button with a click or trigger
a color change by changing a tag value.
Methods
Methods which are applied to individual objects can be used to read out tag values for further
processing or displaying alarms in Runtime.
Additional information
You can find additional information on the VBS object model in the FAQ with entry ID
"53752382" in the SIMATIC Customer Online Support:
https://support.industry.siemens.com/cs/ww/en/view/53752382 (https://
support.industry.siemens.com/cs/ww/en/view/53752382)
1.5.2 Objects
1.5.2.1 HMIRuntime
Description
+0,5XQWLPH
6FUHHQV 6PDUW7DJV
6FUHHQ 6PDUW7DJ
Application
You use the "HMIRuntime" object, e.g. as follows:
• Read or set the current Runtime language ("Language" property).
• Read name of current base screen or trigger a base screen change by setting a new screen
name (property "BaseScreenName")
• Access tags (List "SmartTags")
• End runtime (Method "Stop")
• Output information on sequence tracing output (Method "Trace")
• Access the screens displayed during runtime (List "Screens")
See also
ActiveScreen (Page 493)
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
Note
The alarm window and the alarm indicator are not contained in the screens list, even if they have
the focus in Runtime.
Application
Use the screen property to return the screen list. In the following example, the background color
is changed from black to green:
'VBS_Example_BackColor
HMIRuntime.Screens("Rootscreen").BackColor = vbGreen
Note
If you perform a screen change, the open references to the screen that is no longer available will
become invalid. As a result, it is no longer possible to work with these references.
1.5.2.3 Screen
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
Represents the process screen which is being displayed on the HMI device at the moment or
the permanent area in runtime. The screen object is returned to you as a result of accessing
the screen list.
The screen object also contains a list of all graphic objects in the screen that can be
addressed through the list "ScreenItems".
Application
You can also use the screen object to do the following:
• Read the height and width of a screen (properties "Height" and "Width").
• Change the background color (property "BackColor").
See also
ScreenItem (Page 193)
1.5.2.4 ScreenItem
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents an object in the specified screen. The ScreenItem object is an element of the
ScreenItems list.
Application
You can use the ScreenItem object to access the properties of graphic objects within a screen,
depending on certain events.
You use the "ScreenItem" object as follows, for example:
• "Visible" property
Switch the visibility of an object on or off.
• "Height" and "Width" properties
Query the width and height of an object.
Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.
'VBS_Example_ScreenItems
Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen
Note
To save memory space in the HMI device, no object names are loaded during transfer of the
project. If you still want to transfer object names, call up the Runtime settings for the respective
HMI device in WinCC. You can change the setting under "General". The object name is required
when the object should be accessed via the object name or for debugging a project.
The "ScreenItem" object has different properties depending on its features. The following
properties are provided for every "ScreenItem" object:
• Enabled
• Height
• Left
• ObjectName
• Parent
• Top
• Type
• Visible
• Width
If a specific object type is addressed, further properties are added to the standard properties.
The additional properties are provided in the descriptions of the individual object types.
1.5.2.5 ScreenItems
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
A list of screen item objects with all screen objects of the given process screen. The list has a
parent property. This property provides a reference to the process screen in which the screen
object is located.
Application
By means of the "ScreenItems" list you are able
• To edit or output all objects within the list (that is, all objects within a screen)
• To count the objects of a screen (property "Count").
• To work on a particular object in the list (method "Item").
Use the screen items property to return an object from the process screen. Use the object
name as an index.
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.
Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen
1.5.2.6 SmartTags
Description
+0,5XQWLPH
6PDUW7DJV
6PDUW7DJ
A list of SmartTag objects which represent all of the tags in WinCC Runtime.
Note
The SmartTags list has a limited range of functions. You can only use the tag names to access a
SmartTag object. Access via the index or by using "For each" instruction is not supported.
Note
In order to access a tag, which has still not been created in the project, using the SmartTags list,
no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.
Note
Current system behavior for dynamic access to elements of a user data type
When you compose the tag name of a user data type element dynamically in Runtime, the
composed tag name is not recognized under the following condition:
• Tag of the data type of the user data type is created.
• Tag is not used, e.g. at an I/O field
Example:
You have configured a user data type "Motor" with the elements "RPM" (Int), "On" (Bool) and
"Off" (Bool). In the project, you have configured the tag "Motor1" as instance of the user data
type. You want to output the values of the elements in only one I/O field in runtime. You have
configured an additional I/O field for input of the element name. The value you enter is saved to
the internal tag strElementName. With the following script you output the value of an element
in the I/O field "IOFieldOutputValue":
Dim strDynElementName, objIOFieldOutputValue
Set objIOFieldOutputValue = objscreen.ScreenItems("IOFieldOutput")
'Get element name from tag value
strDynElementName = SmartTags("strElementName").Value
'Create tag name
objIOFieldOutputValue.ProcessValue =
SmartTags("Motor1."+strDynElementName).Value
Help:
Configure a separate I/O field for each user data type element, for example, in an additional
screen. Interconnect the "process value" with the respective user data type element.
Note
Dynamizing faceplates
Use the following syntax to access a tag that is connected at a faceplate interface ("Properties"):
Smarttags("Properties\int_input1_tag")
Application
Use the SmartTags list to return a SmartTag object. Use the tag name to reference the SmartTag
object.
'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure
In Runtime Advanced and Panels you address the tag directly using its name. If the tag name
corresponds to the VBS name conventions, you do not need to use the SmartTags list. Follow
the example below:
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(AirPressure)
HMIRuntime.Trace strAirPressure
1.5.2.7 SmartTag
Description
+0,5XQWLPH
6PDUW7DJV
6PDUW7DJ
Represents the value of the specified process tag. The SmartTag object is an element of the
SmartTag list.
Application
The SmartTag object provides read and write access to the value of the specified process tag. The
SmartTag object does not return an object reference. Use the SmartTags list to return the value
of a process tag. Use the tag name as an index.
Note
With the "SmartTags reads values from the cache" setting, values are read from the process
image (cache) instead of directly from the controller.
The SmartTag object can also read values directly from the controller. However, you can then
expect a substantially higher communication load between the HMI device and the controller.
Example
'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure
Note
In order to access a tag, which has still not been created in the project, using the SmartTags list,
no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.
Note
If you want to return the "TypeName" of a SmartTag object data type with the VBS function
"TypeName", use the following syntax:
TypeName(SmartTags("FillLevel").value)
To access the value of an array element, use "SmartTags("<Tag>[Index]")". Set the number of
the desired array element for "index", for example, "SmartTags("AirPressure[2]")".
1.5.3 Objects
1.5.3.1 Alarm
Description
+0,5XQWLPH
Alarms 3URFHVVYDOXHV
$ODUP 3URFHVVYDOXH
Note
The properties of the alarm object are not automatically updated when the values of the
properties change.
Description
+0,5XQWLPH
Alarms 3URFHVVYDOXHV
$ODUP 3URFHVVYDOXH
Usage
Using the "Alarms" list you can:
• Access a message in the list (Item method)
• Create a new alarm object (Create method)
• Read the alarm ID of the message (AlarmID attribute)
• Generate an instance of the alarm object (Instance property)
• Read the name of the computer on which the message came (ComputerName property)
• Read or set the name of the user who triggered the message (UserName property)
Example
In the following example the alarm with the alarm number "1" configured in the "HMI alarms"
editor is activated.
'VBS360
Dim MyAlarm
Set MyAlarm = HMIRuntime.Alarms(1)
MyAlarm.UserName = "Hans-Peter"
MyAlarm.Create "MyApplication"
See also
AlarmID (Page 502)
Description
/RJJLQJ $ODUPORJV
'DWDORJV
You can use the object to reconnect swapped-out log segments of the alarm log to Runtime
or to remove previously swapped-in log segments of the alarm log. The log segments to be
swapped in are copied to the "Common logging" folder of the WinCC project. The previously
swapped-in log segments are removed from the "Common logging" folder.
You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.
If an error occurs during the operation with log segments, the applied method returns an
error alarm.
Usage
• "Restore" method
Previously swapped-out log segments of the alarm log are connected to Runtime.
• "Remove" method
Previously swapped-in log segments of the alarm log are removed from the Runtime project.
Example
In the following example, log segments from the alarm log are swapped in and the return value
is output as a trace.
'VBS187
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.AlarmLogs.Restore("D:\Folder","2004-09-14","2004-09-20",-1) & vbNewLine
See also
Restore (Page 1339)
Remove (Page 1334)
1.5.3.4 DataItem
Description
+0,5XQWLPH
'DWD6HW
'DWD,WHP
6FUHHQV 'DWD6HW
6FUHHQ 'DWD,WHP
You can use the DataItem object to access the contents of the DataSet list. Values or object
references are stored in the list as DataItem.
Access uses the name under which the value was added to the list. Single access using an
index is not recommended since the index changes during adding or deleting of values. You
can use the index to output the complete contents of the list. The output is in alphabetical
order.
Note
For object references, ensure that the objects are capable of multi-threading.
Example
The example shows how the value of 'Motor1' is output as a trace.
'VBS163
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
The following example enumerates all DataItem objects of the DataSet list. Name and value
are output as a trace.
'VBS164
Dim data
For Each data In HMIRuntime.DataSet
HMIRuntime.Trace data.Name & ": " & data.Value & vbNewLine
Next
Note
The value may not be output directly for objects.
See also
Value (Page 1168)
Name (Page 827)
Description
/RJJLQJ $ODUPORJV
'DWDORJV
You can use the object to reconnect swapped-out log segments of the data log to Runtime
or to delete previously swapped-in log segments of the data log. The log segments to be
swapped in are copied to the "Common logging" folder of the WinCC project. The previously
swapped-in log segments are removed from the "Common logging" folder.
You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.
You also set the type of log ("Fast data log", "Slow data log", "Fast data log and Slow data
log").
If an error occurs during the operation with log segments, the applied method returns an
error alarm.
Usage
• "Restore" method
Previously swapped out log segments of the data log are connected to Runtime.
• "Remove" method
Previously swapped-in log segments of the data log are removed from the Runtime project.
Example
In the following example, log segments from the Fast data log are swapped in and the return
value is output as a trace.
'VBS188
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.DataLogs.Restore("D:\Folder","2004-09-14","2004-09-20",-1,1) &
vbNewLine
See also
Restore (Page 1339)
Remove (Page 1334)
Description
+0,5XQWLPH
'DWD6HW
'DWD,WHP
6FUHHQV 'DWD6HW
6FUHHQ 'DWD,WHP
Using the DataSet object, you can exchange data throughout several actions.
A DataSet object is global and defined by the screen object. You can access the data from any
VBS action.
You address the screen object according to the screen hierarchy . The DataSet object persists
as long as the screen is displayed. The global object persists over the entire runtime time
period.
Note
You cannot include objects with the types Screen, Screens, ScreenItem, ScreenItems, Tag and
TagSet in the DataSet list.
The DataSet object does not support any classes.
Application
Use the "DataSet" list as follows:
• Enumerating
Output or process all objects in the list
• "Count" property
Output the number of elements contained
• "Item" method
Work on a particular object in the list
• "Add" method
Add an object to the list
• "Remove" method
Remove a particular object from the list
• "RemoveAll" method
Remove all objects from the list
Access to list elements is made as follows:
HMIRuntime.DataSet("Itemname")
HMIRuntime.Screens("Screenname").DataSet("Itemname")
DataSet("Itemname")
If upon access the stated name does not exist in the list, VT_Empty is returned and an
Exception is triggered.
Example
The example shows how you check with "Is Nothing" whether the "DataSet" object exists:
The example shows how a value can be entered in the list, read and removed from the list
throughout various actions.
'VBS162
HMIRuntime.DataSet.Add "motor1", 23
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet.Remove("motor1")
See also
RemoveAll (Page 1337)
Remove (Page 1334)
Item (Page 1315)
Add (Page 1254)
1.5.3.7 HMIRuntime
Description
+0,5XQWLPH
$ODUPV
$ODUP
7DJV
7DJ
6FUHHQV
6FUHHQ
'DWD6HW
'DWD,WHP
/RJJLQJ
$FWLYH3URMHFW
$FWLYH6FUHHQ
Usage
You can use the "HMIRuntime" object as follows:
• "Language" property
Read or set the current Runtime language
• "BaseScreenName" property
Read or set the name of the current root screen
• "ActiveProject" property
Read the path of the active Runtime project
• "Tags" property
Accessing tags
• "DataSet" property
Accessing tags in a list
• "Stop" method
Stop Runtime
• "Trace" method
Display messages in a diagnostics window
Example
The following command closes WinCC Runtime:
'VBS3
HMIRuntime.Stop
See also
Trace (Page 1359)
Stop (Page 1359)
Language (Page 759)
Tags (Page 998)
Logging (Page 794)
DataSet (Page 644)
CurrentContext (Page 639)
MenuToolBarConfig (Page 800)
ActiveScreen (Page 493)
BaseScreenName (Page 544)
SmartTags (Page 953)
1.5.3.8 Item
Description
The Item object provides a reference to the current object.
Usage
Use the Item object, for example, to address the properties of the object currently selected in the
screen.
Example
In the following example, you set the background color of the object selected in the screen to
red:
'VBS195
Item.BackColor = RGB(255,0,0)
1.5.3.9 Layer
Description
6FUHHQV
6FUHHQ
/D\HUV
/D\HU
The Layer object returns the result of access to the layers list.
Parent object
Screen in which the screen layer is located
Usage
Depending on certain events, you can use the Layer object to obtain access to the properties of
a complete layer to hide or display a layer with operating elements according to the operator
authorization.
Example
In the following example, Layer 1 is set to "invisible":
'VBS4
Layers(2).Visible = vbFalse
See also
Name (Page 827)
Description
6FUHHQV
6FUHHQ
/D\HUV
/D\HU
Use the layers list to access all 32 layers of the graphical Runtime system.
Parent object
Screen in which the screen layer is located
Usage
You use the "Layers" list as follows:
• "_NewEnum" property
Process all layers in the list
• "Count" property
Count all layers contained in the list
• "Item" method
Process a layer from the list
The properties represent default properties and methods of a list and are not described in
detail in the WinCC documentation.
See also
Item (Page 1315)
1.5.3.11 Logging
Description
+0,5XQWLPH
/RJJLQJ $ODUPORJV
'DWDORJV
You can use the object to reconnect swapped-out log segments to Runtime or to remove
previously swapped-in log segments. The log segments to be swapped in are copied to the
"Common logging" folder of the WinCC project. The previously swapped-in log segments are
removed from the "Common logging" folder.
You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.
If an error occurs during the operation with log segments, the applied method returns an
error alarm.
Usage
• "Restore" method
Previously swapped out log segments of the alarm log and the data log are connected to
Runtime.
• "Remove" method
Previously swapped-in log segments of the alarm log and data log are removed from the
Runtime project.
Example
In the following example, log segments from the alarm log and data log are swapped in and the
return value is output as a trace.
'VBS189
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.Restore("D:\Folder","2004-09-14","2004-09-20",-1) & vbNewLine
See also
Restore (Page 1339)
Remove (Page 1334)
DataLogs (list) (Page 205)
AlarmLogs (list) (Page 202)
1.5.3.12 Project
Description
+0,5XQWLPH
$FWLYH3URMHFW
Using the object, you can query information from the current Runtime project.
The project object is returned as the result of ActiveProject.
Usage
You can read the following using the "Project" object:
• The path of the current Runtime project ("Path" property)
• The name of the current Runtime project, without path or file extension ("Name" property)
Example
The following example returns name and path of the current Runtime project as a trace:
'VBS159
HMIRuntime.Trace "Name: " & HMIRuntime.ActiveProject.Name & vbNewLine
HMIRuntime.Trace "Path: " & HMIRuntime.ActiveProject.Path & vbNewLine
See also
Name (Page 827)
Path (Page 860)
1.5.3.13 Screen
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
Represents the screen which is being displayed on the HMI device at the moment or the
permanent area in runtime. The screen object is returned as a result of accessing the screen
list.
Application
You can use the screen object for the following actions, for example:
• "Width" and "Height" properties
Reading the width and height of a screen
• "BackColor" property
Changing the background color
Use the object name as an index.
Example
In the following example, the background color is changed from black to green:
'VBS_Example_BackColor
HMIRuntime.Screens("Rootscreen").BackColor = vbGreen
Parent object
Screen window in which the screen object is embedded.
If the screen object is the root screen, the parent object is not defined and set to zero.
Note
If you perform a screen change, the open references to screens that are no longer available will
become invalid. As a result, it is no longer possible to work with these references.
Example
In the following example, the width of the first screen is increased by 20 pixels in Runtime:
'VBS7
Dim objScreen
Set objScreen = HMIRuntime.Screens(1)
MsgBox "Screen width before changing: " & objScreen.Width
objScreen.Width = objScreen.Width + 20
MsgBox "Screen width after changing: " & objScreen.Width
HMIRuntime.BaseScreenName = "Screenname"
If you call screens with different formulations in the code, you make them known by the
following section of the CrossReference:
' WINCC:SCREENNAME_SECTION_START
Const ScreenNameInAction = "ScreenName"
' WINCC:SCREENNAME_SECTION_END
The section can be inserted in VBS actions as often as required.
See also
Refresh (Page 1333)
Activate (Page 1250)
ObjectSizeDeclutteringEnable (Page 837)
ObjectSizeDeclutteringMax (Page 838)
ObjectSizeDeclutteringMin (Page 838)
LayerDeclutteringEnable (Page 769)
Layers (Page 770)
DataSet (Page 644)
ExtendedZoomingEnable (Page 682)
AccessPath (Page 492)
1.5.3.14 ScreenItem
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents an object in the specified screen. The ScreenItem object is an element of the
ScreenItems list.
Application
You can use the ScreenItem object to access the properties of graphic objects within a screen,
depending on certain events.
You use the "ScreenItem" object as follows, for example:
• "Visible" property
Switch the visibility of an object on or off.
• "Height" and "Width" properties
Query the width and height of an object.
• "Top" and "Left" properties
Change the position of an object.
• "ObjectName" property
Read the name of a graphic object
• "Parent" property
Set a reference to the parent screen
Use the ScreenItems property to return an object to the screen. Use the object name as an
index.
Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.
'VBS_Example_ScreenItems
Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen
Note
To save memory space in the HMI device, no object names are loaded during transfer of the
project. If you still want to transfer object names, call up the Runtime settings for the respective
HMI device in WinCC. You can change the setting under "General". The object name is required
when the object should be accessed via the object name or for debugging a project.
The "ScreenItem" object has different properties depending on its features. The following
properties are provided for every "ScreenItem" object:
• Enabled
• Height
• Left
• ObjectName
• Parent
• Top
• Type
• Visible
• Width
If a specific object type is addressed, further properties are added to the standard properties.
The additional properties are provided in the descriptions of the individual object types.
See also
Activate (Page 1250)
Layer (Page 764)
ScreenItems (Page 900)
Top (Page 1083)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
A list of ScreenItem objects with all screen objects of the specified screen. The list has a
"Parent" property. This "Parent" property provides a reference to the screen in which the
screen object is located.
Usage
You use the "ScreenItems" list as follows:
• To edit or output all objects within the list (that is, all objects within a screen)
• "Count" property
Count the objects of a screen
• "Item" method
Work on a particular object in the list
Use the screen items property to return an object from the screen. Use the object name as an
index.
Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.
Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen
'Control1 is a WinCC-Control
'VBS197
Dim Control
Set Control=ScreenItems("Control1")
Control.type
Example
In the following example, you output the name of the objects in the current screen in a message
box:
See also
Item (Page 1315)
ScreenItems (Page 900)
Top (Page 1083)
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
Several screens can be opened simultaeously in WinCC Runtime by means of the screen
window technique, whereby there is only one main screen. The "Screens" list allows access
to all open screens in Runtime using the screen name. The screen list contains all hidden
screens.
The access key required in the VBS environment in the HMIRuntime.Screens(<access key>)
instruction must conform to the following syntax description:
Examples
The screens are addressed by specifying the hierarchy in the list. You can address the screens
with or without using the screen names. In the following example, a "BaseScreenName" root
screen is configured with a "ScreenWindow". The screen window contains a "ScreenName"
screen.
'VBS8
Set objScreen = HMIRuntime.Screens("BaseScreenName.ScreenWindow:ScreenName")
'VBS9
Set objScreen = HMIRuntime.Screens("ScreenWindow")
'VBS10
Set objScreen = HMIRuntime.Screens(1)
'VBS11
Set objScreen = HMIRuntime.Screens("")
'VBS12
Set objScreen = HMIRuntime.Screens("BaseScreenName")
See also
Screens (Page 901)
1.5.3.17 SmartTag
Description
+0,5XQWLPH
6PDUW7DJV
6PDUW7DJ
Represents the value of the specified process tag. The SmartTag object is an element of the
SmartTag list.
Application
The SmartTag object provides read and write access to the value of the specified process tag. The
SmartTag object does not return an object reference. Use the SmartTags list to return the value
of a process tag. Use the tag name as an index.
Note
With the "SmartTags reads values from the cache" setting, values are read from the process
image (cache) instead of directly from the controller.
The SmartTag object can also read values directly from the controller. However, you can then
expect a substantially higher communication load between the HMI device and the controller.
Example
'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure
Note
In order to access a tag, which has still not been created in the project, using the SmartTags list,
no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.
Note
If you want to return the "TypeName" of a SmartTag object data type with the VBS function
"TypeName", use the following syntax:
TypeName(SmartTags("FillLevel").value)
To access the value of an array element, use "SmartTags("<Tag>[Index]")". Set the number of
the desired array element for "index", for example, "SmartTags("AirPressure[2]")".
1.5.3.18 SmartTags
Description
+0,5XQWLPH
6PDUW7DJV
6PDUW7DJ
A list of SmartTag objects which represent all of the tags in WinCC Runtime.
Note
The SmartTags list has a limited range of functions. You can only use the tag names to access a
SmartTag object. Access via the index or by using "For each" instruction is not supported.
Note
In order to access a tag, which has still not been created in the project, using the SmartTags list,
no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.
Note
Current system behavior for dynamic access to elements of a user data type
When you compose the tag name of a user data type element dynamically in Runtime, the
composed tag name is not recognized under the following condition:
• Tag of the data type of the user data type is created.
• Tag is not used, e.g. at an I/O field
Example:
You have configured a user data type "Motor" with the elements "RPM" (Int), "On" (Bool) and
"Off" (Bool). In the project, you have configured the tag "Motor1" as instance of the user data
type. You want to output the values of the elements in only one I/O field in runtime. You have
configured an additional I/O field for input of the element name. The value you enter is saved to
the internal tag strElementName. With the following script you output the value of an element
in the I/O field "IOFieldOutputValue":
Dim strDynElementName, objIOFieldOutputValue
Set objIOFieldOutputValue = objscreen.ScreenItems("IOFieldOutput")
'Get element name from tag value
strDynElementName = SmartTags("strElementName").Value
'Create tag name
objIOFieldOutputValue.ProcessValue =
SmartTags("Motor1."+strDynElementName).Value
Help:
Configure a separate I/O field for each user data type element, for example, in an additional
screen. Interconnect the "process value" with the respective user data type element.
Note
Dynamizing faceplates
Use the following syntax to access a tag that is connected at a faceplate interface ("Properties"):
Smarttags("Properties\int_input1_tag")
Application
Use the SmartTags list to return a SmartTag object. Use the tag name to reference the SmartTag
object.
'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure
In Runtime Advanced and Panels you address the tag directly using its name. If the tag name
corresponds to the VBS name conventions, you do not need to use the SmartTags list. Follow
the example below:
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(AirPressure)
HMIRuntime.Trace strAirPressure
See also
SmartTag (Page 225)
1.5.3.19 Tag
Description
+0,5XQWLPH
7DJV 7DJ6HW
7DJ 7DJ
A tag object is returned via the "Tags" list. A tag object can be used to address all the
properties and methods of a tag.
When creating a tag object, all the properties are initialized with the following values:
• Value = VT_EMPTY
• Name = Tag name
• QualityCode = BAD NON-SPECIFIC
• TimeStamp = 0
• LastError = 0
• ErrorDescription = " "
Note
A summary of possible Quality Codes can be found in WinCC Information System under key
word "Communication" > "Diagnostics" or "Communication" > "Quality Codes".
Usage
Use the "Tag" object as follows:
• "Name", "QualityCode", "TimeStamp", "LastError" and "ErrorDescription" properties
Read information on the tag
• "Write" method, "Value" property
Set value of a tag
• "Read" method, "Value" property
Read value of a tag
Example
The following example reads the value in the "Tag1" tag:
'VBS13
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read()
MsgBox objTag.Value
Example
The following example shows the declaration of an "lngVar" VB Script tag:
'VBS14
Dim lngVar
lngVar = 5
MsgBox lngVar
Note
Tag names must not contain any special characters.
When creating a tag, ensure it does not contain a value (Value = VT_EMPTY). Initialize the tags
after declaration with the corresponding value.
HMIRuntime.Tags("Tagname")
are automatically compiled by the CrossReference of WinCC and then listed in the picture
properties.
CrossReference and ChangeObjectReference will work together with the tag name. However,
if the "define", "const" or a string tag are used, CrossReference and ChangeObjectReference
won't work in the Engineering System. The script runs in Runtime.
Note
The WINCC:TAGNAME_SECTION code has no effect??? and must be rewritten during the
migration of a previous project, if necessary.
Note
Compound tag names might not be recognized by the CrossReference.
See also
Name (Page 827)
Value (Page 1168)
ErrorDescription (Page 670)
LastError (Page 763)
QualityCode (Page 875)
TimeStamp (Page 1042)
Description
+0,5XQWLPH
7DJV 7DJ6HW
7DJ 7DJ
The "Tags" list enables access to tags in WinCC Runtime. The result of access to the "Tags" list
is returned by an object of the type "Tag". The Tag object can be used to access all the tag
properties and methods.
Note
"Tags" is a list with a restricted functional scope. The tags in the list cannot be accessed via the
index but only by using the tag names. The standard methods get_Count and get_NewEnum
cannot be used in the Tags list.
Application
Tags in the list are accessed via:
HMIRuntime.Tags("Tagname")
The Tags list is used to declare tags (tag objects) for read and write access. The appropriate
HMI tags must exist in order for the write and read acccess to be executed without error.
You can address HMI tags directly in VBScript and set and read values. If you wish to inquire
about additional tag properties, such as quality code or time stamp, or wish to execute error
processing, you must address the tag through tags list. The tag object returned enables
access to all tag properties and methods.
Using the "CreateTagSet" method, you may generate a TagSet object which allows
simultaneous access to several tags.
Example
You use tag names when you set tags.
'VBS16
Dim objTag
Set objTag = HMIRuntime.Tags("Tagname")
If you only use the tag name, the "TagPrefix" property is assigned the values from the
current context (the current screen window).
Description
The "TagSet" object enables simultaneous access to several tags in one call. Simultaneous access
demonstrates better performance and lower communication load than single access to multiple
tags.
Usage
You can use the TagSet object as follows:
• "Add" method
Add tags to the list
• "Item" method
Access tag objects contained in the list and their properties
• "Write" method
Write all tags of the list
• "Read" method
Read all tags of the list
• "Remove" method
Remove single tags from the list
• "RemoveAll" method
Remove all tags from the list
Tags in the list are accessed via:
'VBS169
Dim myTags
myTags = HMIRuntime.Tags.CreateTagSet
myTags("Tagname")
In order to have error-free read/write access to tags (tag objects) of the list, the respective
tags must exist in WinCC.
If a read/write access error has occurred, the method used will return an error message using
the "LastError" and "ErrorDescription" properties.
Example
The following example shows how to generate a TagSet object, how to add tags, and how to
write values.
'VBS168
'Build a Reference to the TagSet Object
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
'Add Tags to the Collection
group.Add "Motor1"
group.Add "Motor2"
'Set the Values of the Tags
group("Motor1").Value = 3
group("Motor2").Value = 9
'Write the Values to the DataManager
group.Write
See also
ErrorDescription (Page 670)
LastError (Page 763)
Basic objects
Elements
Controls
AlarmControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Alarm view" object. The AlarmControl object is an element of the
ScreenItems list.
Example
In the following example, the object with the name "Control1" is moved 10 pixels to the right:
'VBS54
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 10
AlarmView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Alarm view" object. The AlarmView object is an element of the ScreenItems
list.
If you change the settings for this object with a user-defined function, the changed settings
are retained even after the screen is called again.
Note
The object "Simple AlarmView" cannot be dynamized with a user-defined function.
ApplicationWindow
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Bar
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Bar" object. The Bar object is an element of the ScreenItems list.
BatteryView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Charge condition" object. The BatteryView object is an element of the
ScreenItems list.
See also
Height (Page 720)
Width (Page 1217)
Button
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Button" object. The Button object is an element of the ScreenItems list.
The availability of the following object properties depends on the selected mode of the
"button":
CameraControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
ChannelDiagnose
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
CheckBox
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Check box" object. The CheckBox object is an element of the ScreenItems list.
Circle
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Circle" object. The Circle object is an element of the ScreenItems list.
CircleSegment
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
CircularArc
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "CircularArc" object. The CircularArc object is an element of the ScreenItems
list.
Clock
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Clock" object. The Clock object is an element of the ScreenItems list.
ComboBox
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Check box" object. The ComboBox object is an element of the ScreenItems
list.
Connector
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Connector" object. The Connector object is an element of the ScreenItems
list.
DateTimeField
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Date/time field" object. The DateTimeField object is an element of the
ScreenItems list.
DiskSpaceView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Memory space view" object. The DiskSpaceView object is an element of the
ScreenItems list.
Ellipse
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Ellipse" object. The Ellipse object is an element of the ScreenItems list.
EllipseSegment
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
EllipticalArc
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "EllipticalArc" object. The EllipticalArc object is an element of the ScreenItems
list.
FunctionTrendControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Gauge
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Gauge" object. The Gauge object is an element of the ScreenItems list.
GraphicIOField
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Graphic I/O field" object. The GraphicIOField object is an element of the
ScreenItems list.
The availability of the following object properties depends on the selected mode:
GraphicView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Graphic view" object. The GraphicView object is an element of the
ScreenItems list.
HTMLBrowser
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the object "HTML Browser". The HTMLBrowser object is an element of the
ScreenItems-list.
See also
SetHTML (Page 1344)
IOField
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "I/O field" object. The IOField object is an element of the ScreenItems list.
See also
BorderColor (Page 562)
Line
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Line" object. The Line object is an element of the ScreenItems list.
Listbox
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Listbox" object. The Listbox object is an element of the ScreenItems list.
Application
In the following example, the object with the name "ListBox1" is moved 10 pixels to the right:
'VBS21
Dim objListBox
Set objListBox = ScreenItems("ListBox1")
objListBox.Left = objListBox.Left + 10
MediaPlayer
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Media Player" object. The MediaPlayer object is an element of the
ScreenItems list.
Application
In the following example, the object with the name "Control1" is moved 16 pixels to the right:
'VBS60
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 16
MultiLineEdit
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Editable text field" object. The MultiLineEdit object is an element of the
ScreenItems list.
Application
In the following example, the object with the name "MultiLineEdit1" is moved 10 pixels to the
right:
'VBS21
Dim objMultiLineEdit
Set objMultiLineEdit = ScreenItems("MultiLineEdit1")
objMultiLineEdit.Left = objMultiLineEdit.Left + 10
OnlineTableControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Table view" object. The OnlineTableControl object is an element of the
ScreenItems list.
OnlineTrendControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "f(t) TrendView" object. The OnlineTrendControl object is an element of the
ScreenItems list.
OptionGroup
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Option button" object. The OptionGroup object is an element of the
ScreenItems list.
PDFview
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "PDF view" object. The PDFview object is an element of the ScreenItems list.
PLCCodeViewer
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Displays the "PLC Code Viewer" object. The PLCCodeViewer object is an element of the
ScreenItems list.
Polygon
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Polygon" object. The Polygon object is an element of the ScreenItems list.
Polyline
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Polyline" object. The Polyline object is an element of the ScreenItems list.
ProDiag overview
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
ProtectedAreaNameView
Description
Screen
ScreensItems
ScreenItem
Represents the "EffectiveRangeName" (RFID)" object. The ProtectedAreaNameView object is
an element of the ScreenItems list.
RangeLabelView
Description
Screen
ScreensItems
ScreenItem
Represents the "EffectiveRangeName" object. The RangeLabelView object is an element of
the ScreenItems list.
RangeQualityView
Description
Screen
ScreensItems
ScreenItem
Represents the "EffectiveRangeSignal" object. The RangeQualityView object is an element of
the ScreenItems list.
See also
Height (Page 720)
Width (Page 1217)
RecipeView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Displays the "Recipe view" object. The RecipeView object is an element of the ScreenItems
list.
If you change the settings for this object with a user-defined function, the changed settings
are retained even after the screen is called again.
Note
The object "Simple RecipeView" cannot be dynamized with a user-defined function.
Rectangle
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Rectangle" object. The Rectangle object is an element of the ScreenItems list.
RoundButton
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Round button" object. The RoundButton object is an element of the
ScreenItems list.
S7GraphOverview
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "GRAPH overview" object. The S7GraphOverview object is an element of the
ScreenItems list.
ScreenWindow
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
ScriptDiagnostics
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
See also
Name (Page 827)
Slider
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Slider" object. The Slider object is an element of the ScreenItems list.
SmartClientView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Sm@rtClient View" object. The SmartClientView object is an element of the
ScreenItems list.
StatusForce
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Watch table" object. The StatusForce object is an element of the ScreenItems
list.
If you change the settings for this object with a user-defined function, the changed settings
are retained even after the screen is called again.
Switch
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Switch" object. The Switch object is an element of the ScreenItems list.
The availability of the following object properties depends on the selected mode:
SymbolicIOField
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
SymbolLibrary
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
SysDiagControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
TextField
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "TextField" object. The TextField object is an element of the ScreenItems list.
TrendRulerControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Value table" object. The TrendRulerControl object is an element of the
ScreenItems list.
Example
In the following example, the object with the name "Control1" is moved 16 pixels to the right:
'VBS60
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 16
TrendView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "TrendView" object. The TrendView object is an element of the ScreenItems
list.
See also
Height (Page 720)
Width (Page 1217)
TubeArcObject
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "TubeArc" object. The TubeArcObject is an element of the ScreenItems list.
Application
In the following example, the object with the name "TubeArcObject1" is moved 10 pixels to the
right:
'VBS24
Dim objTubeArcObject
Set objTubeArcObject = ScreenItems("TubeArcObject1")
objTubeArcObject.Left = objTubeArcObject.Left + 10
TubeDoubleTeeObject
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Application
In the following example, the object with the name "TubeDoubleTeeObject1" is moved 10 pixels
to the right:
'VBS21
Dim objTubeDoubleTeeObject
Set objTubeDoubleTeeObject = ScreenItems("TubeDoubleTeeObject1")
objTubeDoubleTeeObject.Left = objTubeDoubleTeeObject.Left + 10
TubePolyline
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Pipe" object. The TubePolyline object is an element of the ScreenItems list.
Application
In the following example, the object with the name "TubePolyline1" is moved 10 pixels to the
right:
'VBS24
Dim objTubePolyline
Set objTubePolyline = ScreenItems("TubePolyline1")
objTubePolyline.Left = objTubePolyline.Left + 10
TubeTeeObject
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Tee" object. The TubeTeeObject is an element of the ScreenItems list.
Application
In the following example, the object with the name "TubeTeeObject1" is moved 10 pixels to the
right:
'VBS21
Dim objTubeTeeObject
Set objTubeTeeObject = ScreenItems("TubeTeeObject1")
objTubeTeeObject.Left = objTubeTeeObject.Left + 10
UserArchiveControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Displays the "Recipe view" object. The UserArchiveControl object is an element of the
ScreenItems list.
UserView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "UserView" object. The UserView object is an element of the ScreenItems list.
Note
The object "Simple UserView" cannot be dynamized with a user-defined function.
WindowSlider
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Window slider" object. The WindowSlider object is an element of the
ScreenItems list.
See also
BorderFlashingEnabled (Page 569)
WLanQualityView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "WLAN reception" object. The WLanQualityView object is an element of the
ScreenItems list.
ZoneLabelView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Represents the "Zone name" object. The ZoneLabelView object is an element of the
ScreenItems list.
ZoneQualityView
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
1.5.5 Properties
1.5.5.1 Properties A
AboveUpperLimitColor
Description
Specifies the color when the high limit is exceeded.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.AboveUpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• IOField
You have no access in runtime with the following format:
• GraphicIOField
• Switch
• SymbolLibrary
• SymbolicIOField
Color
Optional. A value or a constant that specifies the color for the "High limit violated" case.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
IOField (Page 332)
GraphicIOField (Page 324)
AcceptOnExit
Description
Specifies whether the input field will be confirmed automatically when it is left.
Access in runtime: Read and write
Syntax
Object.AcceptOnExit[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
• SymbolicIOField
BOOLEAN
Optional TRUE, if the input field will be confirmed automatically when it is left.
See also
IOField (Page 332)
SymbolicIOField (Page 422)
AcceptOnFull
Description
Specifies whether the input field will be left and confirmed automatically when the set number
of values have been entered.
Access in runtime: Read and write
Syntax
Object.AcceptOnFull[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
BOOLEAN
Optional TRUE, if the input field will be left and confirmed automatically when the set
number of values have been entered.
See also
IOField (Page 332)
AccessPath
Description
Returns the storage path of a screen.
Access during runtime: Read
Syntax
Object.AccessPath
Object
Necessary. A "Screen" object.
Example
In the following example, the path of the picture "ScreenWindow1" is issued:
'VBS67
Dim objScreen
Set objScreen = HMIRuntime.Screens("ScreenWindow1")
MsgBox objScreen.AccessPath
See also
Screen (Page 216)
ActiveProject
Description
Returns the specified project.
Access in Runtime: Read
Syntax
Object.ActiveProject
Object
Required A "HMIRuntime" object.
See also
HMIRuntime (Page 209)
Project (Page 215)
ActiveScreen
Description
Returns an object of type "Screen" which shows the screen that currently has the focus.
Note
If you query the "ActiveScreen" property in a user-defined function, it may be due to a screen
saver that the property does not return a valid "screen" object but "Nothing". A system message
will be issued.
Syntax
Object.ActiveScreen
Object
Required. An object of the type"HMIRuntime".
Comments
Which screen is returned depends on whether the root screen or the permanent area has the
focus.
The ActiveScreen property returns NOTHING if no screen has the focus. That is the case, for
example, when another window has the focus. With the statement "If not [expression] is
nothing" you are able to interrogate whether a screen is to be returned:
See also
HMIRuntime (Page 209)
ActiveScreen
Description
Returns an object of type "Screen" which shows the screen that currently has the focus.
Note
If you query the "ActiveScreen" property in a function, it may be due to a ScreenSavers that the
property does not return a valid "Screen" object but "Nothing" and a system alarm is displayed.
Syntax
Object.ActiveScreen
Object
Required. An object of the type"HMIRuntime".
Comments
Which screen is returned depends on whether the root screen or the permanent area has the
focus.
The ActiveScreen property returns NOTHING if no screen has the focus. That is the case,
for example, when another window has the focus. With the instruction "If not [printout] Is
Nothing" you can query whether a screen is going to be returned:
'VBS_Example_ActiveScreen
Dim objActiveScreen
Set objActiveScreen = HmiRuntime.ActiveScreen
If Not objActiveScreen Is Nothing Then
'found an active screen
HmiRuntime.Trace("There is an active screen." & vbCrLf)
Else
'found NO active screen
HmiRuntime.Trace("There is NO active screen." & vbCrLf)
End If
See also
HMIRuntime (Page 209)
ActiveScreenItem
Description
References the screen object that currently has the focus.
It is only if the screen of the respective "Screen" object is currently selected and has an input
field that the "ActiveScreenItem" property of the "Screen" object will be occupied with a valid
"ScreenItem" object. In all other cases if, for example, another screen from the "Screens" list,
an independent window within WinCC or another application is selected, this property is not
supplied on the screens, i.e. assigned "Nothing".
Application
You use the "ActiveScreenItem" object to address the properties of the object that has the focus
in Runtime.
ActiveScreenItem
Description
References the screen object which currently has the focus.
The "ActiveScreenItem" property of the "Screen" object is only assigned a valid "ScreenItem"
object if the screen of the corresponding "Screen" object is active and has an input field. In
all other cases, for example, with a different screen from the "Screens" list, an independent
window within WinCC or a different application will be selected, this property will not apply
to the screens and will be occupied with "Nothing".
Application
The "ActiveScreenItem" object is used to address the object property which has the focus in
runtime.
ActualPointIndex
Description
Specifies the number of the current corner point.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ActualPointIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Polygon
• Polyline
• Tubepolyline
You have no access in runtime with the following format:
• Line
Int32
Optional. A value or a constant that specifies the number of the current corner point.
See also
Polygon (Page 378)
Polyline (Page 381)
TubePolyline (Page 461)
Line (Page 336)
ActualPointLeft
Description
Specifies the X coordinate of the current corner point with reference to the screen origin. The
screen source is at the top left of the object. Every corner is identified by an index which is
derived from the number ("PointCount") of the existing corners.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ActualPointLeft[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Polygon
• Polyline
• Tubepolyline
You have no access in runtime with the following format:
• Line
Int32
Optional. A value or a constant that specifies the X coordinate of the current corner point
with reference to the screen origin.
Comments
Changing the value can have an effect on the properties "Width" (object width) and "Left" (X
coordinate of the object position).
See also
Polygon (Page 378)
Polyline (Page 381)
TubePolyline (Page 461)
Line (Page 336)
ActualPointTop
Description
Specifies the Y coordinate of the current corner point with reference to the screen origin. The
screen source is at the top left of the object.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ActualPointTop[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Polygon
• Polyline
• Tubepolyline
You have no access in runtime with the following format:
• Line
Int32
Optional. A value or a constant that specifies the Y coordinate of the current corner point
with reference to the screen origin.
Comments
Changing the value can have an effect on the properties "Height" (object height) and "Top" (X
coordinate of the object position).
See also
Polygon (Page 378)
Polyline (Page 381)
TubePolyline (Page 461)
Line (Page 336)
AdaptBorder
Description
Specifies whether the border of the object will be dynamically adapted to the text size.
Access in runtime: Read and write
Syntax
Object.AdaptBorder[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• IOField
• OptionGroup
• SymbolicIOField
BOOLEAN
Optional.
TRUE, if the border of the object is dynamically adapted to the text size.
FALSE, if the border of the object is not dynamically adapted to the text size.
See also
Button (Page 267)
CheckBox (Page 275)
IOField (Page 332)
OptionGroup (Page 371)
SymbolicIOField (Page 422)
AdaptPicture
Description
No access in runtime.
AdaptScreenToWindow
Description
Specifies whether or not the screen displayed in a screen window adapts to the size of the screen
window in runtime.
Access in runtime Read and write
Syntax
Object.AdaptScreenToWindow[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Screenwindow
BOOLEAN
Optional.
TRUE, if the screen adapts to the screen window size.
FALSE, if the screen does not adapt to the screen window size.
See also
ScreenWindow (Page 404)
AdaptWindowtoScreen
Description
Specifies whether the screen window adapts to the screen it displays in runtime.
Access in runtime Read and write
Syntax
Object.AdaptWindowtoScreen[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Screenwindow
BOOLEAN
Optional.
TRUE, if the screen window size adapts to the screen.
FALSE, if the screen window size does not adapt to the screen.
See also
ScreenWindow (Page 404)
Address
Description
Specifies the web address that will be opened in the HTML browser.
Access in runtime: Read and write
Syntax
Object.Address[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• HTMLBrowser
STRING
Optional. A value or a constant that contains the web address.
See also
HTMLBrowser (Page 330)
AddressEnabled
Description
No access in runtime.
AdressPreview
Description
No access in runtime.
AdvancedButtonPositions
Description
No access in runtime.
AdvancedView
Description
No access in runtime.
Alarm
Description
No access in runtime.
AlarmAreaHeight
Description
No access in runtime.
AlarmAreaWidth
Description
No access in runtime.
AlarmClasses
Description
No access in runtime.
AlarmColor
Description
No access in runtime.
AlarmID
Description
Returns the AlarmID of the Alarm object. The AlarmID is unique and is assigned by the system.
AlarmID (readonly)
See also
Alarms (list) (Page 201)
AlarmLog
Description
No access in runtime.
AlarmLogs
Description
Returns an object of type "AlarmLogs".
Access in Runtime: Read
Syntax
Object.AlarmLogs
Object
Required A "Logging" object.
See also
Logging (Page 214)
AlarmLowerLimit
Description
Specifies the low limit at which the alarm is triggered.
Access in runtime: Read and write
Syntax
Object.AlarmLowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the low limit at which the alarm is triggered.
Comments
The type of evaluation (percentage or absolute) is defined using the "AlarmLowerLimitRelative"
property.
The "AlarmLowerLimitEnable" property defines whether or not monitoring of this limit is
enabled.
See also
Bar (Page 259)
AlarmLowerLimitColor
Description
Specifies the bar color for the "AlarmLowerLimit" limit.
The "AlarmLowerLimitEnable" property must have the value TRUE if the bar color is to change
once the limit has been reached.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.AlarmLowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
You have no access in runtime with the following format:
• Slider
Color
Optional. A value or a constant that specifies the bar color for the "AlarmLowerLimit" limit.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Slider (Page 408)
AlarmLowerLimitEnabled
Description
Specifies whether the "AlarmLowerLimit" limit is monitored.
Access in runtime: Read and write
Syntax
Object.AlarmLowerLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the "AlarmLowerLimit" limit is monitored.
Comments
The following values will be defined via the properties "AlarmLowerLimit",
"AlarmLowerLimitColor" and "AlarmLowerLimitRelative":
Limit
Representation upon reaching the limit
Type of evaluation
See also
Bar (Page 259)
AlarmLowerLimitRelative
Description
Establish whether the lower limit at which the interrupt is triggered is evaluated as a percentage
or an absolute value.
Access in runtime: Read and write
Syntax
Object.AlarmLowerLimitRelative[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the lower limit at which the interrupt is triggered is evaluated as a
percentage.
See also
Bar (Page 259)
AlarmSource
Description
No access in runtime.
AlarmTextTag
Description
No access in runtime.
AlarmUpperLimit
Description
Establishes the upper limit at which the interrupt will be triggered.
Access in runtime: Read and write
Syntax
Object.AlarmUpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that defines the upper limit at which an interrupt will be
triggered.
Comments
The type of evaluation (percentage or absolute) is defined using the "AlarmUpperLimitRelative"
property.
The "AlarmUpperLimitEnable" property defines whether or not monitoring of this limit is
enabled.
See also
Bar (Page 259)
AlarmUpperLimitColor
Description
Specifies the bar color for the "AlarmUpperLimit" limit.
The "AlarmUpperLimitEnable" property must have the value TRUE if the bar color is to change
once the limit has been reached.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.AlarmUpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
You have no access in runtime with the following format:
• Slider
Color
Optional. A value or a constant that specifies the bar color for the "AlarmUpperLimit" limit.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Slider (Page 408)
AlarmUpperLimitEnabled
Description
Specifies whether the "AlarmUpperLimit" limit is monitored.
Access in runtime: Read and write
Syntax
Object.AlarmUpperLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the "AlarmUpperLimit" limit is monitored.
Comments
The following values will be defined via the properties "AlarmUpperLimit",
"AlarmUpperLimitColor" and "AlarmUpperLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
AlarmUpperLimitRelative
Description
Establish whether the upper limit at which the interrupt is triggered is evaluated as a percentage
or an absolute value.
Access in runtime: Read and write
Syntax
Object.AlarmUpperLimitRelative[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the high limit at which the interrupt is triggered is evaluated as a
percentage.
See also
Bar (Page 259)
AllFilters
Description
No access in runtime.
AllFiltersForHitlist
Description
No access in runtime.
AllowEdit
Description
No access in runtime.
AllowMenu
Description
No access in runtime
AllServer
Description
Specifies whether the alarms of all available servers are displayed.
Access in runtime: Read and write
Syntax
Object.AllServer[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
BOOLEAN
Optional.
TRUE, if the alarms of all available servers are displayed.
FALSE, if only the alarms of the selected server are displayed.
See also
AlarmControl (Page 237)
AllTagTypesAllowed
Description
No access in runtime.
Analog
Description
Specifies whether the clock should be shown as an analog clock.
Access in runtime: Read and write
Syntax
Object.Analog[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Clock
BOOLEAN
Optional TRUE, if the clock should be shown as an analog clock.
See also
Clock (Page 287)
AngleMax
Description
Specifies the angle of the scale end of the "Gauge" object.
Access in runtime: Read and write
Syntax
Object.AngleMax[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
DOUBLE
Optional A value or a constant that specifies the angle in degrees.
Comments
The start and end of the scale gradations are described with the properties "AngleMin" and
"AngleMax" in angle degrees.
The value of the AngleMin property must always be less than the value of the AngleMax
property. The zero degree angle is located at the 3 o´clock position on the scale. Positive
angle values are counted clockwise.
See also
Gauge (Page 320)
AngleMin
Description
Specifies the angle of the scale start of the "Gauge" object.
Access in runtime: Read and write
Syntax
Object.AngleMin[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
DOUBLE
Optional A value or a constant that specifies the angle in degrees.
Comments
The start and end of the scale gradations are described with the properties "AngleMin" and
"AngleMax" in angle degrees.
The value of the AngleMin property must always be less than the value of the AngleMax
property.
The zero degree angle is located at the 3 o´clock position on the scale. Positive angle values
are counted clockwise.
See also
Gauge (Page 320)
AnimationIgnore
Description
No access in runtime.
Appearance
Description
No access in runtime.
ApplyProjectSettings
Description
Specifies whether the project settings are applied from the "HMI alarms" editor.
Access in runtime Read and write
Syntax
Object.ApplyProjectSettings[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE when the alarm text blocks configured in the "HMI alarms" editor are applied in the
alarm view with their properties. The alarm text blocks are displayed with these properties in
the alarm view.
FALSE when the properties are not applied.
See also
AlarmControl (Page 237)
ApplyProjectSettingsForDesignMode
Description
No access in runtime.
ArchiveName
Description
Specifies the log name.
Access in runtime: Read and write
Syntax
Object.ArchiveName[=STRING]
Object
Required. A "ScreenItem" object with the characteristics:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the log name.
See also
UserArchiveControl (Page 466)
ArchiveType
Description
Sets the log type.
Access in runtime: Read and write
Syntax
Object.ArchiveType[=RecipeControlDataSourceType]
Object
Required. A "ScreenItem" object with the characteristics:
• UserArchiveControl
RecipeControlDataSourceType
Optional. Value or constant that specifies the log type.
See also
UserArchiveControl (Page 466)
AskOperationMotive
Description
Specifies whether the reason for operating this object is logged. If the object is operated in
runtime, the operator enters the reason in a dialog.
Syntax
Object.AskOperationMotive[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• ComboBox
• IOField
• ListBox
• SymbolicIOField
• WindowSlider
BOOLEAN
Optional.TRUE if the reason for operating this object is to be logged.
See also
ComboBox (Page 290)
IOField (Page 332)
Listbox (Page 339)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
AspectRatio
Description
Specifies whether the aspect ratio of the Media Player is maintained when the size is modified.
Access in Runtime: Read and write
Syntax
Object.AspectRatio[=BOOLEAN]
Object
Required. An object of the "ScreenItem" type with the format:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the aspect ratio of the Media Player is not maintained when the size is modified.
FALSE, if the aspect ratio of the Media Player is not maintained when the size is modified.
See also
MediaPlayer (Page 342)
AssignedFilters
Description
No access in runtime.
AssignedHitlistFilters
Description
No access in runtime.
Assignments
Description
Specifies a list which contains the assignments between the output value and the output text
actually to be output. The assignments are dependent on the set list type. You define the list type
with the ListType property.
Access in runtime: Read and write
Syntax
Object.Assignments[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• SymbolicIOField
STRING
Optional Specifies a list which contains the assignments between the output value and the
output text actually to be output.
See also
SymbolicIOField (Page 422)
AssociatedS7GraphDBName
Description
No access in runtime.
AssociatedS7GraphDBTag
Description
No access in runtime.
Authorization
Description
Specifies operating rights.
Access in runtime: Read and write
Syntax
Object.Authorization[=HMIRTAuthorization]
Object
Required. A "ScreenItem" object with the format:
• Bar
• Button
• CheckBox*
• Circle *
• CircleSegment *
• CircularArc *
• ComboBox*
• Connector *
• DateTimeField **
• Ellipse *
• EllipseSegment *
• EllipticalArc *
• GraphicIOField
• GraphicView *
• IOField
• Line *
• ListBox *
• MultiLineEdit *
• OptionGroup *
• Polygon *
• Polyline *
• RecipeView **
• Rectangle *
• RoundButton *
• S7GraphOverview *
• Slider
• StatusForce **
• Switch **
• SymbolLibrary **
• SymbolicIOField
• TextField *
• TrendView
• TubeArcObject *
• TubeDoubleTeeObject *
• TubeTeeObject *
• Tubepolyline *
• UserView **
• WindowSlider *
* No access in RT Advanced
** No access in RT Professional
HMIRTAuthorization
Optional. A value or a constant which specifies the operating rights.
AutoCompleteColumns
Description
Specifies whether empty columns are shown if the control is wider than the configured
columns.
Access in runtime Read and write
Syntax
Object.AutoCompleteColumns[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the empty columns are shown.
FALSE if the empty columns are not shown.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AutoCompleteRows
Description
Specifies whether empty rows are shown if the control is longer than the number of configured
rows.
Access in runtime Read and write
Syntax
Object.AutoCompleteRows[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the empty rows are shown.
FALSE if the empty rows are not shown.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AutoPosition
Description
Specifies whether the value table is automatically placed below the object that supplies the
value table with data.
Access in Runtime: Read and write
Syntax
Object.AutoPosition[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the object is automatically placed below the data source.
FALSE, if the object is placed at the configured position.
See also
TrendRulerControl (Page 441)
AutoScroll
Description
Specifies whether autoscroll is used.
Access in runtime Read and write
Syntax
Object.AutoScroll[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if autoscroll is used.
See also
AlarmControl (Page 237)
AutoSelectionColors
Description
Specifies whether the colors defined by the system are used as the selection colors for cells and
rows.
Access in runtime Read and write
Syntax
Object.AutoSelectionColors[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the system color is used.
FALSE if the user-defined color is used.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AutoSelectionRectColor
Description
Specifies whether the selection frame is shown with the color defined by the system.
Access in runtime: Read and write
Syntax
Object.AutoSelectionRectColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the system color is used.
FALSE if the user-defined color is used.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AutoShow
Description
Specifies whether the value table is shown automatically.
Access in runtime: Read and write
Syntax
Object.AutoShow[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the value table is shown automatically.
FALSE, if the value table is not shown automatically.
See also
TrendRulerControl (Page 441)
AutoSizing
Description
No access in runtime.
AutoStart
Description
No access in runtime.
AvailableStatusbarElements
Description
No access in runtime.
AvailableToolbarButtons
Description
No access in runtime.
AverageLast15Values
Description
Specifies whether the average of the last 15 values is to be shown.
Access in runtime Read and write
Syntax
Object.AverageLast15Values[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
BOOLEAN
Optional.
TRUE if the average of the last 15 values is to be shown.
FALSE if the average of the last 15 values is not to be shown.
See also
Bar (Page 259)
AxisXBunchCount
Description
No access in runtime.
AxisXMarkCount
Description
No access in runtime.
AxisXNoOfDigits
Description
No access in runtime.
AxisXShowBunchValues
Description
No access in runtime.
AxisXStyle
Description
No access in runtime.
AxisY1BunchCount
Description
No access in runtime.
AxisY1MarkCount
Description
No access in runtime.
AxisY1ShowBunchValues
Description
No access in runtime.
AxisY2BunchCount
Description
No access in runtime.
AxisY2MarkCount
Description
No access in runtime.
AxisY2ShowBunchValues
Description
No access in runtime.
1.5.5.2 Properties B
BackButtonVisible
Description
No access in runtime.
BackColor
Description
Specifies the background color.
Access in runtime: Read and write
Syntax
Object.BackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl *
• AlarmView
• Bar
• Button **
• CheckBox *
• Circle
• CircleSegment *
• CircularArc *
• ComboBox *
• Connector *
• DateTimeField **
• Ellipse
• EllipseSegment *
• EllipticalArc *
• FunctionTrendControl *
• Gauge
• GraphicIOField **
• GraphicView
• IOField
• Line
• ListBox *
• MultiLineEdit *
• OnlineTableControl *
• OnlineTrendControl *
• OptionGroup *
• Polygon
• Polyline
• RecipeView **
• Rectangle
• RoundButton *
• Slider
• StatusForce **
• Switch **
• SymbolLibrary
• SymbolicIOField
• TextField
• TrendRulerControl *
• UserArchiveControl *
• UserView **
• WindowSlider *
* RT Advanced No access
** RT Professional No access
Color
Optional. A value or a constant that specifies the background color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
The background color is not visible if the "BorderStyle" property has the value "0".
See also
AlarmControl (Page 237)
AlarmView (Page 251)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
ComboBox (Page 290)
Connector (Page 293)
DateTimeField (Page 296)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
FunctionTrendControl (Page 309)
BackColorBottom
Description
Specifies the color for the lower / right part of the object.
Access in runtime Read and write
Syntax
Object.BackColorBottom[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• WindowSlider
Color
Optional. A value or a constant that specifies the color for the lower / right part of the object.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
WindowSlider (Page 482)
BackColorTop
Description
Specifies the color for the upper / left part of the object.
Access in runtime Read and write
Syntax
Object.BackColorTop[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• WindowSlider
Color
Optional. A value or a constant that specifies the color for the upper / left part of the object.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
WindowSlider (Page 482)
BackFillStyle
Description
Specifies the fill pattern.
Access in runtime: Read and write
Syntax
Object.BackFillStyle[=FillStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
• Button*
• CheckBox*
• Circle
• CircleSegment *
• Clock*
• ComboBox
• Ellipse
• EllipseSegment *
• Gauge*
• GraphicView*
• IOField*
• ListBox*
• OptionGroup*
• Polygon
• Rectangle
• RoundButton*
• Slider*
• SymbolLibrary*
• SymbolicIOField*
• TextField*
• WindowSlider*
* RT Advanced No access
FillStyle
Optional. A value or a constant that specifies the fill style.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
Gauge (Page 320)
GraphicIOField (Page 324)
GraphicView (Page 327)
IOField (Page 332)
Listbox (Page 339)
OptionGroup (Page 371)
RoundButton (Page 398)
Slider (Page 408)
Switch (Page 418)
BackFlashingColorOff
Description
Specifies the background color for flash state "Off".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BackFlashingColorOff[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• GraphicView
• IOField
• OptionGroup
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
Color
Optional. A value or a constant that specifies the color of the background for the flashing
status "off".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicView (Page 327)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
BackFlashingColorOn
Description
Specifies the background color for flash state "On".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BackFlashingColorOn[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• GraphicView
• IOField
• OptionGroup
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
Color
Optional. A value or a constant that specifies the color of the background for the flashing
status "on".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicView (Page 327)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
BackFlashingEnabled
Description
Specifies whether the background flashes in runtime.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BackFlashingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• GraphicView
• IOField
• OptionGroup
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
BOOLEAN
Optional. TRUE if the background flashes in runtime.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicView (Page 327)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
BackFlashingRate
Description
Specifies the flash rate of the background.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BackFlashingRate[=FlashingRate]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• GraphicView
• IOField
• OptionGroup
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
FlashingRate
Optional. A value or a constant that specifies the flash rate of the background.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicView (Page 327)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
BackgroundColor
Description
No access in runtime.
See also
TrendRulerControl (Page 441)
BackPicture
Description
Specifies the background graphic.
Access in runtime: Read and write
Syntax
Object.BackPicture[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the characteristics:
• Gauge
• Slider
HmiObjectHandle
Optional. A value or a constant that specifies the background graphic.
See also
Gauge (Page 320)
Slider (Page 408)
BackStyle
Description
Specifies the background style.
Syntax
Object.BackStyle[=Int32]
Object
Required. A "ScreenItem" object with the characteristics:
• Gauge
Int32
Optional. A value or a constant that specifies the background style.
See also
Gauge (Page 320)
BarBackColor
Description
Specifies the color of the bar background for the selected object.
Access in runtime Read and write
Syntax
Object.BarBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
• Slider
Color
Optional. A value or a constant that specifies the color of the bar background.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Slider (Page 408)
BarBackFillStyle
Description
Specifies the fill style for the bar.
Access in runtime Read and write
Syntax
Object.BarBackFillStyle[=FillStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
FillStyle
Optional. A value or a constant that specifies the fill pattern of the bar.
See also
Bar (Page 259)
BarBackFlashingColorOff
Description
Specifies the color ###
Access in Runtime: Read and write
Syntax
Object.BarBackFlashingColorOff[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
Color
Optional. A value or a constant that specifies the color of ###
BarBackFlashingColorOn
Description
Specifies the color ###
Access in Runtime: Read and write
Syntax
Object.BarBackFlashingColorOn[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
Color
Optional. A value or a constant that specifies the color of ###
BarBackFlashingEnabled
Description
Specifies whether ###
Access in Runtime: Read and write
Syntax
Object.BarBackFlashingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
BOOLEAN
Optional. TRUE, if ###
BarBackFlashingRate
Description
Sets the flash rate ###
Access in Runtime: Read and write
Syntax
Object.BarBackFlashingRate[=FlashingRate]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
FlashingRate
Optional. A value or a constant that specifies the flash rate ###
BarColor
Description
Specifies the color of the bar.
Access in runtime Read and write
Syntax
Object.BarColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Slider
Color
Optional. A value or a constant that specifies the color of the slider.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
The range extends from the value in "MinimumValue (Page 822)" to the position of the
slider.
See also
Slider (Page 408)
BarEdgeStyle
Description
Specifies ###
Access in Runtime:
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.BarEdgeStyle[=LineStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
LineStyle
Optional. A value or a constant, which ###
BarOrientation
Description
Specifies the bar alignment.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BarOrientation[=BarOrientation]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
You have no access in runtime with the following format:
• Slider
BarOrientation
Optional. A value or a constant that specifies the bar direction.
See also
Bar (Page 259)
Slider (Page 408)
BaseScreenName
Description
Reads the name of the current root screen or triggers a root screen change by setting a new
screen name.
Access in Runtime: Read and write
Syntax
Object.BaseScreenName[= STRING]
Object
Required An "HMIRuntime" object.
STRING
Optional A value or a constant that contains the screen name.
Comments
You can also use the property to establish which screen is currently being displayed.
See also
HMIRuntime (Page 209)
BelowLowerLimitColor
Description
Specifies the color for the "Low limit violated" event.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BelowLowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• IOField
You have no access in runtime with the following format:
• GraphicIOField
• Switch
• SymbolLibrary
• SymbolicIOField
Color
Optional. A value or a constant which specifies the color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
BitNumber
Description
Specifies the bit whose status must change to trigger a value change.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BitNumber[=Int32]
Object
Required. A "ScreenItem" object with the format:
• SymbolicIOField
You have no access in runtime with the following format:
• Button
• GraphicIOField
Int32
Optional Specifies the bit whose status must change to trigger a value change.
Comments
The tag being used must be of type BYTE, WORD or DWORD.
See also
SymbolicIOField (Page 422)
Button (Page 267)
GraphicIOField (Page 324)
BlinkColor
Description
Specifies the color in which the object flashes in runtime.
Access in runtime Read and write
Syntax
Object.BlinkColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
Color
Optional. A value or a constant that specifies the flash color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
SymbolLibrary (Page 427)
BlinkMode
Description
Specifies the type of flash graphic for the specified object.
Access in runtime Read and write
Syntax
Object.BlinkMode[=SymbolLibraryBlinkMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
SymbolLibraryBlinkMode
Optional. A value or a constant that specifies the type of flash picture for the specified object.
See also
SymbolLibrary (Page 427)
BlinkSpeed
Description
Sets the flash rate.
Fast - 250: The length of the flashing interval is 250 ms. Medium - 500: The length of the
flashing interval is 500 ms.
Slow - 1000: The length of the flashing interval is 1000 ms. The default value is medium -
500.
Access in runtime Read and write
Syntax
Object.BlinkSpeed[=FlashingRate]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
FlashingRate
Optional. A value or a constant that specifies the flash rate.
See also
SymbolLibrary (Page 427)
BlockAlignment
Description
Specifies the alignment of the text within the column header of the referenced block.
Access in runtime Read and write
Syntax
Object.BlockAlignment[=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the format:
• TrendRulerControl
HorizontalAlignment
Optional. A value or constant that determines the horizontal alignment.
See also
TrendRulerControl (Page 441)
BlockAutoPrecision
Description
Specifies whether the number of decimal places displayed in the current block is adjusted
automatically.
Access in runtime: Read and write
Syntax
Object.BlockAutoPrecisions[=BOOLEAN]
Object
Required. A "ScreenItem" object with the characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the number of displayed decimal places is adapted automatically.
FALSE, if the number of displayed decimal places is not adapted automatically.
See also
TrendRulerControl (Page 441)
BlockCaption
Description
Specifies the header of the current block.
Access in runtime: Read and write
Syntax
Object.BlockCaption[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
STRING
Optional. A value or a constant that specifies the header of the block.
See also
TrendRulerControl (Page 441)
BlockCount
Description
Specifies the number of blocks.
Access in runtime: Read and write
Syntax
Object.BlockCount[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
Int32
Optional. A value or a constant that specifies the number of blocks.
See also
TrendRulerControl (Page 441)
BlockDateFormat
Description
Specifies the format for date information in the current block.
Access in runtime: Read and write
Syntax
Object.BlockDateFormat[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
STRING
Optional. A value or a constant that specifies the format for date information.
See also
TrendRulerControl (Page 441)
BlockExponentialFormat
Description
Specifies whether the values in the current block are displayed in exponential notation.
Access in runtime: Read and write
Syntax
Object.BlockExponentialFormat[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the values are displayed in exponential notation.
FALSE, if the values are displayed in decimal notation.
See also
TrendRulerControl (Page 441)
BlockHideText
Description
No access in runtime.
BlockHideTitleText
Description
Specifies whether the header of the block is displayed as text.
Access in runtime: Read and write
Syntax
Object.BlockHideTitleText[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the header of the block is displayed as text.
FALSE, if the header of the block is not displayed as text.
See also
TrendRulerControl (Page 441)
BlockId
Description
References a block with its block ID. To access the properties of a block, you need to set "BlockId".
Access in runtime Read and write
Syntax
Object.BlockId[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
Int32
Optional. A value or a constant that specifies the ID of the current block.
See also
TrendRulerControl (Page 441)
BlockIndex
Description
References a block. To access the properties of a block, you need to set "BlockIndex".
Values between 0 and "BlockIndex" minus 1 are valid for "BlockCount". The "BlockCount"
property specifies the number of configured blocks.
Access in runtime Read and write
Syntax
Object.BlockIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
Int32
Optional. A value or a constant that specifies the number of the current block.
See also
TrendRulerControl (Page 441)
BlockLength
Description
Specifies the number of characters of the current block.
Access in runtime: Read and write
Syntax
Object.BlockLength[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
Int32
Optional. A value or a constant that specifies the number of characters.
See also
TrendRulerControl (Page 441)
BlockName
Description
Specifies the name of the current block.
Access in runtime: Read and write
Syntax
Object.BlockName[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
STRING
Optional. A value or a constant that specifies the name of the block.
See also
TrendRulerControl (Page 441)
BlockPrecision
Description
Specifies the number of decimal places in the current block.
Access in runtime: Read and write
Syntax
Object.BlockPrecisions[=Int16]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
Int16
Optional. A value or a constant that specifies the number of decimal places.
See also
TrendRulerControl (Page 441)
Blocks
Description
No access in runtime.
BlockShowDate
Description
Specifies that the date is displayed in the current block.
Access in runtime: Read and write
Syntax
Object.BlockShowDate[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the date is displayed in the current block.
FALSE, if the date is not displayed in the current block.
See also
TrendRulerControl (Page 441)
BlockShowIcon
Description
Specifies whether the content of the current block is displayed as an icon.
Access in runtime: Read and write
Syntax
Object.BlockShowIcon[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the content of the current block is displayed as an icon.
FALSE, if the content of the current block is not displayed as an icon.
See also
TrendRulerControl (Page 441)
BlockShowTitleIcon
Description
Specifies whether the header of the current block is displayed as an icon.
Access in runtime: Read and write
Syntax
Object.BlockShowTitleIcon[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the header of the current block is displayed as an icon.
FALSE, if the header of the current block is not displayed as an icon.
See also
TrendRulerControl (Page 441)
BlockTimeFormat
Description
Specifies the format of the time information in the current block.
Access in runtime: Read and write
Syntax
Object.BlockTimeFormat[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
STRING
A value or a constant that specifies the format of the time information.
See also
TrendRulerControl (Page 441)
BlockUseSourceFormat
Description
Specifies whether the format of the connected control is used in the current block.
Access in runtime: Read and write
Syntax
Object.BlockUseSourceFormat[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the format of the connected control is used in the current block.
FALSE, if the configured format is used in the current block.
See also
TrendRulerControl (Page 441)
BorderBackColor
Description
Specifies the background color of the broken border line.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• ComboBox
• Ellipse
• EllipseSegment
• GraphicIOField
• GraphicView
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• Pölygon
• Rectangle
• RoundButton
• TextField
• WindowSlider
You have no access in runtime with the following format:
• AlarmView
• Clock
• DateTimeField
• Gauge
• RecipeView
• Slider
• StatusForce
• Switch
• SymbolicIOField
• SysDiagControl
• TrendView
• UserView
Color
Optional. A value or a constant that specifies the background color of the broken border line.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmView (Page 251)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
GraphicIOField (Page 324)
GraphicView (Page 327)
Gauge (Page 320)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RecipeView (Page 389)
RoundButton (Page 398)
Slider (Page 408)
StatusForce (Page 414)
Switch (Page 418)
SymbolicIOField (Page 422)
SysDiagControl (Page 429)
TextField (Page 438)
TrendView (Page 451)
UserView (Page 478)
WindowSlider (Page 482)
BorderBrightColor3D
Description
Specifies the border color of the following border parts for 3D presentation:
• External frame parts at the top and bottom
• Internal frame parts at the top and right
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderBrightColor3D[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• RoundButton
• Slider*
* RT Advanced read and write access
You have no access in runtime with the following format:
• Switch
Color
Optional. A value or a constant that specifies the frame color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Button (Page 267)
RoundButton (Page 398)
Slider (Page 408)
Switch (Page 418)
BorderColor
Description
Specifies the line color.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle*
• CircleSegment
• ComboBox
• DateTimeField**
• Ellipse*
• EllipseSegment
• FunctionTrendControl
• GraphicIOField
• GraphicView
• IOField
• ListBox
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• OptionGroup
• Polygon*
• Rectangle*
• RoundButton
• SymbolicIOField*
• TextField***
• TrendRulerControl
• UserArchiveControl
• WindowSlider
* RT Advanced read and write access
** RT Advanced read and write access, RT Professional no access
*** RT Advanced No access
You have no access in runtime with the following format:
• AlarmControl
• AlarmView
• Clock
• Gauge
• RecipeView
• Slider
• StatusForce
• Switch
• SysDiagControl
• TrendView
• UserView
Color
Optional. A value or a constant that specifies the line color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Circle (Page 279)
BorderEnabled
Description
Returns whether the window is displayed with a border in runtime.
Access in runtime: Read and write
Syntax
Object.BorderEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• ApplicationWindow
• Screenwindow
BOOLEAN
Optional. TRUE, if the window is displayed with a border in runtime.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
BorderEndStyle
Description
Specifies the type of line ends.
Access in runtime: Read and write
Syntax
Object.BorderEndStyle[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
• Line
• Polyline
Int32
Optional. A value or a constant that specifies the type of line end.
See also
Connector (Page 293)
Line (Page 336)
Polyline (Page 381)
BorderFlashingColorOff
Description
Specifies the color of the border line for the flashing status "Off".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderFlashingColorOff[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicIOField
• GraphicView
• IOField
• OptionGroup
• Polyline
• Polygon
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
Color
Optional. A value or a constant that specifies the color of the border line for the flashing
status "Off".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicIOField (Page 324)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
TextField (Page 438)
WindowSlider (Page 482)
BorderFlashingColorOn
Description
Specifies the color of the border line for the flashing status "On".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderFlashingColorOn[=Color]
Object
Required. A "ScreenItem" object with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicIOField
• GraphicView
• IOField
• OptionGroup
• Polyline
• Polygon
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
Color
Optional. A value or a constant that specifies the color of the border line for the flashing
status "On".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
BorderFlashingEnabled
Description
Specifies whether the limit of the object can flash in runtime.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderFlashingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicIOField
• GraphicView
• IOField
• OptionGroup
• Polyline
• Polygon
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
You have no access in runtime with the following format:
• Switch
• WindowSlider
BOOLEAN
Optional.
TRUE if the object limit can flash in runtime.
FALSE if the object limit cannot flash in runtime.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicIOField (Page 324)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
BorderFlashingRate
Description
Specifies the flash rate of the border line.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderFlashingRate[=FlashingRate]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicView
• IOField
• OptionGroup
• Polyline
• Polygon
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• GraphicIOField
• Switch
FlashingRate
Optional. A value or a constant that specifies the flash rate of the border line.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
GraphicIOField (Page 324)
IOField (Page 332)
BorderInnerStyle3D
Description
Specifies the appearance of the inner part of the object border.
Access in runtime Read and write
Syntax
Object.BorderInnerStyle3D[=3DStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
• Slider
3DStyle
Optional. A value or a constant that defines how the inside part of the object border is
displayed.
See also
Gauge (Page 320)
Slider (Page 408)
BorderInnerWidth3D
Description
Specifies the width of the inner border for 3D display.
Access in runtime Read and write
Syntax
Object.BorderInnerWidth3D[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Slider
Int32
Optional. A value or a constant that specifies the width of the inner border in pixels.
See also
Slider (Page 408)
BorderOuterStyle3D
Description
Specifies the appearance of the outer part of the object border.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderOuterStyle3D[=3DStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
You have no access in runtime with the following format:
• Slider
3DStyle
Optional. A value or a constant that defines how the outside part of the object border is
displayed.
See also
Gauge (Page 320)
Slider (Page 408)
BorderOuterWidth3D
Description
Specifies the width of the outer border for 3D display.
Access in runtime Read and write
Syntax
Object.BorderOuterWidth3D[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Slider
Int32
Optional. A value or a constant that specifies the width of the outer border in pixels.
See also
Slider (Page 408)
BorderShadeColor3D
Description
Specifies the border color of the following border parts for 3D presentation:
• Internal frame parts at the top and bottom
• External frame parts at the bottom and right
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderShadeColor3D[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• Slider*
* RT Advanced read and write access
Color
Optional. A value or a constant that specifies the color of the shading.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Button (Page 267)
RoundButton (Page 398)
BorderStyle
Description
Specifies the type of border lines.
Access in runtime: Read and write
Syntax
Object.BorderStyle[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• OptionGroup
Int32
Optional. A value or a constant that specifies the type of border line.
Value Description
0 Solid line
1 Dashed line
2 Dotted line
3 Dashed and dotted line
4 Dash-dot-dot line
See also
TextField (Page 438)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
GraphicIOField (Page 324)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RoundButton (Page 398)
SymbolicIOField (Page 422)
WindowSlider (Page 482)
BorderWidth
Description
Specifies the line thickness.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Ala rmControl
• Bar
• Button
• Circle *
• CircleSegment
• CheckBox
• ComboBox
• Ellipse *
• EllipseSegment
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• IOField
• ListBox
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• Polygon *
• Rectangle *
• OptionGroup
• RoundButton
• Slider *
• SymbolicIOField *
• TextField *
• TrendRulerControl
• UserArchiveControl
• WindowSlider
* RT Advanced read and write access
Int32
Optional. A value or a constant that specifies the line weight in pixels.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
FunctionTrendControl (Page 309)
Gauge (Page 320)
GraphicIOField (Page 324)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
OptionGroup (Page 371)
RecipeView (Page 389)
RoundButton (Page 398)
Slider (Page 408)
StatusForce (Page 414)
BorderWidth3D
Description
Specifies the width of the inner border for 3D display.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.BorderWidth3D[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• Gauge
• RoundButton
You have no access in runtime with the following format:
• Bar
• IOField
• Switch
Int32
Optional. A value or constant that determines the width of the inside border for 3D display in
pixels.
See also
Bar (Page 259)
Button (Page 267)
BottomMargin
Description
No access in runtime.
Bounds
Description
No access in runtime.
BrowserTypeUsed
Description
No access in runtime.
BufferViewColumnOrder
Description
No access in runtime.
BufferViewInternalRowOrder
Description
No access in runtime.
BusyText
Description
No access in runtime.
ButtonBackColor
Description
No access in runtime.
ButtonBackFillStyle
Description
No access in runtime.
ButtonBarElements
Description
No access in runtime.
ButtonBarHeight
Description
No access in runtime.
ButtonBarStyle
Description
No access in runtime.
ButtonBorderBackColor
Description
No access in runtime.
ButtonBorderColor
Description
No access in runtime.
ButtonBorderWidth
Description
No access in runtime.
ButtonCornerRadius
Description
No access in runtime.
ButtonEdgeStyle
Description
No access in runtime.
ButtonFirstGradientColor
Description
No access in runtime.
ButtonFirstGradientOffset
Description
No access in runtime.
ButtonMiddleGradientColor
Description
No access in runtime.
ButtonPositions
Description
No access in runtime.
ButtonSecondGradientColor
Description
No access in runtime.
ButtonSecondGradientOffset
Description
No access in runtime.
BV_ColumnWidth_Date
Description
No access in runtime.
BV_ColumnWidth_Event
Description
No access in runtime.
BV_ColumnWidth_EventSeverity
Description
No access in runtime.
BV_ColumnWidth_EventState
Description
No access in runtime.
BV_ColumnWidth_Number
Description
No access in runtime.
BV_ColumnWidth_Time
Description
No access in runtime.
BV_ItemText_Date
Description
No access in runtime.
BV_ItemText_Event
Description
No access in runtime.
BV_ItemText_EventSeverity
Description
No access in runtime.
BV_ItemText_EventState
Description
No access in runtime.
BV_ItemText_Number
Description
No access in runtime.
BV_ItemText_Time
Description
No access in runtime.
BV_ShowItem_Date
Description
No access in runtime.
BV_ShowItem_Event
Description
No access in runtime.
BV_ShowItem_EventSeverity
Description
No access in runtime.
BV_ShowItem_EventState
Description
No access in runtime.
BV_ShowItem_Number
Description
No access in runtime.
BV_ShowItem_Time
Description
No access in runtime.
1.5.5.3 Properties C
CameraUrl
Description
No access in runtime.
CanBeGrouped
Description
No access in runtime.
Caption
Description
Specifies the text to be displayed in the header.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.Caption[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTrendControl
• Slider *
• TrendRulerControl
• UserArchiveControl
* RT Advanced read and write access
You have no access in runtime with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that contains the text that will be shown in the title line.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
Slider (Page 408)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CaptionBackColor
Description
Specifies the background color of the title bar.
Access in runtime Read and write
Syntax
Object.CaptionBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Color
Optional. A value or a constant that specifies the background color of the title bar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
SymbolicIOField (Page 422)
CaptionColor
Description
Specifies the color of the text to be displayed in the title bar.
Access in runtime Read and write
Syntax
Object.CaptionColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Gauge
• Switch
• SymbolicIOField
Color
Optional. A value or a constant that specifies the text color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
Switch (Page 418)
SymbolicIOField (Page 422)
CaptionFont
Description
Sets the font.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.CaptionFont[=Font]
Object
Required. A "ScreenItem" object with the characteristics:
• Gauge
You have no access in runtime in the case of the following characteristic:
• Switch
Font
Optional. A value or a constant that specifies the font.
See also
Gauge (Page 320)
Switch (Page 418)
CaptionText
Description
Specifies the text to be displayed in the header.
Access in runtime Read and write
Syntax
Object.CaptionText[= STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• Gauge
• ScreenWindow
• Switch
STRING
Optional. A value or a constant that contains the text that will be shown in the title line.
See also
Gauge (Page 320)
ScreenWindow (Page 404)
Switch (Page 418)
CaptionTop
Description
Specifies the distance between the instrument labels and the upper edge of the object. You can
only position the instrument labels in line with the vertical diameter of the scale. The value of
the property refers to the height of the object. The height specifies the upper edge of the object
and the lower edge of the lettering.
Access in runtime Read and write
Syntax
Object.CaptionTop[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
DOUBLE
Optional. A value or a constant that specifies the distance between the instrument labels and
the upper edge of the object.
Value Description
0 The lower edge of the lettering is positioned at the upper limit of the object. The text is no
longer visible as it is positioned outside the object.
1 The lower edge of the lettering is positioned on the lower limit of the selected object.
See also
Gauge (Page 320)
CellCut
Description
Specifies whether the contents of the cells are abbreviated if the cells are too narrow.
Access in runtime Read and write
Syntax
Object.CellCut[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
You have no access in runtime with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the contents are abbreviated.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CellSpaceBottom
Description
Specifies the bottom margin of the table cells.
Access in runtime: Read and write
Syntax
Object.CellSpaceBottom[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or constant that defines the bottom margin used in the table cells.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CellSpaceLeft
Description
Specifies the left indent used in the table cells.
Access in runtime: Read and write
Syntax
Object.CellSpaceLeft[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional A value or parameter that defines the left indent in the table cells.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CellSpaceRight
Description
Specifies the right indent used in the table cells.
Access in runtime: Read and write
Syntax
Object.CellSpaceRight[=Int32]
Object
Required. A "ScreenItem" object with the following formats:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional A value or constant that defines the right indent used in the table cells.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CellSpaceTop
Description
Defines the top margin of the table cells.
Access in runtime: Read and write
Syntax
Object.CellSpaceTop[=Int32]
Object
Required. A "ScreenItem" object with the following formats:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional A value or constant that defines the top margin used in the table cells.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
CenterColor
Description
Specifies the color of the center point.
Access in runtime Read and write
Syntax
Object.CenterColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the color of the center.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
CenterSize
Description
Specifies the diameter of the scale center point.
Access in runtime: Read and write
Syntax
Object.CenterSize[=SINGLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
SINGLE
Optional A value or a constant that specifies the diameter of the round scale center point.
Value range from 0.03 to 1
1: The diameter corresponds to the smaller value of the geometry attribute "Width" or
"Height".
See also
Gauge (Page 320)
ChangeMouseCursor
Description
Specifies how the appearance of the cursor changes in runtime when it is above the icon.
Access in runtime Read and write
Syntax
Object.ChangeMouseCursor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
BOOLEAN
Optional.
TRUE, if the mouse cursor has the appearance of an arrow even when it is positioned above
the icon.
FALSE, if the mouse cursor has the appearance of a 3D arrow with a green lightning symbol.
This indicates in Runtime that the respective objective can be operated.
See also
SymbolLibrary (Page 427)
CheckMarkAlignment
Description
Specifies whether the fields are right-aligned.
Access in runtime: Read and write
Syntax
Object.CheckMarkAlignment[=CheckMarkAlignment]
Object
Required. An object of the type "ScreenItem" with the format:
• CheckBox
• OptionGroup
CheckMarkAlignment
Optional. A value or a constant that specifies whether the fields are right-aligned.
Value Explanation
0 The fields are arranged left aligned.
1 The fields are right-aligned.
See also
OptionGroup (Page 371)
CheckBox (Page 275)
CheckMarkCount
Description
Specifies the number of fields.
Access in runtime: Read and write
Syntax
Object.CheckMarkCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• CheckBox
• OptionGroup
Int32
Optional. A value or a constant that specifies the number of fields. Value range from 0 to 31
See also
OptionGroup (Page 371)
CheckBox (Page 275)
ClearOnError
Description
Specifies whether an invalid input in this object will be deleted automatically.
Access in runtime: Read and write
Syntax
Object.ClearOnError[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
BOOLEAN
Optional TRUE, if an invalid input in this object will be deleted automatically.
See also
IOField (Page 332)
ClearOnFocus
Description
Specifies whether the field entry will be deleted as soon as the I/O field is activated.
Access in runtime: Read and write
Syntax
Object.ClearOnFocus[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
BOOLEAN
Optional TRUE, if the field entry is deleted as soon as the I/O field is activated.
See also
IOField (Page 332)
Closeable
Description
Specifies whether the object can be closed in runtime.
Access in runtime: Read and write
Syntax
Object.Closeable[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional. TRUE if the object can be closed in runtime.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
Color
Description
Specifies the line color.
Access in runtime: Read and write
Syntax
Object.Color[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• CircularArc
• Connector
• EllipticalArc
• Line
• Polyline
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
Color
Optional. A value or a constant that specifies the line color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
CircularArc (Page 285)
Connector (Page 293)
ColorChangeHysteresis
Description
Specifies hysteresis as a percentage of the display value.
The "ColorChangeHysteresisEnable" property must have the value TRUE so that the hysteresis
can be calculated.
Access in runtime: Read and write
Syntax
Object.ColorChangeHysteresis[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the hysteresis as a percentage of the display
value.
See also
Bar (Page 259)
ColorChangeHysteresisEnabled
Description
Determines whether the object will be displayed with a hysteresis.
Access in runtime: Read and write
Syntax
Object.ColorChangeHysteresisEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the object will be displayed with a hysteresis.
See also
Bar (Page 259)
ColumnAdd
Description
Creates a new column. The newly created column is automatically referenced with
"ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• TrendRulerControl
STRING
Required. A value or a constant that specifies the name of a new column.
See also
ColumnIndex (Page 609)
TrendRulerControl (Page 441)
ColumnAlias
Description
Returns the display name of the column referenced with "ColumnIndex".
Syntax
Object.ColumnAlias[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the display name of the column.
See also
UserArchiveControl (Page 466)
ColumnAlignment
Description
Specifies the alignment of the column content in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnAlignment[=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the format:
• UserArchiveControl
HorizontalAlignment
Optional. A value or constant that determines the horizontal alignment.
See also
UserArchiveControl (Page 466)
ColumnAutoPrecisions
Description
Specifies whether the number of decimal places for a column referenced with "ColumnIndex" is
set automatically.
Access in runtime Read and write
Syntax
Object.ColumnAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "ColumnPrecisions" is used.
See also
UserArchiveControl (Page 466)
ColumnCaption
Description
Specifies the header of the current column.
Access in runtime: Read and write
Syntax
Object.ColumnCaption[=STRING]
Object
Required. A "ScreenItem" object with the characteristics:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the header of the current column.
See also
UserArchiveControl (Page 466)
ColumnCount
Description
Specifies the number of configured columns.
Access in runtime Read and write
Syntax
Object.ColumnCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the number of configured columns.
See also
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnDateFormat
Description
Specifies the date format.
Access in runtime Read and write
Syntax
Object.ColumnDateFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the date format.
See also
UserArchiveControl (Page 466)
ColumnDMVarName
Description
Specifies the name of a tag.
Access in runtime: Read and write
Syntax
Object.ColumnDMVarName[=STRING]
Object
Required. A "ScreenItem" object with the characteristics:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the name of a tag.
See also
UserArchiveControl (Page 466)
ColumnExponentialFormat
Description
Specifies whether the values of a column referenced with "ColumnIndex" are displayed in
exponential notation.
Access in runtime Read and write
Syntax
Object.ColumnExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the values are displayed in exponential notation.
FALSE if the values are not displayed in exponential notation.
See also
ColumnIndex (Page 609)
UserArchiveControl (Page 466)
ColumnFlagNotNull
Description
Specifies whether the user archive field assigned to a column referenced with "ColumnIndex" has
to have a value.
Access in runtime Read and write
Syntax
Object.ColumnFlagNotNull[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if a value is required.
FALSE, if no value is required.
See also
UserArchiveControl (Page 466)
ColumnFlagUnique
Description
Specifies whether the user archive field assigned to a column referenced with "ColumnIndex" has
to have a unique value. The values in this column must differ from one another.
Access in runtime Read and write
Syntax
Object.ColumnFlagUnique[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the value must be unique.
FALSE, if the value does not have to be unique.
See also
UserArchiveControl (Page 466)
ColumnHideText
Description
Specifies whether the text in a column referenced with "ColumnIndex" is hidden.
Access in runtime Read and write
Syntax
Object.ColumnHideText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the text in the current column is hidden.
FALSE, if the text in the current column is shown.
See also
UserArchiveControl (Page 466)
ColumnHideTitleText
Description
Specifies whether the header of a column referenced with "ColumnIndex" is hidden.
Access in runtime Read and write
Syntax
Object.ColumnHideTitleText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the header of the referenced column is hidden.
FALSE if the header of the referenced column is displayed.
See also
UserArchiveControl (Page 466)
ColumnIndex
Description
References a column. To access the properties of a column, you need to set ""ColumnIndex"".
Values between 0 and "ColumnIndex minus 1 are valid for "ColumnCount". The
"ColumnCount" property specifies the number of configured columns.
Access in runtime Read and write
Syntax
Object.ColumnIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that the specifies the column to be edited over the index.
See also
ColumnCount (Page 605)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnLeadingZeros
Description
Specifies how many leading zeros are displayed for the values of a column referenced with
"ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnLeadingZeros[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the number of leading zeros. The maximum
number is 11.
See also
UserArchiveControl (Page 466)
ColumnLength
Description
Specifies the number of characters displayed in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnLength[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the number of characters displayed.
See also
UserArchiveControl (Page 466)
ColumnMaxValue
Description
Returns the maximum value defined in the user archive of a column referenced with
"ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnMaxValue[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
STRING
Optional. A value or a constant that returns the maximum value of the column specified in
the user log.
See also
UserArchiveControl (Page 466)
ColumnMinValue
Description
Returns the minimum value defined in the user archive of a column referenced with
"ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnMinValue[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
STRING
Optional. A value or a constant that returns the minimum value of the column specified in
the user log.
See also
UserArchiveControl (Page 466)
ColumnName
Description
Specifies the name of a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that returns the name of the referenced column.
See also
ColumnIndex (Page 609)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnOrder
Description
No access in runtime.
ColumnPosition
Description
Specifies the position of a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnPosition[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the position of the column.
See also
UserArchiveControl (Page 466)
ColumnPrecisions
Description
Specifies the number of decimal places in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int16
Optional. A value or a constant that specifies the number of decimal places in the column.
See also
UserArchiveControl (Page 466)
ColumnReadAccess
Description
Returns the read access authorization defined in the user archive for a column referenced with
"ColumnIndex".
The number corresponds to the number that is assigned to the authorization in the "User
Administrator" editor.
Access in runtime Read and write
Syntax
Object.ColumnReadAccess[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that returns the authorization for read access specified in the
user log to the column.
See also
UserArchiveControl (Page 466)
ColumnReadonly
Description
Specifies whether the values of a column referenced with "ColumnIndex" can only be read.
Access in runtime Read and write
Syntax
Object.ColumnReadonly[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the values of the column are read-only values.
FALSE, if the values of the column are not read-only values.
See also
UserArchiveControl (Page 466)
ColumnRemove
Description
Removes a column referenced with its name.
Access in runtime Read and write
Syntax
Object.ColumnRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
STRING
Optional. A value or a constant that returns the name of the referenced column to be
removed.
See also
TrendRulerControl (Page 441)
ColumnRepos
Description
For multiple columns, specifies the position of a column referenced with "ColumnIndex".
If you have changed the position of the column with "ColumnRepos", "ColumnIndex" is
assigned the value of "ColumnRepos".
Syntax
Object.ColumnRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the position of the referenced column. Value
range from 0 to "ColumnCount" minus 1. Values outside this range have no effect.
0: The referenced column is positioned on the left.
See also
ColumnIndex (Page 609)
ColumnCount (Page 605)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnResize
Description
Specifies whether you can change the width of the columns.
Access in runtime Read and write
Syntax
Object.ColumnResize[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if you can change the width of the columns.
FALSE if you cannot change the width of the columns.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
Columns
Description
No access in runtime.
ColumnScrollbar
Description
Specifies when the horizontal scroll bar is to be displayed.
Access in runtime Read and write
Syntax
Object.ColumnScrollbar[=ScrollbarVisibility]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
ScrollbarVisibility
Optional. A value or a constant that specifies when the horizontal scroll bar is displayed.
Value Description
0 The horizontal scroll bar is not displayed.
1 If the display area is too small for all columns, the horizontal scroll bar is displayed.
2 The horizontal scroll bar is always displayed.
See also
UserArchiveControl (Page 466)
TrendRulerControl (Page 441)
OnlineTableControl (Page 347)
AlarmControl (Page 237)
ColumnSettings
Description
No access in runtime.
ColumnSettingsBufferView
Description
No access in runtime.
ColumnShowDate
Description
Specifies whether the date is to be displayed in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnShowDate[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the date is displayed in the column.
FALSE, if the date is not displayed in the column.
See also
UserArchiveControl (Page 466)
ColumnShowIcon
Description
Specifies whether a symbol is to be displayed in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnShowIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if an icon is displayed in the column.
FALSE, if no icon is displayed in the column.
See also
UserArchiveControl (Page 466)
ColumnShowTitleIcon
Description
Specifies whether a symbol is to be displayed in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnShowTitleIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if an icon is displayed in the column.
FALSE, if no icon is displayed in the column.
See also
UserArchiveControl (Page 466)
ColumnsMoveable
Description
No access in runtime.
ColumnSort
Description
Specifies the sorting type of a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
SortMode
Optional. A value or a constant that specifies the sorting mode.
Value Description
0 No sorting
1 Ascending sorting from the smallest to largest value
2 Descending sorting from the largest to smallest value
See also
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnSortIndex
Description
Specifies the sorting order for a column referenced with "ColumnIndex" in which the columns
are sorted one after another.
Access in runtime Read and write
Syntax
Object.ColumnSortIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the sorting index of the column.
Value Description
0 The sorting direction defined in the "ColumnSort (Page 620)" property is set to "No sorting".
1 The number 1 is displayed in the header. Sorting by this column takes place first.
2-4 The selected number is displayed in the header. The columns are sorted in the corresponding order.
See also
ColumnIndex (Page 609)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnStartValue
Description
Returns the start value defined in the user log of a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnStartValue[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
STRING
Optional. A value or a constant that returns the start value of the column specified in the user
log.
See also
UserArchiveControl (Page 466)
ColumnStringLength
Description
Returns the string length defined in the user archive for a column referenced with
"ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnStringLength[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that returns the length of the character string of the column
specified in the user log.
See also
UserArchiveControl (Page 466)
ColumnTextAckGroup
Description
No access in runtime.
ColumnTextAlarmState
Description
No access in runtime.
ColumnTextAlarmText
Description
No access in runtime.
ColumnTextBit
Description
No access in runtime.
ColumnTextClassName
Description
No access in runtime.
ColumnTextConnection
Description
No access in runtime.
ColumnTextDataType
Description
No access in runtime.
ColumnTextDate
Description
No access in runtime.
ColumnTextDateTime
Description
No access in runtime.
ColumnTextDbNumber
Description
No access in runtime.
ColumnTextDevice
Description
No access in runtime.
ColumnTextDiagnosable
Description
No access in runtime.
ColumnTextFormat
Description
No access in runtime.
ColumnTextGroup
Description
No access in runtime.
ColumnTextLogTime
Description
No access in runtime.
ColumnTextNumber
Description
No access in runtime.
ColumnTextOffset
Description
No access in runtime.
ColumnTextPassword
Description
No access in runtime.
ColumnTextRead
Description
No access in runtime.
ColumnTextTagConnection
Description
No access in runtime.
ColumnTextTime
Description
No access in runtime.
ColumnTextTrend
Description
No access in runtime.
ColumnTextType
Description
No access in runtime.
ColumnTextUser
Description
No access in runtime.
ColumnTextValue
Description
No access in runtime.
ColumnTextWrite
Description
No access in runtime.
ColumnTextXValue
Description
No access in runtime.
ColumnTimeFormat
Description
Specifies the time format for a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnTimeFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the time format for the column.
Value Description
Automatic The time format is set automatically.
HH:mm:ss.ms Hours:Minutes:Seconds, e.g. 15:35:44.240.
hh:mm:ss tt Hours:Minutes:Seconds AM/PM, e.g. 03:35:44 PM.
hh:mm:ss.ms tt Hours:Minutes:Seconds.Milliseconds AM/PM, e.g. 03:35:44.240 PM.
See also
UserArchiveControl (Page 466)
ColumnTitleAlignment
Description
Specifies the alignment of the header in a column referenced with "ColumnIndex".
Access in runtime Read and write
Syntax
Object.ColumnTitleAlignment[=GridColumnHeaderHorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridColumnHeaderHorizontalAlignment
Optional. A value or a constant that specifies the column header alignment.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnTitles
Description
Specifies whether the column header is displayed.
Access in runtime: Read and write
Syntax
Object.ColumnTitles[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchive Control
BOOLEAN
Optional.
TRUE if the column header is displayed.
FALSE if the column header is not displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnType
Description
Returns the data type defined in the user archive of a column referenced with "ColumnIndex".
Syntax
Object.ColumnType[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that returns the data type of the column specified in the user
log.
See also
UserArchiveControl (Page 466)
ColumnVisible
Description
Specifies whether the column referenced with "ColumnIndex" is displayed in the object.
Access in runtime Read and write
Syntax
Object.ColumnVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the referenced column is displayed.
FALSE if the referenced column is not displayed.
See also
ColumnIndex (Page 609)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ColumnWidth
Description
No access in runtime.
ColumnWriteAccess
Description
Returns the write access authorization defined in the user archive for a column referenced with
"ColumnIndex".
The number corresponds to the number that is assigned to the authorization in the "User
Administrator" editor.
Access in runtime Read and write
Syntax
Object.ColumnWriteAccess[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that returns the authorization for write access specified in the
user log to the column.
See also
UserArchiveControl (Page 466)
ComboboxFont
Description
No access in runtime.
CompatibilityMode
Description
No access in runtime.
ComplexViewToolbar
Description
No access in runtime.
ComplexViewToolbarBounds
Description
No access in runtime.
ComponentInfoText
Description
No access in runtime.
ComputerName
Description
Returns the name of the computer on which the alarm object was triggered.
ComputerName (readonly)
ConfiguredAlarmClasses
Description
No access in runtime.
ConnectionType
Description
Specifies the type of connector. You can select one of two connection types.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ConnectionType[=ConnectorConnectionType]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
You have no access in runtime with the following format:
• SmartClientView
ConnectorConnectionType
Optional. A value or a constant that specifies the type of connector.
(0): Automatic: Both objects are connected by a polyline made up of horizontal and vertical
parts.
(1): Simple: Both objects are connected by a straight line between the connecting points. The
fields are right-aligned.
See also
Connector (Page 293)
SmartClientView (Page 412)
ConnectOnStart
Description
No access in runtime.
ConnectTrendWindows
Description
Specifies whether the configured trend views are connected. The requirement is that you have
configured several trend views.
The connected trend views have the following properties:
• A common X axis
• A scrollbar
• A ruler
Syntax
Object.ConnectTrendWindows[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if all configured trend views are connected.
FALSE if the trend views are displayed separately.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
Context
Description
Reads or sets the alarm object server prefix.
ContinousChange
Description
Specifies whether the value of the "ProcessValue" property will be transferred when the mouse
button is released or as soon as the slider position changes in Runtime.
Access in runtime: Read and write
Syntax
Object.ContinousChange[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Slider
BOOLEAN
Optional TRUE, if the value of the property "ProcessValue" will be transferred when the
mouse button is released or as soon as the slider position changes in Runtime.
See also
Slider (Page 408)
ControlDesignMode
Description
Specifies the control design.
Access in runtime Read and write
Syntax
Object.ControlDesignMode[=RTControlModes]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
RTControlModes
Optional. A value or a constant that specifies the control design.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
CornerRadius
Description
No access in runtime.
CornerStyle
Description
Specifies the shape of the corners.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.CornerStyle[=CornerStye | LineJoinStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• Tubepolyline
• WindowSlider
You have no access in runtime with the following format:
• Switch
• TubeArcObject
CornerStyle | LineJoinStyle
Optional. A value or a constant that specifies the shape of the corners.
Value Description
0 Solid line
1 Dashed line
2 Dotted line
3 Dashed and dotted line
4 Dash-dot-dot line
Count
Description
Returns the number of elements in the specified list.
Access in Runtime: Read
Syntax
Object.Count
Object
Required A "Collection" object.
CountDivisions
Description
Specifies the number of segments in which the bar will be divided by the large marking lengths
of the scale.
Access in runtime: Read and write
Syntax
Object.CountDivisions[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• Bar
Int32
Optional A value or a constant that specifies the number of segments in which the bar will be
divided by the large marking lengths of the scale.
0-100: An object can be divided into a maximum of 100 segments
= 0: The optimum number of segments will be established automatically.
See also
Bar (Page 259)
CountOfLinesPerAlarms
Description
No access in runtime.
CountOfVisibleAlarms
Description
No access in runtime.
CountSubDivisions
Description
Specifies the number of scale marks between two main marks.
Syntax
Object.CountSubDivisions[= Int32]
Object
Required. A ScreenItem object with the following format
• Bar
Int32
Optional. A value or a constant that specifies the number of scale segments.
See also
Bar (Page 259)
CountVisibleItems
Description
Specifies how many lines the selection list will contain. If the number of configured texts is
greater than this value, then the selection list will have a vertical scroll bar.
Access in runtime:
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.CountVisibleItems[=Int32]
Object
Required. A "ScreenItem" object with the format:
• ComboBox
• ListBox
• SymbolicIOField
You have no access in runtime with the following format:
• StatusForce
• TrendView
• UserView
Int32
Optional A value or a constant that specifies how many lines the selection list will contain.
See also
ComboBox (Page 290)
Listbox (Page 339)
SymbolicIOField (Page 422)
StatusForce (Page 414)
TrendView (Page 451)
UserView (Page 478)
CurrentContext
Description
Returns a character string depending on the use of the function.
If the function is contained in a screen in the screen window, CurrentContext returns the
symbolic server name which supplies the screen. Example: "WinCCProject_MyComputer::"
If the function is contained in the main screen, an empty character string is returned.
Access in Runtime: Read
Syntax
Object.CurrentContext
Object
Required A "HMIRuntime" object.
See also
HMIRuntime (Page 209)
CursorControl
Description
Specifies whether the mouse cursor jumps to the next field of the TAB sequence after leaving the
field.
Access in runtime: Read and write
Syntax
Object.CursorControl[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
• SymbolicIOField
BOOLEAN
Optional TRUE, if the mouse cursor jumps to the next field of the TAB-order after leaving the
field.
Comments
For this purpose, the "CursorMode" property must be set to TRUE.
See also
IOField (Page 332)
SymbolicIOField (Page 422)
Curves
Description
No access in runtime.
1.5.5.4 Properties D
DangerRangeColor
Description
Specifies the color of the danger range on the scale of the "Gauge" object.
The "DangerRangeVisible" property must have the value TRUE so that the warning range is
displayed.
Access in runtime Read and write
Syntax
Object.DangerRangeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the color of the warning range.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
DangerRangeStart
Description
Specifies at which scale value the danger range of the "Gauge" object will start.
The "DangerRangeColor" property must have the value TRUE so that the warning range is
displayed.
Access in runtime Read and write
Syntax
Object.DangerRangeStart[=SINGLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
SINGLE
Optional. A value or a constant that specifies the scale value for the start of the warning
range.
Comments
The range extends from the value "DangerRangeStart" through to the end of the scale.
See also
Gauge (Page 320)
DangerRangeVisible
Description
Specifies whether the warning range in the scale of the "Gauge" object will be displayed.
Access in runtime: Read and write
Syntax
Object.DangerRangeVisible[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
BOOLEAN
Optional TRUE, if the warning range will be displayed in the scale.
Comments
Specifies the color of the warning range with the "DangerRangeColor" property.
Specifies the start of the warning range with the "DangerRangeStart" property.
See also
Gauge (Page 320)
DataFormat
Description
Returns the display format.
Access in runtime: Read and write
Syntax
Object.DataFormat[=IOFieldDataFormat]
Object
Required. An object of the type "ScreenItem" with the format:
• IOField
IOFieldDataFormat
Optional. A value or a constant that returns the display format.
See also
IOField (Page 332)
DataLogs
Description
Returns an object of type "DataLogs".
Access in Runtime: Read
Syntax
Object.DataLogs
Object
Required A "Logging" object.
See also
Logging (Page 214)
DataProviderGuid
Description
Returns the GUID of the control.
Access in Runtime: Read
Syntax
Object.DataProviderGuid
Object
Required. An object of the "UserArchiveControl" type.
Example
Dim objRecipeview
Set objRecipeview= HMIRuntime.Screens("Screen_1").ScreenItems("Recipeview_1")
SmartTags("Tag1") = objRecipeView.DataProviderGuid
See also
UserArchiveControl (Page 466)
DataRecordNameCaption
Description
No access in runtime.
DataRecordNrCaption
Description
No access in runtime.
DataSet
Description
Returns an object of type "DataSet".
Access in Runtime: Read
Syntax
Object.DataSet
Object
Required A "Screen" object.
See also
HMIRuntime (Page 209)
Screen (Page 216)
DataSource
Description
No access in runtime.
DefaultFilterEom
Description
No access in runtime.
DefaultHitListFilterEom
Description
No access in runtime.
DefaultMsgFilterSQL
Description
Specifies an SQL statement as default for alarm filter.
Access in runtime: Read and write
Syntax
Object.DefaultMsgFilterSQL[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
STRING
Optional. A value or a constant that specifies an SQL statement as default for alarm filter.
See also
AlarmControl (Page 237)
DefaultSort
Description
Specifies the type of sorting.
Access in runtime: Read and write
Syntax
Object.DefaultSort[=SortMode]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
SortMode
Optional. A value or a constant that specifies the type of sorting.
Value Explanation
0 No sorting
1 The alarms are updated starting from the bottommost line.
2 The alarms are updated starting from the topmost line.
See also
AlarmControl (Page 237)
DefaultSort2
Description
Specifies the type of sorting.
Access in runtime: Read and write
Syntax
Object.DefaultSort2[=SortMode]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
SortMode
Optional. A value or a constant that specifies the type of sorting.
Value Explanation
0 No sorting
1 The alarms are updated starting from the bottommost line.
2 The alarms are updated starting from the topmost line.
See also
AlarmControl (Page 237)
DefaultSort2Column
Description
Specifies a column for initial sorting of the table entries.
If no value is assigned, alarms are sorted according to the following column order:
• Date/Time/Number
If you configure the "Alarm text" column as a value, for example, alarms are sorted according
to the following column order:
• Alarm text/Date/Time/Number
Access in runtime Read and write
Syntax
Object.DefaultSort2Column[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the column for initial sorting of the
table entries.
See also
AlarmControl (Page 237)
DeviceStyle
Description
No access in runtime.
DiagnosticsContext
Description
Specifies the diagnostics context.
Access in runtime: Read and write
Syntax
Object.DiagnosticsContext[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
STRING
Optional. A value or a constant that specifies the diagnostics context.
See also
AlarmControl (Page 237)
DiagramAreaHeight
Description
No access in runtime.
DiagramAreaLeft
Description
No access in runtime.
DiagramAreaTop
Description
No access in runtime.
DiagramAreaWidth
Description
No access in runtime.
DialColor
Description
Specifies the color of the dial for the selected object.
Access in runtime Read and write
Syntax
Object.DialColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
• Gauge
Color
Optional. A value or a constant that specifies the color of the dial.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Clock (Page 287)
Gauge (Page 320)
DialFillStyle
Description
Specifies the type of background.
Access in runtime Read and write
Syntax
Object.DialFillStyle[=GaugeFillStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
GaugeFillStyle
Optional. A value or a constant that specifies the type of background.
See also
Gauge (Page 320)
DialPicture
Description
Specifies a graphic for the dial face.
Access in runtime: Read and write
Syntax
Object.DialPicture[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following characteristics:
• Gauge
HmiObjectHandle
Optional. A value or a constant that specifies the graphic for the dial face.
See also
Gauge (Page 320)
DialSize
Description
Specifies the diameter of the scale in relation to the smaller value of the geometry attributes
"Width" and "Height".
Access in runtime: Read and write
Syntax
Object.DialSize[=SINGLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
SINGLE
Optional A value or a constant that specifies the diameter of the scale in relation to the
smaller value of the geometry attributes "Width" and "Height".
See also
Gauge (Page 320)
Display3D
Description
No access in runtime.
DisplayButton2Plc
Description
No access in runtime.
DisplayButtonComparison
Description
No access in runtime.
DisplayButtonDelete
Description
No access in runtime.
DisplayButtonFromPlc
Description
No access in runtime.
DisplayButtonHelp
Description
No access in runtime.
DisplayButtonNew
Description
No access in runtime.
DisplayButtonSave
Description
No access in runtime.
DisplayButtonSaveAs
Description
No access in runtime.
DisplayCentury
Description
No access in runtime.
DisplayComboBox
Description
No access in runtime.
DisplayGridLines
Description
No access in runtime.
DisplayLabeling
Description
No access in runtime.
DisplayNumbers
Description
No access in runtime.
DisplayOptions
Description
Specifies whether alarms whose view was suppressed are displayed.
Access in runtime Read and write
Syntax
Object.DisplayOptions[=AlarmDisplayOptions]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
AlarmDisplayOptions
Optional. A value or a constant that specifies whether alarms that were hidden are displayed.
Value Explanation
0 All messages
1 Only displayed messages
2 Only hidden messages
See also
AlarmControl (Page 237)
DisplaySize
Description
No access in runtime.
DisplayStatusBar
Description
No access in runtime.
DisplaySystemTime
Description
No access in runtime.
DisplayTable
Description
No access in runtime.
DoubleClickAction
Description
Specifies the action to be executed in runtime by double-clicking on a message line.
Access in runtime Read and write
Syntax
Object.DoubleClickAction[=AlarmControlActions]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
AlarmControlActions
Optional. A value or a constant that specifies the action to be executed in runtime when you
double-click on an alarm line.
See also
AlarmControl (Page 237)
DrawInsideFrame
Description
Specifies whether the border line is to be shown with a line thickness of greater than 1 within the
border or symmetrically to the border.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.DrawInsideFrame[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• OptionGroup
• Rectangle
• RoundButton
• SymbolicIOField
• TextField
• WindowSlider
You have no access in runtime with the following format:
• Switch
• TubeArcObject
BOOLEAN
Optional. TRUE if the border line is shown with a line thickness of greater than 1 within the
border.
Drive
Description
No access in runtime.
EdgeStyle
Description
Specifies the line style.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.EdgeStyle[=LineStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle *
• CircleSegment
• ComboBox
• Ellipse *
• EllipseSegment
• GraphicIOField
• GraphicView
• IOField *
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon *
• Rectangle *
• RoundButton
• SymbolicIOField
• TextField *
• WindowSlider
* RT Advanced read and write access
LineStyle
Optional. A value or a constant that specifies the line style. Value range from -1 to 4.
The objects "Ellipse", "Circle", "Rectangle" and "Polygon" support the line styles:
The objects "TextField" and "IOField" support only the line styles:
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
ComboBox (Page 290)
Ellipse (Page 300)
EllipseSegment (Page 303)
EditOnFocus
Description
Specifies whether the data input is immediately possible if the input field is selected using the
<Tab> key.
Access in runtime: Read and write
Syntax
Object.EditOnFocus[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
• SymbolicIOField
BOOLEAN
Optional TRUE, if the data input is immediately possible and the input field has been selected
using the <Tab> key.
See also
IOField (Page 332)
SymbolicIOField (Page 422)
Enabled
Description
Specifies whether the selected object can be operated in runtime.
Access in runtime: Read and write
Syntax
Object.Enabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl *
• AlarmView **
• Bar
• Button
• ChannelDiagnose *
• CheckBox *
• Circle
• CircleSegment *
• CircularArc *
• Clock
• ComboBox *
• Connector *
• DateTimeField **
• DiscSpaceView *
• Ellipse
• EllipseSegment *
• EllipticalArc *
• FunctionTrendControl **
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox *
• MediaPlayer
• MultiLineEdit *
• OptionGroup *
• PLCCodeViewer **
• PdfView **
• Polygon
• Polyline
• ProDiagOverview ***
• RecipeView **
• Rectangle
• RoundButton *
• S7GraphOverview **
• Slider
• SmartClientView **
• StatusForce **
• Switch **
• SymbolLibrary
• SymbolicIOField
• SysDiagControl ****
• TextField
• TrendRulerControl *
• TrendView **
• TubeArcObject *
• TubeDoubleTeeObject *
• TubeTeeObject *
• Tubepolyline *
• UserView
• WindowSlider *
* RT Advanced No access
** RT Professional No access
*** RT Advanced Read access
**** Read access only
BOOLEAN
Optional. T RUE, if the specified object can be operated in Runtime.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
Bar (Page 259)
Button (Page 267)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
FunctionTrendControl (Page 309)
EnableDelete
Description
Specifies whether data can be deleted in runtime.
Access in runtime: Read and write
Syntax
Object.EnableDelete[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if data can be deleted in runtime.
FALSE, if data cannot be deleted in runtime.
See also
UserArchiveControl (Page 466)
EnableEdit
Description
Specifies whether the data shown can be edited in runtime.
Access in runtime Read and write
Syntax
Object.EnableEdit[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the data can be changed in runtime.
FALSE if the data cannot be changed in runtime.
See also
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
EnableInsert
Description
Specifies whether data can be inserted in runtime.
Access in runtime: Read and write
Syntax
Object.EnableInsert[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if data can be inserted in runtime.
FALSE, if data cannot be inserted in runtime.
See also
UserArchiveControl (Page 466)
EnableNavigateButtons
Description
No access in runtime.
EnableNavigateKeys
Description
No access in runtime.
EncryptCommunication
Description
No access in runtime.
EndAngle
Description
Specifies the angle by which the end point deviates from the zero position (0°).
Access in runtime Read and write
Syntax
Object.EndAngle[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• CircleSegment
• CircularArc
• EllipseSegment
• EllipticalArc
• TubeArcObject
Int32
Optional. A value or a constant that specifies the angle by which the end point deviates from
the zero position (0°).
See also
CircleSegment (Page 282)
CircularArc (Page 285)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
TubeArcObject (Page 457)
EndLeft
Description
No access in runtime.
EndStyle
Description
Specifies how the line end is displayed.
Access in runtime: Read and write
Syntax
Object.EndStyle[=LineEndStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
• Line
• Polyline
LineEndStyle
Optional. A value or a constant that specifies the line-end shapes.
* Only RT Professional
See also
Line (Page 336)
Polyline (Page 381)
Connector (Page 293)
EndTop
Description
No access in runtime.
EnterButtonVisible
Description
No access in runtime.
EntryNameCaption
Description
No access in runtime.
EntryNameColumnWidth
Description
No access in runtime.
EntryValueColFirst
Description
No access in runtime.
EntryValueColumnWidth
Description
No access in runtime.
EntryValueFieldLength
Description
No access in runtime.
EntryValuePos
Description
No access in runtime.
ErrorColor
Description
Specifies the color of errors in the GRAPH overview.
Access in runtime: Read and write
Syntax
Object.ErrorColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
Color
Optional. A value or a constant that specifies the color for errors.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
The background color is not visible if the "BorderStyle" property has the value "0".
See also
S7GraphOverview (Page 402)
ErrorDescription
Description
Returns one of the following error descriptions in English:
Output Description
"" OK
"Operation Failed" Execution error
"Variable not found" Tag error
"Server down" Server not available.
"An error occured for one or several tags" Multi Tag Error (Error in one or several tags)
To obtain an error description, first of all carry out the Read method.
Note
If the error occurs when accessing via the TagSet object, evaluate the ErrorDescription property
for each tag of the TagSet object.
Syntax
Object.ErrorDescription
Object
Required A "Tag" object.
Example
The following example shows the error description for the "Tag1" tag:
'VBS72
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objtag.Read
MsgBox objTag.ErrorDescription
The following example adds two tags to the TagSet list and outputs the ErrorDescription
property as Trace:
'VBS179
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "ErrorDescription: " & group.ErrorDescription & vbNewLine
The ErrorDescription property of a tag contained in the list may be accessed as follows:
See also
Tag (Page 229)
TagSet (list) (Page 233)
Errorflag
Description
Specifies whether an error description is displayed in the device / detail view.
Access in runtime Read and write
Syntax
Object.Errorflag[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
BOOLEAN
Optional.
TRUE, if an error description is displayed in the device/detail view.
FALSE, if no error description is displayed in the device/detail view.
See also
S7GraphOverview (Page 402)
ES2RT_ButtonPositions
Description
No access in runtime.
ES2RT_ColumnOrder
Description
No access in runtime.
ES2RT_ColumnWidth
Description
No access in runtime.
ES2RT_EntryNameColumnWidth
Description
No access in runtime.
ES2RT_EntryValueColumnWidth
Description
No access in runtime.
ES2RT_ListAreaHeight
Description
No access in runtime.
ES2RT_ListAreaWidth
Description
No access in runtime.
ES2RT_MessageAreaHeight
Description
No access in runtime.
ES2RT_MessageAreaWidth
Description
No access in runtime.
ES2RT_StoreAsCheckBack
Description
No access in runtime.
Es2rtButtonPositions
Description
No access in runtime.
Es2rtTableBounds
Description
No access in runtime.
EscButtonVisible
Description
No access in runtime.
EsPreviewType
Description
No access in runtime.
EvenRowBackColor
Description
No access in runtime.
ExportDelimiter
Description
No access in runtime.
ExportDirectoryChangeable
Description
Specifies whether the data export directory can be changed in runtime.
Access in runtime: Read and write
Syntax
Object.ExportDirectoryChangeable[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the directory for data export can be changed in runtime.
FALSE if the directory for data export cannot be changed in runtime.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
ExportDirectoryname
Description
Defines the directory to which the exported Runtime data is written.
Access in runtime: Read and write
Syntax
Object.ExportDirectoryname[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional A value or a constant which specifies the directory.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportFileExtension
Description
Specifies the file extension of the export file. Only the "csv" file extension is currently supported.
Syntax
Object.ExportFileExtension[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. Specifies the file extension of the export file.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportFilename
Description
Specifies the name of the target file for the exported runtime data.
Access in runtime: Read and write
Syntax
Object.ExportFilename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. Specifies the name of the target file for the exported runtime data.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportFilenameChangeable
Description
Specifies whether the export file name can be changed in runtime.
Access in runtime: Read and write
Syntax
Object.ExportFilenameChangeable[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the export file can be renamed in runtime.
FALSE if the export file cannot be renamed in runtime.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportFormat
Description
No access in runtime.
ExportFormatGuid
Description
Specifies the assignment of ID number and export provider.
Access in runtime: Read and write
Syntax
Object.ExportFormatGuid[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or constant that specifies the assignment of ID number and export
provider.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportFormatName
Description
Defines the export file format. Only the "csv" file format is currently available for the export.
Access in runtime: Read and write
Syntax
Object.ExportFormatName[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional A value or a constant that defines the file format for export.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
ExportParameters
Description
Specifies the parameters of the selected format by means of the properties dialog.
Access in runtime Read and write
Syntax
Object.ExportParameters
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
ExportParameters
Optional. A value or constant that specifies the parameters of the selected format in the
Properties dialog.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportSelection
Description
Specifies which runtime data of the control is exported.
Access in runtime: Read and write
Syntax
Object.ExportSelection[=ExportRange]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
ExportRange
Optional. A value or a constant that specifies which runtime data of the control can be
exported.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExportShowDialog
Description
Enables the display of the export dialog during runtime.
Syntax
Object.ExportShowDialog[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional TRUE, if the dialog box is shown in Runtime.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ExtendedZoomingEnable
Description
Specifies whether the operator can zoom the screen in or out in runtime by turning the mouse
wheel.
Access during runtime: Read and write
Syntax
Object.ExtendedZoomingEnable[=BOOLEAN]
Object
Necessary. A "Screen" object.
BOOLEAN
Optional TRUE, if the operator can zoom the screen in and out in runtime.
Example
The following example shows how the extended zoom can be enabled for the NewPDL1 screen:
'VBS155
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
objScreen.ExtendedZoomingEnable = 1
See also
Screen (Page 216)
ExtraHeightOffset
Description
No access in runtime.
FieldLength
Description
No access in runtime.
FileName
Description
Specifies the name of the file to be loaded.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FileName[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
You have no access in runtime with the following format:
• PdfView
STRING
Optional. A value or a constant that specifies the name of the file to be loaded.
See also
MediaPlayer (Page 342)
FillColorMode
Description
Specifies the type of foreground for the selected object.
Access in runtime Read and write
Syntax
Object.FillColorMode[=SymbolLibraryColorMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
SymbolLibraryColorMode
Optional. A value or a constant that specifies the type of foreground for the object.
See also
SymbolLibrary (Page 427)
FillPattern
Description
No access in runtime.
FillPatternColor
Description
Specifies the color of the fill pattern.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FillPatternColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicView
• IOField
• OptionGroup
• Polygon
• Rectangle
• RoundButton
• SymbolicIOField*
• TextField
• WindowSlider
*: Read access only
Color
Optional. A value or a constant that specifies the color of the fill pattern.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
ComboBox (Page 290)
Ellipse (Page 300)
EllipseSegment (Page 303)
GraphicView (Page 327)
IOField (Page 332)
Listbox (Page 339)
OptionGroup (Page 371)
Polygon (Page 378)
Rectangle (Page 395)
RoundButton (Page 398)
SymbolicIOField (Page 422)
FillStyle
Description
Specifies whether the background color is displayed with a broken line.
Access in runtime Read and write
Syntax
Object.FillStyle[=LineFillStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Line
• Polyline
LineFillStyle
Optional. A value or a constant that specifies the fill style.
See also
Line (Page 336)
Polyline (Page 381)
FillingDirection
Description
Specifies the fill direction.
Syntax
Object.FillingDirection[=FillDirection]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicView
• OptionGroup
• Polygon
• Rectangle
• RoundButton
• TextField
• WindowSlider
FillDirection
Optional. A value or a constant which specifies the fill direction.
Filter
Description
No access in runtime.
FilterSQL
Description
Sets an SQL statement for the filter criterion.
Access in runtime: Read and write
Syntax
Object.FilterSQL[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• UserArchiveControl
STRING
Optional. A value or constant that specifies the SQL statement for the filter criterion.
See also
UserArchiveControl (Page 466)
FilterTag
Description
No access in runtime.
FilterText
Description
No access in runtime.
FirstConnectedObject
Description
No access in runtime.
FirstConnectedObjectIndex
Description
Specifies the index number of the upper connector point.
Access in runtime: Read and write
Syntax
Object.FirstConnectedObjectIndex[=Int]
Object
Int
Optional. A value or a constant that specifies the index number of the upper connector point.
See also
Connector (Page 293)
FirstConnectedObjectName
Description
Specifies the name of the object that is docked to the upper connector point.
Access in runtime: Read and write
Syntax
Object.FirstConnectedObjectName[=String]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
String
Optional. A value or a constant that specifies the name of the object that is docked to the
upper connector point.
See also
Connector (Page 293)
FirstGradientColor
Description
No access in runtime.
FirstGradientOffset
Description
No access in runtime.
FitToLargest
Description
No access in runtime.
FitToSize
Description
No access in runtime.
FitToSizeLowerRows
Description
No access in runtime.
FitToSizeUpperRows
Description
No access in runtime.
FixedAspectRatio
Description
Specifies whether the aspect ratio should be maintained or changed when the symbol size is
altered.
Access in runtime: Read and write
Syntax
Object.FixedAspectRatio[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• SymbolLibrary
BOOLEAN
Optional TRUE, if the aspect ratio should be maintained when the symbol size is altered.
See also
SymbolLibrary (Page 427)
Flashing
Description
Specifies whether the selected object flashes in runtime.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.Flashing[=FlashingType]
Object
Required. An object of the type "ScreenItem" with the format:
• Clock
• Gauge
• Slider
You have no access in runtime with the following format:
• AlarmView
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Connector
• DateTimeField
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• OptionGroup
• Polygon
• Polyline
• RecipeView
• Rectangle
• RoundButton
• ScreenWindow
• SmartClientView
• StatusForce
• Switch
• SymbolicIOField
• SymbolLibrary
• SysDiagControl
• TextField
• TrendView
• TubeArcObject
• UserView
• WindowSlider
FlashingType
Optional. A value or a constant that specifies whether the object flashes in runtime.
Designation Description
None The object does not flash in runtime.
Standard The object flashes in runtime.
FlashingColorOff
Description
Specifies the color of the border line for the flashing status "Off".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FlashingColorOff[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• IOField
• Line
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
Color
Optional. A value or a constant that specifies the color of the border line for the flashing
status "Off".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Button (Page 267)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
IOField (Page 332)
Line (Page 336)
OptionGroup (Page 371)
Polygon (Page 378)
Polyline (Page 381)
Rectangle (Page 395)
RoundButton (Page 398)
SymbolicIOField (Page 422)
TextField (Page 438)
Bar (Page 259)
CheckBox (Page 275)
Switch (Page 418)
TubeArcObject (Page 457)
FlashingColorOn
Description
Specifies the color of the border line for the flashing status "On".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FlashingColorOn[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• IOField
• Line
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
Color
Optional. A value or a constant that specifies the color of the border line for the flashing
status "On".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Button (Page 267)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
IOField (Page 332)
Line (Page 336)
OptionGroup (Page 371)
Polygon (Page 378)
Polyline (Page 381)
Rectangle (Page 395)
RoundButton (Page 398)
SymbolicIOField (Page 422)
TextField (Page 438)
Bar (Page 259)
CheckBox (Page 275)
Switch (Page 418)
TubeArcObject (Page 457)
FlashingEnabled
Description
Specifies whether flashing is activated for the object in runtime.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FlashingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• IOField
• Line
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
BOO LEAN
Optional.
TRUE if flashing is activated for the object in runtime.
FALSE if flashing is not activated for the object in runtime.
See also
Button (Page 267)
Circle (Page 279)
FlashingOnLimitViolation
Description
No access in runtime.
FlashingRate
Description
Specifies the flash rate of the border line.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FlashingRate[=FlashingRate]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• IOField
• Line
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton
• SymbolicIOField*
• TextField
* Read access only
FlashingRate
Optional. A value or a constant that specifies the flash rate of the border line.
See also
Button (Page 267)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
IOField (Page 332)
Line (Page 336)
OptionGroup (Page 371)
Polygon (Page 378)
Polyline (Page 381)
Rectangle (Page 395)
RoundButton (Page 398)
SymbolicIOField (Page 422)
TextField (Page 438)
Bar (Page 259)
CheckBox (Page 275)
Switch (Page 418)
TubeArcObject (Page 457)
FlashTransparentColor
Description
Specifies the color of the bitmap object of a flashing graphic that is set to "transparent".
Access in runtime: Read and write
Syntax
Object.FlashTransparentColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• GraphicIOField
Color
Optional. A value or a constant that specifies the color of the bitmap object of a flashing
graphic that is set to "transparent".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
The background color is not visible if the "BorderStyle" property has the value "0".
See also
GraphicIOField (Page 324)
Flip
Description
Specifies whether the symbol is flipped on the vertical and / or horizontal center axis of the
symbol.
Access in runtime Read and write
Syntax
Object.Flip[=SymbolLibraryFlip]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolLibrary
SymbolLibraryFlip
Optional. A value or a constant that specifies whether the symbol is flipped on the vertical
and / or horizontal center axis of the symbol.
See also
SymbolLibrary (Page 427)
FocusColor
Description
Specifies the color of the focus border when the object has the focus.
Access in runtime:
• RT Advanced: Read and write
• RT Professional: No access
Syntax
Object.FocusColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmView
• Button
• GraphicIOField
• RecipeView
• Slider *
• StatusForce
• Switch
• TrendView
* RT Professional read and write access
You have no access in runtime with the following format:
• SymbolicIOField
Color
Optional. A value or a constant that specifies the color of the focus border.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmView (Page 251)
RecipeView (Page 389)
Slider (Page 408)
StatusForce (Page 414)
Switch (Page 418)
TrendView (Page 451)
Button (Page 267)
GraphicIOField (Page 324)
SymbolicIOField (Page 422)
FocusWidth
Description
Specifies the border width when the object has the focus.
Access in runtime:
• RT Advanced: Read and write
• RT Professional: No access
Syntax
Object.FocusWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmView
• Button
• GraphicIOField
• RecipeView
• Slider *
• StatusForce
• Switch
• TrendView
* RT Professional read and write access
You have no access in runtime with the following format:
• SymbolicIOField
Int32
Optional. A value or a constant that specifies the border width in pixels. Value range from 1
to 10.
See also
AlarmView (Page 251)
RecipeView (Page 389)
Slider (Page 408)
StatusForce (Page 414)
Switch (Page 418)
TrendView (Page 451)
Button (Page 267)
GraphicIOField (Page 324)
SymbolicIOField (Page 422)
Font
Description
Specifies the font.
The font object has the following sub-properties
• Size (Font Size)
• Bold (yes/no)
• Name (font name)
• Italic (yes/no)
• Underline (underline yes/no)
• StrikeThrough (yes/no)
If two font properties are directly assigned, only the default property "Name" is assumed.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.Font.[Size|Bold|Name|Italic|Underline|StrikeThrough][=Value]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• Bar
• Clock
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• Slider
• TrendRulerControl
• UserArchiveControl
You have no access in runtime with the following format:
• Button
• CheckBox
• ComboBox
• DateTimeField
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• ProtectedAreaNameView
• RangeLabelView
• RecipeView
• RoundButton
• SmartClientView
• Switch
• SymbolicIOField
• TextField
• TrendView
• ZoneLabelView
Value
Optional. A value or a constant which specifies the selected subproperty.
Example
'VBS74
Dim objControl1
Dim objControl2
Set objControl1 = ScreenItems("Control1")
Set objControl2 = ScreenItems("Control2")
objControl2.Font.Name = objControl1.Font.Name ' take over only the type of font
See also
AlarmControl (Page 237)
Clock (Page 287)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
Slider (Page 408)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
DateTimeField (Page 296)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
ProtectedAreaNameView (Page 385)
RangeLabelView (Page 386)
RecipeView (Page 389)
RoundButton (Page 398)
SmartClientView (Page 412)
Switch (Page 418)
SymbolicIOField (Page 422)
TextField (Page 438)
TrendView (Page 451)
ZoneLabelView (Page 487)
FontBold
Description
Specifies whether the text is shown in bold.
Access in runtime: Read and write
Syntax
Object.FontBold[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• ComboBox
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only.
BOOLEAN
Optional. TRUE if the text is shown in bold.
FontItalic
Description
Specifies whether the text is shown in italics.
Access in runtime: Read and write
Syntax
Object.FontItalic[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• ComboBox
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
BOOLEAN
Optional. TRUE if the text is shown in italics.
See also
TextField (Page 438)
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RoundButton (Page 398)
SymbolicIOField (Page 422)
FontName
Description
Specifies the font.
Access in runtime: Read and write
Syntax
Object.FontName[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• ComboBox
• IOField
• ListBox
• OptionGroup
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
STRING
Optional. A value or a constant that specifies the font.
See also
TextField (Page 438)
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RoundButton (Page 398)
SymbolicIOField (Page 422)
FontSize
Description
Specifies the font size of the text.
Access in runtime: Read and write
Syntax
Object.FontSize[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• ComboBox
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only.
Int32
Optional. A value or a constant that specifies the font size of the text.
FontUnderline
Description
Specifies whether the text is shown underlined.
Access in runtime: Read and write
Syntax
Object.FontUnderline[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• ComboBox
• IOField
• ListBox
• MultiLineEdit
• OptionGroup
• RoundButton
• SymbolicIOField*
• TextField
*: Read access only
BOOLEAN
Optional. TRUE if the text is shown underlined.
ForeColor
Description
Specifies the font color of the text.
Access in runtime Read and write
Syntax
Object.ForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox **
• ComboBox **
• DateTimeField *
• IOField
• ListBox **
• MultiLineEdit **
• OptionGroup **
• RecipeView *
• RoundButton ***
• Slider
• Switch *
• SymbolLibrary
• SymbolicIOField ****
• TextField
* RT Professional No access
** RT Advanced No access
*** RT Advanced No access, RT Professional read access only
**** RT Professional Read access only
You have no access in runtime with the following format:
• AlarmView
Color
Optional. A value or a constant that specifies the font color of the text.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
DateTimeField (Page 296)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RecipeView (Page 389)
RoundButton (Page 398)
ForeColorTransparency
Description
No access in runtime.
Format
Description
No access in runtime.
FormatPattern
Description
Specifies the format of the output value.
Access in runtime: Read and write
Syntax
Object.FormatPattern[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• IOField
STRING
Optional. A value or a constant that specifies the format of the output value.
See also
IOField (Page 332)
FrameColor
Description
Specifies the background color of the gauge.
Also set "background graphic" to "none".
Access in Runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.FrameColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the background color of the gauge.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
Free
Description
No access in runtime.
FreePercent
Description
Returns the measured values for the free disk space as a percentage. The values can be queried
in Runtime. The values cannot be predefined.
Access in runtime: Read
Syntax
Object.FreePercent[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• DiscSpaceView
Int32
Optional A value or a constant that returns the measured values for the free disk space as a
percentage.
See also
DiskSpaceView (Page 298)
Gradation
Description
Specifies the value difference between two main marking lengths of the "Gauge" object.
Access in runtime: Read and write
Syntax
Object.Gradation[=SINGLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
SINGLE
Optional A value or a constant that specifies the value difference.
See also
Gauge (Page 320)
GraphDirection
Description
Specifies at which border of the trend view the current values are displayed.
Access in runtime Read and write
Syntax
Object.GraphDirection[=GraphDirection]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
GraphDirection
Optional. A value or a constant that specifies at which margin of the trend view the current
values are displayed.
Value Explanation
0 Positive values run to the right and upwards.
-1 Positive values run to the left and upwards.
-2 Positive values run to the right and upwards.
-3 Positive values run to the right and downwards.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
GridlineAxis
Description
No access in runtime.
GridLineColor
Description
Specifies the color for the grid lines.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Read and write
Syntax
Object.GridLineColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• AlarmView*
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
* RT Advanced read and write access, RT Professional no access
Color
Optional. A value or a constant that specifies the color of the grid lines.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TrendView (Page 451)
GridlineEnabled
Description
No access in runtime.
GridlineFillColor
Description
No access in runtime.
GridlineStyle
Description
No access in runtime.
GridLineWidth
Description
Defines the line weight of the row/column dividers in pixels.
Access in runtime: Read and write
Syntax
Object.GridLineWidth[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional A value or a constant which specifies the width of the grid line.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
GSCRuntimeAllowed
Description
No access in runtime.
HeaderFont
Description
No access in runtime.
Height
Description
Specifies the height.
Access in runtime: Read and write
You have read-only access in "Runtime Advanced" and "Panel Runtime" with the following
formats:
• AlarmView
• Bar
• BatteryView
• Button
• CameraControl
• Clock
• DateTimeField
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• MediaPlayer
• PDFView
• PLCCodeViewer
• Polygon
• Polyline
• ProDiagOverview
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView
• S7GraphOverview
• Slider
• SmartClientView
• StatusForce
• Switch
• SymbolicIOField
• SymbolLibrary
• SysDiagControl
• TextField
• TrendView
• UserView
• WLanQualityView
• ZoneLabelView
• ZoneQualityView
Syntax
Object.Height[=Int32]
Object
Required. An object of the type "ScreenItem". This property is a standard property of the
ScreenItem object and is therefore available for all formats.
Int32
Optional. A value or a constant that specifies the height in pixels.
Example
The following example halves the height of all objects of the image "NewPDL1", whose name
starts with "Circle":
'VBS75
Dim objScreen
Dim objCircle
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
'
'Searching all circles
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName
If "Circle" = Left(strName, 6) Then
'
'to halve the height of the circles
Set objCircle = objScreen.ScreenItems(strName)
objCircle.Height = objCircle.Height / 2
End If
Next
See also
Line (Page 336)
Polyline (Page 381)
Ellipse (Page 300)
Circle (Page 279)
EllipseSegment (Page 303)
CircleSegment (Page 282)
EllipticalArc (Page 306)
CircularArc (Page 285)
Rectangle (Page 395)
Polygon (Page 378)
TextField (Page 438)
IOField (Page 332)
SymbolicIOField (Page 422)
Button (Page 267)
Switch (Page 418)
GraphicView (Page 327)
GraphicIOField (Page 324)
Bar (Page 259)
HelpText
Description
Returns the tooltip that is shown in Runtime as an operating aid for the specified object.
Access in runtime: Read and write
Syntax
Object.HelpText[=STRING]
Object
Required. An object of the "ScreenItem" type with the format:
• Button
• DateTimeField
• GraphicIOField
• IOField
• Switch
• SymbolicIOField
• TrendView
STRING
Optional. A value or constant that specifies the contents of the tooltip that is shown in
runtime as an operator aid for the specified object.
See also
Button (Page 267)
DateTimeField (Page 296)
GraphicIOField (Page 324)
IOField (Page 332)
Switch (Page 418)
SymbolicIOField (Page 422)
TrendView (Page 451)
HiddenInput
Description
Specifies whether the input value or a * for each character will be shown during the input.
Access in runtime: Read and write
Syntax
Object.HiddenInput[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• IOField
BOOLEAN
Optional TRUE, if the input value is not shown during the input. An * is shown for each
character.
See also
IOField (Page 332)
HighlightColor
Description
Specifies the highlight color in the GRAPH overview.
Access in runtime Read and write
Syntax
Object.HighlightColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• S7GraphOverview
Color
Optional. A value or a constant that specifies the highlight color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
S7GraphOverview (Page 402)
HighLimitColor
Description
Specifies the color of the top or right scroll button in a scroll bar.
Access in runtime Read and write
Syntax
Object.HighLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• WindowSlider
Color
Optional. A value or a constant that specifies the color of the top or right scroll button in a
scroll bar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
WindowSlider (Page 482)
Hitlist
Description
No access in runtime.
HitlistColumnAdd
Description
Creates a new alarm text block in alarm statistics. The newly created alarm text block is
automatically referenced with "HitlistColumnIndex".
Access in runtime Read and write
Syntax
Object.HitlistColumnAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Required. A value or a constant that specifies the name of the new alarm text block in alarm
statistics with "HitlistColumnName".
See also
HitlistColumnIndex (Page 728)
AlarmControl (Page 237)
HitlistColumnCount
Description
Specifies the number of configured alarm text blocks in alarm statistics.
Access in runtime Read and write
Syntax
Object.HitlistColumnCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the number of configured alarm text blocks in
alarm statistics.
See also
AlarmControl (Page 237)
HitlistColumnIndex
Description
References an alarm text block selected for alarm statistics. To access the properties of a alarm
text block, you need to set "HitlistColumnIndex".
Values between 0 and "HitlistColumnIndex minus 1 are valid for "HitlistColumnCount". The
"HitlistColumnCount" property specifies the number of configured alarm text blocks.
Access in runtime Read and write
Syntax
Object.HitlistColumnIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies, with the index, the alarm text block to be
edited.
See also
HitlistColumnCount (Page 727)
AlarmControl (Page 237)
HitlistColumnName
Description
Specifies the name of an alarm statistics alarm text block referenced with "HitlistColumnIndex".
You cannot edit this name.
Access in runtime Read and write
Syntax
Object.HitlistColumnName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the referenced alarm text block in
alarm statistics.
See also
HitlistColumnIndex (Page 728)
AlarmControl (Page 237)
HitlistColumnRemove
Description
Removes an alarm statistics alarm text block referenced with its name.
Access in runtime Read and write
Syntax
Object.HitlistColumnRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the referenced alarm statistics
alarm text block to be removed.
See also
AlarmControl (Page 237)
HitlistColumnRepos
Description
Specifies the position of an alarm text block referenced with "HitlistColumnIndex" in alarm
statistics.
If you have changed the position of the alarm text block with "HitlistColumnRepos",
"HitlistColumnIndex" is assigned the value of "HitlistColumnRepos".
Access in runtime Read and write
Syntax
Object.HitlistColumnRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the position of the referenced alarm text block
in alarm statistics. Value range from 0 to "HitlistColumnCount" minus 1. Values outside this
range have no effect.
0: The referenced alarm text block is positioned on the left.
See also
HitlistColumnIndex (Page 728)
HitlistColumnCount (Page 727)
AlarmControl (Page 237)
HitlistColumnSort
Description
Specifies the sorting order in the hit list for the alarm text block that is referenced in
"HitlistColumnIndex".
Access in runtime Read and write
Syntax
Object.HitlistColumnSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
SortMode
Optional. A value or a constant that specifies which runtime data of the control can be
exported.
Value Explanation
0 No sorting
1 Ascending sorting from the smallest to largest value
2 Descending sorting from the largest to smallest value
See also
AlarmControl (Page 237)
HitlistColumnSortIndex
Description
Specifies the sorting order of the alarm statistics alarm text block referenced with
"HitlistColumnIndex".
If you set the value to "0", the sorting criterion in "HitlistColumnSort" is removed.
Access in runtime Read and write
Syntax
Object.HitlistColumnSortIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. Specifies the sorting order of the referenced alarm statistics alarm text block.
See also
AlarmControl (Page 237)
HitlistColumnVisible
Description
Specifies whether the alarm text block referenced with "HitlistColumnIndex" is displayed in
alarm statistics.
Access in runtime Read and write
Syntax
Object.HitlistColumnVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the referenced alarm statistics alarm text block is displayed.
FALSE if the referenced alarm statistics alarm text block is not displayed.
See also
HitlistColumnIndex (Page 728)
AlarmControl (Page 237)
HitlistDefaultSort
Description
Specifies the default sorting order in the table columns of alarm statistics.
Access in runtime Read and write
Syntax
Object.HitlistDefaultSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
SortMode
Optional. A value or a constant that specifies the default sorting order in the table columns of
alarm statistics.
Value Explanation
0 The list is sorted in ascending order of frequency.
1 The list is sorted in descending order of frequency.
See also
AlarmControl (Page 237)
HitlistFilter
Description
No access in runtime.
HitlistMaxSourceItems
Description
Specifies the maximum number of data records that can be used from the alarm log to create
alarm statistics. The value can be anything from "0 - 10000".
Access in runtime Read and write
Syntax
Object.HitlistMaxSourceItems[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the maximum number of data records that can
be used from the alarm log to create alarm statistics.
See also
AlarmControl (Page 237)
HitlistMaxSourceItemsWarn
Description
Specifies that a warning is output when the maximum number of data records in the alarm view
is reached.
Access in runtime Read and write
Syntax
Object.HitlistMaxSourceItemsWarn[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
TRUE if an alarm is output as soon as the maximum number of data records in the alarm view
is reached.
FALSE if no alarm is output when the maximum number of data records in the alarm view is
reached.
See also
AlarmControl (Page 237)
HitListRelTime
Description
Specifies whether the calculation period for alarm statistics is limited.
Access in runtime Read and write
Syntax
Object.HitListRelTime [=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
TRUE if the specified time range is used for statistics.
FALSE if the specified time range is not used.
See also
AlarmControl (Page 237)
HitListRelTimeFactor
Description
Specifies the time factor which, alongside the time type "HitlistRelTimeFactorType (Page 735)",
determines the time period for which the alarm statistics are created.
Access in runtime: Read and write
Syntax
Object.HitListRelTimeFactor[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the time factor.
See also
AlarmControl (Page 237)
HitlistRelTimeFactorType
Description
Specifies the time unit that, together with the time factor "HitlistRelTimeFactor", defines the time
range displayed for alarm statistics.
Access in runtime Read and write
Syntax
Object.HitListRelTimeFactorType[=AlarmControlTimeUnit)
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
AlarmControlTimeUnit
Optional. A value or a constant that specifies the time unit.
Value Designation
0 Minute
1 Hour
2 Day
3 Week
4 Month
See also
AlarmControl (Page 237)
HomeButtonVisible
Description
No access in runtime.
HorizontalAlignment
Description
Specifies the horizontal alignment of the text.
Access in runtime Read and write
Syntax
Object.HorizontalAlignment[=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox *
• ComboBox *
• DateTimeField **
• IOField
• ListBox *
• MultiLineEdit *
• OptionGroup *
• RoundButton ***
• Switch **
• SymbolicIOField ****
• TextField
* RT Advanced No access
** RT Professional No access
*** RT Advanced No access, RT Professional read access only
**** RT Professional Read access only
HorizontalAlignment
Optional. A value or a constant that specifies the horizontal alignment of the text.
See also
Button (Page 267)
CheckBox (Page 275)
ComboBox (Page 290)
DateTimeField (Page 296)
IOField (Page 332)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
TextField (Page 438)
HorizontalGridLines
Description
Specifies whether horizontal separating lines are displayed.
Access in runtime Read and write
Syntax
Object.HorizontalGridLines[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if horizontal separation lines are displayed.
FALSE if horizontal separation lines are not displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
HorizontalPictureAlignment
Description
No access in runtime.
HorizontalScrollBarPosition
Description
Specifies the position of the slider in the horizontal scroll bar. The picture is displayed by moving
the scroll bar slider horizontally.
To display the screen as a cutout where the scroll bars are located at the left and top edge
of the screen, use the LeftOffset (Page 775)" and "TopOffset (Page 1085)" properties as the
source of this cutout.
Access in runtime Read and write
Syntax
Object.HorizontalScrollBarPosition[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• ScreenWindow
Int32
Optional. A value or a constant that specifies the horizontal position of the slide in the scroll
bar.
See also
ScreenWindow (Page 404)
HorizontalScrollingEnabled
Description
No access in runtime.
Hotkey
Description
No access in runtime.
HourNeedleHeight
Description
Specifies the length of the hour hand.
Access in runtime Read and write
Syntax
Object.HourNeedleHeight[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the length of the hour hand.
Specify the length of the hour hand as a percentage relating to the radius of the clock face.
See also
Clock (Page 287)
HourNeedleWidth
Description
Specifies the width of the hour hand.
Access in runtime Read and write
Syntax
Object.HourNeedleWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the width of the hour hand.
Specify the width of the hour hand as a percentage relating to double the length of the clock
face.
See also
Clock (Page 287)
IconSpace
Description
Defines the spacing between the icons and text in the table cells. The value is active if and icon
and text are displayed.
Access in runtime: Read and write
Syntax
Object.IconSpace[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional Value that specifies the spacing.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
Index
Description
Specifies the index for the selected text field.
Access in runtime: Read and write
Syntax
Object.Index[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• CheckBox
• ComboBox
• ListBox
• OptionGroup
Int32
Optional A value or a constant that specifies the index of the selected text field.
See also
CheckBox (Page 275)
ComboBox (Page 290)
Listbox (Page 339)
OptionGroup (Page 371)
IndipendentWindow
Description
No access in runtime.
InfoArea_BackgroundColor
Description
No access in runtime.
InfoArea_ColumnsMovable
Description
No access in runtime.
InfoArea_DefaultTextColor
Description
No access in runtime.
InfoArea_ErrorTextBackgroundColor
Description
No access in runtime.
InfoArea_ErrorTextColor
Description
No access in runtime.
InfoArea_FocusFrameColor
Description
No access in runtime.
InfoArea_FocusFrameWidth
Description
No access in runtime.
InfoArea_Font
Description
No access in runtime.
InfoArea_RootNodeText
Description
No access in runtime.
InfoArea_SelectionBackgroundColor
Description
No access in runtime.
InfoArea_SelectionForegroundColor
Description
No access in runtime.
InfoArea_ShowGridLines
Description
No access in runtime.
InfoArea_TableHeaderBackgroundColor
Description
No access in runtime.
InfoArea_TableHeaderTextColor
Description
No access in runtime.
InnerBackColorOff
Description
Specifies the color under the slider of the "Switch" object if the object is in OFF status.
Access in runtime Read and write
Syntax
Object.InnerBackColorOff[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Switch
Color
Optional. A value or a constant that specifies the color for the OFF status.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Switch (Page 418)
InnerBackColorOn
Description
Specifies the color under the slider of the "Switch" object if the object is in ON status.
Access in runtime Read and write
Syntax
Object.InnerBackColorOn[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Switch
Color
Optional. A value or a constant that specifies the color for the ON status.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Switch (Page 418)
InnerDialColor
Description
No access in runtime.
InnerDialInnerDistance
Description
No access in runtime.
InnerDialOuterDistance
Description
No access in runtime.
InnerHeight
Description
Specifies ###
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.InnerHeight[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• IOField
• RoundButton*
• SymbolicIOField*
*: Read access only
Int32
Optional. A value or a constant, which ###
InnerWidth
Description
Specifies ###
Access in Runtime: Read and write
Syntax
Object.InnerWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• RoundButton*
*: Read access only
Int32
Optional. A value or a constant, which ###
InputAddressText
Description
No access in runtime.
InputValue
Description
Specifies the input value. The value is not displayed in the object when the property is set.
To show the value entered in the object, configure the system function
"SetPropertyByProperty" to the event "Object changed":
This system function is meaningful if no tag connection is configured at the output value but
the user still wants to query the specified value, for example using a script.
Access in runtime Read and write
Syntax
Object.InputValue[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• IOField
• SymbolicIOField*
*: Read access only
Int32
Optional. A value or a constant that specifies the input value.
InspectorViewInternalColumnOrder
Description
No access in runtime.
InspectorViewRowOrder
Description
No access in runtime.
Instance
Description
Returns an instance of the alarm object.
IntegerDigits
Description
Establishes the number of integer digits (0 to 20).
Access in runtime: Read and write
Syntax
Object.IntegerDigits[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• Bar
Int32
Optional A value or a constant that specifies the number of integer digits (0 to 20).
See also
Bar (Page 259)
Interval
Description
Specifies the time interval for updating the displayed measured value. You enter the value in
minutes.
Access in runtime: Read
Syntax
Object.Interval[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• DiscSpaceView
Int32
Optional A value or a constant that specifies the time interval for updating the measured
values.
See also
DiskSpaceView (Page 298)
IsActive
Description
No access in runtime.
IsImageMiddleAligned
Description
No access in runtime.
IsMinPasswordValueSet
Description
No access in runtime.
IsRunningUnderCE
Description
No access in runtime.
IsVerticalScrollBarEnabled
Description
No access in runtime.
ItemBorderStyle
Description
Specifies the line type of the separation lines in the selection list.
Access in runtime Read
Syntax
Object.ItemBorderStyle[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Int32
Optional. A value or a constant that specifies the type of separation lines in the selection list.
See also
SymbolicIOField (Page 422)
ItemText_AKZ
Description
No access in runtime.
ItemText_Descriptor
Description
No access in runtime.
ItemText_ErrorText
Description
No access in runtime.
ItemText_HardwareRevision
Description
No access in runtime.
ItemText_IMDataVersion
Description
No access in runtime.
ItemText_InstallationDate
Description
No access in runtime.
ItemText_LADDR
Description
No access in runtime.
ItemText_ManufacturerID
Description
No access in runtime.
ItemText_Name
Description
No access in runtime.
ItemText_OKZ
Description
No access in runtime.
ItemText_OperationState
Description
No access in runtime.
ItemText_OrderID
Description
No access in runtime.
ItemText_ProfileID
Description
No access in runtime.
ItemText_Rack
Description
No access in runtime.
ItemText_RevisionCounter
Description
No access in runtime.
ItemText_SerialNumber
Description
No access in runtime.
ItemText_Slot
Description
No access in runtime.
ItemText_SoftwareRevision
Description
No access in runtime.
ItemText_SpecificProfileData
Description
No access in runtime.
ItemText_State
Description
No access in runtime.
ItemText_Station
Description
No access in runtime.
ItemText_SubAddress
Description
No access in runtime.
ItemText_SubSlot
Description
No access in runtime.
ItemText_SubSystem
Description
No access in runtime.
ItemText_Type
Description
No access in runtime.
IV_ShowItem_AKZ
Description
No access in runtime.
IV_ShowItem_Descriptor
Description
No access in runtime.
IV_ShowItem_ErrorText
Description
No access in runtime.
IV_ShowItem_HardwareRevision
Description
No access in runtime.
IV_ShowItem_IMDataVersion
Description
No access in runtime.
IV_ShowItem_InstallationDate
Description
No access in runtime.
IV_ShowItem_LADDR
Description
No access in runtime.
IV_ShowItem_ManufacturerID
Description
No access in runtime.
IV_ShowItem_Name
Description
No access in runtime.
IV_ShowItem_OKZ
Description
No access in runtime.
IV_ShowItem_OperationState
Description
No access in runtime.
IV_ShowItem_OrderID
Description
No access in runtime.
IV_ShowItem_ProfileID
Description
No access in runtime.
IV_ShowItem_Rack
Description
No access in runtime.
IV_ShowItem_RevisionCounter
Description
No access in runtime.
IV_ShowItem_SerialNumber
Description
No access in runtime.
IV_ShowItem_Slot
Description
No access in runtime.
IV_ShowItem_SoftwareRevision
Description
No access in runtime.
IV_ShowItem_SpecificProfileData
Description
No access in runtime.
IV_ShowItem_State
Description
No access in runtime.
IV_ShowItem_Station
Description
No access in runtime.
IV_ShowItem_SubAddress
Description
No access in runtime.
IV_ShowItem_SubSlot
Description
No access in runtime.
IV_ShowItem_SubSystem
Description
No access in runtime.
IV_ShowItem_Type
Description
No access in runtime.
JumpToLimitsAfterMouseClick
Description
Specifies whether the slider will be set to the associated end value. The end value is the minimum
or maximum value. To set the slider to the end value, users click on the area outside of the
current slider setting.
Access in runtime: Read and write
Syntax
Object.JumpToLimitsAfterMouseClick[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• WindowSlider
BOOLEAN
Optional. TRUE, if the slider is set to the associated end value.
See also
WindowSlider (Page 482)
KeyboardOnline
Description
No access in runtime.
LabelColor
Description
Specifies the color of the scale label.
Syntax
Object.LabelColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Slider
Color
Optional. A value or a constant that specifies the color of the scale label.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Slider (Page 408)
Language
Description
Determines the current Runtime language.
Access in Runtime: Read and write
Syntax
Object.Language[= LONG]
Object
Required A "HMIRuntime" object.
LONG
Optional A value or a constant that specifies the national code.
Comments
Specify the Runtime language in VBS with a national code, e.g. 1031 for German, 2057 for
English etc.. Refer to the VBScript basics under the topic "Current local ID (LCID) diagram" for an
overview of all the national codes.
See also
HMIRuntime (Page 209)
LargeTickLabelingStep
Description
Returns the interval at which scale sections are labeled.
Access in runtime: Read and write
Syntax
Object.LargeTickLabelingStep[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Int32
Optional. A value or constant that returns the interval at which scale sections are labeled.
See also
Bar (Page 259)
LargeTicksBold
Description
Specifies whether the long marking lengths of a scale are shown in bold.
Access in runtime: Read and write
Syntax
Object.LargeTicksBold[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the long marking lengths of a scale are shown in bold.
See also
Bar (Page 259)
LargeTicksSize
Description
Specifies the length of the long marking lengths of a scale.
Access in runtime: Read and write
Syntax
Object.LargeTicksSize[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• Bar
Int32
Optional A value or a constant that specifies the length of the long marking lengths of a scale.
See also
Bar (Page 259)
LastConnectedObject
Description
No access in runtime.
LastConnectedObjectIndex
Description
Specifies the index number of the connection point to the last connected object.
Access in runtime: Read and write
Syntax
Object.LastConnectedObjectIndex[=Int]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
Int
Optional. A value or a constant that specifies the index number of the connection point to
the last connected object.
See also
Connector (Page 293)
LastConnectedObjectName
Description
Specifies the name of the object that is docked to the lower connector point.
Access in runtime: Read and write
Syntax
Object.LastConnectedObjectName[=String]
Object
Required. An object of the type "ScreenItem" with the following format:
• Connector
String
Optional. A value or a constant that specifies the name of the object that is docked to the
lower connector point.
See also
Connector (Page 293)
LastError
Description
Returns an error code regarding the success of the last operation, e.g. information on a tag write
or read process:
To obtain an error description, first of all carry out the Read method.
Note
If the error occurs when accessing via the TagSet object, evaluate the LastError property for each
tag of the TagSet object.
To obtain a statement about the quality of the supplied value, use the "QualityCode"
property. To obtain a description of the error, use the "ErrorDescription" property.
Access during runtime: Read
Syntax
Object.LastError
Object
Necessary. A "Tag" object.
Example
The following example shows the error code for the "Tag1" tag:
'VBS77
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
MsgBox objTag.LastError
The following example adds two tags to the TagSet list and outputs the LastError property as
Trace:
'VBS178
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "LastError: " & group.LastError & vbNewLine
The LastError property of a tag contained in the list may be accessed as follows:
See also
Tag (Page 229)
TagSet (list) (Page 233)
Layer
Description
Returns the layer in the screen in which an object is located. There is a total of 32 layers available,
whereby Layer "0" is the bottom layer and Layer "31" the top layer.
The configured objects are initially in the background of a layer.
Access in runtime: Read and write
Syntax
Object.Layer[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl *
• AlarmView **
• ApplicationWindow *
• Bar
• BatteryView ***
• Button
• CameraControl ***
• ChannelDiagnose *
• CheckBox *
• Circle
• CircleSegment *
• CircularArc *
• Clock
• ComboBox *
• Connector *
• DateTimeField **
• DiscSpaceView *
• Ellipse
• EllipseSegment *
• EllipticalArc *
• FunctionTrendControl **
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox *
• MediaPlayer
• MultiLineEdit *
• OptionGroup *
• PLCCodeViewer **
• Polygon
• Polyline
• ProDiagOverview ****
• ProtectedAreaNameView ***
• RangeLabelView ***
• RangeQualityView ***
• RecipeView **
• Rectangle
• RoundButton *****
• S7GraphOverview
• ScreenWindow *
• Slider
• SmartClientView **
• StatusForce **
• Switch **
• SymbolLibrary
• SymbolicIOField ******
• SysDiagControl *******
• TextField
• TrendRulerControl *
• TrendView **
• TubeArcObject *
• TubeDoubleTeeObject *
• TubeTeeObject *
• Tubepolyline *
• UserView
• WLanQualityView ***
• WindowSlider *
• ZoneLabelView ***
• ZoneQualityView ***
* RT Advanced No access
** RT Professional No access
*** Only Panel RT read and write access
**** RT Advanced read access, RT Professional read and write access
***** RT Advanced No access, RT Professional read access
****** RT Advanced read and write access, RT Professional read access
******* Read access only
Int32
Optional. A value or a constant returns the layer in the screen in which an object is located.
Comments
Note
The Layer property specifies the layer in which the object is located. The layer "0" is output as
layer "0".
When accessed, the layers are counted up from 1 in VBS. Therefore, address the level "1" with
layers(2).
Example
The following example displays the name and layer of all objects in the screen "NewPDL1":
'VBS78
Dim objScreen
Dim objScrItem
Dim lngAnswer
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName
Set objScrItem = objScreen.ScreenItems(strName)
lngAnswer = MsgBox(strName & " is in layer " & objScrItem.Layer,vbOKCancel)
If vbCancel = lngAnswer Then Exit For
Next
See also
AlarmControl (Page 237)
AlarmView (Page 251)
ApplicationWindow (Page 257)
Bar (Page 259)
BatteryView (Page 265)
Button (Page 267)
CameraControl (Page 272)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
LayerDeclutteringEnable
Description
Indicates whether the layers of a screen can be shown or hidden dependent on the set minimum
and maximum zoom.
Access during runtime: Read
Syntax
Object.LayerDeclutteringEnable
Object
Necessary. A "Screen" object.
Example:
The example outputs the LayerDecluttering property of the "NewPDL1" screen as Trace.
'VBS156
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine
See also
Screen (Page 216)
Layers
Description
Returns an object of type "Layers".
Access in Runtime: Read
Syntax
Object.Layers
Object
Required A "Screen" object.
See also
Screen (Page 216)
Left
Description
Specifies the value of the X coordinate.
Access in runtime: Read and write
Syntax
Object.Left[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl *
• AlarmView **
• ApplicationWindow *
• Bar
• BatteryView ***
• Button
• ChannelDiagnose *
• CheckBox *
• Circle
• CircleSegment *
• CircularArc *
• Clock
• ComboBox *
• Connector *
• DateTimeField **
• DiscSpaceView *
• Ellipse
• EllipseSegment *
• EllipticalArc *
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox *
• MediaPlayer
• MultiLineEdit *
• OnlineTableControl *
• OnlineTrendControl *
• OptionGroup *
• PLCCodeViewer **
• Polygon
• Polyline
• ProDiagOverview ***
• ProtectedAreaNameView ***
• RangeLabelView ***
• RangeQualityView ***
• RecipeView**
• Rectangle
• RoundButton *****
• S7GraphOverview **
• ScreenWindow *
• Slider
• SmartClientView **
• StatusForce **
• Switch **
• SymbolLibrary
• SymbolicIOField ******
• SysDiagControl *******
• TextField
• TrendRulerControl *
• TrendView **
• TubeArcObject *
• TubeDoubleTeeObject *
• TubeTeeObject *
• Tubepolyline *
• UserArchiveControl *
• UserView
• WLanQualityView ***
• WindowSlider *
• ZoneLabelView ***
• ZoneQualityView ***
* RT Advanced No access
** RT Professional No access
*** Only Panel RT read and write access
**** RT Advanced read access, RT Professional read and write access
***** RT Advanced No access, RT Professional read access
****** RT Advanced read and write access, RT Professional read access
Int32
Optional. A value or a constant that contains the value of the X coordinate in pixels
(measured from the top left edge of the screen).
Comments
The X coordinate refers to the top left corner of the rectangle that surrounds the object. The
screen limits are also monitored in runtime. If the assigned coordinate value exceeds the display
size, the user-defined function is interrupted with an error message.
See also
Bar (Page 259)
BorderWidth (Page 577)
CameraControl (Page 272)
Connector (Page 293)
AlarmControl (Page 237)
AlarmView (Page 251)
ApplicationWindow (Page 257)
BatteryView (Page 265)
Button (Page 267)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
FunctionTrendControl (Page 309)
Gauge (Page 320)
GraphicIOField (Page 324)
GraphicView (Page 327)
HTMLBrowser (Page 330)
IOField (Page 332)
Line (Page 336)
Listbox (Page 339)
MediaPlayer (Page 342)
MultiLineEdit (Page 345)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
OptionGroup (Page 371)
LeftMargin
Description
No access in runtime.
LeftOffset
Description
Specifies the horizontal shift of zero point of the display of a screen that is larger than the screen
window. The shift refers to the left edge of the screen window.
The screen is displayed cut. The picture scroll bars are located at the left and upper edge of
the picture.
If you wish to display the screen in the screen window with horizontal and vertical
offset of the screen scroll bars, use the "HorizontalScrollBarPosition (Page 738)" and
"VerticalScrollbarPosition (Page 1202) properties for the offset.
Access in Runtime: Read and write
Syntax
Object.LeftOffset[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Screenwindow
Int32
Optional. A value or a constant that specifies the horizontal shift of the screen display's zero
point from the left margin of the screen window.
See also
ScreenWindow (Page 404)
Limit4LowerLimit
Description
Specifies the lower limit for ""Reserve4".
The "Limit4LowerLimitEnabled" property must be set to TRUE so that the limit "Reserve4"" can
be monitored.
Access in runtime: Read and write
Syntax
Object.Limit4LowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the low limit for "Reserve4".
Comments
The "Limit4LowerLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.
See also
Bar (Page 259)
Limit4LowerLimitColor
Description
Specifies the color for the low limit "Reserve4".
The "Limit4LowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime Read and write
Syntax
Object.Limit4LowerLimitColor[=Color]
Object
Required. An object of the type ""ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the lower limit ""Reserve4".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Limit4LowerLimitEnabled
Description
Specifies whether the lower limit ""Reserve4"" is to be monitored.
Access in runtime: Read and write
Syntax
Object.Limit4LowerLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the lower limit ""Reserve4" is to be monitored.
Comments
The following values will be specified with the properties ""Limit4LowerLimit",
"Limit4LowerLimitColor" and "Limit4LowerLimitRelative"":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
Limit4LowerLimitRelative
Description
Specifies whether the low limit "Reserve4" is evaluated as a percentage or as an absolute value.
Access in runtime Read and write
Syntax
Object.Limit4LowerLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the low limit "Reserve4" is to be evaluated as a percentage.
FALSE if the low limit "Reserve4" is to be evaluated as an absolute value.
See also
Bar (Page 259)
Limit4UpperLimit
Description
Specifies the lower limit for "Reserve4".
The "Limit4UpperLimitEnabled"" property must be set to TRUE so that the limit ""Reserve4"
can be monitored.
Access in runtime: Read and write
Syntax
Object.Limit4UpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the upper limit for "Reserve4".
Comments
The "Limit4UpperLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.
See also
Bar (Page 259)
Limit4UpperLimitColor
Description
Specifies the color for the upper limit ""Reserve4".
The "Limit4UpperLimitEnabled"" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime Read and write
Syntax
Object.Limit4UpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the upper limit "Reserve4".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Limit4UpperLimitEnabled
Description
Specifies whether the upper limit "Reserve4" is to be monitored.
Access in runtime: Read and write
Syntax
Object.Limit4UpperLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the upper limit ""Reserve4" is to be monitored.
Comments
The following values are defined via the properties ""Limit4UpperLimit",
"Limit4UpperLimitColor" and "Limit4UpperLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
Limit4UpperLimitRelative
Description
Specifies whether the high limit "Reserve4" is to be evaluated as a percentage or as an absolute
value.
Access in runtime Read and write
Syntax
Object.Limit4UpperLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the low limit "Reserve4" is to be evaluated as a percentage.
FALSE if the low limit "Reserve4" is to be evaluated as an absolute value.
See also
Bar (Page 259)
Limit5LowerLimit
Description
Specifies the lower limit for "Reserve5"".
The "Limit5LowerLimitEnabled" property must be set to TRUE so that the limit ""Reserve5" can
be monitored.
Access in runtime: Read and write
Syntax
Object.Limit5LowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the lower limit for "Reserve5"".
Comments
The "Limit5LowerLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.
See also
Bar (Page 259)
Limit5LowerLimitColor
Description
Specifies the color for the lower limit ""Reserve5"".
The "Limit5LowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime Read and write
Syntax
Object.Limit5LowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the lower limit ""Reserve5".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Limit5LowerLimitEnabled
Description
Specifies whether the lower limit "Reserve5" is to be monitored.
Access in runtime: Read and write
Syntax
Object.Limit5LowerLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the lower limit ""Reserve5" is to be monitored.
Comments
The following values will be defined via the properties "Limit5LowerLimit",
"Limit5LowerLimitColor" and "Limit5LowerLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
Limit5LowerLimitRelative
Description
Specifies whether the lower limit ""Reserve5" is to be evaluated as a percentage or as an absolute
value.
Access in runtime Read and write
Syntax
Object.Limit5LowerLimitRelative[=BOOLEAN]
Object
Required. An object of the "ScreenItem" type with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the low limit ""Reserve5" is to be evaluated as a percentage.
FALSE if the low limit ""Reserve5" is to be evaluated as an absolute value.
See also
Bar (Page 259)
Limit5UpperLimit
Description
Specifies the lower limit for "Reserve5".
The ""Limit5UpperLimitEnabled" property must be set to TRUE so that the limit ""Reserve5"
can be monitored.
Syntax
Object.Limit5UpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the upper limit for ""Reserve5".
Comments
The "TypeLimitHigh5" property specifies whether the object is evaluated as a percentage or
absolutely.
See also
Bar (Page 259)
Limit5UpperLimitColor
Description
Specifies the color for the upper limit "Reserve5"".
The "Limit5UpperLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime Read and write
Syntax
Object.Limit5UpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the upper limit ""Reserve5".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
Limit5UpperLimitEnabled
Description
Specifies whether the upper limit "Reserve5" is to be monitored.
Access in runtime: Read and write
Syntax
Object.Limit5UpperLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the upper limit ""Reserve5"" is to be monitored.
See also
Bar (Page 259)
Limit5UpperLimitRelative
Description
Specifies whether the high limit "Reserve5" is to be evaluated as a percentage or as an absolute
value.
Access in runtime Read and write
Syntax
Object.Limit5UpperLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the high limit "Reserve5" is to be evaluated as a percentage.
FALSE if the high limit "Reserve5" is to be evaluated as an absolute value.
See also
Bar (Page 259)
LimitRangeCollection
Description
No access in runtime.
LineAlarmView
Description
No access in runtime.
LineBackgroundColor
Description
No access in runtime.
LineColor
Description
Specifies the color of the window separation lines.
Access in runtime Read and write
Syntax
Object.LineColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the color of the window separation lines.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
LineEndShapeStyle
Description
Specifies the shape of the line ends.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.LineEndShapeStyle[=LineEndShapeStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton *
• SymbolicIOField *
• TextField
• WindowSlider
* Read access only
You have no access in runtime with the following format:
• Switch
• TubeArcObject
LineEndShapeStyle
Optional. A value or a constant that specifies the form of the line ends.
Value Description
0 Rounded
1 Flush
2 Rectangular
See also
Bar (Page 259)
Button (Page 267)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
ComboBox (Page 290)
Connector (Page 293)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
GraphicIOField (Page 324)
GraphicView (Page 327)
IOField (Page 332)
Line (Page 336)
Listbox (Page 339)
MultiLineEdit (Page 345)
OptionGroup (Page 371)
Polygon (Page 378)
Polyline (Page 381)
Rectangle (Page 395)
RoundButton (Page 398)
Switch (Page 418)
SymbolicIOField (Page 422)
TextField (Page 438)
TubeArcObject (Page 457)
WindowSlider (Page 482)
LinesPerDiagEntry
Description
No access in runtime.
LineStyle
Description
No access in runtime.
LineWidth
Description
Specifies the line thickness.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.LineWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• CircularArc
• Connector
• EllipticalArc
• FunctionTrendControl
• Line *
• OnlineTableControl
• OnlineTrendControl
• Polyline *
• TrendRulerControl
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• UserArchiveControl
* RT Advanced read and write access
You have no access in runtime with the following format:
• Polygon
Int32
Optional. A value or a constant that specifies the line weight in pixels.
See also
AlarmControl (Page 237)
CircularArc (Page 285)
EllipticalArc (Page 306)
FunctionTrendControl (Page 309)
Line (Page 336)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
Polyline (Page 381)
TrendRulerControl (Page 441)
TubeArcObject (Page 457)
TubeDoubleTeeObject (Page 459)
TubePolyline (Page 461)
TubeTeeObject (Page 464)
UserArchiveControl (Page 466)
Polygon (Page 378)
LineWrap
Description
No access in runtime.
ListAreaHeight
Description
No access in runtime.
ListAreaLeft
Description
No access in runtime.
ListAreaTop
Description
No access in runtime.
ListAreaWidth
Description
No access in runtime.
LoadDataImmediately
Description
Specifies whether in the event of a screen refresh the tag values should be downloaded from the
archives for the time range that is to be shown.
Access in runtime: Read and write
Syntax
Object.LoadDataImmediately[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
BOOLEAN
Optional TRUE, if in the event of a screen the tag values should be downloaded from the
archives for the time range that is to be shown.
See also
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
LocalCursor
Description
No access in runtime.
Location
Description
No access in runtime.
LockSquaredExtent
Description
Specifies whether the size of the clock can be adjusted with the mouse.
Access in runtime: Read and write
Syntax
Object.LockSquaredExtent[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Clock
• Gauge
BOOLEAN
Optional TRUE, if the size of the clock can be adjusted by dragging the mouse on the
selection points to the desired aspect ratio.
See also
Clock (Page 287)
Gauge (Page 320)
Logging
Description
Returns an object of type "Logging".
Access in Runtime: Read
Syntax
Object.Logging
Object
Required A "HMIRuntime" object.
See also
HMIRuntime (Page 209)
LogOperation
Description
Specifies whether, after operating this object, an alarm is output on the alarm system.
Access in runtime: Read and write
Syntax
Object.LogOperation[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• CheckBox
• ComboBox
• IOField
• ListBox
• OptionGroup
• SymbolicIOField *
• WindowSlider
*: Read access only
BOOLEAN
Optional TRUE, if, after operating this object, an alarm is output on the alarm system.
LongDateTimeFormat
Description
No access in runtime.
LongTermArchiveConsistency
Description
Specifies how alarms are displayed in the alarm view when the "Historical alarm list (long-term)"
is configured.
Access in runtime Read and write
Syntax
Object.LongTermArchiveConsistency[= BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the 1000 most recent alarms are displayed on the client of all servers or the
redundant server pair in the "Historical alarm list" (long-term) display.
FALSE if 1000 alarms are displayed in the "Historical alarm list" (long-term) display on the
single-station system, server or client for each server, or for each redundant server pair.
See also
AlarmControl (Page 237)
Look3D
Description
No access in runtime.
LowerLimit
Description
Specifies the lower limit for input values.
Syntax
Object.LowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• IOField
DOUBLE
Optional A value or a constant that specifies the lower limit for input values.
See also
IOField (Page 332)
LowLimitColor
Description
Specifies the color of the bottom or left scroll button in a scroll bar.
Access in runtime Read and write
Syntax
Object.LowLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• WindowSlider
Color
Optional. A value or a constant that specifies the color of the bottom or left scroll button in a
scroll bar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
WindowSlider (Page 482)
Machine
Description
No access in runtime.
MachineName
Description
Specifies the network code of the device that is to be monitored.
Enter the name or the port of the device as the network code.
Access in runtime: Read and write
Syntax
Object.MachineName[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• SmartClientView
STRING
Optional A value or a constant that contains the network code.
See also
SmartClientView (Page 412)
MaintainAspectRatio
Description
No access in runtime.
MaintainOriginalSize
Description
No access in runtime.
MarginToBorder
Description
Specifies the width of the 3D border in pixels. The value of the width is dependent on the size of
the object.
Access in runtime: Read and write
Syntax
Object.MarginToBorder[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• WindowSlider
Int32
Optional A value or a constant that specifies the width of the 3D border in pixels.
See also
WindowSlider (Page 482)
MaximumNumberOfTimeAxes
Description
No access in runtime.
MaximumNumberOfTimeColumns
Description
No access in runtime.
MaximumNumberOfValueAxes
Description
No access in runtime.
MaximumNumberOfValueColumns
Description
No access in runtime.
MaximumValue
Description
Specifies the maximum value of the scale in the selected object.
Access in runtime: Read and write
Syntax
Object.MaximumValue[=DOUBLE | Int32 | SINGLE]
Object
Required. A "ScreenItem" object with the format:
• Bar
• Gauge
• Slider
• WindowSlider*
*: Read access only
MaxNrOfCurves
Description
No access in runtime.
MaxNumberOfComboBoxCharacters
Description
No access in runtime.
MaxToolbarRows
Description
No access in runtime.
MenuButtonVisible
Description
No access in runtime.
MenuToolBarConfig
Description
Determines the configuration file with user-defined menu and toolbars.
Access in Runtime: Read and write
Syntax
Object.MenuToolBarConfig[=HmiObjectHandle]
Object
Required. An object of the type "ScreenItem" with the format:
• ScreenWindow
HmiObjectHandle
Optional. A value or a constant that specifies the configuration file with user-defined menu
and toolbars.
MessageAreaHeight
Description
No access in runtime.
MessageAreaLeft
Description
No access in runtime.
MessageAreaTop
Description
No access in runtime.
MessageAreaWidth
Description
No access in runtime.
MessageBlockAlignment
Description
Specifies the designation of an alarm text block referenced with "MessageBlockIndex" in the
column header.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockAlignment [=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
HorizontalAlignment
Optional. A value or constant that determines the alignment.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockAutoPrecisions
Description
Specifies whether the number of decimal places for an alarm text block referenced with
"MessageBlockIndex" is automatically determined.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "MessageBlockPrecisions" is used.
See also
MessageBlockIndex (Page 808)
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockCaption
Description
Specifies the designation in the column header for an alarm text block referenced with
"MessageBlockIndex". The designation entered is effective in all runtime languages.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockCaption[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies the designation in the column header for the selected alarm text block.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockCount
Description
Specifies the number of configured alarm text blocks.
Access in runtime Read and write
Syntax
Object.MessageBlockCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the number of configured alarm text blocks.
See also
AlarmControl (Page 237)
MessageBlockDateFormat
Description
Specifies the date format for displaying the alarms.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockDateFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the date format used for displaying alarms.
Value Explanation
Automatic The date format is set automatically.
dd.MM.yy Day.Month.Year, e.g. 24.12.10.
dd.MM.yyyy Day.Month.Year, e.g. 24.12.2010.
dd/MM/yy Day/Month/Year, e.g. 24/12/10.
dd/MM/yyyy Day/Month/Year, e.g. 24/12/2010.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockExponentialFormat
Description
Specifies whether the values of an alarm text block referenced with "MessageBlockIndex" are
displayed in exponential notation.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the values are displayed in exponential notation.
FALSE if the values are displayed in decimal notation.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockFlashOn
Description
Specifies whether the content of an alarm text block referenced with "MessageBlockIndex"
flashes in runtime when an alarm appears.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockFlashOn[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the content of the alarm text block flashes.
FALSE if the content of the alarm text block does not flash.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockHideText
Description
Specifies whether the content of an alarm text block referenced with "MessageBlockIndex" is
displayed as text.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockHideText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the content is not displayed as text.
FALSE if the content is displayed as text.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockHideTitleText
Description
Specifies whether the header of an alarm text block referenced with "MessageBlockIndex" is
displayed as text.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockHideTitleText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the header is not displayed as text.
FALSE if the header is displayed as text.
See also
AlarmControl (Page 237)
MessageBlockId
Description
Specifies the assignment of ID number and alarm text block in the alarm view.
Access in runtime: Read and write
Syntax
Object.MessageBlockId[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
Int32
Optional Specifies the assignment of ID number and alarm text block in the alarm view.
See also
AlarmControl (Page 237)
MessageBlockIndex
Description
References an alarm text block. To access the properties of an alarm text block, you need to set
"MessageBlockIndex".
Values between 0 and "MessageBlockIndex" minus 1 are valid for "MessageBlockCount". The
"MessageBlockCount" property specifies the number of configured alarm text blocks.
Access in runtime Read and write
Syntax
Object.MessageBlockIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies, with the index, the alarm text block to be
edited.
See also
MessageBlockCount (Page 803)
AlarmControl (Page 237)
MessageBlockLeadingZeros
Description
Specifies whether the entries in an alarm text block referenced with "MessageBlockIndex" are
displayed with leading zeros.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockLeadingZeros[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional.
1 if the entries in the alarm text block are displayed with leading zeros.
0 if the entries in the alarm text block are displayed without leading zeros.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockLength
Description
Specifies the length in characters of the content of an alarm text block referenced with
"MessageBlockIndex".
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockLength[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. Value which specifies the length of the alarm text block.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockName
Description
Specifies the name of an alarm text block referenced with "MessageBlockIndex".
Access in runtime: Read and write
Syntax
Object.MessageBlockName[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the referenced alarm text block.
MessageBlockPrecisions
Description
Specifies the number of decimal places for values in an alarm text block referenced with
"MessageBlockIndex".
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int16
Optional. Specifies the number of decimal places.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockSelected
Description
Specifies whether an alarm text block referenced with "MessageBlockIndex" is selected.
Also set "ApplyProjectSettings (Page 513)" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockSelected[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional. TRUE if the alarm text block is selected.
See also
AlarmControl (Page 237)
MessageBlockShowDate
Description
Specifies whether to display both the date and time in the "Time" alarm text block.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockShowDate[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if both date and time are displayed.
FALSE if the time is displayed.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockShowIcon
Description
Specifies whether the content of an alarm text block referenced with "MessageBlockIndex" is
displayed as an icon.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockShowIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the content is displayed as an icon.
FALSE if the content is not displayed as an icon.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockShowTitleIcon
Description
Specifies whether the header of an alarm text block referenced with "MessageBlockIndex" is
displayed as text.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockShowTitleIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the header is shown as an icon.
FALSE if the header is not shown as an icon.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockTextId
Description
Specifies the designation of an alarm text block referenced with "MessageBlockIndex" using a
text ID from the text library. The designation is adapted automatically if the runtime language
is changed.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime: Read and write
Syntax
Object.MessageBlockTextId[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
Int32
Optional. Specifies the name of the selected alarm text block using a text ID number.
MessageBlockTimeFormat
Description
Specifies which time format or duration format is used for displaying alarms.
Also set "ApplyProjectSettings" to "FALSE".
Access in runtime Read and write
Syntax
Object.MessageBlockTimeFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the time format or duration format used for
displaying alarms.
The following time formats are available:
Value Explanation
Automatic The time format is set automatically.
HH:mm:ss Hours:Minutes:Seconds, e.g. 15:35:44
HH:mm:ss.ms Hours:Minutes:Seconds.Milliseconds, e.g. 15:35:44.240.
hh:mm:ss tt Hours:Minutes:Seconds AM/PM, e.g. 03:35:44 PM.
hh:mm:ss.ms tt Hours:Minutes:Seconds.Milliseconds AM/PM, e.g. 03:35:44.240 PM.
Value Explanation
Automatic The duration format is determined automatically.
d H:mm:ss Day Hours:Minutes:Seconds, e.g. 1 2:03:55.
H:mm:ss. Hours:Minutes:Seconds, e.g. 26:03:55.
m:ss Minutes:Seconds, Example: 1563:55.
s Seconds, e.g. 93835.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageBlockType
Description
Returns the type of an alarm text block referenced with "MessageBlockIndex".
Access in runtime Read and write
Syntax
Object.MessageBlockType[=AlarmBlockType]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
AlarmBlockType
Optional. A value or a constant that returns the type of alarm text block.
Value Explanation
0 The alarm text block is a system block.
1 The alarm text block is a user text block.
2 The alarm text block is a parameter block.
3 The alarm text block belongs to the alarm text blocks of the alarm statistics.
See also
ApplyProjectSettings (Page 513)
AlarmControl (Page 237)
MessageColumnAdd
Description
Creates a new alarm text block. The newly created alarm text block is automatically referenced
with "MessageColumnIndex".
Access in runtime Read and write
Syntax
Object.MessageColumnAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Required. A value or a constant that specifies the name of the new alarm text block with
"MessageColumnName".
See also
MessageColumnIndex (Page 816)
AlarmControl (Page 237)
MessageColumnCount
Description
Specifies the number of configured alarm text blocks.
Syntax
Object.MessageColumnCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the number of configured alarm text blocks.
See also
AlarmControl (Page 237)
MessageColumnIndex
Description
References an alarm text block selected for the alarm list. To access the properties of an alarm
text block, you need to set "MessageColumnIndex".
Values between 0 and "MessageColumnIndex" minus 1 are valid for "MessageColumnCount".
The "MessageColumnCount" property specifies the number of configured alarm text blocks.
Access in runtime Read and write
Syntax
Object.MessageColumnIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies, with the index, the alarm text block selected
for the alarm list.
See also
MessageColumnCount (Page 815)
AlarmControl (Page 237)
MessageColumnName
Description
Specifies the name of an alarm text block referenced with "MessageColumnIndex".
Access in runtime Read and write
Syntax
Object.MessageColumnName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the referenced alarm text block.
See also
MessageColumnIndex (Page 816)
AlarmControl (Page 237)
MessageColumnRemove
Description
Removes an alarm text block referenced with its name.
Access in runtime Read and write
Syntax
Object.MessageColumnRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name of the referenced alarm text block to
be removed.
See also
AlarmControl (Page 237)
MessageColumnRepos
Description
For multiple alarm text blocks, specifies the position of an alarm text block referenced with
"MessageColumnIndex".
If you have changed the position of the alarm text block with "MessageColumnRepos",
"MessageColumnIndex" is assigned the value of "MessageColumnRepos".
Access in runtime Read and write
Syntax
Object.MessageColumnRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the position of the referenced alarm text block.
Value range from 0 to "MessageColumnCount" minus 1. Values outside this range have no
effect.
0: The referenced alarm text block is positioned on the left.
See also
MessageColumnIndex (Page 816)
MessageColumnCount (Page 815)
AlarmControl (Page 237)
MessageColumnSort
Description
Specifies how the content of an alarm text block referenced with "MessageColumnIndex" is
sorted.
Access in runtime Read and write
Syntax
Object.MessageColumnSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
SortMode
Optional. A value or a constant that specifies sorting for the referenced alarm text block.
Value Explanation
0 No sorting
1 Ascending sorting from the smallest to largest value
2 Descending sorting from the largest to smallest value
See also
AlarmControl (Page 237)
MessageColumnSortIndex
Description
Defines the sorting order of the alarm text block referenced in "MessageColumnIndex". If you set
the value to "0", the sorting criterion is removed in "MessageColumnSort".
Access in runtime: Read and write
Syntax
Object.MessageColumnSortIndex[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
Int32
Optional Defines the sorting order of the alarm text block referenced in
"MessageColumnIndex".
See also
AlarmControl (Page 237)
MessageColumnVisible
Description
Specifies whether the alarm text block referenced with "MessageColumnIndex" is displayed.
Access in runtime Read and write
Syntax
Object.MessageColumnVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the referenced alarm text block is displayed.
FALSE if the referenced alarm text block is not displayed.
See also
MessageColumnIndex (Page 816)
AlarmControl (Page 237)
MessageListType
Description
Specifies the content to be displayed.
Access in runtime Read and write
Syntax
Object.MessageListType[=AlarmListType]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
AlarmListType
Optional. A value or a constant that specifies the content.
Value Explanation
0 The alarms currently active are displayed upon screen refresh.
1 The "Historical alarm list" (short-term) display is activated upon screen refresh. The alarm
view shows logged alarms and alarms currently pending.
The display is updated immediately on activation of new messages.
2 The "Historical alarm list" (long-term) display is activated after a screen change. The alarm
view only displays logged alarms, which the user can comment.
3 Only the currently locked alarms are displayed after a screen change.
4 The configured statistical calculations for logged alarms are displayed after a screen change.
5 Only previously hidden alarms are displayed after a screen change.
See also
AlarmControl (Page 237)
MiddleGradientColor
Description
No access in runtime.
MinimumNumberOfTimeAxes
Description
No access in runtime.
MinimumNumberOfTimeColumns
Description
No access in runtime.
MinimumNumberOfValueAxes
Description
No access in runtime.
MinimumNumberOfValueColumns
Description
No access in runtime.
MinimumValue
Description
Specifies the minimum value of the scale in the selected object.
Access in runtime: Read and write
Syntax
Object.MinimumValue[=DOUBLE | Int32 | SINGLE]
Object
Required. A "ScreenItem" object with the format:
• Bar
• Gauge
• Slider
• WindowSlider*
*: Read access only
MinNrOfCurves
Description
No access in runtime.
MinPasswordValue
Description
No access in runtime.
MinuteNeedleHeight
Description
Specifies the length of the minute hand.
Access in runtime Read and write
Syntax
Object.MinuteNeedleHeight[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the length of the minute hand.
Specify the length of the minute hand as a percentage relating to the radius of the clock face.
See also
Clock (Page 287)
MinuteNeedleWidth
Description
Specifies the width of the minute hand.
Access in runtime Read and write
Syntax
Object.MinuteNeedleWidth[=Int32]
Object
Required. An object of the type ""ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the width of the minute hand.
Specify the width as a percentage relating to double the length of the minute hand.
See also
Clock (Page 287)
Mode
Description
Specifies the mode for the behavior of a text object in runtime.
Access in runtime
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.Mode[=Type]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• IOField
• RoundButton*
• SymbolicIOField*
*: Read access only
Type
Optional. A value or a constant that specifies the mode for the behavior of a text object in
runtime.
MonitorNumber
Description
Returns the number of the monitor whose contents are shown in the screen window.
The monitor number refers to the number of monitors set in Microsoft Windows: "Control Panel
> Display > Settings > Display"
Access in runtime: Read and write
Syntax
Object.MonitorNumber[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• Screenwindow
Int32
Optional. A value or a constant that specifies the number of the displayed monitor.
See also
ScreenWindow (Page 404)
Moveable
Description
Specifies whether the object can be moved in runtime.
Access in runtime Read and write
Syntax
Object.Moveable[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the window can be moved in runtime.
FALSE if the window is fixed in runtime.
See also
AlarmControl (Page 237)
UserArchiveControl (Page 466)
TrendRulerControl (Page 441)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
MsgFilterSQL
Description
Specifies one or several SQL statements for user-defined selection of the alarms. Several
customized selections are connected with "OR". If you have configured a fixed selection
"DefaultMsgFilterSQL", the SQL statements of "DefaultMsgFilterSQL" and "MsgFilterSQL" are
connected with "AND".
Access in runtime: Read and write
Syntax
Object.MsgFilterSQL[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or constant that specifies the SQL statements for user-defined selection of
messages.
See also
AlarmControl (Page 237)
Name
Description
Returns the object name as STRING. The returned value is dependent upon the used object.
Access in runtime: Read and write
Syntax
Object.Name[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• Clock
• DiscSpaceView *
• Gauge
• Slider
* Read access only
You have no access in runtime with the following format:
• AlarmControl
• AlarmView
• ApplicationWindow
• BatteryView
• Bar
• Button
• ChannelDiagnose
• CheckBox
• Circle
• CircleSegment
• CircularArc
• ComboBox
• Connector
• DateTimeField
• Ellipse
• EllipseSegment
• EllipticalArc
• FunctionTrendControl
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox
• MediaPlayer
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• OptionGroup
• PLCCodeViewer
• ProDiagOverview
• Polygon
• Polyline
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView
• Rectangle
• RoundButton
• S7GraphOverview
• ScreenWindow
• SmartClientView
• StatusForce
• Switch
• SymbolLibrary
• SymbolicIOField
• SysDiagControl
• TextField
• TrendRulerControl
• TrendView
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• UserArchiveControl
• UserView
• WLanQualityView
• WindowSlider
• ZoneLabelView
• ZoneQualityView
String
Optional. A value or a constant that returns the object name.
Comments
Dependent on the specified object, the following object names will be returned:
• Tag: Name of the tag without server or tag prefix.
• Project: Name of the current runtime project.
• DataItem: Name of the DataItem object.
• Layer: Name of the layer.
• FunctionTrendControl: Name of the trend referenced by the "Index" property.
Note
Use the "Name" property to address a tag in the Tags" list. Tag names are structured in WinCC
according to the following scheme:
<Tag prefix><Name of tag>
If you only specify the tag name, the tag prefix is applied from the screen window shortcut.
Example
The following example returns the name of the current Runtime project as Trace:
Table 1-129
'VBS160
HMIRuntime.Trace "Name: " & HMIRuntime.ActiveProject.Name & vbNewLine
NameColumnWidth
Description
No access in runtime.
NavigateTo
Description
Specifies the module to be jumped to.
Access in runtime: Read and write
Syntax
Object.NavigateTo[=String]
Object
Required. An object of the type "ScreenItem" with the following format:
• PLCCodeViewer
• SysDiagControl *
* RT Advanced No access, RT Professional read access only
String
Optional. A value or a constant that specifies the module.
NavigationButtons
Description
No access in runtime.
NavigationPath_Font
Description
No access in runtime.
NavigationPath_RootText
Description
No access in runtime.
NavigationPath_TextColor
Description
No access in runtime.
NavigationpathDiagbufferDetailText
Description
No access in runtime.
NavigationpathDiagbufferText
Description
No access in runtime.
NeedleBorderColor
Description
Specifies the line color of the pointer.
Access in runtime Read and write
Syntax
Object.NeedleBorderColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Color
Optional. A value or a constant that specifies the line color of the pointer.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Clock (Page 287)
NeedleColor
Description
Specifies the pointer color.
Also specify with ""NeedleFillStyle" that the pointer color is to be displayed.
Access in runtime Read and write
Syntax
Object.NeedleColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Color
Optional. A value or a constant that specifies the pointer color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Clock (Page 287)
NeedleFillStyle
Description
Specifies whether the pointers are displayed as filled or transparent.
Access in runtime Read and write
Syntax
Object.NeedleFillStyle[=THmiFillStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
THmiFillStyle
Optional. A value or a constant that specifies whether the pointers are filled or transparent.
See also
Clock (Page 287)
NeedleHeight
Description
No access in runtime.
NoHitTest
Description
No access in runtime.
NormalColor
Description
Specifies the color of the utilized memory in the memory space view when the memory space
utilization is in the non-critical range.
Access in runtime: Read
Syntax
Object.NormalColor[=Color]
Object
Required. A "ScreenItem" object with the following characteristics:
• DiscSpaceView
Color
Optional. A value or a constant that specifies the color of the memory display in the normal
range.
Comments
You use the "RGB" function to define the color in RGB format (red, green, blue). To do this, you
specify the corresponding decimal value for each of the three RGB values (value range from 0 to
255). The "Red" color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
DiskSpaceView (Page 298)
NormalRangeColor
Description
Specifies the color of the normal range on the scale of the "Gauge" object.
The "NormalRangeVisible" property must have the value TRUE for the normal range to be
displayed.
Access in runtime Read and write
Syntax
Object.NormalRangeColor[=Color]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the color of the normal range.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
NormalRangeVisible
Description
Specifies whether the normal range in the scale of the "Gauge" object is displayed.
Access in runtime: Read and write
Syntax
Object.NormalRangeVisible[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
BOOLEAN
Optional TRUE, if the normal range will be displayed in the scale.
Comments
Specify the color of the normal range with the "NormalRangeColor" property.
See also
Gauge (Page 320)
NumberOfButtons
Description
No access in runtime.
NumberOfLines
Description
No access in runtime.
NumberOfVisibleLines
Description
Specifies the number of visible lines in the PLC code display.
Access in runtime: Read and write
Syntax
Object.NumberOfVisibleLines[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• PLCCodeViewer
Int32
Optional. A value or a constant that specifies the number of lines in the PLC code display.
See also
PLCCodeViewer (Page 376)
NumberStyle
Description
No access in runtime.
Object
Description
No access in runtime.
ObjectSizeDeclutteringEnable
Description
Specifies whether only the objects within a set size range are displayed.
Access during runtime: Read
Syntax
Object.ObjectSizeDeclutteringEnable
Object
Necessary. A "Screen" object.
Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.
'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine
See also
Screen (Page 216)
ObjectSizeDeclutteringMax
Description
Returns the upper size range for the display suppression of objects of the specified screen as
LONG.
Access during runtime: Read
Syntax
Object.ObjectSizeDeclutteringMax
Object
Necessary. A "Screen" object.
Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.
'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine
See also
Screen (Page 216)
ObjectSizeDeclutteringMin
Description
Returns the lower size range for the display suppression of objects of the specified screen as
LONG.
Access during runtime: Read
Syntax
Object.ObjectSizeDeclutteringMin
Object
Necessary. A "Screen" object.
Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.
'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine
See also
Screen (Page 216)
OcxGuid
Description
No access in runtime.
OCXState
Description
No access in runtime.
OcxStateForEs2Rt
Description
No access in runtime.
Online
Description
Specifies start and stop of the updating.
Access in runtime: Read and write
Syntax
Object.Online[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the updated display is to be stopped. The values are buffered and updated when the
button is clicked again.
FALSE if the updated display is to be continued.
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnValue
Description
No access in runtime.
OperationSteps
Description
Specifies by how many steps the slider of the scrollbar is moved with one mouseclick.
Access in runtime: Read and write
Syntax
Object.OperationSteps[=Int32]
Object
Required. An object of the type ""ScreenItem" with the format:
• WindowSlider
Int32
Optional. A value or a constant which specifies by how many steps the slider of the scrollbar
is moved with one mouse-click.
See also
WindowSlider (Page 482)
OperatorAlarms
Description
No access in runtime.
OperatorMessageId
Description
Specifies the assignment of ID number and trigger event in the alarm view.
Access in runtime: Read and write
Syntax
Object.OperatorMessageId[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or constant that specifies the assignment of ID number and trigger event in
the alarm view.
See also
AlarmControl (Page 237)
OperatorMessageIndex
Description
References an operator message event. You can assign the values of other properties to a
specific operator message by using the property.
Access in runtime: Read and write
Syntax
Object.OperatorMessageIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. A value or a constant that specifies the alarm event for an operator input alarm.
Value Explanation
0 Message event "Lock"
1 "Unlock" Message Event
2 Message event "Hide"
3 Message event "Unhide"
4 Message event "Acknowledge"
See also
AlarmControl (Page 237)
OperatorMessageName
Description
Specifies the name which is referenced with the "OperatorMessageIndex" event in message
events for operator messages.
Access in runtime: Read and write
Syntax
Object.OperatorMessageName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the name that is referenced with the
"OperatorMessageIndex" event in alarm events for operator input alarms.
Value Explanation
Lock Message event "Lock"
Unlock Message event "Enable"
Hide Message event "Hide"
Unhide Message event "Unhide"
Quit Message event "Ackn."
See also
AlarmControl (Page 237)
OperatorMessageNumber
Description
Specifies a message number for the operator message of the selected message event if you
do not use the operator message of WinCC.
Access in runtime: Read and write
Syntax
Object.OperatorMessageNumber[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
Int32
Optional. Specifies a message number for the operator message of the selected message
event.
See also
AlarmControl (Page 237)
OperatorMessageSelected
Description
Activates the message events in the list that trigger operator messages.
Syntax
Object.OperatorMessageSelected[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the alarm events in the list that trigger operator input alarms are activated.
See also
AlarmControl (Page 237)
OperatorMessageSource1
Description
Specifies a alarm text block of the operated message to be added to "Process value block 1" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource1[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 1" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "1" at process value as the alarm text block lock
of the operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource2
Description
Specifies a alarm text block of the operated message to be added to "Process value block 2" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource2[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 2" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "2" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource3
Description
Specifies a alarm text block of the operated message to be added to "Process value block 3" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource3[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 3" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "3" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource4
Description
Specifies a alarm text block of the operated message to be added to "Process value block 4" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource4[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 4" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "4" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource5
Description
Specifies a alarm text block of the operated message to be added to "Process value block 5" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource5[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 5" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "5" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource6
Description
Specifies a alarm text block of the operated message to be added to "Process value block 6" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource6[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 6" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "6" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource7
Description
Specifies a alarm text block of the operated message to be added to "Process value block 7" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource7[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 7" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "7" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource8
Description
Specifies a alarm text block of the operated message to be added to "Process value block 8" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource8[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 8" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "8" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource9
Description
Specifies a alarm text block of the operated message to be added to "Process value block 9" of the
operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource9[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 9" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "9" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSource10
Description
Specifies a alarm text block of the operated message to be added to "Process value block 10" of
the operator message configured here.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSource10[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. Specifies a alarm text block of the operated message to be added to "Process value
block 10" of the operator message configured here.
Example
An operator message is to be generated to indicate that a message was locked. The content of
"User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "10" at process value as the alarm text block of the
operated alarm "User text block 1".
See also
AlarmControl (Page 237)
OperatorMessageSourceType1
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType1[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType2
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType2[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType3
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as value.
Access in runtime: Read and write
Syntax
Object.OperatorMessageSourceType3[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
OperatorMessageSourceType4
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType4[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType5
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType5[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType6
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType6[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType7
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType7[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType8
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType8[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType9
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType9[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OperatorMessageSourceType10
Description
Specifies whether the content of the alarm text block in the operator input alarm is to be
transferred as text or as a value.
Access in runtime Read and write
Syntax
Object.OperatorMessageSourceType10[=TransferAs]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
TransferAs
Optional. A value or a constant that specifies how the alarm text block is displayed in the
operator input alarm.
The following settings are available:
See also
AlarmControl (Page 237)
OutputAddressText
Description
No access in runtime.
PaddingBottom
Description
No access in runtime.
PaddingLeft
Description
No access in runtime.
PaddingRight
Description
No access in runtime.
PaddingTop
Description
No access in runtime.
PageMode
Description
Enables paging is in the long-term archive list. Allows you to display all messages of the short-
term archive in the long-term archive list. Use the "PageModeMessageNumber" property to
determine the number of messages displayed per page. The page up/down buttons of the
toolbar can be used if paging is enabled.
Access in runtime: Read and write
Syntax
Object.PageMode[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if scrolling in the historical alarm list (long-term) is possible.
FALSE if scrolling in the historical alarm list (long-term) is not possible.
See also
AlarmControl (Page 237)
PageModeMessageNumber
Description
Defines the number of messages shown per page when paging the long-term archive list.
Access in runtime: Read and write
Syntax
Object.PageModeMessageNumber[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
Int32
Optional A value or constant that specifies the number of messages per page.
See also
AlarmControl (Page 237)
Password
Description
Determines the password for the loading of the remote monitor.
Access in runtime: Read and write
Syntax
Object.Password[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• SmartClientView
STRING
Optional A value or constant that contains the password for establishing remote monitoring.
See also
SmartClientView (Page 412)
PasswordsMustBeEncrypted
Description
No access in runtime.
Path
Description
Returns the path of the current project without the file names as STRING. For a WinCC client
without its own path, the path is returned in UNC format, otherwise the local path is returned.
Access during runtime: Read
Syntax
Object.Path
Object
Necessary. A "Project" object.
Example
The following example returns the project path as Trace:
'VBS161
HMIRuntime.Trace "Path: " & HMIRuntime.ActiveProject.Path & vbNewLine
See also
Project (Page 215)
PathHeaderBackColor
Description
No access in runtime.
PathHeaderFont
Description
Specifies the header font.
Syntax
Object.PathHeaderFont[=Font]
Object
Required. An object of the type "ScreenItem" with the following format:
• PLCCodeViewer
• S7GraphOverview
Font
Optional. A value or a constant that specifies the font of the header.
See also
PLCCodeViewer (Page 376)
S7GraphOverview (Page 402)
PathHeaderTextColor
Description
Specifies the font color in the header of the GRAPH overview.
Access in runtime Read and write
Syntax
Object.PathHeaderTextColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
Color
Optional. A value or a constant that specifies the font color in the header of the S7-GRAPH
overview.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
S7GraphOverview (Page 402)
PercentageAxis
Description
Specifies that an additional axis with percentage scaling is shown in the trend view.
Access in runtime: Read and write
Syntax
Object.PercentageAxis[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if an axis with percentage scaling is shown.
FALSE, if only value and time axes are shown.
See also
OnlineTrendControl (Page 359)
PercentageAxisAlignment
Description
Specifies the alignment of the percentage axis.
Access in runtime: Read and write
Syntax
Object.PercentageAxisAlignment[=AxisAlignment]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
AxisAlignment
Optional. Value or constant that specifies the alignment of the percentage axis.
See also
OnlineTrendControl (Page 359)
PercentageAxisColor
Description
Specifies the font color and line color of the percentage axis.
Access in runtime: Read and write
Syntax
Object.PercentageAxisColor[=Color]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the percentage axis.
Comments
You use the "RGB" function to define the color in RGB format (red, green, blue). To do this, you
specify the corresponding decimal value for each of the three RGB values (value range from 0 to
255). The "Red" color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTrendControl (Page 359)
Picture
Description
Specifies the screen from the WinCC project graphics to be displayed in the object in runtime.
Access in runtime: Read and write
Syntax
Object.Picture[=HmiObjectHandle]
Object
Required. An object of the type " "ScreenItem" with the format:
• Clock
• GraphicView
HmiObjectHandle
Optional. A value or a constant that specifies the screen from the WinCC project graphics to
be displayed in the object in runtime.
PictureAlignment
Description
Specifies the display type for the background screen in the process image.
Access in runtime: Read and write
Syntax
Object.PictureAlignment[=PictureAlignment]
Object
Required. A "ScreenItem" object with the following format:
• Button
• RoundButton*
*: Read access only
PictureAlignment
Optional A value or a constant that specifies the display type for the background screen in the
process image.
PictureAreaBottomMargin
Description
No access in runtime.
PictureAreaLeftMargin
Description
No access in runtime.
PictureAreaRightMargin
Description
No access in runtime.
PictureAreaTopMargin
Description
No access in runtime.
PictureAutoSizing
Description
No access in runtime.
PictureDeactivated
Description
Specifies the graphic from the WinCC project graphics that is displayed in the "Disabled" status.
Access in runtime Read
Syntax
Object.PictureDeactivated[=HmiObjectHandle]
Object
Required. An object of the type ""ScreenItem" with the following format:
• Roundbutton
HmiObjectHandle
Optional. A value or a constant that specifies the picture that will be displayed in the
"Deactivated" status.
See also
RoundButton (Page 398)
PictureList
Description
No access in runtime.
PictureOff
Description
Specifies the picture that is displayed in the "Off" status.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.PictureOff[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the format:
• Button
• GraphicIOField
• RoundButton*
*: Read access only
You have no access in runtime with the following format:
• Switch
HmiObjectHandle
Optional A value or a constant that specifies the picture that will be displayed in the "Off"
status.
Comments
The picture (*.BMP or *.DIB) must be in the "GraCS" folder of the current project so that you can
integrate it.
PictureOn
Description
Specifies the screen that will be displayed in the "on" state.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.PictureOn[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the format:
• Button
• GraphicIOField
• RoundButton*
*: Read access only
You have no access in runtime with the following format:
• Switch
HmiObjectHandle
Optional A value or a constant that specifies the screen that will be displayed in the "on"
state.
Comments
The screen (*.BMP or *.DIB) must be in the "GraCS" folder of the current project in order to be
able to integrate it.
PictureRotation
Description
No access in runtime.
PictureSizeMode
Description
Specifies the size adaptation between Media Player and the contents to be displayed.
Access in runtime: Read and write
Syntax
Object.PictureSizeMode[=PictureSizeMode]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
PictureSizeMode
Optional. Value or constant that specifies the size adaptation between Media Player and the
contents to be displayed.
See also
MediaPlayer (Page 342)
PlayCount
Description
No access in runtime.
PlayEndless
Description
Specifies that the media file is repeated in an endless loop.
Access in runtime: Read and write
Syntax
Object.PlayEndless[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the media file is repeated in an endless loop.
FALSE, if the media file is played only once.
See also
MediaPlayer (Page 342)
PLCFilter
Description
No access in runtime.
PlcUDTFilter
Description
No access in runtime.
PointerColor
Description
Specifies the pointer color of the "Gauge" object.
Access in runtime Read and write
Syntax
Object.PointerColor[=Color]
Object
Required. An object of the type ""ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the pointer color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
Points
Description
No access in runtime.
PointsCount
Description
Specifies the number of corner points of the polyline or of the polygon.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.PointsCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Polygon
• Polyline
• Tubepolyline
You have no access in runtime with the following format:
• Connector
• Line
Int32
Optional. A value or a constant that specifies the number of corner points of the polyline.
PopupMenuEnabled
Description
No access in runtime.
PositionFont
Description
Sets the font for the label of the slider.
Access in runtime: Read and write
Syntax
Object.PositionFont[=Font]
Object
Required. An object of the type "ScreenItem" with the format:
• Slider
Font
Optional. Value or constant that specifies the font.
Precision
Description
Specifies the number of decimal places (0 to 20).
Syntax
Object.Precision[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• Bar
Int32
Optional A value or a constant that specifies the number of decimal places (0 to 20).
See also
Bar (Page 259)
PreferredUseOnAck
Description
No access in runtime.
Pressed
Description
Specifies whether the selected object is displayed in a pressed state.
Access in runtime: Read and write
Syntax
Object.Pressed[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Button
• RoundButton*
*: Read access only
BOOLEAN
Optional. TRUE, if the selected object is displayed in a pressed state.
PrintJob
Description
Specifies a print job that is created in the "Reports" editor.
Access in runtime: Read and write
Syntax
Object.PrintJob[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
HmiObjectHandle
Optional. A value or a constant that specifies the layout of the printout.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ProcessTag
Description
No access in runtime.
ProcessValue
Description
Specifies the default for the value to be displayed.
This value will be used in runtime if the associated tag is not connected or has not been
updated when the screen starts.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ProcessValue[=DOUBLE | Int32 | Object | SINGLE]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• CheckBox
• Gauge
• GraphicIOField
• IOField
• OptionGroup
• Slider
• SymbolicIOField*
• WindowsSlider*
*: Read access only
You have no access in runtime with the following format:
• Button
• DateTimeField
• Switch
• SymbolLibrary
• Object: IOField
• SINGLE: Gauge
Comments
If you want to assign the "ProcessValue" SmartTags property, then you must formulate the
assignment as follows:
'Examples for the assignment of SmartTags
'Example 1
IOField.ProcessValue = SmartTags("TagName").Value
'Example 2
HmiRuntime.Screens("Screen_1").ScreenItems("IOField_1").ProcessValue =
SmartTags("Tag_1").Value
ProgID
Description
In the case of non-WinCC controls, the version-independent ProgID is returned as the type.
ProhibitDataRecordTagInOnlySimpleView
Description
No access in runtime.
QualityCode
Description
Returns the quality of a tag value after reading the tag as SHORT. After a tag has been written,
the value is invalid.
Access during runtime: Read
Syntax
Object.QualityCode
Object
Necessary. An object of the "HMIRuntime" type.
Example
The following example indicates the quality of the read value when no errors have occurred
during the reading process:
'VBS83
Dim objTag
Dim lngLastErr
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
lngLastErr = objTag.LastError
If 0 = lngLastErr Then
MsgBox objTag.QualityCode
End If
See also
Tag (Page 229)
Radius
Description
Specifies the radius.
Access in runtime: Read and write
Syntax
Object.Radius[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Circle
• CircleSegment
• CircularArc
• RoundButton
Int32
Optional. A value or constant which determines the radius in pixels.
RadiusHeight
Description
Specifies the secondary axis.
Syntax
Object.RadiusHeight[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Ellipse
• EllipseSegment
• EllipticalArc
• TubeArcObject
You have no access in runtime with the following format:
• Circle
Int32
Optional. A value or constant which determines the secondary axis in pixels.
See also
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
TubeArcObject (Page 457)
Circle (Page 279)
RadiusWidth
Description
Specifies the main axis.
Access in runtime: Read and write
Syntax
Object.RadiusWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Ellipse
• EllipseSegment
• EllipticalArc
• TubeArcObject
You have no access in runtime with the following format:
• Circle
Int32
Optional. A value or constant which determines the main axis in pixels.
See also
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
TubeArcObject (Page 457)
Circle (Page 279)
Recipe
Description
No access in runtime.
RecipeName
Description
Returns the name of the recipe that is currently being displayed in the "Recipe view".
Access in runtime: Read and write
Syntax
Object.RecipeName[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• RecipeView
STRING
Optional A value or a constant that returns the name of the recipe.
See also
RecipeView (Page 389)
RecipeNameCaption
Description
No access in runtime.
RecipeNrCaption
Description
No access in runtime.
RecipeNrColFirst
Description
No access in runtime.
RecipeNumber
Description
Returns the number of the recipe that is currently being displayed in the "Recipe view".
Access in runtime: Read and write
Syntax
Object.RecipeNumber[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• RecipeView
Int32
Optional A value or a constant that returns the number of the recipe.
See also
RecipeView (Page 389)
RecordName
Description
Returns the name of the recipe data record that is currently being displayed in the "Recipe view".
Access in runtime: Read and write
Syntax
Object.RecordName[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• RecipeView
STRING
Optional A value or a constant that returns the name of the recipe data record.
See also
RecipeView (Page 389)
RecordNrColFirst
Description
No access in runtime.
RecordNumber
Description
Returns the number of the recipe data record that is currently being displayed in the "Recipe
view".
Access in runtime: Read
Syntax
Object.RecordNumber[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• RecipeView
Int32
Optional A value or a constant that returns the number of the recipe data record.
See also
RecipeView (Page 389)
RelativeFillLevel
Description
Specifies the fill percentage for the object.
Access in runtime: Read and write
Syntax
Object.RelativeFillLevel[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• Ellipse
• EllipseSegment
• GraphicView
• OptionGroup
• Polygon
• Rectangle
• RoundButton*
• TextField
• WindowsSlider*
*: Read access only
You have no access in runtime with the following format:
• CircleSegment
Int32
Optional. A value or a constant that specifies the fill percentage of the object.
RenameButtonVisible
Description
No access in runtime.
ReSizeable
Description
No access in runtime.
RightMargin
Description
No access in runtime.
Rotation
Description
Specifies the angle of rotation in degrees. The angle of rotation is measured counterclockwise.
Access in runtime: Read and write
Syntax
Object.Rotation[=SymbolLibraryRotation]
Object
Required. An object of the type "ScreenItem" with the format:
• SymbolLibrary
SymbolLibraryRotation
Optional. A value or a constant that specifies the angle of rotation in degrees.
RotationAngle
Description
Specifies the angle of rotation in degrees.
Access in runtime: Read and write
Syntax
Object.RotationAngle[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Line
• Polygon
• Polyline
• TextField
• TubeTeeObject
Int32
Optional A value or a constant that specifies the angle of rotation in degrees.
Comments
In Runtime the object rotates clockwise on the reference point.
See also
Line (Page 336)
Polygon (Page 378)
Polyline (Page 381)
TextField (Page 438)
TubeTeeObject (Page 464)
RotationCenterLeft
Description
Specifies the X coordinate of the pivot point for the object in runtime.
Access in runtime: Read and write
Syntax
Object.RotationCenterLeft[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Line
• Polygon
• Polyline
• TextField*
*: Read access only
Int32
Optional. A value or a constant that specifies the X coordinates of the pivot point to rotate
the object in runtime.
Comments
The value of the X coordinate is relative to the object width. Specify the value as a percentage
from the left edge of the rectangle that surrounds the object.
RotationCenterTop
Description
Specifies the Y coordinate of the pivot point for the object in runtime.
Access in runtime: Read and write
Syntax
Object.RotationCenterTop[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Line
• Polygon
• Polyline
• TextField*
*: Read access only
Int32
Optional. A value or a constant that specifies the Y coordinates of the pivot point to rotate
the object in Runtime.
Comments
The value of the Y coordinate is relative to the object width. Specify the value as a percentage
from the upper edge of the rectangle that surrounds the object.
RoundCornerHeight
Description
Specifies the corner radius. Enter the value as a percentage of half the height of the object.
Access in runtime: Read and write
Syntax
Object.RoundCornerHeight[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Rectangle
Int32
Optional A value or a constant that specifies the corner radius.
RoundCornerWidth
Description
Specifies the corner radius. Enter the value as a percentage of half the width of the object.
Access in runtime: Read and write
Syntax
Object.RoundCornerWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Rectangle
Int32
Optional A value or a constant that specifies the corner radius.
RowScrollbar
Description
Specifies when the vertical scroll bar is displayed.
Access in runtime Read and write
Syntax
Object.RowScrollbar[=ScrollbarVisibility]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
ScrollbarVisibility
Optional. A value or a constant that specifies when the vertical scroll bar is displayed.
Value Explanation
0 The vertical scroll bar is not displayed.
1 The vertical scroll bar is displayed if the display area is too small for all rows.
2 The vertical scroll bar is always displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
RowTitleAlignment
Description
Specifies the type of row header alignment.
Access in runtime Read and write
Syntax
Object.RowTitleAlignment[=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
HorizontalAlignment
Optional. A value or a constant that specifies the row header alignment.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
RowTitles
Description
Specifies whether numbered column headers are displayed.
Access in runtime Read and write
Syntax
Object.RowTitles[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional. TRUE if numbered column headers are displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
RTPersistence
Description
Specifies whether online configurations are retained after a screen change.
Also set "RTPersistenceType" to 1 or 2.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.RTPersistence[=RTPersistence]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
You have no access in runtime with the following format:
• SysDiagControl
• UserView
RTPersistence
Optional. A value or a constant that specifies whether online configurations are retained after
a screen change.
Value Explanation
0 The current online configurations are discarded at the next picture change.
1 The current online configurations are retained at the next picture change.
2 All online configurations made are lost. The screen is set to the content originally configured.
RTPersistenceAuthorization
Description
Specifies the authorization required for online configuration in runtime.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.RTPersistenceAuthorization[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
You have no access in runtime in the case of the following characteristic:
• SysDiagControl
• UserView
HmiObjectHandle
Optional. A value or a constant that specifies the user rights in runtime.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SysDiagControl (Page 429)
UserView (Page 478)
RTPersistenceType
Description
Specifies how online configurations of WinCC are retained.
Access in Runtime:
• RT Advanced: No access
• RT Professional: Read
Syntax
Object.RTPersistenceType
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
You have no access in runtime with the following format:
• SysDiagControl
• UserView
RTPersistenceType
Optional. A value or a constant that specifies how online configurations are retained by
WinCC.
Value Explanation
0 Online configurations are discarded. These are lost at the next picture change.
1 Online configurations are retained during Runtime. These are lost on exiting.
2 Online configurations are retained permanently. These are also available after restart.
RulerColor
Description
Specifies the color of the scale gradation (help line) of the axis label.
Access in runtime Read and write
Syntax
Object.RulerColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendView
Color
Optional. A value or a constant that specifies the color of the scale gradation.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendView (Page 451)
RulerColumns
Description
No access in runtime.
RulerType
Description
Specifies the display mode of the value table.
Access in runtime: Read and write
Syntax
Object.RulerType[=TrendRulerControlType]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
TrendRulerControlType
Optional. A value or a constant that specifies the display mode of the value table.
See also
TrendRulerControl (Page 441)
1.5.5.12 Properties S
S7Device
Description
No access in runtime.
ScaleColor
Description
Specifies the color of the scale.
Access in runtime: Read and write
Syntax
Object.ScaleColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• TrendView
Color
Optional. A value or a constant that specifies the color of the scale.
Comments
ScreenItem object with the format "Bar": For the color to be displayed, the property ""ShowScale"
must have the value TRUE.
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this,
enter the appropriate decimal value for each of the three RGB values (range from 0 to 255).
For example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
ScaleDenominator
Description
Defines the counter for scaling on the client.
Syntax
Object.ScaleDenominator=[Int]
Object
Required. A "ScreenItem" object with the format "SmartClientView".
Int
Optional. A value or a constant that specifies the value.
See also
SmartClientView (Page 412)
ScaleDenominator
Description
No access in runtime.
ScaleGradation
Description
Specifies the distance between two large marking lengths of the scale.
Syntax
Object.ScaleGradation[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the distance between two large marking lengths
of the scale.
See also
Bar (Page 259)
ScaleLabelColor
Description
Specifies the color of the label for the scale marks of the "Gauge" object.
Access in runtime Read and write
Syntax
Object.ScaleLabelColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the label color of the scale gradation.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
ScaleLabelFieldLength
Description
No access in runtime.
ScaleLabelFont
Description
Specifies the font for the scale label.
Access in runtime: Read and write
Syntax
Object.ScaleLabelFont[=Font]
Object
Required. An object of the type "ScreenItem" with the format:
• Gauge
Font
Optional. A value or a constant that specifies the font for scale labeling.
ScaleLabelingDoubleLined
Description
No access in runtime.
ScaleNumerator
Description
No access in runtime.
ScalePosition
Description
Specifies the position of the scale.
Also set "ShowScale" to "TRUE".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ScalePosition[=ScalePosition]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
You have no access in runtime with the following format:
• Slider
ScalePosition
Optional. A value or a constant that specifies the position of the scale.
ScaleStart
Description
No access in runtime.
ScaleTickColor
Description
Specifies the color of the scale gradation of the "Gauge" object.
Access in runtime: Read and write
Syntax
Object.ScaleTickColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Gauge
Color
Optional. A value or a constant that specifies the color of the scale gradation.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
ScaleTickLabelPosition
Description
Specifies the diameter of the assumed circle on which the label of the scale divisions is located.
Access in runtime: Read and write
Syntax
Object.ScaleTickLabelPosition[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
DOUBLE
Optional A value or a constant that specifies the diameter of the assumed circle on which the
label of the scale division is located.
Value range from 0 to 1
0: The label is located in the center of the scale.
1: The diameter of the assumed circle for the label is the smaller value of the geometry
properties "Width" and "Height". A part of the label can lie outside the object limits and is
therefore invisible.
See also
Gauge (Page 320)
ScaleTickLength
Description
Specifies the length of the main markings for the scale division. The value refers to half the
smaller value of the geometry properties "Width" and "Height".
The length of the marking lengths for the fine divisions is 0.5* scale width.
Access in runtime: Read and write
Syntax
Object.ScaleTickLength[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
DOUBLE
Optional A value or a constant that specifies the length of the main markings of the scale.
Value range 0 to scale end value
0: There are no scale divisions. The divisions of the scale in the areas are not visible.
Scale end value: The scale division ranges from the mid-point of the scale disc to the value
specified by the scale end value.
See also
Gauge (Page 320)
ScaleTickPosition
Description
Specifies the diameter of the assumed circle on which the scale divisions are located.
The main markings of the scale divisions lie with their outward-facing ends on this circle.
Access in runtime: Read and write
Syntax
Object.ScaleTickPosition[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
DOUBLE
Optional A value or a constant that specifies the diameter of the assumed circle on which the
scale divisions are located.
Value range from 0 to 1
0: The scale divisions are located in the center of the scale.
1: The diameter of the assumed circle for the label is the scale divisions is the smaller value of
the geometry properties ""Width" and "Height".
See also
Gauge (Page 320)
Scaling
Description
No access in runtime.
ScalingType
Description
Specifies the type of bar scaling.
Also set "ShowScale" to "TRUE".
Access in runtime Read and write
Syntax
Object.ScalingType[=BarScalingType]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BarScalingType
Optional. A value or a constant that specifies the type of bar scaling.
See also
Bar (Page 259)
ScreenItems
Description
Returns the ScreenItems list.
Access in Runtime: Read
Syntax
Object.ScreenItems
Object
Required A "ScreenItems"." object.
See also
ScreenItem (Page 219)
ScreenItems (list) (Page 221)
ScreenName
Description
Specifies the screen to be displayed in the screen window in runtime.
Access in runtime: Read and write
Syntax
Object.ScreenName[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following format:
• ScreenWindow
HmiObjectHandle
Optional A value or a constant that specifies the screen to be displayed in the screen window
in runtime.
See also
ScreenWindow (Page 404)
Screens
Description
Returns the Screens listing. The Screens list contains two elements: The first element with the
index 0 represents the permanent area. The second element with the index 1 represents the root
screen. Alternatively, the two elements can be addressed by means of their names. Use
"Overview" for the permanent area and "Base" for the root screen.
Note
The alarm window and the alarm indicator are not contained in the Screens list, even if they
have the focus in Runtime.
Access in runtime: Read
Syntax
Object.Screens
Object
Required. An object of the type "Screens".
See also
Screen object (list) (Page 223)
ScreenScaleMode
Description
Specifies the scaling mode of the displayed screen.
Access in Runtime: Read and write
Syntax
Object.ScreenScaleMode[=ScreenScaleModeType]
Object
Required. An object of the type "ScreenItem" with the format:
• ScreenWindow
ScreenScaleModeType
Optional. A value or a constant that specifies the scaling mode of the displayed screen.
ScrollBarOrientation
Description
No access in runtime.
SecondGradientColor
Description
No access in runtime.
SecondGradientOffset
Description
No access in runtime.
SecondNeedleHeight
Description
Specifies the length of the second hand.
Access in runtime Read and write
Syntax
Object.SecondNeedleHeight[=Int32]
Object
Required. An object of the type ""ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the length of the second hand.
Specify the length of the second hand as a percentage relating to the radius of the clock face.
See also
Clock (Page 287)
SecondNeedleWidth
Description
Specifies the width of the second hand.
Access in runtime Read and write
Syntax
Object.SecondNeedleWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Int32
Optional. A value or a constant that specifies the width of the second hand. Specify the width
as a percentage relating to double the length of the second hand.
See also
Clock (Page 287)
SecurityForSimpleViewEnabled
Description
No access in runtime.
SegmentColoring
Description
Specifies the type of color change to be displayed if the limits are exceeded.
Access in runtime Read and write
Syntax
Object.SegmentColoring[=THmiBarColorType]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
THmiBarColorType
Optional. A value or a constant that specifies the type of color change. Value range from 0 to
1.
See also
Bar (Page 259)
SelectArchiveName
Description
Specifies that the selection dialog for the data source of the recipe view is displayed initially in
runtime.
Access in runtime: Read and write
Syntax
Object.SelectArchiveName[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• UserArchiveControl
BOOLEAN
Optional.
TRUE, if the selection dialog for the data source of the recipe view is displayed in the screen.
FALSE, if no selection dialog for the data source of the recipe view is displayed in the screen.
See also
UserArchiveControl (Page 466)
SelectBackColor
Description
Specifies the background color of the selected text entry.
Access in runtime Read
Syntax
Object.SelectBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Color
Optional. A value or a constant that specifies the background color of the selected text entry.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
SymbolicIOField (Page 422)
SelectedCellColor
Description
Specifies the background color of the selected cell.
Access in runtime Read and write
Syntax
Object.SelectedCellColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the background color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectedCellForeColor
Description
Specifies the font color of the selected cell.
Access in runtime Read and write
Syntax
Object.SelectedCellForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the font color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectedID
Description
Returns the ID of the data record selected in the recipe view.
Access in runtime Read and write
Syntax
Object.SelectedID[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• UserArchiveControl
Int32
Optional. A value or a constant that returns the ID of the selected data record.
Value Description
0 None valid data record selected, e.g. in the event of a connection error.
-1 The edit line is selected.
See also
UserArchiveControl (Page 466)
SelectedIndex
Description
Defines the index of which the associated text is highlighted in the combo box or list box.
The maximum value is the number of lines (NumberLines) of the object.
Access in runtime: Read and write
Syntax
Object.SelectedIndex[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• ComboBox
• ListBox
Int32
Optional A value or a constant that specifies the index of the text highlighted.
See also
ComboBox (Page 290)
Listbox (Page 339)
SelectedRowColor
Description
Specifies the background color of the selected row.
Access in runtime Read and write
Syntax
Object.SelectedRowColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the background color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectedRowForeColor
Description
Specifies the font color of the selected row.
Access in runtime Read and write
Syntax
Object.SelectedRowForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the font color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectedText
Description
Specifies the text for the entry referenced with "SelectedIndex".
Access in runtime Read and write
Syntax
Object.SelectedText[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• ComboBox
• ListBox
STRING
Optional. A value or a constant that specifies the text for an entry.
See also
ComboBox (Page 290)
Listbox (Page 339)
SelectedTitleColor
Description
Specifies the background color of the selected table header.
Also set "UseSelectedTitleColor" to "TRUE".
Access in runtime Read and write
Syntax
Object.SelectedTitleColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the background color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectedTitleForeColor
Description
Specifies the font color of the selected table header.
Also set "UseSelectedTitleColor" to "TRUE".
Access in runtime Read and write
Syntax
Object.SelectedTitleForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the font color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
UserArchiveControl (Page 466)
TrendRulerControl (Page 441)
SelectForeColor
Description
Specifies the color of the selected text entry.
Access in runtime Read
Syntax
Object.SelectForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Color
Optional. A value or a constant that specifies the color of the selected text entry.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
SymbolicIOField (Page 422)
SelectionBackColor
Description
Specifies the background color of the selected cells.
Access in runtime Read and write
Syntax
Object.SelectionBackColor[=Color]
Object
Required. A "ScreenItem" object with the format:
• AlarmView
• RecipeView*
• StatusForce
• UserView
*: Read access only
You have no access in runtime with the following format:
• TrendView
Color
Optional. A value or constant that specifies the background color of the selected row.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
SelectionColoring
Description
Specifies whether selection colors are used for cells or rows.
Access in runtime Read and write
Syntax
Object.SelectionColoring[=GridSelectionColoring]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridSelectionColoring
Optional. A value or a constant that specifies whether highlight colors are used for cells or
rows.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectionForeColor
Description
Specifies the foreground color of the selected cells.
Access in runtime Read and write
Syntax
Object.SelectionForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmView
• RecipeView*
• StatusForce
• UserView
*: Read access only
You have no access in runtime with the following format:
• TrendView
Color
Optional. A value or constant that specifies the background color of the selected row.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
SelectionRect
Description
Specifies whether a selection frame is used for the selected cells or rows.
Access in runtime Read and write
Syntax
Object.SelectionRect[=GridSelectionBorder]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridSelectionBorder
Optional. A value or a constant that specifies whether a selection border is used for the
selected cell or rows.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectionRectColor
Description
Specifies the color of the selection rectangle in the alarm window.
Also set "SelectionType" to "1" or "2".
Access in runtime Read and write
Syntax
Object.SelectionRectColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant which specifies the color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectionRectWidth
Description
Specifies the line width of the selection rectangle in the alarm window if SelectionType equals
"1".
Syntax
Object.SelectionRectWidth[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional A value or a constant which specifies the line width.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SelectionType
Description
Specifies the number of lines you can mark.
Access in runtime: Read and write
Syntax
Object.SelectionType[=GridSelectionType]
Object
Required. A "ScreenItem" object with the format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridSelectionType
Optional A value or a constant that specifies the number of lines that you can select.
The following settings are available:
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
SeparateLineForAlarmText
Description
No access in runtime.
SeparatorBackColor
Description
Specifies the background color of the broken separation lines in the selection list.
Access in runtime Read
Syntax
Object.SeparatorBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Color
Optional. A value or a constant that specifies the background color of the broken separation
lines in the selection list.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
SymbolicIOField (Page 422)
SeparatorColor
Description
Specifies the color of the separation lines in the selection list.
Access in runtime: Read and write
Syntax
Object.SeparatorColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• S7GraphOverview
• SymbolicIOField *
* Read access only
Color
Optional. A value or a constant that specifies the color of the separation lines in the selection
list.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
SeparatorCornerStyle
Description
Returns the shape of the corners for the separation line.
Access in runtime: Read
Syntax
Object.SeparatorCornerStyle[=CornerStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• SymbolicIOField
CornerStyle
Optional. A value or a constant that returns the shape of the corners of the separation line.
Value Description
0 Solid line
1 Dashed line
2 Dotted line
3 Dashed and dotted line
4 Dash-dot-dot line
SeparatorLineEndShapeStyle
Description
Returns the shape of the line ends for the separation line.
Access in runtime: Read
Syntax
Object.SeparatorLineEndShapeStyle[=LineEndShapeStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• SymbolicIOField
LineEndShapeStyle
Optional. A value or a constant that returns the shape of the line ends for the separation line.
Value Designation
-1 Flush
0 Rounded
1 Rectangular
SeparatorStyle
Description
Specifies the line type of the separation lines in the selection list.
Access in runtime: Read
Syntax
Object.SeparatorStyle[=LineStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• SymbolicIOField
LineStyle
Optional. A value or a constant that specifies the type of separation lines in the selection list.
SeparatorWidth
Description
Specifies the width of the separation lines in the selection list.
Access in runtime Read
Syntax
Object.SeparatorWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
Int32
Optional. A value or a constant that specifies the width of separation lines in the selection list.
See also
SymbolicIOField (Page 422)
ServerNames
Description
Specifies the servers of a distributed system from which the object receives data. The
information is given in the following form: NameServer1;NameServer2;NameServer3.
Access in runtime Read and write
Syntax
Object.ServerNames[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
STRING
Optional. A value or a constant that specifies the servers of a distributed system from which
the object receives data.
See also
AlarmControl (Page 237)
ServerPrefix
Description
Specifies the server on which the screen is located that is displayed in the screen window in
runtime or returns the server name.
Enter the server name followed by two colons: "<Server name>::". There is no check whether
the server actually exists.
Access in Runtime: Read and write
Syntax
Object.ServerPrefix[=String]
Object
Required. An object of the type "ScreenItem" with the following format:
• ScreenWindow
String
Optional. A value or a constant which specifies the server name.
ServerScale
Description
No access in runtime.
SetOfVisibleColumns
Description
No access in runtime.
Shared
Description
No access in runtime.
ShareSpaceWithSourceControl
Description
Specifies that the display area of the data source is adapted to the size of the value table.
Access in runtime Read and write
Syntax
Object.ShareSpaceWithSourceControl[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• TrendRulerControl
BOOLEAN
Optional.
TRUE if the size of the data source is adjusted to the size of the value table.
FALSE; if the size of the data source is not adapted to the size of the value table.
See also
TrendRulerControl (Page 441)
ShiftDecimalPoint
Description
No access in runtime.
ShowAcknowledgeButton
Description
No access in runtime.
ShowAlarmsFromDate
Description
Specifies that only those message events are displayed that are saved in this tag.
Access in runtime: Read and write
Syntax
Object.ShowAlarmsFromDate[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the format:
• AlarmView
HmiObjectHandle
Optional A value or a constant which specifies that only those message events are displayed
that are saved in this tag.
See also
AlarmView (Page 251)
ShowAlarmsToAcknowledge
Description
No access in runtime.
ShowBadTagState
Description
Defines whether the object is grayed out when a bad quality code or tag status is detected.
Access in runtime: Read and write
Syntax
Object.ShowBadTagState[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• CheckBox
• IOField
• OptionGroup
• SymbolicIOField *
• WindowSlider *
* Read access only
BOOLEAN
Optional.
TRUE if the object is grayed out or the settings for the grid color are used when the quality
code or the the tag status is poor.
ShowBar
Description
Specifies whether the displayed process value is also shown by a filled bar.
Access in runtime Read and write
Syntax
Object.ShowBar[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Slider
BOOLEAN
Optional. TRUE if the process value is also shown by a filled bar.
See also
Slider (Page 408)
ShowCaption
Description
Specifies whether the title bar is shown.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ShowCaption[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• ApplicationWindow
• ScreenWindow
You have no access in runtime with the following format:
• Switch
BOOLEAN
Optional. TRUE if the header is shown.
ShowColumnHeaders
Description
No access in runtime.
ShowControls
Description
Specifies that a toolbar is displayed.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ShowControls[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• MediaPlayer
You have no access in runtime with the following format:
• SmartClientView
BOOLEAN
Optional.
TRUE, if a toolbar is displayed.
FALS E, if no toolbar will be displayed.
ShowDate
Description
No access in runtime.
ShowDecimalPoint
Description
Specifies whether the scale is identified with decimal figures (decimal point and one decimal
place) or with whole integers.
Access in runtime: Read and write
Syntax
Object.ShowDecimalPoint[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
BOOLEAN
Optional TRUE, if the scale is identified with decimal figures (decimal point and one decimal
place).
See also
Gauge (Page 320)
ShowDropDownButton
Description
Returns whether a button for the selection list is displayed.
Access in runtime Read
Syntax
Object.ShowDropDownButton[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
BOOLEAN
Optional.
TRUE if a button is displayed for the selection list.
FALSE, if no button for the selection list is displayed.
See also
SymbolicIOField (Page 422)
ShowDropDownList
Description
No access in runtime.
ShowFeatureBackward
Description
Specifies that the "Backward" button is to be displayed in runtime.
Access in runtime Read and write
Syntax
Object.ShowFeatureBackward[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Backward" button is displayed.
FALSE if no "Backward" button is displayed.
See also
MediaPlayer (Page 342)
ShowFeatureForward
Description
Specifies that the "Forward" button is displayed in runtime.
Access in runtime Read and write
Syntax
Object.ShowFeatureForward[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Forward" button is displayed.
FALSE if no "Forward" button is displayed.
See also
MediaPlayer (Page 342)
ShowFeatureFullScreen
Description
Specifies that the Media Player can be displayed as a full screen.
Access in runtime Read and write
Syntax
Object.ShowFeatureFullScreen[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Full screen" button is displayed in the toolbar of the Media Player.
FALSE, if no "Full screen" button is displayed in the toolbar of the Media Player.
See also
MediaPlayer (Page 342)
ShowFeatureFullVolume
Description
No access in runtime.
ShowFeaturePause
Description
Specifies that the "Pause" button is displayed in runtime.
Access in runtime: Read and write
Syntax
Object.ShowFeaturePause[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Pause" button is displayed in runtime.
FALSE, if no "Pause" button is displayed in runtime.
See also
MediaPlayer (Page 342)
ShowFeaturePlay
Description
Specifies that the "Play" button is displayed in runtime.
Access in runtime: Read and write
Syntax
Object.ShowFeaturePlay[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Play" button is displayed in runtime.
FALSE, if no "Play" button is displayed in runtime.
See also
MediaPlayer (Page 342)
ShowFeatureStop
Description
Specifies that the "Stop" button is displayed in runtime.
Syntax
Object.ShowFeatureStop[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the "Stop" button is displayed in runtime.
FALSE, if no "Stop" button is displayed in runtime.
See also
MediaPlayer (Page 342)
ShowFillLevel
Description
Specifies whether the selected object is filled.
Access in runtime: Read and write
Syntax
Object.ShowFillLevel[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• Circle
• CircleSegment
• Ellipse
• EllipseSegment
• GraphicView
• OptionGroup
• Polygon
• Rectangle
• RoundButton*
• TextField
• WindowsSlider*
*: Read access only
BOOLEAN
Optional.TRUE, if the selected object is filled.
ShowFocusRectangle
Description
Specifies whether the button is given a selection border when it is activated in Runtime.
Access in runtime: Read and write
Syntax
Object.ShowFocusRectangle[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Clock
BOOLEAN
Optional TRUE, if the button is given a selection border when it is activated in Runtime.
See also
Clock (Page 287)
ShowHelpButton
Description
No access in runtime.
ShowHorizontalGridlines
Description
No access in runtime.
ShowInnerDial
Description
No access in runtime.
ShowLargeTicksOnly
Description
Specifies whether only large scale marks are shown.
Access in runtime: Read and write
Syntax
Object.ShowLargeTicksOnly[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE if only large scale marks are shown.
See also
Bar (Page 259)
ShowLeadingZeros
Description
No access in runtime.
ShowLimitLines
Description
No access in runtime.
ShowLimitRanges
Description
No access in runtime.
ShowLimitMarkers
Description
Specifies whether the limit values are shown as a scale value.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ShowLimitMarkers[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
You have no access in runtime with the following format:
• Slider
BOOLEAN
Optional. TRUE, if the limit value is shown as a scale value.
ShowLoopInAlarmButton
Description
No access in runtime.
ShowMilliseconds
Description
No access in runtime.
ShowNavigationButtons
Description
No access in runtime.
ShowPathInformation
Description
No access in runtime.
ShowPeakValuePointer
Description
Specifies whether a slave pointer will be used for the selected object.
The slave pointer shows the maximum pointer deflection provided in Runtime while the
process screen is loaded. If you reload the process screen, the slave pointer will be reset.
Access in runtime: Read and write
Syntax
Object.ShowPeakValuePointer[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
BOOLEAN
Optional TRUE, if the slave pointer is used.
See also
Gauge (Page 320)
ShowPendingAlarms
Description
No access in runtime.
ShowPosition
Description
Specifies whether the value of the current slider position should also be displayed numerically.
The value is then displayed beneath the slider.
Access in runtime: Read and write
Syntax
Object.ShowPosition[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Slider
BOOLEAN
Optional TRUE if the value is also shown numerically.
See also
Slider (Page 408)
ShowProcessValue
Description
No access in runtime.
ShowReadButton
Description
No access in runtime.
ShowRuler
Description
Specifies whether a scale division (help line) is displayed for an axis label of the object.
Access in runtime: Read and write
Syntax
Object.ShowRuler[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
• TrendView
BOOLEAN
Optional. TRUE, if the scale gradation is shown.
ShowRulerInAxis
Description
Specifies whether rulers are also displayed in the time axes.
Access in runtime Read and write
Syntax
Object.ShowRulerInAxis[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the rulers are also displayed in the time axes.
FALSE if the rulers are not displayed in the time axes.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
ShowScale
Description
Specifies whether the values are also shown in a scale.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ShowScale[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
You have no access in runtime with the following format:
• Slider
BOOLEAN
Optional. TRUE, if the values will also be shown in a scale.
ShowScrollBar
Description
No access in runtime.
ShowScrollbars
Description
Specifies whether scroll bars are displayed.
Access in runtime: Read and write
Syntax
Object.ShowScrollbars[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
• ScreenWindow
BOOLEAN
Optional. TRUE if scroll bars are displayed.
ShowSignForPositiveLabel
Description
No access in runtime.
ShowSortButton
Description
Specifies whether the sorting button is shown above the vertical scroll bar. Click this sorting
button to sort the selected column based on the configured sorting criteria. The sorting button
is not displayed if the table does not contain a vertical scroll bar.
Access in runtime Read and write
Syntax
Object.ShowSortButton[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the sort button is displayed. You can sort the selected column.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ShowSortIcon
Description
Specifies whether the sorting icon is displayed.
Access in runtime Read and write
Syntax
Object.ShowSortIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the sort icon is displayed.
FALSE if the sort icon is not displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ShowSortIndex
Description
Specifies whether a sort index is displayed.
Syntax
Object.ShowSortIndex[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if a sort index is displayed.
FALSE if a sort index is not displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ShowSplittedView
Description
No access in runtime.
ShowStatisticRuler
Description
Specifies whether the lines that define the statistics area are shown.
Access in runtime: Read and write
Syntax
Object.ShowStatisticRuler[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if the lines for the statistics area are shown.
FALSE, if no lines for the statistics area are shown.
See also
OnlineTrendControl (Page 359)
ShowStatusBar
Description
Specifies whether the status bar is shown.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ShowStatusBar[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• HTMLBrowser
You have no access in runtime with the following format:
• MediaPlayer
BOOLEAN
Optional. TRUE, if the status bar is shown.
ShowTableGridlines
Description
Specifies whether grid lines are shown in the table.
Access in runtime:
• RT Advanced: Read and write
• RT Professional: No access
Syntax
Object.ShowTableGridlines[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• StatusForce
You have no access in runtime with the following format:
• TrendView
• UserView
BOOLEAN
Optional. TRUE if grid lines are shown in the table.
ShowThumb
Description
Specifies whether the slider of the "Slider" object will be displayed.
Access in runtime:
• RT Advanced: Read and write
• RT Professional: Read
Syntax
Object.ShowThumb[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Slider
BOOLEAN
Optional. TRUE, if the slider is shown.
See also
Slider (Page 408)
ShowTickLabels
Description
Specifies whether the label is shown in the scale.
Access in runtime
• RT Advanced: Read and write
• RT Profession al: Read
Syntax
Object.ShowTickLabels[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Slider
You have no access in runtime with the following format:
• Bar
BOOLEAN
Optional. TRUE if the label is shown.
Comments
The increments for the measured value are automatically established dependent upon the
specified measurement range and the size of the object.
ShowTicks
Description
Specifies whether the marks in the scale are displayed.
Access in runtime Read and write
Syntax
Object.ShowTicks[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
• Slider*
* RT Professional, read access only
BOOLEAN
Optional. TRUE if the marks are shown.
See also
Clock (Page 287)
Slider (Page 408)
ShowTime
Description
No access in runtime.
ShowTimeAxis
Description
No access in runtime.
ShowTimeAxisLabeling
Description
No access in runtime.
ShowTitle
Description
Specifies the style of the window border and window title for the object.
Access in runtime Read and write
Syntax
Object.ShowTitle[=WindowHeaderStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
WindowHeaderStyle
Optional. A value or constant that specifies the style of the window border for the object.
Value Description
0 Neither window border not title are displayed.
1 A narrow window border with title is displayed.
2 A standard window border with title is displayed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ShowToolBar
Description
No access in runtime.
ShowToolbarBackgroundColor
Description
No access in runtime.
ShowTracker
Description
Specifies that the tracker is displayed.
Access in runtime: Read and write
Syntax
Object.ShowTracker[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
BOOLEAN
Optional.
TRUE, if the tracker is displayed.
FALSE, if no tracker is displayed.
See also
MediaPlayer (Page 342)
ShowTrendIcon
Description
Specifies whether an icon is displayed below the value axes. The icon indicates the trend
currently displayed in the foreground.
Access in runtime Read and write
Syntax
Object.ShowTrendIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the icon is displayed.
FALSE if the icon is not displayed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
ShowTrendIndicator
Description
Specifies whether the tendency (increasing or falling) of the measurement value that is to be
monitored is shown with a small arrow.
Access in runtime: Read and write
Syntax
Object.ShowTrendIndicator[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the tendency (increasing or falling) of the measurement value that is to be
monitored is shown with a small arrow.
See also
Bar (Page 259)
ShowValueAxis1
Description
No access in runtime.
ShowValueAxis1Label
Description
No access in runtime.
ShowValueAxis2
Description
No access in runtime.
ShowValueAxis2Label
Description
No access in runtime.
ShowValueTable
Description
No access in runtime.
ShowWriteButton
Description
No access in runtime.
ShowY1HlpLine
Description
No access in runtime.
ShowY2HlpLine
Description
No access in runtime.
SimpleView
Description
No access in runtime.
SimpleViewToolbar
Description
No access in runtime.
Size
Description
No access in runtime.
Sizeable
Description
Specifies that the size of an object can be changed in Runtime.
Access in Runtime: Read and write
Syntax
Object.Sizeable[=BOOLEAN]
Object
Required. An object of the "ScreenItem" type with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Sizable
Optional. A value or a constant that specifies whether the size of the object can be modified.
See also
TrendRulerControl (Page 441)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
UserArchiveControl (Page 466)
SmartTags
Description
Returns the SmartTags list.
Access in Runtime: Read
Syntax
Object.SmartTags
Object
Required A ""HMIRuntime" object.
See also
HMIRuntime (Page 209)
SortByTimeDirection
Description
Specifies whether the last alarm received is shown at the top (ascending sorting order).
Access in runtime Read and write
Syntax
Object.SortByTimeDirection[=SortByTimeDirection]
Object
Required. An object of the type "ScreenItems" with the following format:
• AlarmView
SortByTimeDirection
Optional. A value or a constant that specifies the sorting order in the object.
See also
AlarmView (Page 251)
SortByTimeEnabled
Description
Specifies whether alarm sorting can be altered according to the time.
Access in runtime Read and write
Syntax
Object.SortByTimeEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItems" with the following format:
• AlarmView
BOOLEAN
Optional. TRUE if sorting can be altered by the device operator.
See also
AlarmView (Page 251)
SortSequence
Description
Specifies how the sorting order is changed if the operator clicks on the column header in
runtime.
Access in runtime: Read and write
Syntax
Object.SortSequence[=GridSortSequence]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridSortSequence
Optional. A value or a constant that specifies how the sorting order will be changed by a
mouse click.
SourceControl
Description
Specifies the trend or table view that is connected to the value table.
Access in runtime: Read and write
Syntax
Object.SourceControl[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
HmiObjectHandle
Optional. A value or a constant that specifies the trend or table view that is connected to the
value table.
See also
TrendRulerControl (Page 441)
SourceControlType
Description
Specifies the type of data source.
Access in runtime: Read and write
Syntax
Object.SourceControlType[=TrendRulerControlSourceControlType]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
TrendRulerControlSourceControlType
Optional. Value or constant that specifies the type of the data source of the value table.
See also
TrendRulerControl (Page 441)
SplittedViewRatio
Description
No access in runtime.
StartAngle
Description
Specifies the angle by which the start point deviates from the zero position (0°).
Access in runtime: Read and write
Syntax
Object.StartAngle[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• CircleSegment
• CircularArc
• EllipseSegment
• EllipticalArc
• TubeArcObject
Int32
Optional. A value or a constant that specifies the angle by which the start point deviates from
the zero position (0°).
See also
CircleSegment (Page 282)
CircularArc (Page 285)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
TubeArcObject (Page 457)
StartLeft
Description
No access in runtime.
StartStyle
Description
Specifies how the line start is displayed.
Access in runtime: Read and write
Syntax
Object.StartStyle[=LineEndStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
• Line
• Polyline
LineEndStyle
Optional. A value or constant which determines the line start. Value range from 0 to 6.
StartTop
Description
No access in runtime.
StartValue
Description
Defines the absolute value of the zero point of the scale indicator.
Access in runtime: Read and write
Syntax
Object.StartValue[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the absolute value of the zero point for the scale
indicator.
See also
Bar (Page 259)
State
Description
Returns the status of a message.
StatisticAreaColumns
Description
No access in runtime.
StatisticResultColumns
Description
No access in runtime.
StatusbarBackColor
Description
Specifies the background color for status bars.
Also set "StatusbarUseBackColor" to "TRUE".
Access in runtime Read and write
Syntax
Object.StatusbarBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the background color of the status bar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementAdd
Description
Creates a new, user-defined status bar element. The newly created element is automatically
referenced with "StatusbarElementIndex".
Access in runtime Read and write
Syntax
Object.StatusbarElementAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Required. A value or a constant that specifies the name of the new user-defined element of
the status bar with "StatusbarElementName".
See also
StatusbarElementIndex (Page 964)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementAutoSize
Description
Specifies whether the width of a status bar element referenced with "StatusbarElementIndex" is
set automatically.
Access in runtime Read and write
Syntax
Object.StatusbarElementAutoSize[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the width of the selected element is set automatically.
FALSE if the width of the selected element is not set automatically.
See also
UserArchiveControl (Page 466)
TrendRulerControl (Page 441)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
StatusbarElementCount
Description
Specifies the number of configured status bar elements.
Access in runtime Read and write
Syntax
Object.StatusbarElementCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the number of configured status bar elements.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementIconId
Description
References a status bar element with its icon ID.
The referencing of an element with its icon ID does not depend on the actual order of the
elements.
Access in runtime Read and write
Syntax
Object.StatusbarElementIconId[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the status bar element to be edited with the
icon ID.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementID
Description
References a status bar element with its element ID. To access the properties of a status bar
element, you need to set ""StatusbarElementID"".
The referencing of an element with its element ID does not depend on the actual order of the
elements. The element ID are listed in the inspector window of the object under "Properties >
Properties > Status bar > Status bar - Elements".
Access in runtime Read and write
Syntax
Object.StatusbarElementID[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the status bar element to be edited with the
element ID.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementIndex
Description
References a status bar element. To access the properties of a status bar element, you need to
set ""StatusbarElementIndex"".
Values between 0 and "StatusbarElementCount minus 1 are valid for
"StatusbarElementIndex". The "StatusbarElementCount" property specifies the number of
configured status bar elements.
Access in runtime Read and write
Syntax
Object.StatusbarElementIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the status bar element to be edited with the
index.
See also
StatusbarElementCount (Page 962)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementName
Description
Specifies the name of a status bar element referenced with "StatusbarElementIndex".
Access in runtime Read and write
Syntax
Object.StatusbarElementName[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the name of the referenced status bar element.
See also
StatusbarElementIndex (Page 964)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementRemove
Description
Removes the user-defined status bar element referenced with its name.
Access in runtime Read and write
Syntax
Object.StatusbarElementRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the name of the referenced user-defined
element of the status bar to be removed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementRename
Description
Specifies the new name of a user-defined status bar element referenced with
"StatusbarElementIndex".
Access in runtime Read and write
Syntax
Object.StatusbarElementRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or constant that specifies the new name of the selected user-defined status
bar element.
See also
StatusbarElementIndex (Page 964)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
StatusbarElementRepos
Description
Specifies the position of an element referenced with "StatusbarElementIndex" in the status bar
of the object.
If you have changed the position of the element with "StatusbarElementRepos",
"StatusbarElementIndex" is assigned the value of "StatusbarElementRepos".
Access in runtime Read and write
Syntax
Object.StatusbarElementRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the position of the referenced element in
the status bar. Value range from 0 to "StatusbarElementCount" minus 1. Values outside this
range have no effect.
0: The element referenced is positioned on the left.
See also
StatusbarElementIndex (Page 964)
StatusbarElementCount (Page 962)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
StatusbarElements
Description
No access in runtime.
StatusbarElementText
Description
Specifies the text of a user-defined status bar element referenced with "StatusbarElementIndex".
Access in runtime Read and write
Syntax
Object.StatusbarElementText[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the text of the selected element of the status
bar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementTooltipText
Description
Specifies the text for the tooltip of a user-defined status bar element referenced with
"StatusbarElementIndex".
Access in runtime Read and write
Syntax
Object.StatusbarElementTooltipText[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the tooltip text for the selected user-defined
status bar element.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementUserDefined
Description
Specifies whether the configuration engineer has added a status bar element referenced with
"StatusbarElementIndex" as a new user-defined element.
Access in runtime Read and write
Syntax
Object.StatusbarElementUserDefined[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the status bar element is user-defined.
FALSE if the status bar element is specified by the system.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementVisible
Description
Specifies whether the status bar element referenced with "StatusbarElementIndex" is displayed
in the object.
Access in runtime Read and write
Syntax
Object.StatusbarElementVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional. TRUE if the referenced status bar element is displayed.
See also
StatusbarElementIndex (Page 964)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarElementWidth
Description
Specifies the width in pixels of a status bar element referenced with "StatusbarElementIndex".
Also set "StatusbarElementAutoSize (Page 961)" to "FALSE".
Access in runtime Read and write
Syntax
Object.StatusbarElementWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or constant that specifies the width of the referenced status bar element in
pixels.
See also
StatusbarElementIndex (Page 964)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarFont
Description
Specifies the font of the texts in the status bar.
Access in runtime: Read and write
Syntax
Object.StatusbarFont[=Font]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Font
Optional. A value or constant that specifies the font of the texts in the status bar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarFontColor
Description
Specifies the color of the texts in the status bar.
Access in runtime Read and write
Syntax
Object.StatusbarFontColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or constant that specifies the color of the texts in the status bar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarShowTooltips
Description
Specifies whether tooltips are displayed for the elements of the status bar in runtime.
Access in runtime Read and write
Syntax
Object.StatusbarShowTooltips[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the tooltips are shown.
FALSE if the tooltips are not shown.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
StatusbarText
Description
Specifies the default text in the status bar.
Access in runtime: Read and write
Syntax
Object.StatusbarText[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional A value or a constant that specifies the default text in the status bar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarUseBackColor
Description
Specifies whether the background color of the status bar is shown.
Access in runtime Read and write
Syntax
Object.StatusbarUseBackColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the background color of the status bar is displayed.
FALSE if the background color of the status bar is not displayed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatusbarVisible
Description
Specifies whether the status bar of the control is displayed.
Access in runtime Read and write
Syntax
Object.StatusbarVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the status bar is displayed.
FALSE if the status bar is not displayed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
StatuslineFont
Description
No access in runtime.
StepBackColor
Description
Specifies the background color of the step.
Access in runtime Read and write
Syntax
Object.StepBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
You have no access in runtime with the following format:
Color
Optional. A value or a constant that specifies the background color of the step.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
S7GraphOverview (Page 402)
StepFont
Description
Specifies the font color of the step.
Access in runtime Read and write
Syntax
Object.StepFont[=Font]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
Font
Optional. A value or a constant that specifies the font.
See also
S7GraphOverview (Page 402)
StepSeconds
Description
Specifies the step interval in seconds after actuating the "Forward" or "Backward" button.
Access in runtime: Read and write
Syntax
Object.StepSeconds[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• MediaPlayer
Int32
Optional. A value or a constant that specifies the step interval in seconds after actuating the
"Forward" or "Backward" button.
See also
MediaPlayer (Page 342)
StepTextColor
Description
Specifies the text color of the step.
Access in runtime Read and write
Syntax
Object.StepTextColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• S7GraphOverview
You have no access in runtime with the following format:
Color
Optional. A value or a constant that specifies the background color of the step.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
S7GraphOverview (Page 402)
Style
Description
Specifies the line style.
Access in runtime: Read and write
Syntax
Object.Style[=LineStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• CircularArc
• Connector
• EllipticalArc
• Line
• Polyline
LineStyle
Optional. A value or a constant that specifies the line style. Value range from 0 to 4.
StyleItem
Description
No access in runtime.
StyleSettings
Description
Specifies the style in which the object is displayed.
Access in runtime Read and write
Syntax
Object.StyleSettings[=WinCCStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• RoundButton*
• Window Slider*
*: Read access only
WinCCStyle
Optional. A value or a constant that specifies the style in which the object is displayed.
SupportsInplaceEdit
Description
No access in runtime.
SupportsS7DiagnosticsInSimpleView
Description
No access in runtime.
SupportsUserDefinedToolbarButtons
Description
No access in runtime.
SwapFirstWithLastConnection
Description
Specifies that the first and last connection should be swapped.
Access in Runtime: Read and write
Syntax
Object.SwapFirstWithLastConnection[=Boolean]
Object
Required. An object of the type "ScreenItem" with the format:
• Connector
Boolean
Optional. A value or a constant which specifies that the first and last connection are
swapped.
See also
Connector (Page 293)
SwitchOrientation
Description
No access in runtime.
SymbolTableFont
Description
Specifies the font of the symbol table in the PLC code display.
Access in runtime: Read and write
Syntax
Object.SymbolTableFont[=Font]
Object
Required. A "ScreenItem" object with the following characteristics:
• PLCCodeViewer
Font
Optional. A value or a constant that specifies the font in the symbol table in the PLC code
display.
See also
PLCCodeViewer (Page 376)
SysDiagBuffButtonVisible
Description
No access in runtime.
1.5.5.13 Properties T
TabIndex
Description
Specifies the position that the object takes in the order if you toggle between the objects with
the tabulator key in Alpha-Cursor mode.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read
Syntax
Object.TabIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• DiscSpaceView
You have no access in runtime with the following format:
•
Int32
Optional. A value or a constant which specifies the position in the tabulator order.
TabIndexAlpha
Description
Specifies the position that the object takes in the order if you toggle between the objects with
the tabulator key in Alpha-Cursor mode.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read
Syntax
Object.TabIndexAlpha[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• DiscSpaceView
You have no access in runtime with the following format:
• AlarmControl
• AlarmView
• ApplicationWindow
• Bar
• BatteryView
• Button
• ChannelDiagnose
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Clock
• ComboBox
• Connector
• DateTimeField
• Ellipse
• EllipseSegment
• EllipticalArc
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox
• MediaPlayer
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• OptionGroup
• PLCCodeViewer
• Polygon
• Polyline
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView
• Rectangle
• RoundButton
• S7GraphOverview
• ScreenWindow
• Slider
• SmartClientView
• StatusForce
• Switch
• SymbolLibrary
• SymbolicIOField
• SysDiagControl
• TextField
• TrendRulerControl
• TrendView
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• UserArchiveControl
• UserView
• WLanQualityView
• WindowsSlider
• ZoneLabelView
• ZoneQualityView
Int32
Optional. A value or a constant which specifies the position in the tabulator order.
TableBackColor
Description
Specifies the background color of the table cells.
Access in runtime Read and write
Syntax
Object.TableBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmView
• RecipeView*
• StatusForce
• TrendView
• UserView
*: Read access only
Color
Optional. A value or constant which determines the background color of the table cells.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TableColor
Description
Specifies the background color of the table rows in the object.
Access in runtime Read and write
Syntax
Object.TableColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or constant that specifies the background color of the table rows.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TableColor2
Description
Specifies the second background color of the table rows in the object.
Also set "UseTableColor2 (Page 1158)" to "TRUE".
Access in runtime Read and write
Syntax
Object.TableColor2[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or constant that specifies the second background color of the table rows.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TableColumnsWidthAndOrder
Description
No access in runtime.
TableEvenRowBackColor
Description
No access in runtime.
TableFont
Description
No access in runtime.
TableForeColor
Description
Specifies the text color used in the table cells of the object.
Access in runtime: Read and write
Syntax
Object.TableForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• AlarmView
• OnlineTableControl
• RecipeView*
• StatusForce
• TrendRulerControl
• UserArchiveControl
• UserView
*: Read access only
Color
Optional. A value or a constant that specifies the text color used in the table cells.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TableForeColor2
Description
Specifies the second text color used in the table cells of the object.
Also set "UseTableColor2 (Page 1158)" to "TRUE".
Access in runtime Read and write
Syntax
Object.TableForeColor2[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the second font color used in the table cells.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TableGridLineColor
Description
Specifies the color of the grid lines in the table.
Access in runtime:
• RT Advanced: Read and write
• RT Professional: No access
Syntax
Object.TableGridLineColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• RecipeView*
• TrendView*
• UserView
*: Read access only
Color
Optional. A value or constant which determines the color of the gridlines of the table.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TableHeaderBackColor
Description
Specifies the background color in the header of the table.
Access in runtime Read and write
Syntax
Object.TableHeaderBackColor[=Color]
Object
Required. A "ScreenItem" object with the following format:
• AlarmView
• RecipeView*
• StatusForce
• TrendView*
• UserView
*: Read access only
Color
Optional. A value or a constant that specifies the background color in the header.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TableHeaderBackFillStyle
Description
No access in runtime.
TableHeaderBorderBackColor
Description
No access in runtime.
TableHeaderBorderColor
Description
No access in runtime.
TableHeaderBorderWidth
Description
No access in runtime.
TableHeaderCornerRadius
Description
No access in runtime.
TableHeaderEdgeStyle
Description
No access in runtime.
TableHeaderFirstGradientColor
Description
No access in runtime.
TableHeaderFirstGradientOffset
Description
No access in runtime.
TableHeaderFont
Description
No access in runtime.
TableHeaderForeColor
Description
Specifies the text color in the header of the table.
Access in runtime Read and write
Syntax
Object.TableHeaderForeColor[=Color]
Object
Required. A "ScreenItem" object with the following format:
• AlarmView
• RecipeView*
• StatusForce*
• TrendView*
• UserView
*: Read access only
Color
Optional. A value or a constant that specifies the text color in the header.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TableHeaderMiddleGradientColor
Description
No access in runtime.
TableHeaderPaddingBottom
Description
No access in runtime.
TableHeaderPaddingLeft
Description
No access in runtime.
TableHeaderPaddingRight
Description
No access in runtime.
TableHeaderPaddingTop
Description
No access in runtime.
TableHeaderSecondGradientColor
Description
No access in runtime.
TableHeaderSecondGradientOffset
Description
No access in runtime.
Tag4DataRecord
Description
No access in runtime.
Tag4RecipeNumber
Description
No access in runtime.
TagForExternalTime
Description
No access in runtime.
TagPrefix
Description
Specifies the tag prefix that is prefixed for all tags contained in the screen window. In this way,
a screen that is embedded in a screen window retains access to its own tags while another
accesses other tags.
The change to the tag prefix does not become effective until the screen is reloaded. The
change is effected automatically during a screen change. Without screen change the change
is only effect if the screen name is re-assigned.
The prefix is freely definable but must match the name of the structure tag.
Note
Assigning a user data type
You can also select a user data type for a screen that is integrated in a screen window.
Afterwards, the data type elements are assigned directly from the selected user data type.
Note
Tag prefix versus indirectly addressed tags
Avoid use of tag prefixes and indirectly addressed tags at the same time.
Syntax
Object.TagPrefix[= STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• ScreenWindow
STRING
Optional. A value or a constant that specifies the tag prefix.
Example
The "InOutput" screen should be displayed in the screen window. The "InOutput" screen contains
three I/O fields that are linked to a structure tag. The structure tag consists of the
elements .IO1, .IO2, .IO3; one element for each I/O field. The element name is preceded by a
period. The period is necessary for addressing the elements of the structure tags as structure
elements with the correct syntax.
Three such structure tags with the structure names Struct1, Struct2 and Struct3 are defined
in the project, for example.
In this case, the tag prefix is the structure name. Specify "Struct2" as tag prefix, for example.
The I/O fields in the "InOutput" screen are then linked to the elements of structure tag
"Struct2".
Tag prefix: "Struct2":
• Output value (first IO field): .IO1
• Output value (second IO field): .IO2
• Output value (third IO field): .IO3
The current tag connection in the screen window:
• Output value (first I/O field): Struct2.EA1
• Output value (second I/O field): Struct2.EA2
• Output value (third I/O field): Struct2.EA3
See also
ScreenWindow (Page 404)
Tags
Description
Returns an object of type "Tags".
Access during runtime: Read
Syntax
Object.Tags
Object
Necessary. An object of the "HMIRuntime" type.
Example
The following example accesses the tag "Tag1":
'VBS86
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
See also
HMIRuntime (Page 209)
TcpPortNr
Description
No access in runtime.
Template
Description
Specifies the template for displaying the window content in the "Print job/Script diagnostic"
object.
Access in Runtime: Read and write
Syntax
Object.Template[=TemplateType]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
TemplateType
Optional. A value or a constant that specifies the template.
The following templates are possible depending on the value of the property
"WindowsContents (Page 1222)":
See also
ApplicationWindow (Page 257)
Text
Description
Specifies the label for the text field.
Access in runtime: Read and write
Syntax
Object.Text[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• CheckBox
• ComboBox
• ListBox
• MultiLineEdit
• OptionGroup
• RoundButton
• TextField
STRING
Optional. A value or a constant that specifies the labeling.
TextAreaBottomMargin
Description
No access in runtime.
TextAreaLeftMargin
Description
No access in runtime.
TextAreaRightMargin
Description
No access in runtime.
TextAreaTopMargin
Description
No access in runtime.
TextHandles
Description
No access in runtime.
TextList
Description
Returns the text list that supplies the object with values.
Access in runtime
• RT Advanced: No access
• RT Professional: Read
Syntax
Object.TextList[=HmiObjectHandle]
Object
Required. An object of the type "ScreenItem" with the following format:
• SymbolicIOField
You have no access in runtime with the following formats:
• Button
HmiObjectHandle
Optional. A value or a constant that returns the text list that supplies the object with values.
See also
SymbolicIOField (Page 422)
Button (Page 267)
TextOff
Description
Specifies the text that will be displayed in the "Off" status.
Access in runtime Read and write
Syntax
Obje ct.TextOff[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• Switch*
STRING
Optional. A value or a constant that specifies the labeling for the "off" status.
Comments
The property is only available if the referenced object is of the "Text" type.
TextOn
Description
Specifies the text that will be displayed in the "On" status.
Access in runtime: Read and write
Syntax
Object.TextOn[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• Switch*
* RT Advanced read access only, RT Professional no access
STRING
Optional. A value or a constant that specifies the labeling for the "on" status.
Comments
The property is only available if the referenced object is of the "Text" type.
TextOrientation
Description
Specifies the text orientation.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.TextOrientation[=TextOrientation]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• IOField
• OptionGroup
• RoundButton*
• SymbolicIOField*
• TextField
• WindowSlider*
*: Read access only
You have no access in runtime with the following formats:
• DateTimeField
• Switch
TextOrientation
Optional. A value or a constant that specifies the text orientation.
Texts
Description
No access in runtime.
TextualObjectPositions
Description
No access in runtime.
TextualObjectsAutoSize
Description
No access in runtime.
TextualObjectsBorderBackColor
Description
No access in runtime.
TextualObjectsBorderColor
Description
No access in runtime.
TextualObjectsBorderWidth
Description
No access in runtime.
TextualObjectsCornerRadius
Description
No access in runtime.
TextualObjectsEdgeStyle
Description
No access in runtime.
TextualObjectsPaddingBottom
Description
No access in runtime.
TextualObjectsPaddingLeft
Description
No access in runtime.
TextualObjectsPaddingRight
Description
No access in runtime.
TextualObjectsPaddingTop
Description
No access in runtime.
ThumbBackColor
Description
Specifies the background color of the slider.
Access in runtime Read
Syntax
Object.ThumbBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• Slider
• WindowSlider
Color
Optional. A value or a constant that specifies the background color of the slider.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Slider (Page 408)
WindowSlider (Page 482)
ThumbPicture
Description
Specifies a graphic for the slider element in the slider.
Access in runtime: Read
Syntax
Object.ThumbPicture[=HmiObjectHandle]
Object
Required. A "ScreenItem" object with the following characteristics:
• Slider
HmiObjectHandle
Optional. A value or constant that specifies the graphic for the slider element in the slider.
See also
Slider (Page 408)
TickDistance
Description
No access in runtime.
TicksColor
Description
Specifies the color of the hour markers on the face of the "Clock" object.
Access in runtime Read and write
Syntax
Object.TicksColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Clock
Color
Optional. A value or a constant that specifies the color of the hour markers.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Clock (Page 287)
TickStyle
Description
Specifies how the marks are displayed in the scale.
Also set "ShowTicks" to "TRUE".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.TickStyle[=SliderTickStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• Slider
You have no access in runtime with the following formats:
• Clock
SliderTickStyle
Optional. A value or a constant that specifies how the marks are displayed in the scale.
Comments
Automatic scaling can show two marks in the scale so close together that they look like one
broad mark. To correct this effect, lengthen or shorten the slider.
TimeAxes
Description
No access in runtime.
TimeAxisAdd
Description
Creates a new time axis. The newly created time axis is automatically referenced with
"TimeAxisIndex".
Access in runtime: Read and write
Syntax
Object.TimeAxisAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTrendControl
STRING
Required. A value or a constant that specifies the name of the new time axis with
"TimeAxisName".
TimeAxisAlignment
Description
Specifies the alignment of the time axis.
Access in runtime: Read and write
Syntax
Object.TimeAxisAlignment[=AxisAlignment]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
AxisAlignment
Optional. A value or a constant that specifies the alignment.
See also
OnlineTrendControl (Page 359)
TimeAxisBegin
Description
No access in runtime.
TimeAxisBeginTime
Description
Specifies the start time for the display of the time axis referenced with "TimeAxisIndex".
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.TimeAxisBeginTime[=DateTime]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTrendControl
You have no access in runtime with the following format:
• TrendView
DateTime
Optional. A value or a constant that specifies the start time for the display of the specified
trend.
TimeAxisColor
Description
Specifies the color of the time axis referenced with "TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the time axis.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTrendControl (Page 359)
TimeAxisCount
Description
Specifies the number of configured time axes.
Access in runtime Read and write
Syntax
Object.TimeAxisCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the number of configured time axes.
See also
OnlineTrendControl (Page 359)
TimeAxisCountPoints
Description
No access in runtime.
TimeAxisDateFormat
Description
Specifies the date format for displaying the time axis referenced with "TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisDateFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the date format.
See also
OnlineTrendControl (Page 359)
TimeAxisEnd
Description
No access in runtime.
TimeAxisEndTime
Description
Specifies the end time for the display of the selected trend. Whether or not the information is
evaluated depends on the "Autorange", "UseTimeRange(i)" and "ShareTimeAxis" properties.
Access in runtime: Read and write
Syntax
Object.TimeAxisEndTime[=DateTime]
Object
Required. A "ScreenItem" object with the following format:
• OnlineTrendControl
DateTime
Optional A value or a constant that specifies the end time for the display of the specified
trend.
See also
OnlineTrendControl (Page 359)
TimeAxisIndex
Description
References a time axis. To access the properties of a time axis, you need to set ""TimeAxisIndex"".
Values between 0 and "TimeAxisIndex" minus 1 are valid for "TimeAxisCount". The
"TimeAxisCount" property specifies the number of configured time axes.
Access in runtime Read and write
Syntax
Object.TimeAxisIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the time axis to be edited.
See also
TimeAxisCount (Page 1012)
OnlineTrendControl (Page 359)
TimeAxisInTrendColor
Description
Specifies whether the color of the time axis referenced with "TimeAxisIndex" corresponds to the
trend color.
Access in runtime Read and write
Syntax
Object.TimeAxisInTrendColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the referenced axis is shown in the trend color. The value of "TimeAxisColor" is not
effective.
FALSE if the referenced axis is shown in the color specified in "TimeAxisColor".
See also
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeAxisLabel
Description
Specifies the label text for a time axis referenced with "TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisLabel[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the label text for the referenced time axis.
See also
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeAxisMeasurePoints
Description
Specifies the number of measuring points displayed for the time axis referenced with
"TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisMeasurePoints[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the number of measurement points.
See also
OnlineTrendControl (Page 359)
TimeAxisMode
Description
No access in runtime.
TimeAxisName
Description
Specifies the name of a time axis referenced with "TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced time axis.
See also
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeAxisOnline
Description
Specifies that the time axis is updated on an ongoing basis.
Access in runtime: Read and write
Syntax
Object.TimeAxisOnline[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if the time axis is updated on an ongoing basis.
FALSE, if the time axis is not updated on an ongoing basis.
See also
OnlineTrendControl (Page 359)
TimeAxisRange
Description
No access in runtime.
TimeAxisRangeType
Description
Defines the time range setting for the time axis referenced with "TimeAxisIndex".
Syntax
Object.TimeAxisRangeType[=TimeRangeMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
TimeRangeMode
Optional. A value or a constant that specifies the settings for the time range.
The following settings are available:
See also
OnlineTrendControl (Page 359)
TimeAxisRemove
Description
Removes a time axis referenced with its name.
Access in runtime Read and write
Syntax
Object.TimeAxisRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that returns the name of the referenced time axis to be
removed.
See also
OnlineTrendControl (Page 359)
TimeAxisRename
Description
Specifies the new name of a time axis referenced with "TimeAxisIndex".
Access in runtime Read and write
Syntax
Object.TimeAxisRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the new name of the selected time axis.
See also
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeAxisRepos
Description
Specifies the position of a time axis referenced with "TimeAxisIndex" in the trend diagram of the
object.
If you have changed the position of the time axis with "TimeAxisRepos", "TimeAxisIndex" is
assigned the value of "TimeAxisRepos".
Access in runtime Read and write
Syntax
Object.TimeAxisRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced time axis. Value
range from 0 to "TimeAxisCount" minus 1. Values outside this range have no effect.
0: The referenced time axis is positioned outside.
See also
TimeAxisIndex (Page 1014)
TimeAxisCount (Page 1012)
OnlineTrendControl (Page 359)
TimeAxisShowDate
Description
Specifies whether the time axis referenced with "TimeAxisIndex" is displayed with date and time.
Access in runtime Read and write
Syntax
Object.TimeAxisShowDate[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if date and time are displayed. The date format is specified using the
"TimeAxisDateFormat" property.
FALSE, if the date is not displayed. Only the time is displayed.
See also
OnlineTrendControl (Page 359)
TimeAxisSide
Description
No access in runtime.
TimeAxisTimeFormat
Description
Specifies the format of the information along the time axis for the selected trend.
Access in runtime Read and write
Syntax
Object.TimeAxisTimeFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant which defines the format for the time axis.
See also
OnlineTrendControl (Page 359)
TimeAxisTimeRange
Description
No access in runtime.
TimeAxisTimeRangeBase
Description
Specifies the time unit that defines the time range together with the time factor
"TimeAxisTimeRangeFactor".
Access in runtime Read and write
Syntax
Object.TimeAxisTimeRangeBase[=TagLoggingTimeUnit]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
TagLoggingTimeUnit
Optional. A value or a constant that specifies the time unit.
The following settings are available:
Value Designation
500 500 ms
1000 1 second
60000 1 minute
3600000 1 hour
86400000 1 day
See also
OnlineTrendControl (Page 359)
TimeAxisTimeRangeFactor
Description
Specifies the time factor that together with time unit "TimeAxisTimeRangeBase" determines the
time period.
Access in runtime: Read and write
Syntax
Object.TimeAxisTimeRangeFactor[=Int16]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
Int16
Optional. A value or a constant that specifies the time factor.
See also
OnlineTrendControl (Page 359)
TimeAxisTrendWindow
Description
Specifies the trend diagram in which the axis referenced with "TimeAxisIndex" is displayed.
Access in runtime Read and write
Syntax
Object.TimeAxisTrendWindow[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the trend diagram.
See also
TrendWindowCount (Page 1127)
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeAxisVisible
Description
Specifies whether the time axis referenced with "TimeAxisIndex" is displayed in the object.
Access in runtime Read and write
Syntax
Object.TimeAxisVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the referenced time axis is shown.
FALSE if the referenced time axis is hidden.
See also
TimeAxisIndex (Page 1014)
OnlineTrendControl (Page 359)
TimeBase
Description
Specifies the time zone in which the time values are displayed.
Access in runtime Read and write
Syntax
Object.TimeBase[=TimeBase]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• UserArchiveControl
TimeBase
Optional. A value or a constant that specifies the time zone.
Comments
You can specify the time mode for a particular HMI device in the project tree, in the object
properties of the HMI device.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
UserArchiveControl (Page 466)
TimeColumnActualize
Description
Specifies whether the values of the time column referenced with "TimeColumnIndex" are
updated.
Access in runtime Read and write
Syntax
Object.TimeColumnActualize[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the time column is updated.
FALSE if the time column is not updated. This setting is useful for comparing tables.
See also
OnlineTableControl (Page 347)
TimeColumnAdd
Description
Creates a new time column. The newly created time column is automatically referenced with
"TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Required. A value or a constant that specifies the name of the new time column with
"TimeColumnName".
See also
TimeColumnIndex (Page 1032)
OnlineTableControl (Page 347)
TimeColumnAlignment
Description
Specifies how the text in the time column referenced with "TimeColumnIndex" is aligned.
Access in runtime Read and write
Syntax
Object.TimeColumnAlignment [=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
HorizontalAlignment
Optional. A value or a constant that specifies how the text in the referenced time column is
aligned.
See also
OnlineTableControl (Page 347)
TimeColumnBackColor
Description
Specifies the background color of the time column referenced with "TimeColumnIndex".
Also set "UseColumnBackColor (Page 1146)" to "TRUE" and
"TimeColumnUseValueColumnColors (Page 1041)" to "FALSE".
Access in runtime Read and write
Syntax
Object.TimeColumnBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Color
Optional. A value or a constant that specifies the background color of the selected time
column.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTableControl (Page 347)
TimeColumnBeginTime
Description
Specifies the start of the time range for the time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnBeginTime[=DateTime]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
DateTime
Optional. A value or a constant that specifies the starting time for the selected time column.
See also
OnlineTableControl (Page 347)
TimeColumnCaption
Description
Specifies the label of the time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnCaption[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the caption of the time column.
See also
OnlineTableControl (Page 347)
TimeColumnCount
Description
Specifies the number of configured time columns.
Access in runtime: Read and write
Syntax
Object.TimeColumnCount[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• OnlineTableControl
Int32
Optional A value or a constant that specifies the number of configured time columns.
See also
OnlineTableControl (Page 347)
TimeColumnDateFormat
Description
Specifies the date format for displaying the time column referenced with "TimeColumnIndex".
Access in runtime: Read and write
Syntax
Object.TimeColumnDateFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the date format for displaying the selected time
column.
The following date formats are available:
Value Explanation
dd.MM.yy Day.Month.Year, e.g., 24.12.13.
dd.yyyyd.MM Day.Month.Year, e.g., 24.12.2013.
dd/MM/yy Day/Month/Year, e.g., 24/12/13.
dd/MM/yyyy Day/Month/Year, e.g., 24/12/2013.
TimeColumnEndTime
Description
Defines the end of the time range of for a time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnBeginTime[=DateTime]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
DateTime
Optional. A value or constant that specifies the end time.
See also
OnlineTableControl (Page 347)
TimeColumnForeColor
Description
Specifies the font color of the time column referenced with "TimeColumnIndex".
Also set "UseColumnForeColor (Page 1147)" to "TRUE" and
"TimeColumnUseValueColumnColors (Page 1041)" to "FALSE".
Access in runtime Read and write
Syntax
Object.TimeColumnForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Color
Optional. A value or a constant that specifies the font color of the selected time column.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTableControl (Page 347)
TimeColumnHideText
Description
Specifies whether the content of the time column referenced with "TimeColumnIndex" is
displayed as text.
Access in runtime Read and write
Syntax
Object.TimeColumnHideText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the content is not displayed as text.
FALSE if the content is displayed as text.
See also
OnlineTableControl (Page 347)
TimeColumnHideTitleText
Description
Specifies whether the header of the time column referenced with "TimeColumnIndex" is
displayed as text.
Access in runtime Read and write
Syntax
Object.TimeColumnHideTitleText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the header is not displayed as text.
FALSE if the header is displayed as text.
See also
OnlineTableControl (Page 347)
TimeColumnIndex
Description
References a configured time column. To access the properties of a time column, you need to set
""TimeColumnIndex"".
Values between 0 and "TimeColumnCount" minus 1 are valid for "TimeColumnIndex". The
property "TimeColumnCount" specifies the number of configured time columns.
Access in runtime: Read and write
Syntax
Object.TimeColumnIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies, with the index, the time column to be edited.
TimeColumnLength
Description
Specifies the width of the time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnLength[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the width of the selected time column.
See also
OnlineTableControl (Page 347)
TimeColumnMeasurePoints
Description
Specifies the number of measuring points to be displayed in the time column referenced with
"TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnMeasurePoints[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or constant that specifies the number of measurement points.
See also
OnlineTableControl (Page 347)
TimeColumnName
Description
Specifies the name of a time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the name of the referenced time column.
See also
TimeColumnIndex (Page 1032)
OnlineTableControl (Page 347)
TimeColumnRangeType
Description
Specifies the time range for a time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnRangeType[=TimeRangeMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
TimeRangeMode
Optional. A value or a constant that specifies the time range for the selected time column.
See also
OnlineTableControl (Page 347)
TimeColumnRemove
Description
Removes a time column referenced with its name.
Access in runtime Read and write
Syntax
Object.TimeColumnRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that returns the name of the referenced time column to be
removed.
See also
OnlineTableControl (Page 347)
TimeColumnRename
Description
Specifies the new name of a time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the new name of the selected time column.
See also
TimeColumnIndex (Page 1032)
OnlineTableControl (Page 347)
TimeColumnRepos
Description
For multiple time columns with corresponding value columns, specifies the position of a time
column referenced with "TimeColumnIndex".
If you have changed the position of the time column with "TimeColumnRepos",
"TimeColumnIndex" is assigned the value of "TimeColumnRepos".
Syntax
Object.TimeColumnRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the position of the referenced time column
with the corresponding value columns. Value range from 0 to "TimeColumnCount" minus 1.
Values outside this range have no effect.
0: The referenced time column is positioned on the left.
See also
TimeColumnIndex (Page 1032)
TimeColumnCount (Page 1028)
OnlineTableControl (Page 347)
TimeColumns
Description
No access in runtime.
TimeColumnShowDate
Description
Specifies whether the time column referenced with "TimeColumnIndex" is displayed with date
and time.
Also set the date format with "TimeColumnDateFormat (Page 1029)".
Access in runtime Read and write
Syntax
Object.TimeColumnShowDate[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if date and time are displayed.
FALSE if only the time is displayed.
See also
OnlineTableControl (Page 347)
TimeColumnShowIcon
Description
Specifies whether the content of the time column referenced with "TimeColumnIndex" is
displayed as an icon.
Access in runtime: Read and write
Syntax
Object. [=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the content is displayed as an icon.
FALSE if the content is not displayed as an icon.
TimeColumnShowTitleIcon
Description
Specifies whether the header of the time column referenced with "TimeColumnIndex" is
displayed as an icon.
Access in runtime Read and write
Syntax
Object.TimeColumnShowTitleIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the header is shown as an icon.
FALSE if the header is not shown as an icon.
See also
OnlineTableControl (Page 347)
TimeColumnSort
Description
Specifies how a time column referenced with "TimeColumnIndex" is sorted.
Access in runtime Read and write
Syntax
Object.TimeColumnSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
SortMode
Optional. A value or a constant that specifies how the time column referenced in
"TimeColumnIndex" is sorted.
See also
OnlineTableControl (Page 347)
TimeColumnSortIndex
Description
Specifies the sorting order of the time column referenced by "TimeColumnIndex". If you set the
value to "0", the sorting criterion is removed in "TimeColumnSort".
Access in runtime: Read and write
Syntax
Object.TimeColumnSortIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTableControl
Int32
Optional. Value or constant that specifies the sorting order of the time column referenced
by "TimeColumnIndex". If you set the value to "0", the sorting criterion is removed in
"TimeColumnSort".
TimeColumnTimeFormat
Description
Specifies the time format for displaying the time column referenced with "TimeColumnIndex".
Access in runtime Read and write
Syntax
Object.TimeColumnTimeFormat[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the time format for displaying the selected time
column.
Value Explanation
Automatic The time format is set automatically.
HH:mm:ss.ms Hours:Minutes:Seconds, e.g. 15:35:44.240.
hh:mm:ss tt Hours:Minutes:Seconds AM/PM, e.g. 03:35:44 PM.
hh:mm:ss.ms tt Hours:Minutes:Seconds.Milliseconds AM/PM, e.g. 03:35:44.240 PM.
See also
OnlineTableControl (Page 347)
TimeColumnTimeRangeBase
Description
Specifies the time unit for calculating the time range displayed in the time column referenced
with "TimeColumnIndex".
The time range is calculated with a time unit and a time factor. The time factor is specified in
"TimeColumnTimeRangeFactor (Page 1040)".
Access in runtime Read and write
Syntax
Object.TimeColumnTimeRangeBase[=TagLoggingTimeUnit]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
TagLoggingTimeUnit
Optional. A value or a constant that specifies the time unit for determining the time range.
Value Description
500 500 ms
1000 1 second
60000 1 minute
3600000 1 hour
86400000 1 day
See also
OnlineTableControl (Page 347)
TimeColumnTimeRangeFactor
Description
Defines the factor for calculating the time range. Only integer factors are valid.
Access in runtime: Read and write
Syntax
Object.TimeColumnTimeRangeFactor[=Int16]
Object
Required. A "ScreenItem" object with the following format:
• OnlineTableControl
Int16
Optional A value or a constant that specifies the factor to determine the time range.
See also
OnlineTableControl (Page 347)
TimeColumnUseValueColumnColors
Description
Specifies whether the time column referenced with "TimeColumnIndex" is displayed in the
colors of the value column.
Access in runtime Read and write
Syntax
Object.TimeColumnUseValueColumnColors[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the selected time column is displayed in the value column colors. The settings in
"TimeColumnBackColor (Page 1026)" and "TimeColumnForeColor (Page 1030)" are disabled.
FALSE if the selected time column is displayed in the colors specified in
"TimeColumnBackColor (Page 1026)" and "TimeColumnForeColor (Page 1030)"
See also
OnlineTableControl (Page 347)
TimeColumnVisible
Description
Specifies whether the time column referenced with "TimeColumnIndex" is displayed in the table
view.
Access in runtime Read and write
Syntax
Object.TimeColumnVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the referenced time column is displayed in the table.
FALSE if the referenced time column is not displayed in the table.
See also
TimeColumnIndex (Page 1032)
OnlineTableControl (Page 347)
TimeDisplayMode
Description
No access in runtime.
TimeStamp
Description
Returns the time stamp of the last read access of a tag in local time as DATE.
Access in Runtime: Read
Syntax
Object.TimeStamp
Object
Required A "Tag" object.
Comments
To show the TimeStamp property in plain text, use the VBS function "FormatDateTime(Date[,
NamedFormat])". The output is dependent on the language setting. To adjust the language, use
the VBS function "SetLocale´()".
If you want to return the time stamp sorted by date, day and time, use the NamedFormat
parameter or the VBS functions like Year, WeekDay, Day, Hour, Minute, Second. The name of
a week day can be obtained using the VBS function WeekdayName.
Examples
The following example issues the time stamp of the tag "Tag11" with the aid of the function
"FormatDateTime":
'VBS87
Dim objTag
Dim lngCount
lngCount = 0
Set objTag = HMIRuntime.Tags("Tag11")
objTag.Read
SetLocale("en-gb")
MsgBox FormatDateTime(objTag.TimeStamp) 'Output: e.g. 06/08/2002 9:07:50
MsgBox Year(objTag.TimeStamp) 'Output: e.g. 2002
MsgBox Month(objTag.TimeStamp) 'Output: e.g. 8
MsgBox Weekday(objTag.TimeStamp) 'Output: e.g. 3
MsgBox WeekdayName(Weekday(objTag.TimeStamp)) 'Output: e.g. Tuesday
MsgBox Day(objTag.TimeStamp) 'Output: e.g. 6
MsgBox Hour(objTag.TimeStamp) 'Output: e.g. 9
MsgBox Minute(objTag.TimeStamp) 'Output: e.g. 7
MsgBox Second(objTag.TimeStamp) 'Output: e.g. 50
For lngCount = 0 To 4
MsgBox FormatDateTime(objTag.TimeStamp, lngCount)
Next
'lngCount = 0: Output: e.g. 06/08/2002 9:07:50
'lngCount = 1: Output: e.g. 06 August 2002
'lngCount = 2: Output: e.g. 06/08/2002
'lngCount = 3: Output: e.g. 9:07:50
'lngCount = 4: Output: e.g. 9:07
The following example issues the time stamp of the tag "Tag1":
'VBS88
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
MsgBox objTag.TimeStamp
See also
Tag (Page 229)
TimeStepBase
Description
Specifies the time unit for the exactness of the time stamp displayed in the table. The exactness
is determined by multiplying the factor and time unit.
Access in runtime: Read and write
Syntax
Object.TimeStepBase[=TimeStepBase]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTableControl
TimeStepBase
Optional. A value or a constant that specifies the time unit for the exactness of the time
stamp.
See also
OnlineTableControl (Page 347)
TimeStepFactor
Description
Specifies the exactness of the time stamp that is formed with time unit "TimeStepBase".
You determine the exactness by multiplying the factor and time unit. For example, if you
want to display all values that occurred within 3 seconds in the same row, you enter "3" for
the factor and "Base1s" for the time unit.
The entered factor has no effect if "exact" is selected for the time unit.
Syntax
Object.TimeStepFactor[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the time factor for the exactness of the time
stamp.
See also
OnlineTableControl (Page 347)
TitleColor
Description
Specifies the background color of the table header.
Access in runtime Read and write
Syntax
Object.TitleColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the background color of the table header.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleCut
Description
Specifies whether the content of the fields in a title bar is to be shortened if the column is too
narrow.
Access in runtime: Read and write
Syntax
Object.TitleCut[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional TRUE if the column headers in the title bar are shortened if the column is too
narrow.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleDarkShadowColor
Description
Specifies the color for the dark side of the 3D shading for column and row headers in the object
table.
Also set "TitleStyle (Page 1051)" to "1".
Access in runtime Read and write
Syntax
Object.TitleDarkShadowColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the color for the dark side of the 3D shading.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleForeColor
Description
Specifies the text color for the table column and row headers of the object.
Syntax
Object.TitleForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or constant that specifies the font color in the column and row headers of
the table.
Comments
You use the "RGB" function to define the color in RGB format (red, green, blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). The "Red"
color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleGridLineColor
Description
Specifies the color of the separation lines in the title bar of the table.
Access in runtime Read and write
Syntax
Object.TitleGridLineColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the color of the separation lines in the title bar
of the table.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleLightShadowColor
Description
Specifies the color for the light side of the 3D shading for table column and row headers of the
object.
Also set "TitleStyle (Page 1051)" to "1".
Access in runtime Read and write
Syntax
Object.TitleLightShadowColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the color for the light side of the 3D shading.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleSort
Description
Specifies how sorting by column header is triggered.
Access in runtime Read and write
Syntax
Object.TitleSort[=GridSortTrigger]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridSortTrigger
Optional. A value or constant that specifies how to trigger sorting by column header.
Value Explanation
0 Sorting by column header is disabled.
1 Sorting is triggered by clicking in the column header.
2 Sorting is triggered by double-clicking in the column title.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
TitleStyle
Description
Specifies whether to use a shading color for the text in the column headers.
Access in runtime Read and write
Syntax
Object.TitleStyle[=GridHeaderStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
GridHeaderStyle
Optional. A value or a constant that specifies whether the text in the columns headers is
displayed with shading.
Value Explanation
0 No shading color is used. Flat header style.
1 Enables the use of shading colors. 3D representation of the header.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
Toggle
Description
Specifies whether the selected object engages after it has been operated in Runtime.
Access in runtime: Read and write
Syntax
Object.Toggle[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Button
• RoundButton*
*: Read access only
BOOLEAN
Optional. TRUE, if the selected object engages after it has been operated in runtime.
Tolerance
Description
Specifies the limit for the storage space display as of which a deviation will be reported.
Access in runtime: Read
Syntax
Object.Tolerance[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• DiscSpaceView
Int32
Optional. A value or a constant that specifies the limit for the disk space view as of which a
deviation is reported.
See also
DiskSpaceView (Page 298)
ToleranceColor
Description
Specifies the colors in which the bars of the memory space display are shown as soon as the
tolerance range is exceeded.
Access in runtime Read
Syntax
Object.ToleranceColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• DiscSpaceView
Color
Optional. A value or a constant that specifies the colors in which the bars of the storage
space display will be shown as soon as the tolerance range is exceeded.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
DiskSpaceView (Page 298)
ToleranceLowerLimit
Description
Sets the low limit for tolerance 1.
Access in runtime: Read and write
Syntax
Object.ToleranceLowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the format:
• Bar
DOUBLE
Optional A value or a constant that specifies the low limit for tolerance 1.
Comments
The following values will be defined via the properties "ToleranceLowerLimit",
"ToleranceLowerLimitColor" and "ToleranceLowerLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
ToleranceLowerLimitColor
Description
Specifies the color for the lower limit "ToleranceLowerLimit"".
The "ToleranceLowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime Read and write
Syntax
Object.ToleranceLowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the lower limit
"ToleranceLowerLimit" ".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
ToleranceLowerLimitEnabled
Description
Specifies whether the "ToleranceLowerLimit" limit is monitored. The limit, the display when the
limit has been reached, and the type of evaluation are set with the properties
"ToleranceLowerLimit", "ToleranceLowerLimitColor" and "ToleranceLowerLimitRelative".
Access in runtime: Read and write
Syntax
Object.ToleranceLowerLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the "ToleranceLowerLimit" limit is monitored.
See also
Bar (Page 259)
ToleranceLowerLimitRelative
Description
Specifies whether the low limit "ToleranceLowerLimit" is evaluated as a percentage or as an
absolute value.
Access in runtime Read and write
Syntax
Object.ToleranceLowerLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the low limit "ToleranceLowerLimit" is to be evaluated as a percentage.
FALSE if the low limit "ToleranceLowerLimit" is to be evaluated as an absolute value.
See also
Bar (Page 259)
ToleranceUpperLimit
Description
Sets the high limit for tolerance 1.
Access in runtime: Read and write
Syntax
Object.ToleranceUpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the format:
• Bar
DOUBLE
Optional A value or a constant that specifies the high limit for tolerance 1.
Comments
The following values will be specified via the properties "ToleranceUpperLimit",
"ToleranceUpperLimitColor" and "ToleranceUpperLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
ToleranceUpperLimitColor
Description
Specifies the color for the high limit "ToleranceUpperLimit".
Access in runtime Read and write
Syntax
Object.ToleranceUpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the upper limit
"ToleranceUpperLimit"".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
ToleranceUpperLimitEnabled
Description
Specifies whether the "ToleranceUpperLimit"" limit is to be monitored.
Access in runtime: Read and write
Syntax
Object.ToleranceUpperLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the "ToleranceUpperLimit" limit is to be monitored.
Comments
The following values will be specified with the properties "ToleranceUpperLimit",",
"ToleranceUpperLimitColor" and "ToleranceUpperLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
ToleranceUpperLimitRelative
Description
Specifies whether the higher limit "ToleranceUpperLimit"" is to be evaluated as a percentage or
as an absolute value.
Access in runtime Read and write
Syntax
Object.ToleranceUpperLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the high limit "ToleranceUpperLimit" is to be evaluated as a percentage.
FALSE if the high limit "ToleranceUpperLimit" is to be evaluated as an absolute value.
See also
Bar (Page 259)
ToolBar_ButtonsHeight
Description
No access in runtime.
ToolBar_ButtonsWidth
Description
No access in runtime.
ToolbarAlignment
Description
Specifies the position of the toolbar.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ToolbarAlignment[=ToolbarPosition]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
You have no access in runtime with the following format:
• SysDiagControl
ToolbarPosition
Optional. A value or a constant that specifies the position of the toolbar within the object.
Value Designation
0 Top
1 Bottom
2 Left
3 Right
ToolbarBackColor
Description
Specifies the background color of the toolbar.
Also set "ToolbarUseBackColor (Page 1079)" to "TRUE".
Access in runtime Read and write
Syntax
Object.ToolbarBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Color
Optional. A value or a constant that specifies the background color of the toolbar.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarBackgroundColor
Description
No access in runtime.
ToolbarButtonActive
Description
Specifies whether the function linked to the button is activated in runtime. Clicking the button
in Runtime triggers the corresponding function.
Access in runtime Read and write
Syntax
Object.ToolbarButtonActive[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the function assigned to the key is active.
FALSE if the function assigned to the key is not active. You can connect your own functions to
the key by local scripts.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonAdd
Description
Creates a new user-defined button in the object's toolbar. The newly created button is
automatically referenced with "ToolbarButtonIndex".
Access in runtime Read and write
Syntax
Object.ToolbarButtonAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Required. A value or a constant that specifies the name of the new button in the toolbar with
"ToolbarButtonName".
See also
ToolbarButtonIndex (Page 1069)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonAuthorization
Description
Specifies the authorization for the selected key function. The authorizations are configured in
the user administration.
Access in runtime Read and write
Syntax
Object.ToolbarButtonAuthorization[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or constant that specifies the authorization for the selected key function.
See also
UserArchiveControl (Page 466)
TrendRulerControl (Page 441)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
ToolbarButtonBeginGroup
Description
Inserts a leading separator (vertical line) for the selected key function on the toolbar. These
separators can be used to group the icons of the button functions.
Access in runtime Read and write
Syntax
Object.ToolbarButtonBeginGroup[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if a separator is inserted in front of the selected key function.
FALSE if no separator is inserted in front of the selected key function.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
ToolbarButtonClick
Description
Clicks a toolbar button. You call the function of the corresponding button using the ID of the
button.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.ToolbarButtonClick[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• SysDiagControl*
• TrendRulerControl
• UserArchiveControl
*: Read access only
Int32
Optional. A value or a constant that specifies the ID of the button that is clicked.
ToolbarButtonCount
Description
Specifies the number of configured buttons in the toolbar.
Access in runtime Read and write
Syntax
Object.ToolbarButtonCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the number of configured buttons in the toolbar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonEnabled
Description
Enables operation of custom toolbar buttons.
Access in runtime: Read and write
Syntax
Object.ToolbarButtonEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional TRUE if operation is enabled for the selected user-defined key in the toolbar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonHeight
Description
No access in runtime.
ToolbarButtonHotKey
Description
Specifies the hot key for the selected object button. Enter the hot key in ASCII coding, e.g. "112"
for the <F1> key.
Also set "ToolbarUseHotKeys (Page 1080)" to "TRUE".
Access in runtime Read and write
Syntax
Object.ToolbarButtonHotKey[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the shortcut for the selected button.
See also
TrendIndex (Page 1100)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonID
Description
References a button with its ID. To access the properties of a status bar element, you need to set
""ToolbarButtonID"".
The referencing of a button with its ID does not depend on the actual order of the buttons.
The ID are listed in the inspector window of the object under "Properties > Properties >
Toolbar > Toolbar - Buttons".
Access in runtime Read and write
Syntax
Object.ToolbarButtonID[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies, with the ID, the toolbar buttons to be edited.
See also
ToolbarButtonClick (Page 1065)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonIndex
Description
References a button. To access the properties of a button, you need to set
""ToolbarButtonIndex"".
Values between 0 and "ToolbarButtonCount" minus 1 are valid for "ToolbarButtonIndex". The
"ToolbarButtonCount" property specifies the number of configured buttons.
Access in runtime Read and write
Syntax
Object.ToolbarButtonIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies, with the index, the button to be edited.
See also
ToolbarButtonCount (Page 1065)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
ToolbarButtonLocked
Description
Specifies whether the locked, pressed state of a user-defined button referenced with
"ToolbarButtonIndex" is displayed.
Access in runtime Read and write
Syntax
Object.ToolbarButtonLocked[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
TRUE if the pressed state is displayed for the referenced user-defined button in the toolbar.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonName
Description
Specifies the name of a user-defined button referenced with "ToolbarButtonIndex".
Access in runtime Read and write
Syntax
Object.ToolbarButtonName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the name of the referenced user-defined
button.
See also
ToolbarButtonIndex (Page 1069)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonRemove
Description
Removes a user-defined button referenced with its name.
Access in runtime Read and write
Syntax
Object.ToolbarButtonRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the name of the referenced user-defined button
to be removed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonRename
Description
Specifies the new name of a user-defined button referenced with "ToolbarButtonIndex".
Access in runtime Read and write
Syntax
Object.ToolbarButtonRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional. A value or a constant that specifies the new name of the selected user-defined
button.
See also
ToolbarButtonIndex (Page 1069)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonRepos
Description
Specifies the position of a button referenced with "ToolbarButtonIndex" in the toolbar of the
object.
If you have changed the position of the button with "ToolbarButtonRepos",
"ToolbarButtonIndex" is assigned the value of "ToolbarButtonRepos".
Access in runtime Read and write
Syntax
Object.ToolbarButtonRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Int32
Optional. A value or a constant that specifies the position of the referenced button in the
toolbar. Value range from 0 to "ToolbarButtonCount" minus 1. Values outside this range have
no effect.
0: The referenced button is positioned on the left.
See also
ToolbarButtonCount (Page 1065)
ToolbarButtonIndex (Page 1069)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtons
Description
No access in runtime.
ToolbarButtonSettings
Description
No access in runtime.
ToolbarButtonsForMigration
Description
No access in runtime.
ToolbarButtonTooltipText
Description
Specifies the tooltip text for the user-defined button in the toolbar.
Access in runtime: Read and write
Syntax
Object.ToolbarButtonTooltipText[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
STRING
Optional A value or a constant that specifies the tooltip text for the selected user-defined
button.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonUserDefined
Description
Specifies whether the project engineer has added the toolbar button as new user-defined
button.
Access in runtime: Read and write
Syntax
Object.ToolbarButtonUserDefined[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
Boolean
Optional.
TRUE if the toolbar key is user-defined.
FALSE if the toolbar key is specified by the system.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonVisible
Description
Specifies whether the button referenced with "ToolbarButtonIndex" is displayed in the toolbar.
Access in runtime Read and write
Syntax
Object.ToolbarButtonVisible[=<BOOLEAN>]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the referenced button is shown.
FALSE if the referenced button is hidden.
See also
ToolbarButtonIndex (Page 1069)
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarButtonWidth
Description
No access in runtime.
ToolbarEnabled
Description
No access in runtime.
ToolbarHeight
Description
No access in runtime.
ToolbarIconStyle
Description
No access in runtime.
ToolbarLeft
Description
No access in runtime.
ToolbarShowTooltips
Description
Specifies whether the tooltips for the key functions are displayed in runtime. The property can
be dynamized with the ToolbarShowTooltips name. The property for specifying the tooltip text
is "ToolbarButtonTooltipText".
Access in runtime Read and write
Syntax
Object.ToolbarShowTooltips[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the tooltips are shown.
FALSE if the tooltips are not shown.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarStyle
Description
No access in runtime.
ToolbarTop
Description
No access in runtime.
ToolbarUseBackColor
Description
Specifies whether the background color for the toolbar is shown.
Access in runtime Read and write
Syntax
Object.ToolbarUseBackColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the background color of the toolbar is displayed.
FALSE if the background color of the toolbar is not displayed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
ToolbarUseHotKeys
Description
Specifies whether the hotkeys are activated for buttons in the toolbar. The hot keys are defined
for each button with "ToolbarButtonHotKey (Page 1067)".
Access in runtime Read and write
Syntax
Object.ToolbarUseHotKeys[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional. TRUE if the hot keys are activated.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarVisible
Description
Specifies whether the toolbar of the control is displayed.
Access in runtime Read and write
Syntax
Object.ToolbarVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• FunctionTrendControl
• OnlineTableControl
• OnlineTrendControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the toolbar is displayed.
FALSE if the toolbar is not displayed.
See also
AlarmControl (Page 237)
FunctionTrendControl (Page 309)
OnlineTableControl (Page 347)
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ToolbarWidth
Description
No access in runtime.
ToolTipText
Description
Specifies the tooltip text.
Access in runtime: Read
Syntax
Object.ToolTipText[=STRING]
ToolTipText
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton *
• StatusForce *
• Switch *
• SymbolicIOField *
• TextField
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• WindowSlider *
* Read access only
STRING
Optional. A value or a constant that specifies the tooltip text.
Top
Description
Specifies the value of the Y coordinate.
Access in runtime: Read
Syntax
Object.Top[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• AlarmControl
• AlarmView
• Bar
• BatteryView
• Button
• ChannelDiagnose
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Clock
• ComboBox
• Connector
• DateTimeField
• DiscSpaceView
• Ellipse
• EllipseSegment
• EllipticalArc
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• ListBox
• MediaPlayer
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• OptionGroup
• PLCCodeViewer
• Polygon
• Polyline
• ProDiagOverview
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView *
• Rectangle
• RoundButton *
• S7GraphOverview
• ScreenWindow
• Slider **
• SmartClientView
• StatusForce *
• Switch *
• SymbolLibrary
• SymbolicIOField *
• SysDiagControl *
• TextField
• TrendRulerControl
• TrendView *
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• UserArchiveControl
• UserView **
• WLanQualityView
• WindowSlider *
• ZoneLabelView
• ZoneQualityView
* Read access only
** RT Professional read access only
You have no access in runtime with the following format:
• ApplicationWindow
Int32
Optional. A value or a constant that contains the value of the Y coordinate in pixels
(measured from the top left edge of the screen).
Comments
The Y coordinate refers to the top left corner of the rectangle that surrounds the object. The
screen limits are also monitored in runtime. If the assigned coordinate value exceeds the display
size, the user-defined function is interrupted with an error message.
TopMargin
Description
No access in runtime.
TopOffset
Description
Specifies the vertical shift of zero point of the display of a screen that is larger than the screen
window. The shift refers to the top edge of the screen window.
The screen is displayed cut. The picture scroll bars are located at the left and upper edge of
the picture.
If you wish to display the screen in the screen window with horizontal and vertical
offset of the screen scroll bars, use the "HorizontalScrollBarPosition (Page 738)" and
"VerticalScrollbarPosition (Page 1202) properties for the offset.
Access in Runtime: Read and write
Syntax
Object.TopOffset[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Screenwindow
Int32
Optional. A value or a constant that specifies the vertical shift of the screen display's zero
point from the top margin of the screen window.
See also
ScreenWindow (Page 404)
Total
Description
Specifies the memory capacity.
Access in runtime: Read
Syntax
Object.Total[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the format:
• DiskSpaceView
DOUBLE
Optional. A value or a constant that specifies the memory capacity.
TransitionHeaderFont
Description
Specifies the font in the information area of this PLC code display.
Access in runtime: Read and write
Syntax
Object.TransitionHeaderFont[=Font]
Object
Required. A "ScreenItem" object with the following characteristics:
• PLCCodeViewer
Font
Optional. A value or a constant that specifies the font.
See also
PLCCodeViewer (Page 376)
Transparency
Description
Specifies the object transparency in percent.
0 = no transparency; 100 = complete transparency (invisible).
The text and fields of the graphic objects are only transparent with "100."
In runtime, a completely transparent object (invisible) is also functional.
Access in runtime: Read and write
Syntax
Object.Transparency[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Clock
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• Gauge
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton *
• Slider *
• SymbolicIOField *
• TextField
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• WindowSlider *
* Read access only
** RT Professional, read access only
Int32
Optional. A value or constant that specifies the transparency of the object in percent.
TransparentColor
Description
Specifies which color of the allocated graphic (*.bmp, *dib) is to be set to "transparent".
Also specify with "UseTransparentColor" that the color is to be shown as transparent.
Access in runtime: Read and write
Syntax
Object.TransparentColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• GraphicIOField
• GraphicView
Color
Optional. A value or a constant that specifies the color that will be shown transparent.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TransparentColorDeactivatedPicture
Description
Sets the color of the assigned bitmap object to "transparent" for the "disabled" status.
Access in runtime: Read
Syntax
Object.TransparentColorDeactivatedPicture[=Color]
Object
Required. A "ScreenItem" object with the following format:
• RoundButton
Color
Optional A value or a constant that specifies which color of the allocated bitmap object will
be set to transparent" for the status "disabled".
Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do this,
enter the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.
The "PicDeactUseTransColor" property must have the value TRUE so that the color can be set
to "transparent".
See also
RoundButton (Page 398)
TransparentColorPictureOff
Description
Specifies which color of the allocated bitmap object will be set to transparent" for the "off" status.
Access in runtime Read and write
Syntax
Object.TransparentColorPictureOff[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• RoundButton*
*: Read access only
Color
Optional. A value or a constant that specifies which color of the allocated bitmap object will
be set to transparent" for the "off" status.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TransparentColorPictureOn
Description
Specifies which color of the allocated bitmap object will be set to transparent" for the "on" status.
The "PicDownUseTransColor" property must have the value TRUE so that the color can be set
to "transparent".
Access in runtime Read and write
Syntax
Object.TransparentColorPictureOn[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• RoundButton*
*: Read access only
Color
Optional. A value or a constant that specifies which color of the allocated bitmap object will
be set to "transparent" for the "on" status.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TrendActualize
Description
Specifies whether the selected trend is updated.
Access in runtime Read and write
Syntax
Object.TrendActualize[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the selected trend is always updated.
FALSE if the selected trend is not updated. This setting is useful when a logged trend is
compared with a current trend.
See also
FunctionTrendControl (Page 309)
TrendAdd
Description
Creates a new trend. The newly created trend is automatically referenced with "TrendIndex".
Access in runtime: Read and write
Syntax
Object.TrendAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Required. A value or a constant that specifies the name of the new trend with "TrendName".
TrendAutoRangeBeginTagName
Description
Specifies a tag that defines the start value of the data range of the trend. You specify additionally
using the "TrendAutoRangeSource (Page 1095)" property that the data range of the trend is
determined dynamically.
Access in runtime: Read and write
Syntax
Object.TrendAutoRangeBeginTagName[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the tag for the start value.
See also
OnlineTrendControl (Page 359)
TrendAutoRangeBeginValue
Description
Specifies the start value of the data range of the trend. You specify additionally using the
"TrendAutoRangeSource (Page 1095)" property that the data range of the trend is set statically.
Access in runtime: Read and write
Syntax
Object.TrendAutoRangeBeginValue[=DOUBLE]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the start value of the data range of the trend.
See also
OnlineTrendControl (Page 359)
TrendAutoRangeEndTagName
Description
Specifies a tag that defines the end value of the data range of the trend. You specify additionally
using the "TrendAutoRangeSource (Page 1095)" property that the data range of the trend is
determined dynamically.
Syntax
Object.TrendAutoRangeEndTagName[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the tag for the end value.
See also
OnlineTrendControl (Page 359)
TrendAutoRangeEndValue
Description
Specifies the end value of the data range of the trend. You specify additionally using the
"TrendAutoRangeSource (Page 1095)" property that the data range of the trend is set statically.
Access in runtime: Read and write
Syntax
Object.TrendAutoRangeEndValue[=DOUBLE]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the end value of the data range of the trend.
See also
OnlineTrendControl (Page 359)
TrendAutoRangeSource
Description
Specifies how the automatic data range of the trend data is determined.
Access in runtime: Read and write
Syntax
Object.TrendAutoRangeSource[=AutorangeSourceType]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTrendControl
AutorangeSourceType
Optional. A value or a constant that specifies the type of data range.
The following settings are available:
TrendBeginTime
Description
Defines the start time of the time range for data transfer to the selected trend.
Access in runtime: Read and write
Syntax
Object.TrendBeginTime[=DateTime]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DateTime
Optional. Defines the start time for data supply for the selected trend.
See also
FunctionTrendControl (Page 309)
TrendColor
Description
Specifies the color of the trend line of a referenced trend of the trend view.
Access in Runtime: Read and write
Syntax
Object.TrendColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the trend line of a referenced trend
in the object.
Comments
You use the "RGB" function to define the color in RGB format (red, green, blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). The "Red"
color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendCount
Description
Specifies the number of configured trends.
Access in runtime Read and write
Syntax
Object.TrendCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the number of configured trends.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendEndTime
Description
Defines the end of the time range for data connections of a selected trend.
Access in runtime: Read and write
Syntax
Object.TrendEndTime[=DateTime]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DateTime
Optional. Specifies the end time for data supply for the selected trend.
See also
FunctionTrendControl (Page 309)
TrendExtendedColorSet
Description
Specifies whether the point and fill colors of the trend are shown.
Access in runtime Read and write
Syntax
Object.TrendExtendedColorSet[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the settings in "TrendFillColor (Page 1099)" and "TrendPointColor (Page 1107)" are
effective.
FALSE if the settings for point and fill color are not effective.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendFill
Description
Specifies whether the area below the trend is shown filled.
If "TrendExtendedColorSet (Page 1098)" is set to "FALSE", the trend color is also used as the fill
color.
Access in runtime Read and write
Syntax
Object.TrendFill[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the area beneath the trend is filled.
FALSE if the trend is not shown filled.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendFillColor
Description
Defines the fill color of the trend.
The setting is effective if the properties "TrendFill (Page 1098)" and "TrendExtendedColorSet
(Page 1098)" are also set to "TRUE".
Access in runtime Read and write
Syntax
Object.TrendFillColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the fill color of the selected trend.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendIndex
Description
References a configured trend. To access the properties of a trend, you need to set
""TrendIndex"".
Values between 0 and "TrendCount" minus 1 are valid for "TrendIndex". The "TrendCount"
property specifies the number of configured trends.
Access in runtime Read and write
Syntax
Object.TrendIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the trend to be edited.
See also
TrendCount (Page 1097)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendIndicatorColor
Description
Specifies the color for the trend view. The trend indicator represents the tendency (rising or
falling) of the measurement value that is to be monitored with a small arrow. To activate the
trend indicator, the property "ShowTrendIndicator" must have the value "TRUE".
Access in runtime Read and write
Syntax
Object.TrendIndicatorColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color of the trend indicator.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
TrendLabel
Description
Defines the label text for a trend referenced with "TrendIndex".
Access in runtime: Read and write
Syntax
Object.TrendLabel[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the label text for the referenced trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendLineStyle
Example
Specifies which line type is used for display of the trend.
Access in runtime Read and write
Syntax
Object.TrendLineStyle[=LineStyle]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
LineStyle
Optional. A value or a constant that specifies the type of line for displaying the trend.
Value Explanation
0 The trend is shown as a solid line.
1 The trend is visualized as dashed line.
2 The trend is visualized as dotted line.
3 The trend is visualized as dot-dash line.
4 The trend is visualized as dash-dot-dot line.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendLineType
Description
Specifies how the trend is displayed.
Access in runtime Read and write
Syntax
Object.TrendLineType[=TrendLineTypeScada]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
TrendLineTypeScada
Optional. A value or a constant that specifies how the trend is displayed.
Value Explanation
0 Only the trend dots are displayed.
1 Visualizes a trend with linear interconnection of points.
2 Visualizes a stepped trend and its interconnected points.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendLineWidth
Description
Specifies the line thickness of the selected trend in pixels.
Access in runtime: Read and write
Syntax
Object.TrendLineWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the line weight of the selected trend in pixels.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendLowerLimit
Description
Specifies the low limit of a tag that is displayed in the object as a trend. If the tag drops below the
value of "TrendLowerLimit", the affected trend dots are marked in the color set in
"TrendLowerLimitColor (Page 1105)".
Using the "TrendLowerLimitColoring (Page 1105)" property, specify additionally that the
display of the low limit violation is activated.
Access in runtime Read and write
Syntax
Object.TrendLowerLimit[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the lower limit for a tag displayed in a trend
view.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendLowerLimitColor
Description
Specifies the color that marks the trend values that are below the value of "TrendLowerLimit
(Page 1104)".
The setting is effective if the "TrendLowerLimitColoring (Page 1105)" property has the value
"TRUE".
Access in runtime: Read and write
Syntax
Object.TrendLowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of trend values below the
"TrendLowerLimit (Page 1104)" value.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
TrendLowerLimitColoring
Description
Specifies whether "TrendLowerLimitColor" is used to identify tag values which are less than the
value of "TrendLowerLimit".
Access in runtime: Read and write
Syntax
Object.TrendLowerLimitColoring[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the "TrendLowerLimitColor" property is effective.
FALSE if the "TrendLowerLimitColor" property is not effective.
TrendMeasurePoints
Description
Specifies the number of measurement points for visualization of the selected trend.
Defines the number of value pairs provided to the trend from a user archive.
Access in runtime: Read and write
Syntax
Object.TrendMeasurePoints[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the number of measurement points or value
pairs for the selected trend.
See also
FunctionTrendControl (Page 309)
TrendName
Description
Specifies the name of a trend referenced with "TrendIndex".
Access in runtime Read and write
Syntax
Object.TrendName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendPointColor
Description
Specifies the color of the dots on the reference trend.
The setting is effective if the "TrendExtendedColorSet (Page 1098)" property has the value
"TRUE".
Access in runtime Read and write
Syntax
Object.TrendPointColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the dots in the referenced trend.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendPointStyle
Description
Specifies how the trend points are displayed.
Access in runtime Read and write
Syntax
Object.TrendPointStyle[=PointStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
PointStyle
Optional. A value or a constant that specifies how the dots in the trend are displayed.
Value Explanation
0 The points are not displayed. The set dot width is disabled.
1 The trend points are visualized with a size of one pixel. The set dot width is disabled.
2 The dots are displayed as square. The set dot width is enabled.
3 The dots are displayed as circles. The set dot width is enabled.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendPointWidth
Description
Specifies the dot weight in pixels. You can only define the dot weight for "square" and "circular"
dots.
Access in runtime: Read and write
Syntax
Object.TrendPointWidth[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional A value or a constant that specifies the dot weight of the selected trend in pixels.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendProvider
Description
Specifies the data source for a selected trend.
Access in runtime Read and write
Syntax
Object.TrendProvider[=DataSourceType]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
DataSourceType
Optional. A value or a constant that specifies the data source for the selected trend.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendProviderCLSID
Description
Specifies the provider CLSID of the data for a trend.
Access in runtime Read and write
Syntax
Object.TrendProviderCLSID[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the provider CLSID.
Value Description
No configured data supply in order to establish a connection in Run‐
time via a script.
{416A09D2-8B5A-11D2- Data source with archive tags of a process value archive.
8B81-006097A45D48}
{A3F69593-8AB0-11D2- Data supply with online
A440-00A0C9DBB64E} tags from tag management.
{2DC9B1C8-4FC1-41B1- Data supply with columns of a user log.
B354-3E469A13FBFD}
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendRangeType
Description
Specifies the time range during which the selected trend is supplied with data.
You can only define the number of measuring points if you select user archives as the data
source.
Access in runtime Read and write
Syntax
Object.TrendRangeType[=TimeRangeMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
TimeRangeMode
Optional. A value or a constant that specifies the time range during which the selected trend
is supplied with data.
See also
FunctionTrendControl (Page 309)
TrendRemove
Description
Removes a trend referenced with its name.
Access in runtime Read and write
Syntax
Object.TrendRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced trend to be
removed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendRename
Description
Specifies the new name of a trend referenced with "TrendIndex".
Access in runtime Read and write
Syntax
Object.TrendRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the new name of the selected trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendRepos
Description
Specifies the position of a trend referenced with "TrendIndex" in the trend window of the object.
If you have changed the position of the trend with "TrendRepos", "TrendIndex" is assigned the
value of "TrendRepos".
Access in runtime Read and write
Syntax
Object.TrendRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced trend in the trend
window. Value range from 0 to "TrendCount" minus 1. Values outside this range have no
effect.
0: The referenced trend is positioned at the front.
See also
TrendIndex (Page 1100)
TrendCount (Page 1097)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
Trends
Description
No access in runtime.
TrendSelectTagName
Description
Specifies that the dialog for selecting the tag name for the data source of the value axis is
displayed initially in runtime.
Syntax
Object.TrendSelectTagName[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if the dialog for selecting the tag name for the data source of the value axis is
displayed in the screen.
FALSE, , if no dialog for selecting the tag name for the data source of the value axis is
displayed in the screen.
TrendSelectTagNameX
Description
Specifies that the dialog for selecting the tag name of the data source of the x-axis is displayed
initially in runtime.
Access in runtime Read and write
Syntax
Object.TrendSelectTagNameX[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional. TRUE if the dialog for selecting the tag name of the data source of the X-axis is
displayed in the screen.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
TrendSelectTagNameY
Description
Specifies that the dialog for selecting the tag name for the data source of the Y axis is displayed
initially in runtime.
Access in runtime Read and write
Syntax
Object.TrendSelectTagNameY[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional. TRUE if the dialog for selecting the tag name of the data source of the Y-axis is
displayed in the screen.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
TrendsForPrinting
Description
No access in runtime.
TrendTagName
Description
Specifies the name of the tag that supplies the value axis with data.
Access in runtime: Read and write
Syntax
Object.TrendTagName[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the tag for the value axis.
TrendTagNameX
Description
Specifies the name of the connected HMI tag or column for the X-axis. You select an HMI tag or
a column with the selection button.
Access in runtime: Read and write
Syntax
Object.TrendTagNameX[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
STRING
Optional A value or a constant that specifies the name of the HMI tag or column for the X
axis.
See also
FunctionTrendControl (Page 309)
TrendTagNameY
Description
Specifies the name of the connected HMI tag or column for the Y-axis. You select an HMI tag or
a column with the selection button.
Access in runtime: Read and write
Syntax
Object.TrendTagNameY[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
STRING
Optional A value or a constant that specifies the name of the HMI tag or column for the Y axis.
See also
FunctionTrendControl (Page 309)
TrendTimeAxis
Description
Specifies the time axis to be used for the selected trend.
Access in runtime Read and write
Syntax
Object.TrendTimeAxis[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the time axis for the selected trend.
See also
TimeAxisCount (Page 1012)
OnlineTrendControl (Page 359)
TrendTimeRangeBase
Description
Specifies the time unit for calculating the time range.
Access in runtime Read and write
Syntax
Object.TrendTimeRangeBase[=TagLoggingTimeUnit]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
TagLoggingTimeUnit
Optional. A value or a constant that specifies the time unit for determining the time range.
Value Description
500 500 ms
1000 1 second
60000 1 minute
3600000 1 hour
86400000 1 day
See also
FunctionTrendControl (Page 309)
TrendTimeRangeFactor
Description
Specifies the factor for determining the time interval for which the referenced trend is displayed.
You determine the time span by multiplying the factor and time unit.
The setting is effective if "TrendRangeType (Page 1111)" property has the value "0".
Access in runtime: Read and write
Syntax
Object.TrendTimeRangeFactor[=Int32]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the factor for determining the time span of the
referenced trend.
TrendTrendWindow
Description
Defines the trend window for visualizing the trend selected.
Define the available trend windows in the "Trend window" tab.
Access in runtime: Read and write
Syntax
Object.TrendTrendWindow[=STRING]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional A value or constant that specifies the name of the trend window for the selected
trend.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendUncertainColor
Description
Specifies the color for values of uncertain status.
Access in runtime Read and write
Syntax
Object.TrendUncertainColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the values of uncertain status in the
selected trend.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendUncertainColoring
Description
Specifies that values of uncertain status are to be highlighted.
Access in runtime Read and write
Syntax
Object.TrendUncertainColoring[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if values of uncertain status are highlighted.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendUpperLimit
Description
Specifies the high limit of a tag that is displayed in the specified object as a trend. If the tag
exceeds the value of "TrendUpperLimit", the relevant trend dots are marked in the color
specified with "TrendUpperLimitColor (Page 1121)".
Also specify with "TrendUpperLimitColoring (Page 1122)" that limit violation display is
activated.
Access in runtime Read and write
Syntax
Object.TrendUpperLimit[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the higher limit for values in the selected trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendUpperLimitColor
Description
Specifies the color that marks trend values which are above the value of "TrendUpperLimit
(Page 1121)".
The setting is effective if "TrendUpperLimitColoring (Page 1122)" has the value "TRUE".
Access in runtime Read and write
Syntax
Object.TrendUpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of trend values above the
"TrendUpperLimit (Page 1121)" value.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). The "Red"
color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendUpperLimitColoring
Description
Specifies whether the selection frame is shown with the color defined by the system.
Access in runtime Read and write
Syntax
Object.TrendUpperLimitColoring[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the "TrendUpperLimitColor" property is enabled.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendValueAlign
Description
No access in runtime.
TrendValueAxis
Description
Specifies the value axis that is used for the trend selected.
Access in runtime Read and write
Syntax
Object.TrendValueAxis[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the value axis for the selected trend.
See also
ValueAxisCount (Page 1175)
OnlineTrendControl (Page 359)
TrendValueUnit
Description
Specifies a unit of the values for the "Display values" trend type. The unit is dependent on the
value to be displayed, e.g., "%" or "°C".
Syntax
Object.TrendValueUnit[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the unit for the values of the value axis.
See also
OnlineTrendControl (Page 359)
TrendVisible
Description
Specifies whether the trend referenced with "TrendIndex" is displayed in the object.
Access in runtime Read and write
Syntax
Object.TrendVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE, if the referenced trend is displayed.
FALSE, if the referenced trend is not displayed.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowAdd
Description
Creates a new trend view. The newly created trend view is automatically referenced with
"TrendWindowIndex".
Access in runtime Read and write
Syntax
Object.TrendWindowAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Required. A value or a constant that specifies the name of the new trend view with
"TrendWindowName".
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowCoarseGrid
Description
Specifies if the grid lines for the main scale are displayed.
Access in runtime Read and write
Syntax
Object.TrendWindowCoarseGrid[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the grid lines for the main scale are displayed.
FALSE if the grid lines for the main scale are not displayed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowCoarseGridColor
Description
Specifies the color of the main grid for the referenced diagram in the object.
Access in runtime: Read and write
Syntax
Object.TrendWindowCoarseGridColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the main grid for the referenced
diagram.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowCount
Description
Specifies the number of configured trend diagrams in the trend view.
Access in runtime Read and write
Syntax
Object.TrendWindowCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the number of configured trend diagrams in the
trend view.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowFineGrid
Description
Specifies whether grid lines are displayed for the secondary scaling.
Access in runtime Read and write
Syntax
Object.TrendWindowFineGrid[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the grid lines for the secondary scale are displayed.
FALSE if the grid lines for the secondary scale are not displayed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowFineGridColor
Description
Specifies the color of the secondary grid for the referenced diagram in the object.
Access in runtime Read and write
Syntax
Object.TrendWindowFineGridColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the help grid for the referenced
diagram.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowForegroundTrendGrid
Description
Specifies whether only the grid lines for the foreground trend are displayed in the selected trend
window.
Access in runtime Read and write
Syntax
Object.TrendWindowForegroundTrendGrid[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the grid lines for the foreground trend are displayed in the trend window.
FALSE if the grid lines for all trends are displayed in the trend window.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowGridInTrendColor
Description
Specifies whether the grid lines for the main scaling are displayed in the trend color.
Access in runtime: Read and write
Syntax
Object.TrendWindowGridInTrendColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the grid lines are displayed in the trend color.
FALSE if the grid lines are displayed in the color set in "TrendWindowCoarseGridColor
(Page 1126)".
See also
FunctionTrendControl (Page 309)
TrendWindowHorizontalGrid
Description
Specifies whether the horizontal grid lines are shown.
Access in runtime: Read and write
Syntax
Object.TrendWindowHorizontalGrid[=BOOLEAN]
Object
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
TRUE: The horizontal grid lines are displayed.
FALSE: The horizontal grid lines are not displayed.
See also
FunctionTrendControl (Page 309)
TrendWindowIndex
Description
References a trend view. To access the properties of a trend view, you need to set
""TrendWindowIndex"".
Values between 0 and "TrendWindowCount" minus 1 are valid for "TrendWindowIndex". The
"TrendWindowCount" property specifies the number of configured trend views.
Access in runtime Read and write
Syntax
Object.TrendWindowIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the trend view to be edited.
See also
TrendWindowCount (Page 1127)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowName
Description
Specifies the name of a trend view referenced with "TrendWindowIndex".
Access in runtime Read and write
Syntax
Object.TrendWindowName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced trend view.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRemove
Description
Removes a trend view referenced with its name.
Access in runtime Read and write
Syntax
Object.TrendWindowRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced trend view to be
removed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRename
Description
Specifies the new name of a trend view referenced with "TrendWindowIndex".
Access in runtime Read and write
Syntax
Object.TrendWindowRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the new name of the selected trend view.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRepos
Description
Specifies the position of a trend view referenced with "TrendWindowIndex".
If you have changed the position of the trend view with "TrendWindowRepos",
"TrendWindowIndex" is assigned the value of "TrendWindowRepos".
Access in runtime Read and write
Syntax
Object.TrendWindwRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced trend view. Value
range from 0 to "TrendWindowCount" minus 1. Values outside this range have no effect.
0: The referenced trend view is positioned at the front.
See also
TrendWindowIndex (Page 1131)
TrendWindowCount (Page 1127)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRulerColor
Description
Specifies the color of the ruler.
The setting is effective if the "TrendWindowRulerStyle (Page 1135)" property has the value
"1".
Access in runtime: Read and write
Syntax
Object.TrendWindowRulerColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the ruler.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRulerLayer
Description
Specifies the display layer of the ruler in the trend view.
Access in runtime Read and write
Syntax
Object.TrendWindowRulerLayer[=RulerLayer]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
RulerLayer
Optional. A value or a constant that specifies the display layer of the ruler in the trend view.
Value Explanation
0 The ruler is visualized on a layer under the grid.
1 The ruler is positioned on top of the trend and under the grid.
2 The ruler is positioned on top of the trend.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRulerStyle
Description
Specifies the appearance of the ruler.
Access in runtime Read and write
Syntax
Object.TrendWindowRulerStyle[=RulerStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
RulerStyle
Optional. A value or a constant that specifies how the ruler is displayed.
Value Explanation
0 The ruler is displayed as a single black line.
1 The ruler is displayed in the configured color and line width.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowRulerWidth
Description
Specifies the thickness of the ruler in pixels.
The setting is effective if the "TrendWindowRulerStyle (Page 1135)" property has the value
"1".
Access in runtime: Read and write
Syntax
Object.TrendWindowRulerWidth[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the width of the ruler in pixels.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindows
Description
No access in runtime.
TrendWindowSpacePortion
Description
Specifies the range proportion of the referenced diagram in the diagram area of the object.
Access in runtime: Read and write
Syntax
Object.TrendWindowSpacePortion[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
Int32
Optional. A value or constant that specifies the range proportion of the referenced diagram
in the diagram area of the object.
Comments
The amount of each range proportion can be calculated from the total number of range
components. If, for example, you have configured a total of three diagrams, a range proportion
of "1" each will result in three diagrams of equal size. To increase the size of range components
in relation to each other, increase the range proportion of one or more diagrams.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowStatisticRulerColor
Description
Specifies the color of the statistics ruler. You specify additionally using the
"TrendWindowStatisticRulerStyle (Page 1138)" property that the statistics ruler can be
configured graphically.
Access in runtime: Read and write
Syntax
Object.TrendWindowStatisticRulerColor[=Color]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the statistics ruler.
Comments
You use the "RGB" function to define the color in RGB format (red, green, blue). To do this, you
specify the corresponding decimal value for each of the three RGB values (value range from 0 to
255). The "Red" color is displayed as follows, for example:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTrendControl (Page 359)
TrendWindowStatisticRulerStyle
Description
Defines the graphical configurability of the lines for specifying the statistics area in the trend
window.
Access in runtime Read and write
Syntax
Object.TrendWindowStatisticRulerStyle[=RulerStyle]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
RulerStyle
Optional. A value or a constant that specifies whether the statistics ruler can be configured
graphically.
The following settings are available:
See also
OnlineTrendControl (Page 359)
TrendWindowStatisticRulerWidth
Description
Specifies the line width of the statistics ruler. You specify additionally using the
"TrendWindowStatisticRulerStyle (Page 1138)" property that the statistics ruler can be
configured graphically.
Access in runtime: Read and write
Syntax
Object.TrendWindowStatisticRulerWidth[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the line width of the statistics ruler.
See also
OnlineTrendControl (Page 359)
TrendWindowVerticalGrid
Description
Specifies whether the vertical grid lines are displayed.
Access in runtime Read and write
Syntax
Object.TrendWindowVerticalGrid[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the vertical grid lines are displayed.
FALSE if the vertical grid lines are not displayed.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendWindowVisible
Description
Specifies whether the trend view referenced with "TrendWindowIndex" is displayed.
Access in runtime: Read and write
Syntax
Object.TrendWindowVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the referenced trend view is displayed.
FALSE if the referenced trend view is not displayed.
See also
TrendWindowIndex (Page 1131)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendXAxis
Description
Defines the X axis to be used for the referenced trend.
Access in Runtime: Read and write
Syntax
Object.TrendXAxis[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or constant that specifies the name of the X-axis used for the referenced
trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
TrendYAxis
Description
Specifies which Y axis is to be used for the referenced trend.
Access in Runtime: Read and write
Syntax
Object.TrendYAxis[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the Y-axis used for the referenced
trend.
See also
TrendIndex (Page 1100)
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
Unit
Description
Specifies the unit of measurement.
Access in runtime: Read and write
Syntax
Object.Unit[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
• IOField
STRING
Optional. A value or a constant that specifies the unit of measurement.
See also
Bar (Page 259)
IOField (Page 332)
UnitColor
Description
Specifies the text color for the unit of measurement.
Access in runtime Read and write
Syntax
Object.UnitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the text color for the measurement unit.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
UnitFont
Description
Specifies the font of the unit of measurement.
Access in runtime: Read and write
Syntax
Object.UnitFont[=Font]
Object
Required. A "ScreenItem" object with the following characteristics:
• Gauge
Font
Optional. A value or a constant that specifies the font.
See also
Gauge (Page 320)
UnitText
Description
Specifies the text for the unit of measurement.
Access in runtime Read and write
Syntax
Object.UnitText[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
STRING
Optional. A value or a constant that specifies the text for the measurement unit.
Comments
Enter a text to show, for example, the physical unit of the value displayed.
See also
Gauge (Page 320)
UnitTop
Description
Specifies the distance from the unit of measurement to the upper edge of the object. The
lettering can only be positioned along the vertical diameter of the scale. The value of the
property refers to the height of the object and is measured from the upper edge of the object to
the lower edge of the lettering.
Access in runtime Read and write
Syntax
Object.UnitTop[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
DOUBLE
Optional. A value or a constant that specifies the distance between the measurement unit
and the upper edge of the object.
Value Description
0 The lower edge of the lettering is positioned on the upper limit of the selected object. The
text is no longer visible as it is positioned outside the object.
1 The lower edge of the lettering is positioned on the lower limit.
See also
Gauge (Page 320)
UnitViewColumnOrder
Description
No access in runtime.
UpdateButtonVisible
Description
No access in runtime.
UpperLimit
Description
Specifies the upper limit for input values.
Access in runtime: Read and write
Syntax
Object.UpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• IOField
DOUBLE
Optional A value or a constant that specifies the upper limit for input values.
See also
IOField (Page 332)
UseAutoScaling
Description
No access in runtime.
UseButtonFirstGradient
Description
No access in runtime.
UseButtonSecondGradient
Description
No access in runtime.
UseColumnBackColor
Description
Specifies the settings for the background color of the columns.
Access in runtime Read and write
Syntax
Object.UseColumnBackColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the background color configured in "TableColor (Page 988)" is used.
FALSE if the background color configured for the columns in the table view is used.
See also
OnlineTableControl (Page 347)
UseColumnForeColor
Description
Specifies the settings for the font color of the columns.
Access in runtime Read and write
Syntax
Object.UseColumnForeColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the font color specified with "TableForeColor (Page 990)" is used.
FALSE, if the font color specified for the columns in the table view is used.
See also
OnlineTableControl (Page 347)
UseCurserKeyScroll
Description
No access in runtime.
See also
OnlineTableControl (Page 347)
Used
Description
Returns the size of the used disk space.
Access in runtime: Read
Syntax
Object.Used[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• DiscSpaceView
DOUBLE
Optional A value or a constant that returns the size of the used disk space.
See also
DiskSpaceView (Page 298)
UseDesignColorSchema
Description
Specifies whether the colors defined in the global color scheme of the current design are to be
used for this object.
Access in runtime:
• RT Advanced: No access
• RT Professional: Read and write
Syntax
Object.UseDesignColorSchema[=BOOLEAN]
Object
Required. An object of the "ScreenItem" type with the following format:
• Bar
• Button
• CheckBox
• Circle
• CircleSegment
• CircularArc
• Clock
• ComboBox
• Connector
• Ellipse
• EllipseSegment
• EllipticalArc
• Gauge
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polygon
• Polyline
• Rectangle
• RoundButton*
• Slider*
• SymbolicIOField*
• TextField
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• WindowSlider*
*: Read access only
• TrendView
• UserView
BOOLEAN
Optional.
TRUE if the object is displayed with the colors from the global color scheme defined for this
object type.
FALSE if the object is displayed with the colors as per the settings in the object.
UseDesignShadowSettings
Description
Specifies whether the object is displayed with global shading. The global shading is specified in
the current design.
Access in runtime: Read
Syntax
Object.UseDesignShadowSettings[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• Bar
• Button
• CheckBox
• CircleSegment
• CircularArc
• Clock
• ComboBox
• Connector
• EllipseSegment
• EllipticalArc
• Gauge
• GraphicIOField
• GraphicView
• IOField
• Line
• ListBox
• MultiLineEdit
• OptionGroup
• Polyline
• RoundButton
• Slider
• SymbolicIOField
• TextField
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• WindowSlider
You have no access in runtime with the following format:
• CircleSegment
BOOLEAN
Optional.
TRUE if the object is displayed with the global shading specified for this object type.
FALSE if the object is displayed without shadowing.
See also
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
GraphicView (Page 327)
Line (Page 336)
Polygon (Page 378)
Polyline (Page 381)
Rectangle (Page 395)
TextField (Page 438)
TubeArcObject (Page 457)
TubeDoubleTeeObject (Page 459)
TubePolyline (Page 461)
UsedPercent
Description
Specifies the measured value for the used disk space as a percentage. The values can be queried
in Runtime. The values cannot be predefined.
Access in runtime: Read
Syntax
Object.UsedPercent[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• DiscSpaceView
Int32
Optional A value or a constant that returns the measured values for the used disk space as a
percentage.
See also
DiskSpaceView (Page 298)
UseExponentialFormat
Description
Specifies whether the figures are shown exponentially (e.g. "1.00e+000").
Access in runtime: Read and write
Syntax
Object.UseExponentialFormat[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the figures are shown exponentially (e.g. "1.00e+000").
See also
Bar (Page 259)
UseFirstGradient
Description
No access in runtime.
UseFlashTransparentColor
Description
Specifies whether the color of the bitmap object of a flashing graphic will be set to ""transparent".
Access in runtime: Read and write
Syntax
Object.UseFlashTransparentColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• "GraphicIOField"
BOOLEAN
Optional. TRUE, if the color of the bitmap object of a flashing graphic will be set to
"transparent".
See also
GraphicIOField (Page 324)
UseMessageColor
Description
Specifies whether the agreed colors of the message classes are displayed.
Access in runtime Read and write
Syntax
Object.UseMessageColor [=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
BOOLEAN
Optional.
TRUE if the colors are displayed.
FALSE if the color settings specified for the table content on the "Layout" tab are effective.
See also
AlarmControl (Page 237)
UserData (Professional)
Description
Specifies the value that is passed to the VB script when a user-defined menu entry or toolbar
button is executed.
Use the "Data" field in the "Menus and toolbars" editor to pass a parameter to the procedure.
Access in Runtime: Read and write
Syntax
Object.UserData[=String]
Object
Required A "Item"-type object.
String
Optional. A value or constant that is passed to the VB script when a user-defined menu entry
or toolbar button is executed.
Example
The following example shows the script "ChangeScreen" that is executed when you click a user-
defined menu item. You transfer the screen name to the script with the "Data" field.
UserName
Description
Returns the name of the user who triggered the alarm object.
UseScadaRendererStyle
Description
No access in runtime.
UseSecondGradient
Description
No access in runtime.
UseSelectedTitleColor
Description
Specifies whether a selection color is used for the headers of selected table cells.
Access in runtime Read and write
Syntax
Object.UseSelectedTitleColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if a highlight color is used. The "Background" and "Font" settings are active in Runtime.
FALSE if a highlight color is not used. The "Background" and "Font" settings are disabled in
Runtime.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
UseSourceBackColors
Description
Specifies that the background color of the data source is used.
Access in runtime: Read and write
Syntax
Object.UseSourceBackColors[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the background color of the connected trend or table view is used.
FALSE, if the background color configured in the value table is used.
See also
TrendRulerControl (Page 441)
UseSourceForeColors
Description
Specifies that the font color of the data source is used.
Access in runtime: Read and write
Syntax
Object.UseSourceForeColors[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following characteristics:
• TrendRulerControl
BOOLEAN
Optional.
TRUE, if the font color of the connected trend or table view is used.
FALSE, if the font color configured in the value table is used.
See also
TrendRulerControl (Page 441)
UseSystemScrollbarWidth
Description
No access in runtime.
UseTableColor2
Description
Specifies whether a second row color is used for the representation of the table.
Access in runtime Read and write
Syntax
Object.UseTableColor2[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if the background colors from "TableColor (Page 988)" and "TableColor2 (Page 989)" are
used alternately.
FALSE if the background colors from "TableColor (Page 988)" are used for all rows.
See also
TableColor2 (Page 989)
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
UseTableHeaderFirstGradient
Description
No access in runtime.
UseTableHeaderSecondGradient
Description
No access in runtime.
UseTagLimitColors
Description
Specifies whether the violation of the configured high and low limits for the object are
highlighted in color.
Access in runtime Read and write
Syntax
Object.UseTagLimitColors[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• IOField
BOOLEAN
Optional. TRUE if the limits are highlighted in color.
See also
IOField (Page 332)
UseTransparentColor
Description
Specifies whether the color defined with the "TransparentColor" property is shown as
transparent.
Access in runtime: Read and write
Syntax
Object.UseTransparentColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the format:
• GraphicIOField
• GraphicView
BOOLEAN
Optional. TRUE if the specified color is to be shown as transparent.
See also
GraphicIOField (Page 324)
GraphicView (Page 327)
UseTransparentColorDeactivatedPicture
Description
Specifies if the transparent color defined with the property
"TransparentColorDeactivatedPicture" for the status "disabled" will be used.
Access in runtime: Read
Syntax
Object.UseTransparentColorDeactivatedPicture[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• RoundButton
BOOLEAN
Optional. TRUE, if the transparent color defined with the property
"TransparentColorDeactivatedPicture" for the status "disabled" is used.
See also
RoundButton (Page 398)
UseTransparentColorPictureOff
Description
Specifies if the transparent color defined with the property "TransparentColorPictureOff" for the
"off" status will be used.
Access in runtime: Read and write
Syntax
Object.UseTransparentColorPictureOff[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Button
• RoundButton*
*: Read access only
BOOLEAN
Optional. TRUE, if the transparent color defined with the property
"TransparentColorPictureOff" for the "off" status is used.
UseTransparentColorPictureOn
Description
Specifies if the transparent color defined with the property "TransparentColorPictureOn" for the
"on" status will be used.
Access in runtime: Read and write
Syntax
Object.UseTransparentColorPictureOn[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Button
• RoundButton*
*: Read access only
BOOLEAN
Optional. TRUE, if the transparent color defined with the property
"TransparentColorPictureOn" for the "on" status is used.
UseTrendNameAsLabel
Description
Specifies whether the "Name" or "Label" property is used as a designation for the trend in
runtime.
Access in runtime Read and write
Syntax
Object.UseTrendNameAsLabel[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the name configured under "Properties > Properties > Trends > Name" is used.
FALSE if the name configured under "Properties > Properties > Trends > Label" is used.
See also
FunctionTrendControl (Page 309)
OnlineTrendControl (Page 359)
UseTwoHandOperation
Description
No access in runtime.
UseUdp
Description
No access in runtime.
UV_ColumnWidth_AKZ
Description
No access in runtime.
UV_ColumnWidth_Descriptor
Description
No access in runtime.
UV_ColumnWidth_InstallationDate
Description
No access in runtime.
UV_ColumnWidth_LADDR
Description
No access in runtime.
UV_ColumnWidth_Name
Description
No access in runtime.
UV_ColumnWidth_OKZ
Description
No access in runtime.
UV_ColumnWidth_OperationState
Description
No access in runtime.
UV_ColumnWidth_OrderID
Description
No access in runtime.
UV_ColumnWidth_ProfileID
Description
No access in runtime.
UV_ColumnWidth_Rack
Description
No access in runtime.
UV_ColumnWidth_Slot
Description
No access in runtime.
UV_ColumnWidth_SoftwareRevision
Description
No access in runtime.
UV_ColumnWidth_SpecificProfileData
Description
No access in runtime.
UV_ColumnWidth_State
Description
No access in runtime.
UV_ColumnWidth_Station
Description
No access in runtime.
UV_ColumnWidth_SubAddress
Description
No access in runtime.
UV_ColumnWidth_SubSlot
Description
No access in runtime.
UV_ColumnWidth_SubSystem
Description
No access in runtime.
UV_ColumnWidth_Type
Description
No access in runtime.
UV_ShowItem_AKZ
Description
No access in runtime.
UV_ShowItem_Descriptor
Description
No access in runtime.
UV_ShowItem_InstallationDate
Description
No access in runtime.
UV_ShowItem_LADDR
Description
No access in runtime.
UV_ShowItem_Name
Description
No access in runtime.
UV_ShowItem_OKZ
Description
No access in runtime.
UV_ShowItem_OperationState
Description
No access in runtime.
UV_ShowItem_OrderID
Description
No access in runtime.
UV_ShowItem_ProfileID
Description
No access in runtime.
UV_ShowItem_Rack
Description
No access in runtime.
UV_ShowItem_Slot
Description
No access in runtime.
UV_ShowItem_SoftwareRevision
Description
No access in runtime.
UV_ShowItem_SpecificProfileData
Description
No access in runtime.
UV_ShowItem_State
Description
No access in runtime.
UV_ShowItem_Station
Description
No access in runtime.
UV_ShowItem_SubAddress
Description
No access in runtime.
UV_ShowItem_SubSlot
Description
No access in runtime.
UV_ShowItem_SubSystem
Description
No access in runtime.
UV_ShowItem_Type
Description
No access in runtime.
Value
Description
Specifies a value for the object being used or returns it.
Access during runtime: Read and write
Syntax
Object.Value[=VARIANT]
Object
Necessary. An object of type "Tag", "DataItem" or "ScreenItem" with the format "Gauge".
VARIANT
Optional The value that is specified dependent on the object being used:
• Tag.Value: returns the tag value for the last read access or specifies the future tag value. Use
the "Read" method to read the tag value from the "Value" property. You assign a new tag value
to the "Value" property with the "Write" method.
• Dataset.Value: Specifies a value or returns a copy of the value or the object reference. When
returning object references, ensure that the object reference is multithread-capable.
• ScreenItem("Gauge_1").Value: Specifies the value to which the pointer points. The value
range within the values set via the properties "ValueMin",and "ValueMax".
Examples
The following example writes a new value in the "Tag1" tag:
'VBS94
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Value = 50
objTag.Write
The example shows how to add a value to a list of tags and output it as a trace. After that,
the value is changed, output again and then removed. It make sense to perform this in
several different actions:
'VBS198
HMIRuntime.DataSet.Add "motor1", 23
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet("motor1").Value = 55
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet.Remove("motor1")
See also
DataItem (Page 203)
Tag (Page 229)
Gauge (Page 320)
ValueAxes
Description
No access in runtime.
ValueAxis1AutoRange
Description
No access in runtime.
ValueAxis1Begin
Description
No access in runtime.
ValueAxis1End
Description
No access in runtime.
ValueAxis1LabelLength
Description
No access in runtime.
ValueAxis1Style
Description
No access in runtime.
ValueAxis2AutoRange
Description
No access in runtime.
ValueAxis2Begin
Description
No access in runtime.
ValueAxis2End
Description
No access in runtime.
ValueAxis2LabelLength
Description
No access in runtime.
ValueAxis2Style
Description
No access in runtime.
ValueAxisAdd
Description
Creates a new value axis. The newly created value axis is automatically referenced with
"ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Required. A value or a constant that specifies the name of the new value axis with
"ValueAxisName".
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisAlignment
Description
Specifies the alignment of the value axis referenced with "ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisAlignment[=AxisAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
AxisAlignment
Optional. A value or a constant that specifies the alignment of the value axis.
See also
OnlineTrendControl (Page 359)
ValueAxisAutoPrecisions
Description
Specifies whether the number of decimal places for a value axis referenced with
"ValueAxisIndex" is set automatically.
Access in runtime Read and write
Syntax
Object.ValueAxisAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "ValueAxisPrecisions" is used.
See also
ValueAxisPrecisions (Page 1179)
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisAutoRange
Description
Specifies whether the value range of a value axis referenced with "ValueAxisIndex" is calculated
automatically.
Access in runtime Read and write
Syntax
Object.ValueAxisAutoRange[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the value range is calculated automatically.
FALSE if the value range is specified with "ValueAxisBeginValue" and "ValueAxisEndValue".
See also
ValueAxisBeginValue (Page 1173)
ValueAxisEndValue (Page 1175)
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisBeginValue
Description
Specifies the lower end of the value range of a value axis referenced with "ValueAxisIndex".
Also set "ValueAxisAutoRange" to "FALSE".
Access in runtime Read and write
Syntax
Object.ValueAxisBeginValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the low limit of the value range of the
referenced value axis.
See also
ValueAxisIndex (Page 1176)
ValueAxisAutoRange (Page 1173)
OnlineTrendControl (Page 359)
ValueAxisColor
Description
Specifies the color of a value axis referenced with "ValueAxisIndex". This property is only
evaluated if the "ValueAxisInTrendColor (Page 1177)" property is set to "FALSE".
Access in runtime Read and write
Syntax
Object.ValueAxisColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Color
Optional. A value or a constant that specifies the color of the value axis.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTrendControl (Page 359)
ValueAxisCount
Description
Specifies the number of configured value axes.
Access in runtime Read and write
Syntax
Object.ValueAxisCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the number of configured value axes.
See also
OnlineTrendControl (Page 359)
ValueAxisEndValue
Description
Specifies the upper end of the value range of a value axis referenced with "ValueAxisIndex".
Also set "ValueAxisAutoRange" to "FALSE".
Access in runtime Read and write
Syntax
Object.ValueAxisEndValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
DOUBLE
Optional. A value or a constant that specifies the high limit of the value range of the
referenced value axis.
See also
ValueAxisIndex (Page 1176)
ValueAxisAutoRange (Page 1173)
OnlineTrendControl (Page 359)
ValueAxisExponentialFormat
Description
Specifies whether the values of a value axis referenced with "ValueAxisIndex" are displayed in
exponential notation.
Access in runtime Read and write
Syntax
Object.ValueAxisExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the values are displayed in exponential notation.
FALSE if the values are not displayed in exponential notation.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisIndex
Description
References a value axis. To access the properties of a value axis, you need to set
""ValueAxisIndex"".
Values between 0 and "ValueAxisCount" minus 1 are valid for "ValueAxisIndex". The
"ValueAxisCount" property specifies the number of configured value axes.
Access in runtime Read and write
Syntax
Object.ValueAxisIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the value axis to be edited.
See also
ValueAxisCount (Page 1175)
OnlineTrendControl (Page 359)
ValueAxisInTrendColor
Description
Specifies whether the color of the axis referenced with "ValueAxisIndex" corresponds to the
trend color.
Access in runtime Read and write
Syntax
Object.ValueAxisInTrendColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the referenced axis is shown in the trend color. The value of "ValueAxisColor" is not
effective.
FALSE if the referenced axis is shown in the color specified in "ValueAxisColor".
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisLabel
Description
Defines the label text for a value axis referenced with "ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisLabel[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the label text for the referenced value axis.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisName
Description
Specifies the name of a value axis referenced with "ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced value axis.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisPrecisions
Description
Specifies the number of decimal places for the label of the value axis referenced with
"ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int16
Optional. A value or a constant that specifies the number of decimal places.
See also
OnlineTrendControl (Page 359)
ValueAxisRemove
Description
Removes a value axis referenced with its name.
Access in runtime Read and write
Syntax
Object.ValueAxisRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced value axis to be
removed.
See also
OnlineTrendControl (Page 359)
ValueAxisRename
Description
Specifies the new name of a value axis referenced with "ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the new name of the value axis.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisRepos
Description
Specifies the position of a value axis referenced with "ValueAxisIndex".
If you have changed the position of the value axis with "ValueAxisRepos", "ValueAxisIndex" is
assigned the value of "ValueAxisRepos".
Access in runtime Read and write
Syntax
Object.ValueAxisRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced value axis. Value
range from 0 to "ValueAxisCount" minus 1. Values outside this range have no effect.
0: The referenced value axis is positioned outside.
See also
ValueAxisIndex (Page 1176)
ValueAxisCount (Page 1175)
OnlineTrendControl (Page 359)
ValueAxisScalingType
Description
Specifies the type of scaling for the value axis referenced with "ValueAxisIndex".
Access in runtime Read and write
Syntax
Object.ValueAxisScalingType[=AxisScalingType]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
AxisScalingType
Optional. A value or a constant that specifies the type of scaling for the referenced value axis.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisTrendWindow
Description
Specifies the trend diagram in which the axis referenced with "ValueAxisIndex" is displayed.
Access in runtime Read and write
Syntax
Object.ValueAxisTrendWindow[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
STRING
Optional. A value or a constant that specifies the name of the trend diagram.
See also
TrendWindowCount (Page 1127)
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueAxisVisible
Description
Specifies whether the value axis referenced with "ValueAxisIndex" is displayed in the object.
Access in runtime Read and write
Syntax
Object.ValueAxisVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTrendControl
BOOLEAN
Optional.
TRUE if the referenced value axis is displayed.
FALSE if the referenced value axis is not displayed.
See also
ValueAxisIndex (Page 1176)
OnlineTrendControl (Page 359)
ValueCaption
Description
No access in runtime.
ValueColumnAdd
Description
Creates a new value column. The newly created value column is automatically referenced with
"ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Required. A value or a constant that specifies the name of the new value column with
"ValueColumnName".
See also
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnAlignment
Description
Specifies how the text in the value column referenced with "ValueColumnIndex" is aligned.
Access in runtime Read and write
Syntax
Object.ValueColumnAlignment[=HorizontalAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
HorizontalAlignment
Optional. A value or a constant that specifies how the text in the referenced value column is
aligned.
See also
OnlineTableControl (Page 347)
ValueColumnAutoPrecisions
Description
Specifies whether the number of decimal places for a value axis referenced with
"ValueColumnIndex" is set automatically.
Access in runtime Read and write
Syntax
Object.ValueColumnAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "ValueColumnPrecisions" is used.
See also
ValueColumnPrecisions (Page 1190)
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnBackColor
Description
Specifies the background color of the value column referenced with "ValueColumnIndex".
Also set "UseColumnBackColor (Page 1146)" to "TRUE".
Access in runtime Read and write
Syntax
Object.ValueColumnBackColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Color
Optional. A value or a constant that specifies the background color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTableControl (Page 347)
ValueColumnCaption
Description
Specifies the name of the value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnCaption[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the name of the value column.
See also
OnlineTableControl (Page 347)
ValueColumnCount
Description
Specifies the number of configured value columns.
Access in runtime Read and write
Syntax
Object.ValueColumnCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the number of configured value columns.
See also
OnlineTableControl (Page 347)
ValueColumnExponentialFormat
Description
Specifies whether the values of a value column referenced with "ValueColumnIndex" are
displayed in exponential notation.
Access in runtime Read and write
Syntax
Object.ValueColumnExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the values are displayed in exponential notation.
FALSE if the values are not displayed in exponential notation.
See also
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnForeColor
Description
Specifies the font color of the value column referenced with "ValueColumnIndex".
Also set "UseColumnForeColor (Page 1147)" to "TRUE".
Access in runtime Read and write
Syntax
Object.ValueColumnForeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Color
Optional. A value or a constant which specifies the font color.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
OnlineTableControl (Page 347)
ValueColumnHideText
Description
Specifies whether the text in the value column referenced with "ValueColumnIndex" is hidden.
Access in runtime Read and write
Syntax
Object.ValueColumnHideText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if the text in the value column is hidden.
FALSE, if the text in the value column is displayed.
See also
OnlineTableControl (Page 347)
ValueColumnHideTitleText
Description
Specifies whether the text in the header of the value column referenced with
"ValueColumnIndex" is hidden.
Access in runtime Read and write
Syntax
Object.ValueColumnHideTitleText[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if the text in the header of the value column is hidden.
FALSE, if the text in the header of the value column is displayed.
See also
OnlineTableControl (Page 347)
ValueColumnIndex
Description
References a value column. To access the properties of a value column, you need to set
""ValueColumnIndex"".
Values between 0 and "ValueColumnCount" minus 1 are valid for "ValueColumnIndex". The
"ValueColumnCount" property specifies the number of configured value columns.
Access in runtime Read and write
Syntax
Object.ValueColumnIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies, with the index, the value column to be edited.
See also
ValueColumnCount (Page 1186)
OnlineTableControl (Page 347)
ValueColumnLength
Description
Specifies the width in characters of the value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnLength[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the number of characters displayed.
See also
OnlineTableControl (Page 347)
ValueColumnName
Description
Specifies the name of a value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the name of the referenced value column.
See also
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnPrecisions
Description
Specifies the number of decimal places for values in the value column referenced with
"ValueColumnIndex".
Syntax
Object.ValueColumnPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int16
Optional. A value or constant that specifies the number of decimal places.
See also
OnlineTableControl (Page 347)
ValueColumnProvider
Description
Specifies the data source for the value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnProvider[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the data supply of a value column.
Value Description
Logging tags Data source with archive tags of a process value archive.
Tags Data supply with online
tags from tag management.
See also
OnlineTableControl (Page 347)
ValueColumnProviderCLSID
Description
Specifies the provider CLSID of the data for a value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnProviderCLSID[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the provider CLSID.
Value Description
{416A09D2-8B5A-11D2-8B81-006097A Data source with archive tags of a process value archive.
45D48}
{A3F69593-8AB0-11D2- Data supply with online
A440-00A0C9DBB64E} tags from tag management.
See also
OnlineTableControl (Page 347)
ValueColumnRemove
Description
Removes a value column referenced with its name.
Access in runtime Read and write
Syntax
Object.ValueColumnRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the name of the referenced value column to be
removed.
See also
OnlineTableControl (Page 347)
ValueColumnRename
Description
Specifies the new name of a value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the new name of the value column.
See also
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnRepos
Description
Specifies the position of a value column referenced with "ValueColumnIndex".
If you have changed the position of the value column with "ValueColumnRepos",
"ValueColumnIndex" is assigned the value of "ValueColumnRepos".
Access in runtime Read and write
Syntax
Object.ValueColumnRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the position of the referenced value column.
Value range from 0 to "ValueColumnCount" minus 1. Values outside this range have no effect.
0: The referenced value column is positioned on the left.
See also
ValueColumnIndex (Page 1189)
ValueColumnCount (Page 1186)
OnlineTableControl (Page 347)
ValueColumns
Description
No access in runtime.
ValueColumnSelectTagName
Description
Specifies that the dialog for selecting the tag name of the data source for the value column
referenced with "ValueColumnIndex" is displayed in Runtime initial.
Access in runtime Read and write
Syntax
Object.ValueColumnSelectTagName[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if the dialog for selecting the tag name for the data source of the value column is
displayed in the screen.
FALSE, if no dialog for selecting the tag name for the data source of the value column is
displayed in the screen.
See also
OnlineTableControl (Page 347)
ValueColumnShowIcon
Description
Specifies whether an icon is displayed in the value column referenced with
"ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnShowIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if an icon is shown.
FALSE, if no icon is shown.
See also
OnlineTableControl (Page 347)
ValueColumnShowTitleIcon
Description
Specifies whether an icon is displayed in the header of the value column referenced with
"ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnShowTitleIcon[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE, if an icon is shown in the title of the current column.
FALSE, if no icon is shown in the title of the current column.
See also
OnlineTableControl (Page 347)
ValueColumnSort
Description
Specifies the type of sorting for the value column referenced with "ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnSort[=SortMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
SortMode
Optional. A value or a constant that specifies the type of sorting in the current column.
See also
OnlineTableControl (Page 347)
ValueColumnSortIndex
Description
Specifies the sorting order.
Access in runtime: Read and write
Syntax
Object.ValueColumnSortIndex[=Int32]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTableControl
Int32
Optional. A value or a constant that specifies the order when sorting.
See also
OnlineTableControl (Page 347)
ValueColumnTagName
Description
Specifies the names of the tags whose values are displayed in the value column referenced with
"ValueColumnIndex".
Access in runtime Read and write
Syntax
Object.ValueColumnTagName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the name of the tag whose values are displayed
in the current column.
See also
OnlineTableControl (Page 347)
ValueColumnTimeColumn
Description
Specifies the associated time column.
Access in runtime: Read and write
Syntax
Object.ValueColumnTimeColumn[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• OnlineTableControl
STRING
Optional. A value or a constant that specifies the associated time column.
See also
OnlineTableControl (Page 347)
ValueColumnVisible
Description
Specifies whether the value column referenced with "ValueColumnIndex" is displayed in the
object.
Access in runtime Read and write
Syntax
Object.ValueColumnVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• OnlineTableControl
BOOLEAN
Optional.
TRUE if the referenced value column is displayed.
FALSE if the referenced value column is not displayed.
See also
ValueColumnIndex (Page 1189)
OnlineTableControl (Page 347)
ValueColumnWidth
Description
No access in runtime.
ValueTableHeight
Description
No access in runtime.
ValueTableLeft
Description
No access in runtime.
ValueTableTop
Description
No access in runtime.
ValueTableWidth
Description
No access in runtime.
ValueY1HlpLine
Description
No access in runtime.
ValueY2HlpLine
Description
No access in runtime.
VerticalAlignment
Description
Specifies the vertical alignment of the text in the specified object.
Access in runtime: Read and write
Syntax
Object.VerticalAlignment[=VerticalAlignment]
Object
Required. An object of the type "ScreenItem" with the format:
• Button
• CheckBox
• DateTimeField
• IOField
• OptionGroup
• RoundButton *
• Switch *
• SymbolicIOField **
• TextField
* Read access only
** RT Professional, read access only
VerticalAlignment
Optional. A value that specifies the vertical alignment.
See also
Button (Page 267)
DateTimeField (Page 296)
IOField (Page 332)
OptionGroup (Page 371)
RoundButton (Page 398)
Switch (Page 418)
VerticalGridLines
Description
Specifies whether vertical separation lines are displayed.
Access in runtime Read and write
Syntax
Object.VerticalGridLines[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• AlarmControl
• OnlineTableControl
• TrendRulerControl
• UserArchiveControl
BOOLEAN
Optional.
TRUE if vertical separation lines are displayed.
FALSE if vertical separation lines are not displayed.
See also
AlarmControl (Page 237)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
VerticalPictureAlignment
Description
No access in runtime.
VerticalScrollBarEnabled
Description
No access in runtime.
VerticalScrollbarPosition
Description
Specifies the position of the slider in the object's vertical scroll bar. The screen is displayed in the
screen window with the vertical shift of the scroll bar's slider.
To display the screen as a cutout where the scroll bars are located at the left and top edge
of the screen, use the LeftOffset (Page 775)" and "LeftOffset (Page 775)" properties as the
source of this cutout.
Access in Runtime: Read and write
Syntax
Object.VerticalScrollBarPosition[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• Screenwindow
Int32
Optional. A value or a constant that specifies the vertical position of the slider in the object's
scroll bar.
See also
TopOffset (Page 1085)
ScreenWindow (Page 404)
VerticalScrolling
Description
No access in runtime.
VerticalScrollingEnabled
Description
No access in runtime.
ViewOnly
Description
Specifies whether the Sm@rtClient display will be used for remote monitoring or remote
maintenance.
Remote maintenance means that settings can be changed on the monitored device.
Remote monitoring means that settings of the monitored device cannot be changed.
Access in runtime: Read and write
Syntax
Object.ViewOnly[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• SmartClientView
BOOLEAN
Optional TRUE, if the Sm@rtClient display is to be used only for remote monitoring.
See also
SmartClientView (Page 412)
ViewType
Description
No access in runtime.
ViewTypeForSaveStream
Description
Access in Runtime:
• RT Advanced: Read
• RT Professional: No access
Syntax
Object.ViewTimeForSaveStream[=[!]: AlarmViewBasicMode | Int16 | PasswordViewType]
Object
Required. An object of the type "ScreenItem" with the format:
• RecipeView
You have no access in runtime with the following format:
• AlarmView
• UserView
Visible
Description
Specifies whether the selected object is visible.
Access in runtime: Read and write
Syntax
Object.Visible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem"" with the format:
• AlarmControl
• AlarmView
• ApplicationWindow
• Bar
• BatteryView
• Button
• ChannelDiagnose
• CheckBox
• CircleSegment
• CircularArc
• ComboBox
• Connector
• DateTimeField
• DiscSpaceView
• EllipseSegment
• EllipticalArc
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• ListBox
• MediaPlayer
• MultiLineEdit
• OnlineTableControl
• OnlineTrendControl
• OptionGroup
• PLCCodeViewer
• ProDiagOverview
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView
• RoundButton
• S7GraphOverview
• ScreenWindow
• SmartClientView
• StatusForce
• Switch
• SymbolLibrary
• SymbolicIOField
• SysDiagControl
• TrendRulerControl
• TrendView
• TubeArcObject
• TubeDoubleTeeObject
• TubeTeeObject
• Tubepolyline
• UserArchiveControl
• WLanQualityView
• WindowSlider
• ZoneLabelView
• ZoneQualityView
You have no access in runtime with the following format:
• PdfView
BOOLEAN
Optional. TRUE, if the object is visible.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
ApplicationWindow (Page 257)
Bar (Page 259)
BatteryView (Page 265)
Button (Page 267)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
ComboBox (Page 290)
DateTimeField (Page 296)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
FunctionTrendControl (Page 309)
VisibleItems
Description
No access in runtime.
Warning
Description
Specifies the percentage of used memory space as of which a warning is to be generated.
Access in runtime: Read
Syntax
Object.Warning[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• DiskSpaceView
Int32
Optional. A value or a constant that specifies the percentage of used storage space as of
which a warning is generated.
See also
DiskSpaceView (Page 298)
WarningColor
Description
Specifies the color in which the bar of the memory space view will be shown as soon as the
warning level is reached.
Access in runtime Read
Syntax
Object.WarningColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• DiskSpaceView
Color
Optional. A value or a constant that specifies the color in which the bar of the storage space
display will be shown as soon as the warning area is exceeded.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
DiskSpaceView (Page 298)
WarningLowerLimit
Description
Specifies the lower limit for "WarningLowerLimit".
The "WarningLowerLimitEnable" property must have the value "TRUE" for the limit to be
monitored.
Access in runtime: Read and write
Syntax
Object.WarningLowerLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the lower limit for "WarningLowerLimit".
Comments
The following values will be specified with the properties "WarningLowerLimitColor" and
"WarningLowerLimitRelative":
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
WarningLowerLimitColor
Description
Specifies the color for the low limit "WarningLowerLimit".
The "WarningLowerLimitEnable" property must have the value "TRUE" if the bar color is to
change when the limit is reached.
Access in runtime Read and write
Syntax
Object.WarningLowerLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the lower limit
"WarningLowerLimit".
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
The following values are defined with the "WarningUpperLimit", "WarningUpperLimitColor"
and "WarningUpperLimitRelative" properties:
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
WarningLowerLimitEnabled
Description
Specifies whether the "WarningLowerLimit" limit is to be monitored.
Access in runtime: Read and write
Syntax
Object.WarningLowerLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional TRUE, if the "WarningLowerLimit" limit is monitored.
Comments
The following values will be defined via the properties "WarningLowerLimit",
"WarningLowerLimitColor" and "WarningLowerLimitRelative":
• Limit
• Representation upon reaching the limit
• Type of evaluation
See also
Bar (Page 259)
WarningLowerLimitRelative
Description
Specifies whether the low limit "WarningLowerLimit" is evaluated as a percentage or as an
absolute value.
Access in runtime Read and write
Syntax
Object.WarningLowerLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional.
TRUE if the low limit "WarningLowerLimit" is to be evaluated as a percentage.
FALSE if the low limit "WarningLowerLimit" is to be evaluated as an absolute value.
See also
Bar (Page 259)
WarningRangeColor
Description
Specifies the color of the warning range on the scale of the "Gauge" object.
The "WarningRangeVisible" property must have the value TRUE so that the warning range is
displayed.
Access in runtime Read and write
Syntax
Object.WarningRangeColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Gauge
Color
Optional. A value or a constant that specifies the color of the warning range.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Gauge (Page 320)
WarningRangeStart
Description
Specifies at which scale value the warning range of the "Gauge" object will start.
The "WarningRangeVisible" property must have the value TRUE so that the warning range is
displayed.
Access in runtime: Read and write
Syntax
Object.WarningRangeStart[=SINGLE]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
SINGLE
Optional A value or a constant that contains the scale value for the start of the warning
range.
Comments
The range extends from the value "Warning" through to the value "Danger". If no range is
activated for "Danger", the range for "Warning" extends to the end of the scale.
See also
Gauge (Page 320)
WarningRangeVisible
Description
Specifies whether the warning range in the scale of the "Gauge" object will be displayed.
Access in runtime: Read and write
Syntax
Object.WarningRangeVisible[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Gauge
BOOLEAN
Optional TRUE, if the warning range will be displayed in the scale.
Comments
Specifies the color of the warning range with the "WarningRangeColor" property.
Specifies the start of the warning range with the "WarningRangeStart" property.
See also
Gauge (Page 320)
WarningUpperLimit
Description
Specifies the upper warning limit.
The "WarningUpperLimitEnabled"" property must have the value TRUE so that the limit is
monitored.
Access in runtime: Read and write
Syntax
Object.WarningUpperLimit[=DOUBLE]
Object
Required. A "ScreenItem" object with the following format:
• Bar
DOUBLE
Optional A value or a constant that specifies the higher limit.
Comments
"WarningUpperLimitColor" defines the display for when the limit is reached.
"WarningUpperLimitRelative" specifies the type of evaluation.
See also
Bar (Page 259)
WarningUpperLimitColor
Description
Specifies the color for the high warning limit.
The ""WarningUpperLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.WarningUpperLimitColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
Color
Optional. A value or a constant that specifies the color for the higher limit.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
Bar (Page 259)
WarningUpperLimitEnabled
Description
Specifies whether the higher limit is to be monitored.
Access in runtime:
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.WarningUpperLimitEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• Bar
BOOLEAN
Optional. TRUE, if the higher limit is monitored.
WarningUpperLimitRelative
Description
Specifies whether the high limit "WarningUpperLimit" is to be evaluated as a percentage or as an
absolute value.
Access in runtime Read and write
Syntax
Object.WarningUpperLimitRelative[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Bar
BOOLEAN
Optional. TRUE if the low limit "WarningUpperLimit" is to be evaluated as a percentage.
See also
Bar (Page 259)
Width
Description
Specifies the width of the object in pixels.
Access in runtime: Read and write
You have read-only access in "Runtime Advanced" and "Panel Runtime" with the following
formats:
• AlarmView
• Bar
• BatteryView
• Button
• CameraControl
• Clock
• DateTimeField
• FunctionTrendControl
• Gauge
• GraphicIOField
• GraphicView
• HTMLBrowser
• IOField
• Line
• MediaPlayer
• PDFView
• PLCCodeViewer
• Polygon
• Polyline
• ProDiagOverview
• ProtectedAreaNameView
• RangeLabelView
• RangeQualityView
• RecipeView
• S7GraphOverview
• Slider
• SmartClientView
• StatusForce
• Switch
• SymbolicIOField
• SymbolLibrary
• SysDiagControl
• TextField
• TrendView
• UserView
• WLanQualityView
• ZoneLabelView
• ZoneQualityView
Syntax
Object.Width[=Int32]
Object
Required. An object of the type "ScreenItem". This property is a standard property of the
ScreenItem object and is therefore available for all formats.
Int32
Optional. A value or a constant that specifies the width of the object in pixels.
See also
AlarmControl (Page 237)
AlarmView (Page 251)
ApplicationWindow (Page 257)
Bar (Page 259)
BatteryView (Page 265)
Button (Page 267)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
WindowCloseEnabled
Description
Indicates whether a window can be closed in runtime.
Access in runtime: Read and write
Syntax
Object.WindowCloseEnabled[=BOOLEAN]
Object
Required. A "ScreenItem" object with the following format:
• ApplicationWindow
• ScreenWindow
BOOLEAN
Optional. TRUE, if the window can be closed in runtime.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
WindowMaximizeEnabled
Description
Returns whether the object can be maximized in runtime.
Access in runtime Read and write
Syntax
Object.WindowMaximizeEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
• Screenwindow
BOOLEAN
Optional.
TRUE if the object can be maximized in runtime.
FALSE if the object cannot be maximized in runtime.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
WindowMovingEnabled
Description
Returns whether the object can be moved in runtime.
Access in runtime: Read and write
Syntax
Object.WindowMovingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
• Screenwindow
BOOLEAN
Optional.
TRUE if the object can be moved in runtime.
FALSE if the object cannot be moved in runtime.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
WindowOnTop
Description
Returns whether the object always remains in the foreground in runtime.
Access in runtime: Read and write
Syntax
Object.WindowOnTop[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
• Screenwindow
BOOLEAN
Optional.
TRUE if the object is always in the foreground in runtime.
FALSE if the object is not always in the foreground in runtime.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
WindowsContents
Description
Returns the content of the print job or script diagnostics.
Access in runtime Read and write
Syntax
Object.WindowsContents[=WindowContent]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
WindowContent
Optional. A value or a constant that returns the content displayed in the object.
Designation Description
Function An application of the global script is displayed. The templates used for this are defined in the
"Template (Page 999)" property:
• GSC diagnostics
The results of the diagnostics system are displayed.
• GSC Runtime
The analysis results on characteristics in runtime are displayed.
Print jobs A report is displayed.
The templates used for this are specified in the "Template (Page 999)" property:
See also
ApplicationWindow (Page 257)
WindowSizingEnabled
Description
Indicates whether the size can be changed.
Access in runtime Read and write
Syntax
Object.WindowSizingEnabled[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• ApplicationWindow
• ScreenWindow
BOOLEAN
Optional. TRUE, if the size can be changed.
See also
ApplicationWindow (Page 257)
ScreenWindow (Page 404)
WindowsStyle
Description
Specifies whether the object is displayed in the general Windows style.
Access in runtime:
• RT Advanced: NoAccess
• RT Professional: Read and write
Syntax
Object.WindowsStyle[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• Button
• WindowSlider
You have no access in runtime with the following format:
• Switch
BOOLEAN
Optional. TRUE, if the object will be displayed in the general Windows style.
See also
Button (Page 267)
WindowSlider (Page 482)
Switch (Page 418)
WindowStartupPosition
Description
Returns the position and the mode of the screen window when an independent screen window
is configured. Set "IndipendentWindow (Page 742)" to "TRUE".
Access in runtime: Read and write
Syntax
Object.WindowsStartupPosition[=PositionMode]
Object
Required. An object of the type "ScreenItem" with the following format:
• ScreenWindow
PositionMode
Optional. A value or a constant that returns the position and the mode of the screen window.
Designation Description
Maximized The screen window is adjusted to the monitor size.
As configured The screen window is displayed in the configured size and at the configured
position.
Centered The screen window is displayed in the configured size in a central position.
See also
ScreenWindow (Page 404)
XAxes
Description
No access in runtime.
XAxisAdd
Description
Creates a new X-axis. The newly created X-axis is automatically referenced with "XAxisIndex".
Access in runtime: Read and write
Syntax
Object.XAxisAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the format:
• FunctionTrendControl
STRING
Required. A value or a constant that specifies the name of the new X-axis with "XAxisName".
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisAlignment
Description
Specifies the alignment of the X-axis referenced with "XAxisIndex".
Access in runtime Read and write
Syntax
Object.XAxisAlignment[=AxisAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
AxisAlignment
Optional. A value or a constant that specifies the alignment of the X-axis in relation to the
trend window:
Value Designation
0 Left
1 Right
See also
FunctionTrendControl (Page 309)
XAxisAutoPrecisions
Description
Specifies whether the number of decimal places for an X-axis referenced with "XAxisIndex" is set
automatically.
Access in runtime Read and write
Syntax
Object.XAxisAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "XAxisPrecisions" is used.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisAutoRange
Description
Specifies whether the value range of an X-axis referenced with "XAxisIndex" is calculated
automatically.
Access in runtime Read and write
Syntax
Object.XAxisAutoRange[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the value range is calculated automatically.
FALSE if the value range is specified with "XAxisBeginValue" and "XAxisEndValue".
See also
XAxisIndex (Page 1231)
XAxisEndValue (Page 1230)
XAxisBeginValue
Description
Specifies the lower end of the value range of an X-axis referenced with "XAxisIndex".
Also set "XAxisAutoRange" to "FALSE".
Access in runtime Read and write
Syntax
Object.XAxisBeginValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DOUBLE
Optional. A value or a constant that specifies the low limit of the value range of the
referenced X-axis.
See also
XAxisAutoRange (Page 1227)
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisColor
Description
Specifies the color of an X-axis referenced with "XAxisIndex".
Also set "XAxisInTrendColor" to "FALSE".
Access in runtime Read and write
Syntax
Object.XAxisColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Color
Optional. A value or a constant that specifies the color of the referenced axis.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
FunctionTrendControl (Page 309)
XAxisCount
Description
Specifies the number of configured X-axes.
Access in runtime: Read and write
Syntax
Object.XAxisCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the number of configured X-axes.
See also
FunctionTrendControl (Page 309)
XAxisEndValue
Description
Specifies the upper end of the value range of an X-axis referenced with "XAxisIndex".
Also set "XAxisAutoRange" to "FALSE".
Access in runtime Read and write
Syntax
Object.XAxisEndValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DOUBLE
Optional. A value or a constant that specifies the high limit of the value range of the
referenced X-axis.
See also
XAxisAutoRange (Page 1227)
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisExponentialFormat
Description
Specifies whether the values of an X-axis referenced with "XAxisIndex" are displayed in
exponential notation.
Access in runtime Read and write
Syntax
Object.XAxisExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisIndex
Description
References an X-axis. To access the properties of an X-axis, you need to set ""YAxisIndex"".
Values between 0 and "XAxisCount" minus 1 are valid for "XAxisIndex". The "XAxisCount"
property specifies the number of configured X-axes.
Access in runtime Read and write
Syntax
Object.XAxisIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the X-axis to be edited.
See also
XAxisCount (Page 1229)
FunctionTrendControl (Page 309)
XAxisInTrendColor
Description
Specifies whether the color of the axis referenced with "XAxisIndex" corresponds to the trend
color.
Access in runtime Read and write
Syntax
Object.XAxisInTrendColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the referenced axis is shown in the trend color. The value of "XAxisColor" is not
effective.
FALSE if the referenced axis is shown in the color specified in "XAxisColor".
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisLabel
Description
Specifies the label text for an X-axis referenced with "XAxisIndex".
Access in runtime Read and write
Syntax
Object.XAxisLabel[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the label text for the referenced X-axis.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisName
Description
Specifies the name of an X-axis referenced with "XAxisIndex".
Access in runtime Read and write
Syntax
Object.XAxisName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced X-axis.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisPrecisions
Description
Specifies the number of decimal places to be displayed for the values of an X-axis referenced with
"XAxisIndex".
Also set "XAxisAutoPrecisions" to "FALSE".
Access in runtime Read and write
Syntax
Object.XAxisPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int16
Optional. A value or a constant that specifies the number of decimal places.
See also
FunctionTrendControl (Page 309)
XAxisRemove
Description
Removes an X-axis referenced with its name.
Access in runtime Read and write
Syntax
Object.XAxisRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced X-axis to be
removed.
See also
FunctionTrendControl (Page 309)
XAxisRename
Description
Specifies the new name of an X-axis referenced with "XAxisIndex".
Access in runtime Read and write
Syntax
Object.XAxisRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the new name of the X-axis.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisRepos
Description
For multiple X-axes, specifies the position of an X-axis referenced with "XAxisIndex".
If you have changed the position of the X-axis with "XAxisRepos", "XAxisIndex" is assigned the
value of "XAxisRepos".
Access in runtime Read and write
Syntax
Object.XAxisRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced X-axis. Value
range from 0 to "XAxisCount" minus 1. Values outside this range have no effect.
0: The referenced X-axis is positioned outside.
See also
XAxisIndex (Page 1231)
XAxisCount (Page 1229)
FunctionTrendControl (Page 309)
XAxisScalingType
Description
Specifies the type of scaling for the X-axis referenced with "XAxisIndex".
Access in runtime Read and write
Syntax
Object.XAxisScalingType[=AxisScalingType]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
AxisScalingType
Optional. A value or a constant that specifies the type of scaling of the referenced X axis.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisTrendWindow
Description
Specifies the trend diagram in which the axis referenced with "XAxisIndex" is displayed.
Access in runtime Read and write
Syntax
Object.XAxisTrendWindow[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the trend diagram.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
XAxisVisible
Description
Specifies whether the X-axis referenced with "XAxisIndex" is displayed in the object.
Access in runtime Read and write
Syntax
Object.XAxisVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE, if the referenced X axis is displayed.
FALSE, if the referenced X axis is not displayed.
See also
XAxisIndex (Page 1231)
FunctionTrendControl (Page 309)
YAxes
Description
No access in runtime.
YAxisAdd
Description
Creates a new Y-axis. The newly created Y-axis is automatically referenced with "YAxisIndex".
Access in runtime: Read and write
Syntax
Object.YAxisAdd[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Required. A value or a constant that specifies the name of the new Y-axis with "YAxisName".
See also
YAxisIndex (Page 1243)
FunctionTrendControl (Page 309)
YAxisAlignment
Description
Specifies the alignment of the Y-axis referenced with "YAxisIndex".
Access in runtime Read and write
Syntax
Object.YAxisAlignment[=AxisAlignment]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
AxisAlignment
Optional. A value or a constant that specifies the alignment of the Y-axis with regard to the
trend window:
Value Designation
0 Left
1 Right
See also
FunctionTrendControl (Page 309)
YAxisAutoPrecisions
Description
Specifies whether the number of decimal places is specified automatically for a Y-axis referenced
with "YAxisIndex".
Access in runtime Read and write
Syntax
Object.YAxisAutoPrecisions[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the number of decimal places is automatically determined.
FALSE if the value of "YAxisPrecisions" is used.
See also
FunctionTrendControl (Page 309)
YAxisAutoRange
Description
Specifies whether the value range of a Y-axis referenced with "YAxisIndex" is calculated
automatically.
Access in runtime Read and write
Syntax
Object.YAxisAutoRange[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the value range is calculated automatically.
See also
FunctionTrendControl (Page 309)
YAxisBeginValue
Description
Specifies the lower end of the value range of a Y-axis referenced with "YAxisIndex".
Also set "YAxisAutoRange" to "FALSE".
Access in runtime: Read and write
Syntax
Object.YAxisBeginValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DOUBLE
Optional. A value or a constant that specifies the low limit of the value range of the
referenced Y-axis.
See also
FunctionTrendControl (Page 309)
YAxisColor
Description
Specifies the color of a Y-axis referenced with "YAxisIndex".
Also set "YAxisInTrendColor" to "FALSE".
Access in runtime Read and write
Syntax
Object.YAxisColor[=Color]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Color
Optional. A value or a constant that specifies the color of the referenced axis.
Comments
You use the "RGB" function to specify the color in RGB format (red, green, blue). To do this, enter
the appropriate decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this:
RGB (255, 0, 0)
You can also use the VBS color constants such as vbRed and vbGreen.
See also
FunctionTrendControl (Page 309)
YAxisCount
Description
Specifies the number of configured Y-axes.
Access in runtime Read and write
Syntax
Object.YAxisCount[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the number of configured Y-axes.
See also
FunctionTrendControl (Page 309)
YAxisEndValue
Description
Specifies the upper end of the value range of a Y-axis referenced with "YAxisIndex".
Also set "YAxisAutoRange" to "FALSE".
Access in runtime Read and write
Syntax
Object.YAxisEndValue[=DOUBLE]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
DOUBLE
Optional. A value or a constant that specifies the high limit of the value range of the
referenced Y-axis.
See also
FunctionTrendControl (Page 309)
YAxisExponentialFormat
Description
Specifies whether the values of a Y-axis referenced with "YAxisIndex" are displayed in
exponential notation.
Access in runtime Read and write
Syntax
Object.YAxisExponentialFormat[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the values are displayed in exponential notation.
FALSE if the values are not displayed in exponential notation.
See also
FunctionTrendControl (Page 309)
YAxisIndex
Description
References a Y-axis. To access the properties of a Y-axis, you need to set ""YAxisIndex"".
Values between 0 and "YAxisCount" minus 1 are valid for "YAxisIndex". The "YAxisCount"
property specifies the number of configured Y-axes.
Access in runtime Read and write
Syntax
Object.YAxisIndex[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies, with the index, the Y-axis to be edited.
See also
FunctionTrendControl (Page 309)
YAxisInTrendColor
Description
Specifies whether the color of the axis referenced with "YAxisIndex" corresponds to the trend
color.
Access in runtime Read and write
Syntax
Object.YAxisInTrendColor[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE if the referenced axis is shown in the trend color. The value of "YAxisColor" is not
effective.
FALSE if the referenced axis is shown in the color specified in "YAxisColor".
See also
YAxisIndex (Page 1243)
FunctionTrendControl (Page 309)
YAxisLabel
Description
Specifies the label text for a Y-axis referenced with "YAxisIndex".
Access in runtime Read and write
Syntax
Object.YAxisLabel[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the label text for the referenced Y-axis.
See also
FunctionTrendControl (Page 309)
YAxisName
Description
Specifies the name of a Y-axis referenced with "YAxisIndex".
Access in runtime Read and write
Syntax
Object.YAxisName[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced Y-axis.
See also
FunctionTrendControl (Page 309)
YAxisPrecisions
Description
Specifies the number of decimal places to be displayed for the values of a Y-axis referenced with
"YAxisIndex".
Also set "YAxisAutoPrecisions" to "FALSE".
Access in runtime Read and write
Syntax
Object.YAxisPrecisions[=Int16]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int16
Optional. A value or a constant that specifies the number of decimal places.
See also
FunctionTrendControl (Page 309)
YAxisRemove
Description
Removes a Y-axis referenced with its name.
Access in runtime Read and write
Syntax
Object.YAxisRemove[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the referenced Y-axis to be
removed.
See also
FunctionTrendControl (Page 309)
YAxisRename
Description
Specifies the new name of a Y-axis referenced with "YAxisIndex".
Access in runtime Read and write
Syntax
Object.YAxisRename[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the new name of the selected Y-axis.
See also
FunctionTrendControl (Page 309)
YAxisRepos
Description
For multiple Y-axes, specifies the position of a Y-axis referenced with "YAxisIndex".
If you have changed positioning of the Y-axis with "YAxisRepos", "YAxisIndex" receives the
value of "YAxisRepos".
Access in runtime
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.YAxisRepos[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
Int32
Optional. A value or a constant that specifies the position of the referenced Y-axis. Value
range from 0 to "YAxisCount" minus 1. Values outside this range have no effect.
0: The referenced Y-axis is positioned outside.
YAxisScalingType
Description
Specifies the type of scaling for the Y-axis referenced with "YAxisIndex".
Access in runtime
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.YAxisScalingType[=AxisScalingType]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
AxisScalingType
Optional. A value or a constant that specifies the type of scaling of the referenced Y axis.
YAxisTrendWindow
Description
Specifies the trend diagram in which the axis referenced with "YAxisIndex" is displayed.
Access in runtime
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.YAxisTrendWindow[=STRING]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
STRING
Optional. A value or a constant that specifies the name of the trend diagram.
YAxisVisible
Description
Specifies whether the Y-axis referenced with "YAxisIndex" is displayed in the object.
Access in runtime
• RT Advanced: Read
• RT Professional: Read and write
Syntax
Object.YAxisVisible[=BOOLEAN]
Object
Required. An object of the type "ScreenItem" with the following format:
• FunctionTrendControl
BOOLEAN
Optional.
TRUE, if the referenced Y axis is displayed.
FALSE, if the referenced Y axis is not displayed.
ZeroPoint
Description
Specifies the position of the zero point as a percentage of the bar height. The zero point can also
be located outside of the displayed area.
The "ScalingType" property must be set to "Auto".
The "ShowScale" property must be set to "TRUE".
Access in runtime: Read and write
Syntax
Object.ZeroPoint[=Int32]
Object
Required. A "ScreenItem" object with the following format:
• Bar
Int32
Optional A value or a constant that specifies the position of the zero point as a percentage of
the bar height.
See also
Bar (Page 259)
ZoomFactor
Description
Specifies the zoom factor of a screen or screen window.
Access in runtime Read and write
Syntax
Object.ZoomFactor[=Int32]
Object
Required. An object of the type "ScreenItem" with the following format:
• ScreenWindow
Int32
Optional. A value or a constant that specifies the zoom factor for displaying the embedded
graphic.
See also
ScreenWindow (Page 404)
1.5.6 Methods
Activate
Description
It only makes sense to use the Activate method with the following operable screen objects. An
error message is output at screen objects which cannot be operated, for example rectangles.
• IOField
• Switch
• SymbolLibrary
• TrendView
• FunctionTrendControl
• HTMLBrowser
• Slider
• GraphicIOField
• SymbolicIOField
• Button
• AlarmControl
• UserView
• UserArchiveControl
• SmartClientView
• StatusForce
In Runtime Advanced and Panels, the permanent area is activated when the method is
applied to a screen object. Use the "BaseScreenName" property to activate a screen that has
not been selected.
Syntax
Expression.Activate()
Expression
Required. An output which returns an object of the "Screen" or "ScreenItem" type.
Parameters
--
Example
Dim objO
Set objO = HMIRuntime.Screens("Screen_1").ScreenItems("IO-Field_1")
objO.Activate
See also
ScreenItem (Page 219)
Screen (Page 216)
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
Connector (Page 293)
DateTimeField (Page 296)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
Gauge (Page 320)
GraphicIOField (Page 324)
GraphicView (Page 327)
HTMLBrowser (Page 330)
IOField (Page 332)
Rectangle (Page 395)
ScriptDiagnostics (Page 406)
Switch (Page 418)
SymbolicIOField (Page 422)
SymbolLibrary (Page 427)
TextField (Page 438)
ActivateDynamic
Description
Dynamically activates a trigger and the specified cycle for a property at runtime. This requires a
VB script at the property as well as a trigger set to "On demand". Every time the trigger is
activated a different activation cycle can be used.
Syntax
Expression.ActivateDynamic (ByVAl Property name As String, ByVal
Cycle name As Cycle)
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
Parameter Description
Property name Property to which trigger relates. Use the VBS name
of the property.
Cycle name Name of activation cycle, e.g. "CycleTime1s".
See also
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
Connector (Page 293)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
Gauge (Page 320)
GraphicIOField (Page 324)
GraphicView (Page 327)
HTMLBrowser (Page 330)
IOField (Page 332)
Rectangle (Page 395)
ScriptDiagnostics (Page 406)
SymbolicIOField (Page 422)
SymbolLibrary (Page 427)
TextField (Page 438)
TubeArcObject (Page 457)
Add
syntax
Expression.Add [Tag]
Expression
Necessary. An expression which returns an object of type "TagSet".
Parameters
VARIANT
Parameters Description
Tag Name of a WinCC tag or reference to a tag object to
be added to the list.
Example:
In the following example, a TagSet object is generated and a tag is added.
'VBS170
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
'VBS171
Dim Tag
Set Tag = HMIRuntime.Tags("Motor2")
Dim group2
Set group2 = HMIRuntime.Tags.CreateTagSet
group2.Add Tag
Note
The Data Set Object does not support classes.
Objects of type Screen, Screens, ScreenItem, ScreenItems, Tag and TagSet cannot be included in
the DataSet list.
For object references it must be ascertained that objects are multiread-enabled.
syntax
Expression.Add [vtName], [vtUserData]
Expression
Necessary. An expression which returns an object of type "DataSet".
Parameters
VARIANT
Parameters Description
vtName Name by which value or tag are to be added to list.
vtUserData Value to be added to list.
Example:
In this example, a value is included in the DataSet list.
'VBS172
HMIRuntime.DataSet.Add "Motor1",23
See also
DataSet (list) (Page 206)
OnlineTrendControl (Page 359)
AttachDB method
Description
Executes the "Connect backup" key function of the control.
Syntax
Expression.AttachDB()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
CalculateStatistic
Description
Executes the "Calculate statistics" key function of the f(t) trend view and the table view.
Syntax
Expression.CalculateStatistic()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
CopyRows
Description
Executes the "Copy lines" key function of the control.
Syntax
Expression.CopyRows()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
Create
Description
Creates a new Alarm object.
Syntax
Expression.Create (VARIANT vtApplication)
Expression
Required. An expression which returns an object of type "Alarm".
Parameters
VARIANT
Parameters Description
vtApplication Name of alarm object (optional)
See also
OnlineTrendControl (Page 359)
CreateTagSet
Description
Creates a new TagSet object. This object may be used for optimized multi-tag access.
syntax
Expression.CreateTagSet()
Expression
Necessary. An expression which returns an object of type "TagSet".
Parameters
VARIANT
Example:
The following example shows how to create a TagSet object.
'VBS168
'Build a Reference to the TagSet Object
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
See also
OnlineTrendControl (Page 359)
CutRows
Description
Executes the "Cut rows" key function of the recipe view.
Syntax
Expression.CutRows()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
UserArchiveControl (Page 466)
DeactivateDynamic
Description
Deactivates the trigger of the "ActivateDynamic" method used for the specified property in/
during runtime.
Syntax
Expression.DeactivateDynamic(ByVal Property name As String)
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
Parameters Description
Property name Property, whose trigger is disabled. Use the VBS
name of the property.
See also
ChannelDiagnose (Page 274)
CheckBox (Page 275)
Circle (Page 279)
CircleSegment (Page 282)
CircularArc (Page 285)
Clock (Page 287)
Connector (Page 293)
DiskSpaceView (Page 298)
Ellipse (Page 300)
EllipseSegment (Page 303)
EllipticalArc (Page 306)
Gauge (Page 320)
GraphicIOField (Page 324)
GraphicView (Page 327)
HTMLBrowser (Page 330)
IOField (Page 332)
Rectangle (Page 395)
ScriptDiagnostics (Page 406)
SymbolicIOField (Page 422)
SymbolLibrary (Page 427)
TextField (Page 438)
TubeArcObject (Page 457)
TubeDoubleTeeObject (Page 459)
TubePolyline (Page 461)
TubeTeeObject (Page 464)
UserView (Page 478)
DeleteRows
Description
Executes the "Delete rows" key function of the recipe view.
Syntax
Expression.DeleteRows()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
UserArchiveControl (Page 466)
DetachDB
Description
Executes the "Disconnect backup" key function of the control.
Syntax
Expression.DetachDB()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
Edit
Description
Executes the "Edit" key function of the table view.
Syntax
Expression.Edit()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
AlarmControl (Page 237)
Export
Description
Executes the "Export log" or "Export data" key function of the control.
Syntax
Expression.Export()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
GetColumn
Description
Returns the column object of the recipe view designated by name or index as "ICCAxUAColumn"
type.
Syntax
Ausdruck.GetColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of the column of the recipe view
Example
'VBS312
Dim ctrl
Dim objColumn
Set ctrl = ScreenItems("RecipeControl")
Set objColumn = ctrl.GetColumn("Field1")
objColumn.Length = 30
Set objColumn = ctrl.GetColumn(3)
objColumn.Align = 2
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "Column" listing, for example, you write "objColumn.Align" instead of
"objColumn.ColumnAlign".
See also
OnlineTrendControl (Page 359)
UserArchiveControl (Page 466)
GetColumnCollection
Description
Returns the list of all column objects of the recipe view as "ICCAxCollection" type.
Syntax
Ausdruck.GetColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS313
Dim ctrl
Dim coll
Dim field
Set ctrl = ScreenItems("RecipeControl")
Set coll = ctrl.GetColumnCollection
HMIRuntime.Trace "Number of fields:" & coll.Count & vbCrLf
For Each field In coll
HMIRuntime.Trace field.Name & vbCrLf
HMIRuntime.Trace field.Type & vbCrLf
HMIRuntime.Trace field.Length & vbCrLf
HMIRuntime.Trace field.Caption & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
UserArchiveControl (Page 466)
GetHistlistColumnCollection
Description
Returns the list of all column objects of the message view hit list as "ICCAxCollection" type.
Syntax
Expression.GetHitlisteColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS315
Dim ctrl
Dim coll
Dim hitlistcol
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetHitlistColumnCollection
HMIRuntime.Trace "Number of hitlist columns:" & coll.Count & vbCrLf
For Each hitlistcol In coll
HMIRuntime.Trace hitlistcol.Index & vbCrLf
HMIRuntime.Trace hitlistcol.Name & vbCrLf
HMIRuntime.Trace hitlistcol.Sort & vbCrLf
HMIRuntime.Trace hitlistcol.SortIndex & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetHitlistColumn
Description
Returns the column object of the message view hit list designated by name or index as
"ICCAxMessageColumn" type.
Syntax
Expression.GetHitlistColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of hitlist column
Example
'VBS314
Dim ctrl
Dim objHitlistColumn
Set ctrl = ScreenItems("AlarmControl")
Set objHitlistColumn = ctrl.GetHitlistColumn("Date")
objHitlistColumn.Sort = 2
Set objHitlistColumn = ctrl.GetHitlistColumn("AverageComeGo")
objHitlistColumn.Visible = FALSE
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "HitlistColumn" listing, for example, you write "objHitlistColumn.Visible" instead of
"objHitlistColumn.HitlistColumnVisible".
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetMessageBlock
Description
Returns the message block of the message view designated by name or index as
"ICCAxMessageBlock" type.
Syntax
Expression.GetMessageBlock(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of message block.
Example
'VBS316
Dim ctrl
Dim objMsgBlock
Set ctrl = ScreenItems("AlarmControl")
Set objMsgBlock = ctrl.GetMessageBlock("Date")
objMsgBlock.Align = 2
Set objMsgBlock = ctrl.GetMessageBlock("Number")
objMsgBlock.LeadingZeros = 4
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageBlock" listing, for example, you write "objMsgBlock.Align" instead of
"objMsgBlock.MessageBlockAlign".
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetMessageBlockCollection
Description
Returns the list of all message block objects of the message view as "ICCAxCollection" type.
Syntax
Expression.GetMessageBlockCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS317
Dim ctrl
Dim coll
Dim msgblock
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetMessageBlockCollection
For Each msgblock In coll
msgblock.Align = 1
msgblock.Length = 12
msgblock.Selected = TRUE
Next
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageBlock" listing, for example, you write "msgblock.Align" instead of
"msgblock.MessageBlockAlign".
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetMessageColumn
Description
Returns the column object of the message view designated by name or index as
"ICCAxMessageColumn" type.
Syntax
Expression.GetMessageColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of column in message list.
Example
'VBS318
Dim ctrl
Dim objMessColumn
Set ctrl = ScreenItems("AlarmControl")
Set objMessColumn = ctrl.GetMessageColumn("Date")
objMessColumn.Visible = FALSE
Set objMessColumn = ctrl.GetMessageColumn("Number")
objMessColumn.Sort = 1
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageColumn" listing, for example, you write "objMessColumn.Visible" instead of
"objMessColumn.MessageColumnVisible".
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetMessageColumnCollection
Description
Returns the list of all column objects of the message view as "ICCAxCollection" type.
Syntax
Expression.GetMessageColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS319
Dim ctrl
Dim coll
Dim msgcol
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetMessageColumnCollection
HMIRuntime.Trace "Number of message columns:" & coll.Count & vbCrLf
For Each msgcol In coll
HMIRuntime.Trace msgcol.Index & vbCrLf
HMIRuntime.Trace msgcol.Name & vbCrLf
HMIRuntime.Trace msgcol.Sort & vbCrLf
HMIRuntime.Trace msgcol.SortIndex & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetOperatorMessage
Description
Returns the operator message object of the message view designated by name or index as
"ICCAxOperatorMessage" type.
Syntax
Expression.GetOperatorMessage(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of operator message
Example
'VBS320
Dim ctrl
Dim objOpMess
Set ctrl = ScreenItems("AlarmControl")
Set objOpMess = ctrl.GetOperatorMessage(0)
objOpMess.Source1 = "Number"
objOpMess.SourceType1 = 1
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "OperatorMessage" listing, for example, you write "objOpMess.Source1" instead of
"objOpMess.OperatorMessageSource1".
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetOperatorMessageCollection
Description
Returns the list of all operator message objects of the message view as "ICCAxCollection" type.
Syntax
Expression.GetOperatorMessageCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS321
Dim ctrl
Dim coll
Dim opmsg
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetOperatorMessageCollection
For Each opmsg In coll
HMIRuntime.Trace opmsg.Index & vbCrLf
HMIRuntime.Trace opmsg.Name & vbCrLf
HMIRuntime.Trace opmsg.Number & vbCrLf
HMIRuntime.Trace opmsg.Selected & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
AlarmControl (Page 237)
GetRow
Description
Returns the row object defined by its row number in the table-based controls as "ICCAxDataRow"
type.
Syntax
Expression.GetRow(ByVal IRow As Long)
Expression
Required An expression that returns an object of the "ScreenItem" type.
Parameters
Long
Parameters Description
IRow Number of the desired line of the control.
Example
'VBS356
Dim coll
Dim ctrl
Dim lIndex
Dim lCellIndex
Set ctrl = ScreenItems("UAControl")
Set coll = ctrl.GetRowCollection
'enumerate and trace out row numbers
For lIndex = 1 To coll.Count
HMIRuntime.trace "Row: " & (ctrl.GetRow(lIndex).RowNumber) & " "
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To ctrl.GetRow(lIndex).CellCount
HMIRuntime.trace ctrl.GetRow(0).CellText(lCellIndex) & " "
HMIRuntime.trace ctrl.GetRow(lIndex).CellText(lCellIndex) & " "
Next
HMIRuntime.trace vbNewLine
Next
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
GetRowCollection
Description
Returns the list of all row objects of the table-based controls type "ICCAxDataRowCollection".
Syntax
Expression.GetRowCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS357
Dim ctrl
Dim coll
Dim lIndex
Dim lCellIndex
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetRowCollection
HMIRuntime.Trace "Number of message rows:" & coll.Count & vbCrLf
'enumerate and trace out row numbers
For lIndex = 1 To coll.Count
HMIRuntime.Trace "Row: " & (ctrl.GetRow(lIndex).RowNumber) & " "
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To ctrl.GetRow(lIndex).CellCount
HMIRuntime.Trace ctrl.GetMessageColumn(lCellIndex -1).Name & " "
HMIRuntime.Trace ctrl.GetRow(lIndex).CellText(lCellIndex) & " "
Next
HMIRuntime.Trace vbNewLine
Next
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
GetRulerBlock
Description
Returns the block object of the evaluation table designated by name or index as
"ICCAxRulerBlock" type.
Syntax
Expression.GetRulerBlock(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of the block in the evaluation table
Example
'VBS322
Dim ctrl
Dim objRulerBlock
Set ctrl = ScreenItems("RulerControl")
Set objRulerBlock = ctrl.GetRulerBlock(0)
objRulerBlock.Caption = "RulerBlock1"
Set objRulerBlock = ctrl.GetRulerBlock("Name")
objRulerBlock.Length = 10
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerBlock" listing, for example, you write "objRulerBlock.Caption" instead of
"objRulerBlock.BlockCaption".
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetRulerBlockCollection
Description
Returns the list of all block objects of the evaluation table as "ICCAxCollection" type.
Syntax
Expression.GetRulerBlockCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS323
Dim ctrl
Dim coll
Dim rulerblock
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetRulerBlockCollection
For Each rulerblock In coll
rulerblock.Align = 1
rulerblock.Length = 12
Next
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerBlock" listing, for example, you write "rulerblock.Align" instead of
"rulerblock.RulerBlockAlign".
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetRulerColumn
Description
Returns the column object of the evaluation table designated by name or index as
"ICCAxRulerColumn" type.
Syntax
Expression.GetRulerColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of the column of the evaluation
Example
'VBS324
Dim ctrl
Dim objRulercol
Set ctrl = ScreenItems("RulerControl")
Set objRulercol = ctrl.GetRulerColumn("Name")
objRulercol.Sort = 0
Set objRulercol = ctrl.GetRulerColumn("ValueY")
objRulercol.Visible = FALSE
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerColumn" listing, for example, you write "objRulercol.Visible" instead of
"objRulercol.ColumnVisible".
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetRulerColumnCollection
Description
Returns the list of all column objects of the evaluation table as "ICCAxCollection" type.
Syntax
Expression.GetRulerColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS325
Dim ctrl
Dim coll
Dim rulercol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetRulerColumnCollection
HMIRuntime.Trace "Number of ruler columns:" & coll.Count & vbCrLf
For Each rulercol In coll
HMIRuntime.Trace rulercol.Index & vbCrLf
HMIRuntime.Trace rulercol.Name & vbCrLf
HMIRuntime.Trace rulercol.Sort & vbCrLf
HMIRuntime.Trace rulercol.SortIndex & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetRulerData
Description
Returns the value of the called trend at the ruler position.
Syntax
Expression.GetRulerData(ByVal RulerIndex As Long, pvValue As
Variant, Optional pvTimeStamp As Variant, Optional pvFlags As
Varian) Long
Expression
Necessary. An expression which returns an object of the "Trend" type.
Parameters
Parameters Description
RulerIndex 0 =Ruler
pvValue Value of X axis
pvTimeStamp Time or value of the Y axis
pvFlags Qualitycode
Example
'VBS326
Dim ctrl
Dim objTrend
Dim objIOField1
Dim objIOField2
Dim rulvalue
Dim rultime
Set ctrl = ScreenItems( "Control1" )
Set objTrend = ctrl.GetTrend( "Trend 1" )
Set objIOField1 = ScreenItems( "I/O Field1" )
Set objIOField2 = ScreenItems( "I/O Field2" )
objTrend.GetRulerData 0, rulvalue, rultime
objIOField1.OutputValue = rulvalue
objIOField2.OutputValue = rultime
See also
OnlineTrendControl (Page 359)
GetSelectedRow
Description
Returns the selected row object of a table-based control as "ICCAxDataRow" type.
Syntax
Expression.GetSelectedRow()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS358
Dim ctrl
Dim lCellIndex
Dim lCellCount
Dim headingRow
Dim selectedRow
Set ctrl = ScreenItems("TableControl")
Set headingRow = ctrl.GetRow(0)
Set selectedRow = ctrl.GetSelectedRow
lCellCount = headingRow.CellCount
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To lCellCount
HMIRuntime.trace headingRow.CellText(lCellIndex) & ": "
HMIRuntime.trace selectedRow.CellText(lCellIndex)
HMIRuntime.trace vbNewLine
Next
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
GetSelectedRows
Description
Returns the selected row objects of a table-based control as type "ICCAxDataRow" for multiple
selection.
Syntax
Expression.GetSelectedRows()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS359
Dim ctrl
Dim lCellIndex
Dim lCellCount
Dim lRowIndex
Dim lRowCount
Dim headingRow
Dim selectedRow
Dim selectedRows
Set ctrl = ScreenItems("TableControl")
Set headingRow = ctrl.GetRow(0)
Set selectedRows = ctrl.GetSelectedRows
lCellCount = headingRow.CellCount
lRowCount = selectedRows.Count
'enumerate selected rows
For lRowIndex = 1 To lRowCount
Set selectedRow = selectedRows(lRowIndex)
HMIRuntime.Trace "Row number: " & CStr(lRowIndex) & vbNewLine
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To lCellCount
HMIRuntime.trace headingRow.CellText(lCellIndex) & ": "
HMIRuntime.trace selectedRow.CellText(lCellIndex)
HMIRuntime.trace vbNewLine
Next
Next
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
GetStatisticAreaColumn
Description
Returns the column object of the statistic area window of the evaluation window designated by
name or index as "ICCAxRulerColumn" type.
Syntax
Ausdruck.GetStatisticAreaColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of column of statistics area window.
Example
'VBS327
Dim ctrl
Dim objStatAreaCol
Set ctrl = ScreenItems("RulerControl")
Set objStatAreaCol = ctrl.GetStatisticAreaColumn("DatasourceY")
objStatAreaCol.Visible = FALSE
Set objStatAreaCol = ctrl.GetStatisticAreaColumn("ValueY(LL)")
objStatAreaCol.Sort = 1
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatisticAreaColumn" listing, for example, you write "objStatAreaCol.Visible" instead of
"objStatAreaCol.ColumnVisible".
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetStatisticAreaColumnCollection
Description
Returns the list of all column objects of the statistic area window of the evaluation table as
"ICCAxCollection" type.
Syntax
Ausdruck.GetStatisticAreaColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS328
Dim ctrl
Dim coll
Dim statcol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetStatisticAreaColumnCollection
HMIRuntime.Trace "Number of statistic Area columns:" & coll.Count & vbCrLf
For Each statcol In coll
HMIRuntime.Trace statcol.Index & vbCrLf
HMIRuntime.Trace statcol.Name & vbCrLf
HMIRuntime.Trace statcol.Sort & vbCrLf
HMIRuntime.Trace statcol.SortIndex & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetStatisticResultColumn
Description
Returns the column object of the statistic window of the evaluation window designated by name
or index as "ICCAxRulerColumn" type.
Syntax
Ausdruck.GetStatisticResultColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of column of statistics window.
Example
'VBS329
Dim ctrl
Dim objStatResCol
Set ctrl = ScreenItems("RulerControl")
Set objStatResCol = ctrl.GetStatisticResultColumn("MaxValue")
objStatResCol.Visible = FALSE
Set objStatResCol = ctrl.GetStatisticResultColumn("Average")
objStatResCol.Sort = 2
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatisticResultColumn" listing, for example, you write "objStatResCol.Visible" instead of
"objStatResCol.ColumnVisible".
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetStatisticResultColumnCollection
Description
Returns the list of all column objects of the statistic window of the evaluation table as
"ICCAxCollection" type.
Syntax
Ausdruck.GetStatisticResultColumnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS330
Dim ctrl
Dim coll
Dim statcol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetStatisticResultColumnCollection
HMIRuntime.Trace "Number of statistic result columns:" & coll.Count & vbCrLf
For Each statcol In coll
HMIRuntime.Trace statcol.Index & vbCrLf
HMIRuntime.Trace statcol.Name & vbCrLf
HMIRuntime.Trace statcol.Sort & vbCrLf
HMIRuntime.Trace statcol.SortIndex & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
TrendRulerControl (Page 441)
GetStatusbarElement
Description
Returns the element of the control status bar designated as name or index as type
"ICCAxStatusbarElement".
Syntax
Ausdruck.GetStatusbarElement(ByVal vIndex As Variant)
Expression
Required An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of status bar element.
Example
'VBS331
Dim ctrl
Dim objStatusBar
Set ctrl = ScreenItems( "Control1" )
Set objStatusBar = ctrl.GetStatusbarElement(1)
objStatusBar.Visible = FALSE
Set objStatusBar = ctrl.GetStatusbarElement(3)
objStatusBar.Width = 10
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatusbarElement" listing, for example, you write "objStatusBar.Visible" instead of
"objStatusBar.StatusbarElementVisible".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
GetStatusbarElementCollection
Description
Returns the list of all status bar elements of the control as type "ICCAxCollection".
Syntax
Ausdruck.GetStatusbarElementCollection()
Expression
Required An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS332
Dim ctrl
Dim coll
Dim statelement
Set ctrl = ScreenItems.Item("Control1")
Set coll = ctrl.GetStatusbarElementCollection
HMIRuntime.Trace "Number of statusbar elements:" & coll.Count & vbCrLf
For Each statelement In coll
HMIRuntime.Trace statelement.Name & vbCrLf
HMIRuntime.Trace statelement.Width & vbCrLf
HMIRuntime.Trace statelement.Text & vbCrLf
Next
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatusbarElement" listing, for example, you write "statelement.Name" instead of
"statelement.StatusbarElementName".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
GetTimeAxis
Description
Returns the time object that is specified by name or index for the f(t) trend view as
"ICCAxTimeAxis" type.
Syntax
Expression.GetTimeAxis(ByVal vIndex As Variant)
Expression
Necessary. Expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of time axis.
Example
'VBS333
Dim ctrl
Dim objTimeAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTimeAxis = ctrl.GetTimeAxis(1)
objTimeAxis.Visible = FALSE
Set objTimeAxis = ctrl.GetTimeAxis("axis 2")
objTimeAxis.Label = "Time axis 2"
objTimeAxis.DateFormat = "dd.MM.yy"
objTimeAxis.TimeFormat = "HH:mm:ss.ms"
objTimeAxis.RangeType = 2
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeAxis.BeginTime = "06.04.2010 9:33:18"
'objTimeAxis.BeginTime = "04/06/2010 9:33:18"
objTimeAxis.MeasurePoints = 100
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "TimeAxis" listing, for example, you write "objTimeAx.Visible" instead of
"objTimeAx.TimeAxisVisible".
See also
OnlineTrendControl (Page 359)
GetTimeAxisCollection
Description
Returns a list of all time objects of the f(t) trend view as "ICCAxCollection" type.
Syntax
Expression.GetTimeAxisCollection()
Expression
Necessary. Expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS334
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis1
Dim objTimeAxis2
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis1 = ctrl.GetTimeAxisCollection.AddItem("TimeAxis2010")
Set objTimeAxis2 = ctrl.GetTimeAxisCollection.AddItem("TimeAxis2011")
objTimeAxis1.TrendWindow = objTrendWnd.Name
objTimeAxis1.Label = "2010"
objTimeAxis1.RangeType = 1
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeAxis1.BeginTime = "01.01.2010 0:00:00"
'objTimeAxis1.BeginTime = "01/01/2010 0:00:00"
objTimeAxis1.EndTime = "31.12.2010 11:59:59"
'objTimeAxis1.EndTime = "12/31/2010 11:59:59"
objTimeAxis2.TrendWindow = objTrendWnd.Name
objTimeAxis2.Label = "2011"
objTimeAxis2.RangeType = 1
objTimeAxis2.BeginTime = "01.01.2011 0:00:00"
'objTimeAxis2.BeginTime = "01/01/2011 0:00:00"
objTimeAxis2.EndTime = "31.12.2011 11:59:59"
'objTimeAxis2.EndTime = "12/31/2011 11:59:59"
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis1.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend2")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis2.Name
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "TimeAxis" listing, for example, you write "objTimeAxis1.Label" instead of
"objTimeAxis1.TimeAxisLabel".
See also
OnlineTrendControl (Page 359)
GetTimeColumn
Description
Returns the time column object of the table view designated by name or index as "ICCAxTime
Column" type.
Syntax
Ausdruck.GetTimeColumn(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of time column.
Example
'VBS335
Dim ctrl
Dim objTimeCol
Set ctrl = ScreenItems("TableControl")
Set objTimeCol = ctrl.GetTimeColumn("Timecolumn1")
objTimeCol.ShowDate = FALSE
Set objTimeCol = ctrl.GetTimeColumn("Timecolumn2")
objTimeCol.Visible = FALSE
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "TimeColumn" listing, for example, you write "objTimeColumn.ShowDate" instead of
"objTimeColumn.TimeColumnShowDate".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
GetTimeColumnCollection
Description
Returns the list of all time column objects of the table view as "ICCAxCollection" type.
Syntax
Expression.GetTimeColumnCollection()
Expression
Necessary. Expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS336
Dim ctrl
Dim objTimeCol1
Dim objTimeCol2
Dim coll
Dim timecol
Set ctrl = ScreenItems("TableControl")
Set objTimeCol1 = ctrl.GetTimeColumnCollection.AddItem("TimeColumn2010")
Set objTimeCol2 = ctrl.GetTimeColumnCollection.AddItem("TimeColumn2011")
objTimeCol1.Caption = "2010"
objTimeCol1.RangeType = 1
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeCol1.BeginTime = "01.01.2010 0:00:00"
'objTimeCol1.BeginTime = "01/01/2010 0:00:00"
objTimeCol1.EndTime = "31.12.2010 11:59:59"
'objTimeCol1.EndTime = "12/31/2010 11:59:59"
objTimeCol2.Caption = "2011"
objTimeCol2.RangeType = 0
objTimeCol2.BeginTime = "01.01.2011 0:00:00"
'objTimeCol2.BeginTime = "01/01/2011 0:00:00"
objTimeCol2.TimeRangeFactor = 1
objTimeCol2.TimeRangeBase = 3600000
Set coll = ctrl.GetTimeColumnCollection
For Each timecol In coll
timecol.Align = 1
timecol.Length = 12
timecol.BackColor = RGB(240,240,0)
timecol.ForeColor = RGB(130,160,255)
Next
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
GetToolbarButton
Description
Returns the button function designated by name or index on the control toolbar as
"ICCAxToolbarButton" type.
Syntax
Ausdruck.GetToolbarButton(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of toolbar button function.
Example
'VBS337
Dim ctrl
Set ctrl = ScreenItems( "Control1" )
Dim toolbu
Set toolbu = ctrl.GetToolbarButton ("ShowHelp")
HMIRuntime.Trace "Name: " & toolbu.Name & vbCrLf
HMIRuntime.Trace "Index: " & toolbu.Index & vbCrLf
HMIRuntime.Trace "Hotkey: " & toolbu.HotKey & vbCrLf
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "ToolbarButton" listing, for example, you write "toolbu.Index" instead of
"toolbu.ToolbarButtonIndex".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
GetToolbarButtonCollection
Description
Returns the list of all button functions of the control toolbar as "ICCAxCollection" type.
Syntax
Ausdruck.GetToolbarButtonCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS338
Dim ctrl
Dim coll
Dim toolbu
Set ctrl = ScreenItems( "Control1" )
Set coll = ctrl.GetToolbarButtonCollection
HMIRuntime.Trace "Number of toolbar buttons:" & coll.Count & vbCrLf
For Each toolbu In coll
HMIRuntime.Trace toolbu.Name & vbCrLf
HMIRuntime.Trace "Hotkey: " & toolbu.HotKey & vbCrLf
HMIRuntime.Trace "Authorization: " & toolbu.PasswordLevel & vbCrLf
Next
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
GetTrend
Description
Returns the f(t) or f(x) trend view designated by name or index as "ICCAxTrend" or
"ICCAxFunctionTrend" type.
Syntax
Ausdruck.GetTrend(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of curve.
'VBS339
Dim ctrl
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrend = ctrl.GetTrend( "Trend 1" )
objTrend.PointStyle = 1
objTrend.LineWidth = 4
Set objTrend = ctrl.GetTrend(2)
objTrend.Provider = 1
objTrend.TagName = "Archive\ArchiveTag2"
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Trend" listing, for example, you write "objTrend.PointStyle" instead of
"objTrend.TrendPointStyle".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetTrendCollection
Description
Returns the list of all trends of the f(t) or f(x) trend view as "ICCAxCollection" type.
Syntax
Ausdruck.GetTrendCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
'VBS340
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis
Dim objValAxis
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis = ctrl.GetTimeAxisCollection.AddItem("myTimeAxis")
Set objValAxis = ctrl.GetValueAxisCollection.AddItem("myValueAxis")
objTimeAxis.TrendWindow = objTrendWnd.Name
objValAxis.TrendWindow = objTrendWnd.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.Provider = 1
objTrend.TagName = "Archive\ArchiveTag1"
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis.Name
objTrend.ValueAxis = objValAxis.Name
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Trend" listing, for example, you write "objTrend.TagName" instead of
"objTrend.TrendTagName".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetTrendWindow
Description
Returns the trend view object of the f(t) trend view or the f(x) trend view designated by name
or index as "ICCAxTrendWindow" type.
Syntax
Ausdruck.GetTrendWindow(ByVal vIndex As Variant)
Expression
Required An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of curve window.
'VBS341
Dim ctrl
Dim objTrendWnd
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindow(1)
objTrendWnd.Visible = FALSE
Set objTrendWnd = ctrl.GetTrendWindow("trend window 2")
objTrendWnd.VerticalGrid = TRUE
objTrendWnd.FineGrid = TRUE
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "TrendWindow" listing, for example, you write "objTrendWnd.Visible" instead of
"objTrendWnd.TrendWindowVisible".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetTrendWindowCollection
Description
Returns the list of all trend window objects of the f(t) trend display or the f(x) trend display as
"ICCAxCollection" type.
Syntax
Ausdruck.GetTrendWindowCollection()
Expression
Required. An expression that returns an object of the "ScreenItem" type.
Parameters
--
'VBS342
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis
Dim objValAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis = ctrl.GetTimeAxisCollection.AddItem("myTimeAxis")
Set objValAxis = ctrl.GetValueAxisCollection.AddItem("myValueAxis")
objTimeAxis.TrendWindow = objTrendWnd.Name
objValAxis.TrendWindow = objTrendWnd.Name
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetValueAxis
Description
Returns the value axis object of the f(t) trend view designated by name or index as
"ICCAxValueAxis" type.
Syntax
Ausdruck.GetValueAxis(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of the value axis
Example
'VBS343
Dim ctrl
Dim objValAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objValAxis = ctrl.GetValueAxis(1)
objValAxis.Visible = FALSE
Set objValAxis = ctrl.GetValueAxis("axis 2")
objValAxis.Label = "Value axis 2"
objValAxis.ScalingType = 0
objValAxis.Precisions = 2
objValAxis.AutoRange = TRUE
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "ValueAxis" listing, for example, you write "objValueAx.Visible" instead of
"objValueAx.ValueAxisVisible".
See also
OnlineTrendControl (Page 359)
GetValueAxisCollection
Description
Returns the list of all value axis objects of the f(t) trend view as "ICCAxCollection" type.
Syntax
Ausdruck.GetValueAxisCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS344
Dim ctrl
Dim objTrendWnd
Dim objValAxis1
Dim objValAxis2
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objValAxis1 = ctrl.GetValueAxisCollection.AddItem("myValueAxis1")
Set objValAxis2 = ctrl.GetValueAxisCollection.AddItem("myValueAxis2")
objValAxis1.TrendWindow = objTrendWnd.Name
objValAxis1.Label = "Value1"
objValAxis2.TrendWindow = objTrendWnd.Name
objValAxis2.inTrendColor = TRUE
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.ValueAxis = objValAxis1.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend2")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.ValueAxis = objValAxis2.Name
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "ValueAxis" listing, for example, you write "objValueAxis1.Label" instead of
"objValueAxis1.ValueAxisLabel".
See also
OnlineTrendControl (Page 359)
GetValueColumn
Description
Returns the value column object defined by name or index for the tabular view as
"ICCAxValueColumn" type.
Syntax
Expression.GetValueColumn(ByVal vIndex As Variant)
Expression
Necessary. Expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of the value column of the f(t) trend view.
Example
'VBS345
Dim ctrl
Dim objValueColumn
Set ctrl = ScreenItems("TableControl")
Set objValueColumn = ctrl.GetValueColumn("Valuecolumn1")
objValueColumn.Precisions = 4
Set objValueColumn = ctrl.GetValueColumn(2)
objValueColumn.ExponentialFormat = TRUE
Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "ValueColumn" listing, for example, you write "objValueColumn.Precisions" instead of
"objValueColumn.ValueColumnPrecisions".
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
GetValueColumnCollection
Description
Returns the list of all value column objects of the f(t) trend view as "ICCAxCollection" type.
Syntax
Ausdruck.GetValueColulmnCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS346
Dim ctrl
Dim objValCol1
Dim objValCol2
Dim coll
Dim valcol
Set ctrl = ScreenItems("TableControl")
Set objValCol1 = ctrl.GetValueColumnCollection.AddItem("ValueColumn1")
Set objValCol2 = ctrl.GetValueColumnCollection.AddItem("ValueColumn2")
objValCol1.Caption = "Value Archive"
objValCol1.Provider = 1
objValCol1.TagName = "ProcessValueArchive\arch1"
objValCol1.TimeColumn = "TimeColumn1"
objValCol2.Caption = "Value Tag"
objValCol2.Provider = 2
objValCol2.TagName = "tagxx"
objValCol2.TimeColumn = "TimeColumn2"
Set coll = ctrl.GetValueColumnCollection
For Each valcol In coll
valcol.Align = 2
valcol.Length = 10
valcol.AutoPrecisions = TRUE
Next
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
GetXAxis
Description
Returns the X axis object of the f(x) trend view designated by name or index as "ICCAxValueAxis"
type.
Syntax
Ausdruck.GetXAxis(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of X axis.
Example
'VBS347
Dim ctrl
Dim objXAx
Set ctrl = ScreenItems("FunctionTrendControl")
Set objXAx = ctrl.GetXAxis(1)
objXAx.Visible = FALSE
Set objXAx = ctrl.GetXAxis("axis 2")
objXAx.Label = "X axis 2"
objXAx.ScalingType = 0
objXAx.Precisions = 2
objXAx.Color = RGB(109,109,109)
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "XAxis" listing, for example, you write "objXAx.Visible" instead of "objXAx.XAxisVisible".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetXAxisCollection
Description
Returns the list of all X axis objects of the f(x) trend view as "ICCAxCollection" type.
Syntax
Ausdruck.GetXAxisCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS348
Dim ctrl
Dim objXAxis1
Dim objXAxis2
Dim coll
Dim axes
Set ctrl = ScreenItems("FunctionTrendControl")
Set objXAxis1 = ctrl.GetXAxisCollection.AddItem("myXAxis1")
objXAxis1.Label = "temperature"
Set objXAxis2 = ctrl.GetXAxisCollection.AddItem("myXAxis2")
objXAxis2.Label = "pressure"
Set coll = ctrl.GetXAxisCollection
HMIRuntime.Trace "Number of XAxis:" & coll.Count & vbCrLf
For Each axes In coll
HMIRuntime.Trace axes.Name & vbCrLf
HMIRuntime.Trace axes.Label & vbCrLf
Next
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "XAxis" listing, for example, you write "objXAxis1.Label" instead of
"objXAxis1.XAxisLabel".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetYAxis
Description
Returns the Y axis object of the f(x) trend view designated by name or index as "ICCAxValueAxis"
type.
Syntax
Ausdruck.GetYAxis(ByVal vIndex As Variant)
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
VARIANT
Parameters Description
vIndex Index or name of Y axis.
Example
'VBS349
Dim ctrl
Dim objYAx
Set ctrl = ScreenItems("FunctionTrendControl")
Set objYAx = ctrl.GetYAxis(1)
objYAx.Visible = FALSE
Set objYAx = ctrl.GetYAxis("axis 2")
objYAx.Label = "Y axis 2"
objYAx.Align = 0
objYAx.Precisions = 3
objYAx.EndValue = 90.000
objYAx.BeginValue = 10.000
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "YAxis" listing, for example, you write "objYAx.Visible" instead of "objYAx.YAxisVisible".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
GetYAxisCollection
Description
Returns the list of all Y axis objects of the f(x) trend view as "ICCAxCollection" type.
Syntax
Ausdruck.GetYAxisCollection()
Expression
Necessary. An expression that returns an object of the "ScreenItem" type.
Parameters
--
Example
'VBS350
Dim ctrl
Dim objYAxis1
Dim objYAxis2
Dim coll
Dim axes
Set ctrl = ScreenItems("FunctionTrendControl")
Set objYAxis1 = ctrl.GetXAxisCollection.AddItem("myYAxis1")
objYAxis1.Label = "temperature"
Set objYAxis2 = ctrl.GetXAxisCollection.AddItem("myYAxis2")
objYAxis2.Label = "pressure"
Set coll = ctrl.GetYAxisCollection
HMIRuntime.Trace "Number of YAxis:" & coll.Count & vbCrLf
For Each axes In coll
HMIRuntime.Trace axes.Name & vbCrLf
HMIRuntime.Trace axes.Label & vbCrLf
Next
Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "YAxis" listing, for example, you write "objYAxis1.Label" instead of
"objYAxis1.YAxisLabel".
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
HideAlarm
Description
Executes the "Hide alarm" button function of the alarm view.
Syntax
Expression.HideAlarm()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
InsertData
Description
Adds data to the called trend.
Syntax
Expression.InsertData(dblAxisX As Variant, dblAxisY As Variant)
Expression
Necessary. An expression which returns an object of the "Trend" type.
Parameters
Parameters Description
dblAxisX Value of X axis
dblAxisY Value of Y axis
Example
'VBS300
Dim lngFactor
Dim dblAxisX
Dim dblAxisY
Dim objTrendControl
Dim objTrend
Set objTrendControl = ScreenItems("Control1")
Set objTrend = objTrendControl.GetTrend("Trend 1")
For lngFactor = -100 To 100
dblAxisX = CDbl(lngFactor * 0.02)
dblAxisY = CDbl(dblAxisX * dblAxisX + 2 * dblAxisX + 1)
objTrend.InsertData dblAxisX, dblAxisY
Next
Item
Description
Returns an element from a list.
Syntax
Expression.Item(Index)
Expression
Necessary. An expression which returns a list.
Parameters
Index
The name or the index number of an element of the list:
• ScreenItems-Listing: Use an object name, e.g.
"HmiRuntime.Screens(1).ScreenItems("Circle")", or the index number.
• Screens-Listing: Use either the name or the index number.
• SmartTags-Listing: You can only use the tag name as index in the SmartTags list. A counting
of all tags is not possible.
If the transferred value does not correspond with an element in the list, an error occurs. The
return value has the value "Nothing".
Example
The item method is the default method for lists. Therefore, the results are the same for the
following two examples:
'VBS_Example_Item
HMIRuntime.Screens.Item(1)
HMIRuntime.Screens(1)
See also
ScreenItems (list) (Page 221)
ScreenItem (Page 219)
LockAlarm
Description
Executes the "Disable alarm" button function of the alarm view.
Syntax
Expression.LockAlarm()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
LoopInAlarm
Description
Executes the "Loop in alarm" button function of the alarm view.
Syntax
Expression.LoopInAlarm()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveAxis
Description
Executes the "Move axes area" button function of the f(t) and f(x) trend views.
Syntax
Expression.MoveAxis()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
MoveToFirst
Description
Executes the "First line" button function of the control.
Syntax
Expression.MoveToFirst()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
MoveToFirstLine
Description
Executes the "First alarm" button function of the alarm view.
Syntax
Expression.MoveToFirstLine()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToFirstPage
Description
Executes the "First page" button function of the alarm view.
Syntax
Expression.MoveToFirstPage()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToLast
Description
Executes the "Last data record" button function of the control.
Syntax
Expression.MoveToLast()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
MoveToLastLine
Description
Executes the "Last alarm" button function of the alarm view.
Syntax
Expression.MoveToLastLine()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
AlarmControl (Page 237)
MoveToLastPage
Description
Executes the "Last page" button function of the alarm view.
Syntax
Expression.MoveToLastPage()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToNext
Description
Executes the "Next data record" button function of the control.
Syntax
Expression.MoveToNext()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
MoveToNextLine
Description
Executes the "Next alarm" button function of the alarm view.
Syntax
Expression.MoveToNextLine()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToNextPage
Description
Executes the "Next page" button function of the alarm view.
Syntax
Expression.MoveToNextPage()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToPrevious
Description
Executes the "Previous data record" button function of the control.
Syntax
Expression.MoveToPrevious()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
UserArchiveControl (Page 466)
MoveToPreviousLine
Description
Executes the "Previous alarm" button function of the alarm view.
Syntax
Expression.MoveToPreviousLine()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
MoveToPreviousPage
Description
Executes the "Previous page" button function of the alarm view.
Syntax
Expression.MoveToPreviousPage()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
NextColumn
Description
Executes the "Next column" button function of the table view.
Syntax
Expression.NextColumn()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTableControl (Page 347)
NextTrend
Description
Executes the "Next trend" button function of the f(t) and f(x) trend views.
Syntax
Expression.NextTrend()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
OneToOneView
Description
Executes the "Original view" button function of the f(t) and f(x) trend views.
Syntax
Expression.OneToOneView()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
PasteRows
Description
Executes the "Insert rows" button function of the recipe view.
Syntax
Expression.PasteRows()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
PreviousColumn
Description
Executes the "Previous column" button function of the table view.
Syntax
Expression.PreviousColumn()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTableControl (Page 347)
PreviousTrend
Description
Executes the "Previous trend" button function of the f(t) and f(x) trend views.
Syntax
Expression.PreviousTrend()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
Description
Executes the "Print" button function of the control.
Syntax
Expression.Print()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
QuitHorn
Description
Executes the "Alarm annunciator acknowledgment" button function of the alarm view.
Syntax
Expression.QuitHorn()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
QuitSelected
Description
Executes the "Single acknowledgment" button function of the alarm view.
Syntax
Expression.QuitSelected()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
QuitVisible
Description
Executes the "Group acknowledgment" button function of the alarm view.
Syntax
Expression.QuitVisible()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
Read
Property Allocation
Value Tag values
Name Tag name (unchanged)
QualityCode Quality level
Timestamp Current tag time stamp
LastError 0
ErrorDescription ""
If the value of the tag is not read successfully, the properties of the tag object are assigned
the following values:
Property Allocation
Value VT_Empty
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError Read operation error codes
ErrorDescription Error description on LastError
syntax
Expression.Read([Readmode])
Expression
Necessary. An expression which returns a tag object. The return value of the Read method is
the value of the tag read out.
Parameters
The optional "Readmode" parameter enables the distinction between two types of reading:
Parameters Description
0 The tag value is read from the process image
(cache). 0 is the default value.
1 The value of a tag is read directly from AS or chan‐
nel (direct).
If the "Readmode" parameter is omitted, the value is read from the process image by default.
The return value of the Read method is the tag value read out as VARIANT.
the call. If a tag is requested which is not contained in the trigger, the behavior is the same as
with a standard trigger.
Behavior in actions with a cyclic trigger
tags are registered with half of the cycle time with the first call. For every other call, the value
is present.
Behavior in event-driven actions
The tag is registered in the "upon change" mode with the first call. Process tags that are
registered in the "upon change" mode correspond with a cyclic read job with a cycle time of
1s.
If an event (e.g. mouse click) requests a value asynchronously, the tag is transferred to the
tag image. The tag is requested cyclically from the AS as of this point in time and therefore
increases the basic load. To bypass this increase in the basic load, the value can also be read
synchronously. The synchronous call causes a one-off increase in the communication load
but the tag is not transferred to the tag image.
Direct reading
In the case of direct reading, the current value is returned. The tag is not registered cyclically, the
value is requested from the AS one time only. Direct reading has the following properties:
• The value is read explicitly from the AS.
• The call takes longer compared to reading from the process image.
• The duration of the call is dependent on the bus load and AS, amongst other things.
Example
Reading a tag directly from AS or channel
'VBS100
Dim objTag
Dim vntValue
Set objTag = HMIRuntime.Tags("Tagname")
vntValue = objTag.Read(1) 'Read direct
MsgBox vntValue
'VBS101
Dim objTag
Dim vntValue
Set objTag = HMIRuntime.Tags("Tagname")
vntValue = objTag.Read 'Read from cache
MsgBox vntValue
Expression
Necessary. An expression which returns an object of type "TagSet".
Direct reading
Since one call may process several read commands, performance is enhanced in comparison to
single calls.
Example
The following example shows how tags are included in the TagSet list, how tag values are
imported and subsequently read.
'VBS174
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.Read
HMIRuntime.Trace "Motor1: " & group("Motor1").Value & vbNewLine
HMIRuntime.Trace "Motor2: " & group("Motor2").Value & vbNewLine
If the optional parameter "Readmode" is set to 1, the process tags are not registered but read
directly from AS or channel.
group.Read 1
ReadTags
Description
Executes the "Read tags" button function of the recipe view.
Syntax
Expression.ReadTags()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
Refresh
Description
Drawing all visible pictures again.
syntax
Expression.Refresh
Expression
Necessary. An expression which returns a "Screens" or "Screen" type object.
Parameter
--
Examples
The first example forces all visible pictures to be drawn again:
'VBS149
HMIRuntime.Screens.Refresh
'VBS150
HMIRuntime.Screens(1).Refresh
See also
Screen (Page 216)
HMIRuntime (Page 209)
Remove
Syntax
Expression.Remove [Tag]
Expression
Required An expression that returns an object of type "TagSet".
Parameters
VARIANT
Parameters Description
Tag Name of a WinCC tag or reference to a tag object to
be removed from the list.
Example
The following example shows how several tags are included in the TagSet list, and how to
remove a tag again.
'VBS175
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.Remove "Motor1"
Syntax
Expression.Remove [Name]
Expression
Required An expression which returns an object of type "DataSet".
Parameters
VARIANT
Parameters Description
Name Name of the object to be removed from the list.
Example
The example shows how to remove the object "motor1" from the list.
'VBS166
HMIRuntime.DataSet.Remove("motor1")
Note
Calling up the "Remove" method is presently only possible at the server. There is an example,
however, which shows how the method may be started by the client from a server.
Syntax
Expression
Required An expression that returns an object of type "Logging" or "AlarmLogs".
Object DataLogs
Expression.Remove [TimeFrom] [TimeTo] [TimeOut] [Type] [ServerPrefix]
Expression
Required An expression that returns an object of type "DataLogs".
Parameters
TimeFrom
Point in time, from which the logs are to be cleared.
When specifying the time information, a short form is also possible. This is described in the
"Time format" section.
TimeTo
Time up to which log segments are to be cleared.
When specifying the time information, a short form is also possible. This is described in the
"Time Format" section.
Timeout
Timeout in milliseconds.
If you enter "-1" as a value, the wait will be infinite. If you enter a value of "0", there will be no
wait.
Type
Type of log.
The parameter can (optionally) be used only to delete log segments of the tag logging.
The following values can be entered:
ServerPrefix
Reserved for future versions.
Return value
If an error occurred during deletion of the log segments, the method will return an error alarm.
Additional information may be found under the subject heading "Error alarms from database
area".
Time format
The format for specifying time information is defined as follows: YYYY-MM-DD hh:mm:ss, where
YYYY represents the year, MM the month, DD the day, hh the hour, mm the minute and ss the
second. For example, the time of 2 minutes and one second past 11 o'clock on July 26, 2004 is
displayed as follows: 2004-07-26 11:02:01.
For parameters "TimeFrom" and "TimeTo" the statement of data and time is also possible in
short form. Not all format fields must be filled in this case. The short form means that the
information on date and time may be lacking one or several parameters, beginning with the
value for seconds. For example, the time may be specified in the "YYYY-MM" or "YYYY-MM-DD
hh" format. Using the statement "TimeFrom" = "2004-09" and "TimeTo" = "2004-10-04" all log
segments between September 2004 up to and including October 4.
Example
In the following example, log segments within a certain time period that were swapped in
(again) after the fact are removed and the return value is output as a trace.
'VBS182
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Remove("2004-08-22","2004-09-22",-1) &
vbNewLine
In the following example, all log segments that were swapped-in (again) after the fact are
removed and the return value is output as a trace.
'VBS183
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Remove("","",-1) & vbNewLine
See also
Logging (Page 214)
DataSet (list) (Page 206)
DataLogs (list) (Page 205)
AlarmLogs (list) (Page 202)
RemoveAll
syntax
Expression.RemoveAll
Expression
Necessary. An expression which returns an object of type "TagSet".
Parameters
--
Example:
The following example shows how several tags are included in the TagSet list, and how to
remove all tags again.
'VBS176
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.RemoveAll
syntax
Expression.RemoveAll
Expression
Necessary. An expression which returns an object of type "DataSet".
Parameters
--
Example:
The example shows how all objects are removed from the list.
'VBS167
HMIRuntime.DataSet.RemoveAll
See also
DataSet (list) (Page 206)
Restore
Syntax
Expression
Required An expression that returns an object of type "Logging" or "AlarmLogs".
Object DataLogs
Expression.Restore [SourcePath] [TimeFrom] [TimeTo] [TimeOut] [Type]
[ServerPrefix]
Expression
Required An expression that returns an object of type "DataLogs".
Parameters
SourcePath
Path to log data.
TimeFrom
Point in time, from which the logs are to be swapped in.
When specifying the time information, a short form is also possible. This is described in the
"Time format" section.
TimeTo
Time up to which log segments are to be swapped in.
When specifying the time information, a short form is also possible. This is described in the
"Time Format" section.
Timeout
Timeout in milliseconds.
If you enter "-1" as a value, the wait will be infinite. If you enter a value of "0", there will be no
wait.
Type
Type of log.
The parameter can (optionally) be used only to store log segments of the tag logging.
The following values can be entered:
ServerPrefix
Reserved for future versions.
Return value
If an error occurred while swapping in log segments, the method will return an error message.
Additional information may be found under the subject heading "Error alarms from database
area".
Time format
The format for specifying time information is defined as follows: YYYY-MM-DD hh:mm:ss, where
YYYY represents the year, MM the month, DD the day, hh the hour, mm the minute and ss the
second. For example, the time of 2 minutes and one second past 11 o'clock on July 26, 2004 is
displayed as follows: 2004-07-26 11:02:01.
For parameters "TimeFrom" and "TimeTo" the statement of data and time is also possible in
short form. Not all format fields must be filled in this case. The short form means that the
information on date and time may be lacking one or several parameters, beginning with
the value for seconds. For example, the statement may be in the form of "YYYY-MM" or "YYYY-
MM-DD hh". Using the statement "TimeFrom" = "2004-09" and "TimeTo" = "2004-10-04" all
log segments between September 2004 up to and including October 4.
Example
In the following example, all log segments since the start of the specified time period are
swapped in again, and the return value is output as a trace.
'VBS184
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Restore("D:\Folder","2004-09-14","",-1) &
vbNewLine
In the following example, all Tag Logging Slow log segments in the specified time period are
swapped in again, and the return value is output as a trace.
'VBS185
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.DataLogs.Restore("D:\Folder","2004-09-14
12:30:05","2004-09-20 18:30",-1,2) & vbNewLine
In the following example, all Alarm Logging log segments up to the specified time period are
swapped in again, and the return value is output as a trace.
'VBS186
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.AlarmLogs.Remove("","2004-09-20",-1) &
vbNewLine
See also
Logging (Page 214)
DataLogs (list) (Page 205)
AlarmLogs (list) (Page 202)
SelectAll
Description
Selects all rows in a table-based control.
Syntax
Expression.SelectAll()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
SelectedStatisticArea
Description
Executes the "Set statistics range" button function of the table view.
Syntax
Expression.SelectedStatisticArea()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTableControl (Page 347)
SelectRow
Description
Selects a specific row in a table-based control.
Syntax
Expression.SelectRow ByVal IRow As Long, Optional bExtendSelection
As Boolean
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
Parameters Description
IRow Number of the row to be selected.
bExtendSelection Indicates as an option whether the current selection will be extended. Is only rele‐
vant if multiple selections are possible.
Example
• Row 1 is currently selected. If SelectRow 4, True is called, then row 1 and row 4 are
selected.
• Row 1 is currently selected. If SelectRow 4, False or SelectRow 4 is called without
an optional parameter, then only row 4 is selected.
See also
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
ServerExport
Description
Executes the "Export log" button function of the recipe view.
Syntax
Expression.ServerExport()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ServerImport
Description
Executes the "Import log" button function of the recipe view.
Syntax
Expression.ServerImport()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
SetHTML
Description
Writes a HTML code in the display range of the HTML browser.
Syntax
Epression.SetHTML string
Expression
Required. An expression which returns an "HTMLBrowser" type object.
Example
Dim objBrowser
Set objBrowser= HMIRuntime.Screens("Screen_1").ScreenItems("HTML-Browser_1")
objBrowser.SetHTML "<h1>This is a title</h1><p>This is a <b>bold</b> text.</p>"
See also
HTMLBrowser (Page 330)
SetOperationLock
Description
Temporarily switches off the operability of a screen window. The respective screen window can
be defined as transparent. You determine the level of transparency yourself.
Note
This function is available for all screen windows except for the root screen.
Note
The contents of the temporary inoperable screen window are not updated on a PC with
Windows 7 operating system.
The contents of the screen window are updated continuously on a PC with Windows 8 or
Windows 10.
Syntax
Expression.SetOperationLock(ByVal LockState as Bool, ByVal
TransparencyLevel as Long)
Expression
Required. An expression that returns an object of the "ScreenItem" type.
Parameters
Parameters Description
True The operability of the screen window was switched off temporarily.
False The operability of the screen window was switched off temporarily.
Value Value for the transparency of the screen window
Example
In the following example, you make the contents of the screen window "MyLockedWindow"
inoperable in the Screen_1 screen by setting the "SetOperationLock" parameter to "true":
HmiRuntime.Screens("Screen_1").ScreenItems("MyLockedWindow").SetOperationL
ock true, 20
HmiRuntime.Screens("Screen_1").ScreenItems("MyLockedWindow").SetOperationL
ock true, 20
ShowColumnSelection
Description
Executes the "Select columns" button function of the table view.
Syntax
Expression.ShowColumnSelection()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTableControl (Page 347)
ShowComment
Description
Executes the "Comment dialog" button function of the alarm view.
Syntax
Expression.ShowComment()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
AlarmControl (Page 237)
ShowDisplayOptionsDialog
Description
Executes the "Display options dialog" button function of the alarm view.
Syntax
Expression.ShowDisplayOptionsDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowEmergencyQuitDialog
Description
Executes the "Emergency acknowledgment" button function of the alarm view.
Syntax
Expression.ShowEmergencyQuitDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowHelp
Description
Executes the "Help" button function of the control.
Syntax
Expression.ShowHelp()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
FunctionTrendControl (Page 309)
AlarmControl (Page 237)
ShowHideList
Description
Executes the "List of alarm to hide" button function of the alarm view.
Syntax
Expression.ShowHideList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowHitList
Description
Executes the "Hit list" button function of the alarm view.
Syntax
Expression.ShowHitList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowInfoText
Description
Executes the "About dialog" button function of the alarm view.
Syntax
Expression.ShowInfoText()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowLockDialog
Description
Executes the "Lock dialog" button function of the alarm view.
Syntax
Expression.ShowLockDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowLockList
Description
Executes the "Lock list" button function of the alarm view.
Syntax
Expression.ShowLockList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowLongTermArchiveList
Description
Executes the "Historical alarm list (long-term)" button function of the alarm view.
Syntax
Expression.ShowLongTermArchiveList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowMessageList
Description
Executes the "Alarm list" button function of the alarm view.
Syntax
Expression.ShowMessageList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowPercentageAxis
Description
Executes the "Relative axis" button function of the f(t) trend view.
Syntax
Expression.ShowPercentageAxis()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTrendControl (Page 359)
ShowPropertyDialog
Description
Executes the "Configuration dialog" button function of the control.
Syntax
Expression.ShowPropertyDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
ShowSelectArchive
Description
Executes the "Select data connection" button function of the recipe view.
Syntax
Expression.ShowSelectArchive()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ShowSelection
Description
Executes the "Selection dialog" button function of the recipe view.
Syntax
Expression.ShowSelection()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ShowSelectionDialog
Description
Executes the "Selection dialog" button function of the alarm view.
Syntax
Expression.ShowSelectionDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowSelectTimeBase
Description
Executes the "Timebase dialog" button function of the recipe view.
Syntax
Expression.ShowSelectTimeBase()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ShowShortTermArchiveList
Description
Executes the "Historical alarm list (short-term)" button function of the alarm view.
Syntax
Expression.ShowShortTermArchiveList()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowSort
Description
Executes the "Sorting dialog" button function of the recipe view.
Syntax
Expression.ShowSort()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ShowSortDialog
Description
Executes the "Sorting dialog" button function of the alarm view.
Syntax
Expression.ShowSortDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowTagSelection
Description
Executes the "Select data connection" button function of the control.
Syntax
Expression.ShowTagSelection()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
ShowTimebaseDialog
Description
Executes the "Timebase dialog" button function of the alarm view.
Syntax
Expression.ShowTimebaseDialog()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
ShowTimeSelection
Description
Executes the "Select time range" button function of the control.
Syntax
Expression.ShowTimeSelection()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
ShowTrendSelection
Description
Executes the "Select trends" button function of the f(t) and f(x) trend views.
Syntax
Expression.ShowTrendSelection()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
-- -
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
StartStopUpdate
Description
Executes the "Start" or "Stop" button function of the control.
Syntax
Expression.StartStopUpdate()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
OnlineTableControl (Page 347)
FunctionTrendControl (Page 309)
Stop
Description
Closes WinCC Runtime.
Syntax
Expression.Stop()
Expression
Required. An expression which returns an object of the type "HMIRuntime".
Parameters
--
See also
HMIRuntime (Page 209)
Trace
Description
Returns a user-defined text through the operating system channel for debug alarms.
The HMIRuntime.Trace method works only for WinCC Runtime Professional. The text
transferred as a parameter can be displayed with the "Print job/Script diagnostics"
object or the "ApDiag" diagnostics tool. The "ApDiag" diagnostics tool is installed by
default with Runtime Professional. The diagnostics tool is available at the following
path: "C:\Program Files (x86)\Siemens\Automation\SCADA-RT_V11\WinCC\uTools".You can
find additional information on the Internet (https://support.industry.siemens.com/cs/de/en/
view/102777629).
If a trace is needed for Runtime Advanced or on a panel, the "ShowSystemAlarm" system
function can be used.
Syntax
Expression.Trace"STRING"
Expression
Required An expression which returns an "HMIRuntime" type object.
Parameters
STRING
The text which is issued as a debug alarm.
Example
In the following example a debug alarm is issued:
'VBS example trace
HMIRuntime.Trace "Customized error message"
See also
HMIRuntime (Page 209)
UnhideAlarm
Description
Executes the "Unhide alarm" button function of the alarm view.
Syntax
Expression.UnhideAlarm()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
UnlockAlarm
Description
Executes the "Unlock alarm" button function of the alarm view.
Syntax
Expression.UnlockAlarm()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
AlarmControl (Page 237)
UnselectAll
Description
Removes all selections from the cells of a table-based control.
Syntax
Expression.UnselectAll()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
UnselectRow
Description
Removes the selections from a specific cell of a table-based control.
Syntax
Expression.UnselectRow(ByVal IRow As Long)
Expression
Required. An expression that returns an object of the "ScreenItem" type.
Parameters
Long
Parameters Description
IRow Number of rows whose selection will be removed.
See also
OnlineTableControl (Page 347)
TrendRulerControl (Page 441)
UserArchiveControl (Page 466)
AlarmControl (Page 237)
Write
Property Allocation
Value Tag values set by the user (unchanged)
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError 0
ErrorDescription ""
If the value of the tag is not set successfully, the properties of the tag object are assigned the
following values:
Property Allocation
Value Tag values set by the user (unchanged)
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError Write operation error codes
ErrorDescription Error description on LastError
syntax
Expression.Write [Value],[Writemode]
Expression
Necessary. An expression which returns a tag object.
Parameters
The value to be written can be transferred directly to the method as a parameter. If the parameter
is not specified, the value in the "Value" property is used. The "Writemode" option parameter can
be used to select whether the tag value should be written synchronously or asynchronously. If
the "Writemode" parameter is not used, writing is performed asynchronously as its default value.
During the writing process, no information is supplied on the status of the tags.
The "Value" property contains the value which was set before or during the writing
operation, therefore is may not correspond to the real current value of the tag. If the data on
the tag should be updated, use the Read method.
Parameters Description
Value (optional) The tag value is specified. The specified value over‐
writes the value in the "Value" property in the tag
object.
The tag value is not specified. The tag receives the
current value from the "Value" property of the tag
object.
Writemode (optional) 0 or empty: The tag value is written asynchronous‐
ly. 0 is the default value.
1: The tag value is written synchronously.
On asynchronous writing, it is written immediately into the tag image. The user does not
receive any feedback if the value has been written in the programmable controller, too.
In the case of synchronous writing (direct to the PLC), the writing operation actually occurs
when the PLC is ready to operate. The use receives a check-back message if the writing
operation was not successful.
Example
Asynchronous writing
'VBS104
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Value = 5
objTag.Write
MsgBox objTag.Value
or
'VBS105
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Write 5
MsgBox objTag.Value
Synchronous writing
'VBS106
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Value = 5
objTag.Write ,1
MsgBox objTag.Value
or
'VBS107
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Write 5, 1
MsgBox objTag.Value
Expression
Necessary. An expression which returns an object of type "TagSet".
Parameters
In order to write different values, the "Value" property of individual tag objects must be set, and
write must be called thereafter without the "Value" parameter. Since the write commands are
grouped into one call, it results in improved performance compared to single calls.
In a TagSet object, it is not possible to pass on a value using the "Write" method. Individual
values must be set using the "Value" property of the individual tag objects.
Example
The following example shows how tags are included in the TagSet list, how tag values are set and
subsequently written.
'VBS173
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Wert1"
group.Add "Wert2"
group("Wert1").Value = 3
group("Wert2").Value = 9
group.Write
If you set the optional parameter "Writemode" equal to 1, the process tags are written
synchronously (directly to AS).
group.Write 1
WriteTags
Description
Executes the "Write tags" button function of the recipe view.
Syntax
Expression.WriteTags()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
UserArchiveControl (Page 466)
ZoomArea
Description
Executes the "Zoom area" button function of the f(t) and f(x) trend views.
Syntax
Expression.ZoomArea()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
ZoomInOut
Description
Executes the "Zoom +/-" button function of the f(t) and f(x) trend views.
Syntax
Expression.ZoomInOut()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
ZoomInOutTime
Description
Executes the "Zoom time axis +/-" button function of the f(t) trend view.
Syntax
Expression.ZoomInOutTime()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTrendControl (Page 359)
ZoomInOutValues
Description
Executes the "Zoom value axis +/-" button function of the f(t) trend view.
Syntax
Expression.ZoomInOutValues()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameter
--
See also
OnlineTrendControl (Page 359)
ZoomInOutX
Description
Executes the "Zoom X axis +/-" button function of the f(x) trend view.
Syntax
Expression.ZoomInOutX()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
FunctionTrendControl (Page 309)
ZoomInOutY
Description
Executes the "Zoom Y axis +/-" button function of the f(x) trend view.
Syntax
Expression.ZoomInOutY()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
FunctionTrendControl (Page 309)
ZoomMove
Description
Executes the "Move trend area" button function of the f(t) and f(x) trend views.
Syntax
Expression.ZoomMove()
Expression
Required. An expression that returns an object of the type "ScreenItem".
Parameters
--
See also
OnlineTrendControl (Page 359)
FunctionTrendControl (Page 309)
Introduction
When databases are accessed, a value is returned after execution. Values starting with "0x8..."
represent an error message. Values not starting with "0x8..." represent a status message.
Status messages
The following status messages are defined:
0x0 OK
0x1 The function has not detected any errors in the parameter assignment or internally. Possible
reasons for this return value include:
Error messages
The following error messages are defined:
2.1.1 ActivateNextScreen
Description
WinCC saves the names of the screens opened by the user during runtime as well as the
sequence in which these screens were opened.
Can only be used in C scripting.
The maximum size of the screen buffer is specified in the "Runtime settings > Screens >
Screen buffer" editor.
The ActivateNextScreen system function now opens the screen that was opened before the
last call of ActivatePreviousScreen.
Syntax
BOOL ActivateNextScreen();
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The ActivateNextScreen function is used in the following program code to call the next screen
and to save the return value to the b_error tag.
{
BOOL b_error;
if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}
2.1.2 ActivatePreviousScreen
Description
WinCC saves the names of the screens opened by the user during runtime as well as the
sequence in which these screens were opened.
The system function can be used in C scripting only.
The maximum size of the screen buffer is specified in the "Runtime settings > Screens >
Screen buffer" editor.
The ActivatePreviousScreen system function now opens the screen which was open before
the currently open screen.
Syntax
BOOL ActivatePreviousScreen();
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The ActivatePreviousScreen function is used in the following program code to call the previous
screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.
{
BOOL b_error;
if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}
2.1.3 ActivateScreen
Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent area or vice versa.
Parameters
Screen name
Name of the screen to which you change.
Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
• If the focus is in the permanent area when the system function is called up, the permanent
area maintains the focus.
• If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
Note
If the "Reach margin" event is assigned to the "ActivateScreen" system function, only the
value "0" is valid for the "Object number" parameter. The active object is not defined by the
object number, but rather by the X position it had prior to the screen change.
Example
The following program code activates "Screen_2" with the ActivateScreen function, for example,
when you click a button.
Sub ActivateScreen_2()
'User-defined code
'' i. e. when pressing a button
ActivateScreen "Screen_2",0
2.1.4 ActivateScreenInScreenWindow
Description
Performs a screen change to the specified screen in a specified screen window.
Parameters
Screen name
Name of the screen to be displayed in the screen window.
Screen window
Name of the screen window in which the new screen is to be displayed.
Example
The ActivateScreenInScreenWindow function is used in the following program code to activate
the "Screen_2" screen when you click a button.
{
// User defined code
// i.e. when pressing a button
ActivateScreenInScreenWindow (GetParentScreen(screenName),
GetParentScreenWindow(screenName), "Screen_2");
...
}
2.1.5 ActivateStartScreen
Description
Opens the configured start screen.
Can only be used in C scripting.
Syntax
BOOL ActivateStartScreen();
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The ActivateStartScreen function is used in the following program code to call the configured
start screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.
{
BOOL b_error;
if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}
2.1.6 ActivateStoredScreen
Description
Opens the screen saved with the StoreScreen system function.
Can only be used in C scripting.
Syntax
BOOL ActivateStoredScreen();
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The ActivateStoredScreen function is used in the following program code to call the stored
screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.
{
BOOL b_error;
if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}
See also
StoreScreen (Page 1484)
2.1.7 DateToSystemTime
Description
Converts a date-clock time specification in DATE format into the SYSTEMTIME data format.
Can only be used in C scripting.
Syntax
DateToSystemTime(Value, PointerToTime);
Parameters
Value
Value in DATE data format
PointerToTime
Pointer to the result in the SYSTEMTIME format
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
BOOL BRet;
SYSTEMTIME st_1, st_2;
DATE d_1, d_2; // wtypes.h. DATE type. Visual Studio documnetation.
GetSystemTime( &st_1 );
2.1.8 DecreaseTag
Description
Subtracts the given value from the tag value.
X=X-a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system function
to assign the tag value to the auxiliary tags.
If you configure the system function for events of an alarm and the tag is not being used in
the current screen, it is not ensured that the actual tag value is being used in the PLC. You
can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag
The tag from which the given value is subtracted.
Value
The value which is subtracted.
Example
The following program code decrements the value at the varX tag by the value at the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.
{
BYTE varX;
BYTE value;
//user input
...
BYTE old_value = varX;
//Decrease tag
DecreaseTag(varX, value);
2.1.9 GetLink
Function
Indicates the current tag connection of object properties.
Syntax
BOOL GetLink(LPCTSTR lpszPictureName, LPCTSTR lpszObjectName, LPCTSTR
lpszPropertyName, LPLINKINFO *pLink);
Parameter
lpszPictureName
Screen name
lpszObjectName
Object name
lpszPropertyName
Object property
pLink
Pointer to a structure of the type: LINKINFO
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
See also
Structure definition LINKINFO (Page 1539)
2.1.10 GetLinkedTag
Description
Returns the name of the tag which is logically linked to the specified object property.
Can only be used in C scripting.
Syntax
char* GetLinkedTag(ScreenName, Object, NameOfProperty);
Parameters
ScreenName
Pointer to the name of the screen.
Object
Pointer to the name of the object.
NameOfProperty
Pointer to the name of the object property.
Return value
Pointer to the name of the tag which is logically linked to the specified object property.
Note
Return value for user data types on the faceplate
If a user data type is directly interconnected on the faceplate, no tag name is returned. A tag
name is only returned if the structure elements of the user data type are interconnected
individually on the faceplate.
Example
The following program code saves the return value of function "GetLinkedTag" to the
"pszVarName" tag. If the return value is valid, it is saved with the maximum path length to the
szVAarName tag. The saved return value can be processed in a following code.
char CFunktion()
{
char* pszVarName = NULL;
char szVarName[_MAX_PATH+1]; //Get the TagName
pszVarName = GetLinkedVariable("gs_stand_graph_00","Textfield6","Visible"); //Copy the
string
if (strcmp (pszVarName,"")!= 0)
{
strncpy(szVarName,pszVarName,_MAX_PATH);
}
else printf("The property 'visible' is not dynamized\r\n");
//User defined code where the
//user can do something with the returnvalue
...
}
2.1.11 GetLocalScreen
Description
Returns a pointer to the screen name.
Can only be used in C scripting.
Syntax
char* GetLocalScreen(ScreenName);
Parameters
ScreenName
Pointer to the name of the screen.
Return value
Pointer to the name of the screen.
Note
The syntax of the transferred call parameter "ScreenName" must correspond to that formed by
the graphics system for the screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Screen
_name>...
Principle
A "Screen_A" contains a "Screen_window_B". Another screen is called in the screen window and
visualized as minimized image, etc.
Example
The following program code saves the return value of the function GetLocalScreen to the
pszScrName tag. If the return value is valid (not NULL), it is saved with maximum_MAX_PATH
characters to the szScrName tag.
{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];
2.1.12 GetLanguageByLocaleID
Description
Determines the current Runtime language.
Can only be used in C scripting.
Syntax
DWORD GetLanguageByLocaleID ();
Return value
Language ID.
The following assignments apply (hexadecimal language code):
Example
The following program code reads out the current Runtime language and saves the return value
in the rt_language tag.
The saved return value can be processed in the following code (in this case, with printf
output).
{
DWORD rt_language;
2.1.13 GetParentScreen
Description
The function determines the name of the parent screen from a specified screen path.
Can only be used in C scripting.
Syntax
char* GetParentScreen(ScreenName);
Parameters
ScreenName
Pointer to the name of the screen. The syntax of the transferred call parameter Screen name
must correspond to that formed by the graphics system for the screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Screen
_name>...
Note
The "." character is used to distinguish between screen and screen object names. The ":"
character is used for the hierarchy structuring. Therefore, use only the "-" or "_" as a delimiter in
the name designations.
Return value
Name of the parent screen.
Principle
A "Screenwindow_1" screen window is in a "Screen_1" screen. In the screen window, the screen
becomes "Screen_2" with the "Screenwindow_2" screen window, etc.
Screen path: Screen_1.Screenwindow_1:Screen_2.Screenwindow_2:Screen_3
GetParentScreen returns:
• "Screen_2", if the system function is called in the "Screen_3" screen.
• "Screen_1", if the system function is called in the "Screen_2" screen.
GetParentScreenwindow returns:
• "Screenwindow_2", if the system function is called in the "Screen_3" screen.
• "Screenwindow_1", if the system function is called in the "Screen_2" screen.
Example
The following program code saves the return value of function GetParentScreen to the
pszScrName tag. If the return value is valid (not NULL), it is saved with maximum_MAX_PATH
characters to the szScrName tag.
{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];
2.1.14 GetParentScreenWindow
Description
The function determines the name of the parent screen window from a transferred screen path.
Can only be used in C scripting.
Syntax
char* GetParentScreenWindow(ScreenName);
Parameters
ScreenName
Pointer to the name of the screen. The syntax of the transferred Screen name call parameter
must correspond to that formed by the graphics system for the screen paths:
<Screen name>.<screen window name>:<screen name>.<screen window name>:<screen
name>...The "." character is used to distinguish between screen and screen object names.
The ":" character is used for the hierarchy structuring. Therefore, use only the "-" or "_" as a
delimiter in the name designations.
Note
The "." character is used to distinguish between screen and screen object names. The ":"
character is used for the hierarchy structuring. Therefore, use only the "-" or "_" as a delimiter in
the name designations.
Return value
Name of the parent screen window.
Principle
A "Screenwindow_1" screen window is in a "Screen_1" screen. In the screen window, the screen
becomes "Screen_2" with the "Screenwindow_2" screen window, etc.
Screen path: Screen_1.Screenwindow_1:Screen_2.Screenwindow_2:Screen_3
GetParentScreen returns:
• "Screen_2", if the system function is called in the "Screen_3" screen.
• "Screen_1", if the system function is called in the "Screen_2" screen.
GetParentScreenwindow returns:
• "Screenwindow_2", if the system function is called in the "Screen_3" screen.
• "Screenwindow_1", if the system function is called in the "Screen_2" screen.
Example
The following program code saves the return value of the function GetParentScreenWindow to
the pszScrName tag. If the return value is valid (not NULL), it is saved with maximum_MAX_PATH
characters to the szScrName tag.
{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];
2.1.15 GetProp
2.1.15.1 GetPropBOOL
Description
Returns the current status of a property of data type "BOOL".
Can only be used in C scripting.
Syntax
BOOL GetPropBOOL(ScreenName, Object, NameOfTheProperty)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code reads out whether the object is visible or not. The value is saved to
the b_error tag.
{
BOOL b_error;
if(b_error)
{
// User defined code if the
// object is visible
...
}
else
{
// User defined code if the
// object is not visible
...
}
}
2.1.15.2 GetPropChar
Description
Returns the value of a property of data type "Char".
Can only be used in C scripting.
Syntax
Char* GetPropChar(ScreenName, Object, NameOfTheProperty)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Return value
Value of the property in data type "Char".
Example
The following program code reads the tooltip text from the object using the GetPropChar
function and processes it as follows:
1. Saving the return value to the pszProp tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. The first 13 characters of the character sequence are saved in the szProp tag.
{
char* pszProp = NULL;
char szProp[14];
if(pszProp != NULL)
{
//Copy the string and trim
strncpy(szProp,pszProp,13);
// print trimmed string
printf ("Short description of tooltip: %s\r\n", szProp);
}
...
}
2.1.15.3 GetPropDouble
Description
Returns the value of a property of data type "Double".
Can only be used in C scripting.
Syntax
double GetPropDouble(ScreenName, Object, NameOfTheProperty)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Return value
Value of the property in data type "Double".
Example
The following program code reads the "BackColor" property (background color of the "Button_1"
object) by means of GetPropDouble function and processes the return value as follows:
1. Saving the return value to the szprop tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. Output of the background color
{
double szProp = NULL;
if(szProp != NULL)
{
// print output value
printf ("Background color: %s\r\n", szProp);}
}
...
}
2.1.15.4 GetPropLong
Description
Returns the value of a property of data type "long".
Can only be used in C scripting.
Syntax
long GetPropLong(ScreenName, Object, NameOfTheProperty)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Return value
Value of the property in data type "long".
Example
The following program code reads the CaptionBackColor property (background color of the
TemperatureField object) by means of GetPropLong function and processes the return value as
follows:
1. Saving the return value to the szProp tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. Output
{
long szProp = NULL;
if(szProp != NULL)
{
// print caption
printf ("Caption of window: %d\r\n", szProp);
}
...
}
2.1.16 GetServerTagPrefix
Description
In order for a WinCC client in a distributed system to access tags of the associated server, the tag
names must be expanded to include the server prefix.
Note
This system function is not supported at present.
A pointer of type "char" to server prefix, tag prefix, and window prefix is returned in each case.
The user is not permitted to change the memory (including no strcat) or release it.
Can only be used in C scripting.
Syntax
void GetServerTagPrefix(ppszServerPrefix, ppszTagPrefix, ppszWindowPrefix);
Return value
ppszServerPrefix
Pointer to a pointer that references the server prefix
ppszTagPrefix
Pointer to a pointer that references the tag prefix
ppszWindowPrefix
Pointer to a pointer that references the window prefix
Example
The following program code retrieves the server prefix, tag prefix and window prefix checks
their validity. If an error occurs, a text is output and the function is exited. If the check is
successful a tag name is created and returned. Processing is executed as follows:
1. Declaration of pointer pszServerPrefix, pszTagPrefix and pszWindowPrefix for the three
prefixes
2. Initialization of the nServerPrefixLen, nTagPrefixLen and nTagLen tags
They serve as a buffer for the string length of the prefixes to be read out.
3. Initialization of the myTagName tag
4. Reading out of server prefix, tag prefix and window prefix
5. Case distinction: Server prefix
– No server prefix returned: a text is output and the function is exited.
– Server prefix returned: Its length is determined and saved in the nServerPrefixLen tag.
6. If a tag prefix is returned, its length is determined and saved in the nTagPrefixLen tag.
7. Determines the length of the tag name and saves it in the nTagLen tag.
8. Case distinction: Permissible length for tag name
– Permissible length exceeded: a text is output and the function is exited.
– Permissible length not exceeded: The tag name required for a client environment is
compiled.
{
char* pszServerPrefix;
char* pszTagPrefix;
char* pszWindowPrefix;
int nServerPrefixLen = 0;
int nTagPrefixLen = 0;
int nTagLen = 0;
char myTagName[MAX_DM_VAR_NAME+1];
2.1.17 GetTag
Description
The GetTagXXX function calculates the value of a tag of the specified data type.
Can only be used in C scripting:
The following table shows the different GetTag functions for reading the tag value:
Syntax
<Type><FunctionName><(Parameter)>;
Example: BYTE GetTagByte(Tag_Name);
Parameter
Tag_Name
Tag name
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
Value of the tags in the specified type.
System function "GetTagChar" returns a pointer to a string that contains the tag value.
System function "GetTagRaw" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.
Example
The following program code uses the GetTagByte function to read out the value of the
gs_tag_byte tag and saves it to the bvalue tag.
{
BYTE bvalue;
// print value
printf ("Value of gs_tag_byte: %d\r\n", bvalue);
...
}
Function
Determines the value of a tag of data type "Date/Time".
Syntax
SYSTEMTIME GetTagDateTime(Tag_Name);
Parameter
Tag_Name
Name of the tag
Return value
Value of the tag in the data type "Date/Time".
Description
The values, status, and quality code of several tags are established and saved in the repsective
addresses in the specified format . The values are read explicitly from the AS.
Two DWORD arrays are transferred, in the member of which the status and quality codes of
the individual tags will be located after the system function has been called. The size of the
arrays must be large enough to provide sufficient storage space for the status and quality
codes.
Can only be used in C scripting.
Syntax
BOOL GetTagMultiStateQCWait(pdwState, pdwQualityCode, pFormat);
Parameters
pdwState
Field in which the status of the individual tags is created after the system function cycle.
pdwQualityCode
Field in which the quality code of the individual tag is created after the system function cycle.
pFormat
Format description (type) for all requested tags, followed by the name and address of the
value for each tag.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the GetTagMultiStateQCWait function to read the value from
the "gs_tag_XXX" tag and saves these values to the Ivalue1, Ivalue2 tags, etc.
1. Preprocessor definition for "DATA_SIZE" (in this case for 5 tags)
2. Creating the DWord fields
– dwState Tag status field
– dwQc Field for quality codes
3. Tag definition for buffering
4. Execution of the function GetTagMultiStateQCWait
The value read is written to the addresses of the tags.
{
#define DATA_SIZE 5
DWORD dwState[DATA_SIZE];
DWORD dwQC[DATA_SIZE];
See also
Quality codes of HMI tags (Page 1550)
Constants (Page 1555)
Description
The values and status of several tags are determined and saved in the respective addresses in the
specified format. The values are read explicitly from the AS.
The system function must be given a DWORD array, in the member of which the status of the
individual tags will be located after the system function has been called. The size of the array
must be large enough to provide sufficient storage space for the status.
Can only be used in C scripting.
Syntax
BOOL GetTagMultiStateWait(pdwState, pFormat);
Parameters
pdwState
Field in which the tag status is saved.
pFormat
Format description (type) for all requested tags, followed by the name and address of the
value for each tag.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the GetTagMultiStateWait function to read the value from the
"gs_tag_XXX" tag and saves these values to the Ivalue1, Ivalue2 tags, etc.
1. Preprocessor definition for "DATA_SIZE" (in this case for 5 tags)
2. Creating DWord field dwState for the tag status
3. Tag definition for buffering
4. Execution of the function GetTagMultiStateWait
The value read is written to the addresses of the tags.
{
#define DATA_SIZE 5
DWORD dwState[DATA_SIZE];
See also
Constants (Page 1555)
Description
The values of several tags are determined and saved in the respective addresses in the specified
format. The value is read explicitly from the AS. The system function uses SysMalloc to allocate
memory to the tag value.
Can only be used in C scripting.
Syntax
BOOL GetTagMultiWait(pFormat,...);
Parameters
pFormat
Format description for all requested tags along with name and address of the value for each
tag.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The GetTagMultiWait function is used in the following program code to read several tags of
different types:
1. Declaration of three tags as memory for three different tag types
2. Declaration of the boolean tag ok for buffering the return value (TRUE/FALSE)
3. Reading the three tags and saving the values to the corresponding addresses.
The return value of the function is saved to the ok tag.
4. Output of the three tags with tag type prefix
DWORD dwVar1Value;
char* szVar2Value;
//memory for values allocated via SysMalloc
double dbVar3Value;
BOOL ok;
Description
The GetTagStateXXX function calculates the value of a tag of the specified data type. It also
returns the status of the tags.
Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitState(Tag_Name, lp_dwstate);
Parameters
Tag_Name
Tag name
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
Value of the tags in the specified type.
The system function "GetTagCharState" returns a pointer to a value of the tag of data type
"char".
System function "GetTagRawState" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.
Example
The following program code uses the GetTagBitState function to read out the value of the
gs_tag_bit tag and saves it to the bValue tag.
The status is stored in the address of the dwState tag.
A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).
{
DWORD dwState;
BOOL bValue;
dwState = 0xFFFFFFFF;
See also
Constants (Page 1555)
Description
The GetTagStateQC function calculates the value of a tag of the specified data type. It also
returns the status and quality code of the tags.
Can only be used in C scripting.
The following table shows the different GetTagStateQC functions for reading the tag value:
Type Function name Parameters PLC data type HMI data type
BOOL GetTagBitStateQC Tag Tag_Name, Binary tag Bool
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BYTE GetTagByteStateQC Tag Tag_Name, Unsigned 8-bit UByte
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
char* GetTagCharStateQC Tag Tag_Name, Text tag 8-bit or text tag 16- String
PDWORD lp_dwstate, bit
PDWORD pdwQuality‐
Code
double GetTagDoubleSta‐ Tag Tag_Name, Floating point 64-bit Double
teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
DWOR GetTagDWordSta‐ Tag Tag_Name, Unsigned 32-bit UInteger
D teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
float GetTagFloatStateQC Tag Tag_Name, Floating point 32-bit Float
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BOOL GetTagRawStateQC Tag Tag_Name, BYTE Raw data type Raw
pValue[], DWORD size,
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
signed GetTagSByteStateQC Tag Tag_Name, Signed 8-bit Byte
char PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
long GetTagSDWordSta‐ Tag Tag_Name, Signed 32-bit Integer
int teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
Type Function name Parameters PLC data type HMI data type
short GetTagSWordSta‐ Tag Tag_Name, Signed 16-bit Short
int teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
WORD GetTagWordStateQC Tag Tag_Name, Unsigned 16-bit UShort
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitStateQC(Tag_Name, lp_dwstate, pdwQualityCode);
Parameters
Tag_Name
Tag name
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pdwQualityCode
Pointer on a DWORD in which the quality code of the tag is created after the system function
cycle.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
Value of the tags in the specified type.
The system function "GetTagCharStateQC" returns a pointer to a value of the tag of data type
"char".
The system function "GetTagRawStateQC" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.
Example
The following program code uses the GetTagBitStateQC function to read the value from the
gs_tag_bit tag and saves it to the ok tag.
The status and quality code is saved to the dwState and dwQC addresses of the tag.
A specific code will be executed, depending on the return value in the tag (TRUE/FALSE).
{
DWORD dwState;
DWORD dwQC;
BOOL ok;
dwState = 0xFFFFFFFF;
See also
Quality codes of HMI tags (Page 1550)
Constants (Page 1555)
Description
The GetTagStateQCWait function calculates the value of a tag of the specified data type. The
value is read explicitly from the AS. It also returns the status and quality code of the tags.
Can only be used in C scripting.
The following table lists the different GetTagStateQCWait functions for reading the tag value:
Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitStateQC(Tag_Name, lp_dwstate, pdwQualityCode);
Parameters
Tag_Name
Tag name
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pdwQualityCode
Pointer on a DWORD in which the quality code of the tag is created after the system function
cycle.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
Value of the tags in the specified type.
The system function "GetTagCharStateQCWait" returns a pointer to a value of the tag of data
type "char".
The system function "GetTagRawStateQCWait" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.
Example
The following program code uses the GetTagBitStateQCWait function to read the value from the
gs_tag_bit tag and saves it to the bValue tag.
The status and quality code is saved to the dwState and dwQC addresses of the tag.
A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).
{
DWORD dwState;
DWORD dwQC;
BOOL bValue;
dwState = 0xFFFFFFFF;
See also
Quality codes of HMI tags (Page 1550)
Constants (Page 1555)
Description
The GetTagStateWait function calculates the value of a tag of the specified data type. The value
is read explicitly from the AS. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different GetTagStateWait functions for reading the tag value:
Syntax
<Type><FunctionName><(Parameter)>
Example: BOOL GetTagBitStateWait(Tag_Name, lp_dwstate)
Parameters
Tag_Name
Tag name
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
Value of the tags in the specified type.
The system function "GetTagCharStateWait" returns a pointer to a value of the tag of data
type "char".
Example
The following program code uses the GetTagBitStateWait function to read the value from the
gs_tag_bit tag and saves it to the bValue tag.
The status is stored in the address of the dwState tag.
A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).
{
DWORD dwState;
BOOL bValue;
dwState = 0xFFFFFFFF;
See also
Constants (Page 1555)
Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value.
Can only be used in C scripting.
Syntax
BOOL GetTagValue(lpdmVarKey, lpdmresult, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCT"
lpdmError
Pointer on the structure that contains the error description.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The GetTagValue function is used in the following program code to calculate the value in varKey.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:
BOOL keyFound;
if (keyFound)
{
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}
Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. It also returns the status and quality code of the tags.
The system function can be used in C scripting only.
Syntax
BOOL GetTagValueStateQC(lpdmVarKey, lpdmresult, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCTEX"
lpdmError
Pointer on the structure that contains the error description.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The GetTagValueStateQC function is used in the following program code to calculate the value
in varKey.
The status and quality code is saved to the dwState and dwQC addresses of the tag.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCTEX result;
CMN_ERROR error:
// clarify (DM_VAR_UPDATE_STRUCTEX already contains QualityCode)
DWORD dwState;
DWORD dwQC;
BOOL keyFound;
if (keyFound)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}
Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. The value is read explicitly from the AS. It also returns the
status and quality code of the tags.
Syntax
BOOL GetTagValueStateQCWait(lpdmVarKey, lpdmresult, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCTEX"
lpdmError
Pointer on the structure that contains the error description.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the function GetTagValueStateQCWait for reading
The status and quality code is saved to the dwState and dwQC addresses of the tag.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCTEX result;
CMN_ERROR error:
// clarify (DM_VAR_UPDATE_STRUCTEX already contains QualityCode)
DWORD dwState;
DWORD dwQC;
BOOL keyFound;
if (keyFound)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}
Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. The value is read directly from the AS.
Can only be used in C scripting.
Syntax
BOOL GetTagValueWait(lpdmVarKey, lpdmresult, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCT"
lpdmError
Pointer on the structure that contains the error description
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The GetTagValueWait function is used in the following program code to calculate the value in
varKey.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:
BOOL keyFound;
if (keyFound)
{
// succeeded, key found
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}
Description
The GetTagWaitXXX function calculates the value of a tag of the specified data type. The value
is read explicitly from the AS.
Type Function name Parameters PLC data type HMI data type
BOOL GetTagBitWait Tag Tag_Name Binary tag Bool
BYTE GetTagByteWait Tag Tag_Name Unsigned 8-bit UByte
char* GetTagCharWait Tag Tag_Name Text tag 8-bit or text tag 16- String
bit
double GetTagDoubleWait Tag Tag_Name Floating point 64-bit Double
DWORD GetTagDWordWait Tag Tag_Name Unsigned 32-bit UInteger
float GetTagFloatWait Tag Tag_Name Floating point 32-bit Float
BOOL GetTagRawWait Tag Tag_Name, Raw data type Raw
BYTE* pValue,
DWORD size
char GetTagSByteWait Tag Tag_Name Signed 8-bit Byte
long int GetTagSDWordWait Tag Tag_Name Signed 32-bit Integer
short int GetTagSWordWait Tag Tag_Name Signed 16-bit Short
WORD GetTagWordWait Tag Tag_Name Unsigned 16-bit UShort
Syntax
<Type><FunctionName><(Parameter)>;
Example: BYTE GetTagByteWait(Tag_Name);
Parameters
Tag_Name
Tag name
pValue
Pointer to a byte field containing the value of the raw data tags.
Return value
Value of the tags in the specified type.
System function "GetTagCharWait" returns a pointer to a string that contains the tag value.
System function "GetTagRawWait" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.
Example
The following program code uses the GetTagByteWait function to read the value from the
gs_tag_byte tag and saves it to the bvalue tag.
{
BYTE bvalue;
// print value
printf ("Value of gs_tag_byte: %d\r\n", bvalue);
...
}
2.1.18 IncreaseTag
Description
Adds the given value to the value of the tags.
X=X+a
Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system function
to assign the tag value to the auxiliary tags.
If you configure the system function for events of an alarm and the tag is not being used in
the current screen, it is not ensured that the actual tag value is being used in the PLC. You
can improve the situation by setting the "Cyclic continuous" acquisition mode.
Parameters
Tag
The tag to which the given value is added.
Value
The value that is added.
Example
The following program code increments the value of the varX tag by the value in the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.
{
BYTE varX;
BYTE value;
//user input
...
BYTE old_value = varX;
//Increase tag
IncreaseTag(varX, value);
2.1.19 InquireLanguage
Description
Determines all languages configured in the text library for the runtime.
Use Pointer to a counter to specify the storage location for language IDs.
The system function can be used in C scripting only.
Syntax
DWORD* InquireLanguage(PointerToACounter);
Parameters
PointerToACounter
Pointer to the number of language IDs found
Return value
Pointer to a field containing the established language IDs.
The following assignments apply (hexadecimal language code):
Example
The following program code uses the InquireLanguage function to query the language
configured at runtime and processes these as follows:
1. Saving the queried language ID to the tag language
2. Saving the number of languages to the tag count
3. Formatted output of the ID and number of languages
{
DWORD count;
DWORD* language;
int i;
2.1.20 InverseLinearScaling
Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the linear
function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
X
The tag which is assigned the value calculated from the linear equation.
Y
The tag that contains the value used for calculation.
b
The value which is subtracted.
a
The value through which is divided.
Example
The following program code assigns a value to the varX tag by means of the InverseLinearScaling
function.
{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
2.1.21 InvertBit
Description
Inverts the value of the given tag of the "Bool" type:
• If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
Parameters
Tag
The tag whose bit is set.
Example
The following program code inverts the value of the Boolean tag bStatus and outputs the result
along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Invert Bit
InvertBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Invert variable
invertBit(bStatus);
2.1.22 InvertBitInTag
Description
Inverts a bit in the given tag:
• If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
• If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.
Parameters
Tag
The tag in which the given bit is set.
Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted
from right to left. The counting begins with 0.
Example
The following program code inverts a bit at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bStatusWord;
BYTE bsaved = bStatusWord;
BYTE bitposition = 2;
2.1.23 IsUserAuthorized
Description
Authentication of users.
Can only be used in C scripting.
Syntax
BOOL IsUserAuthorized(AuthorizationNumber);
Parameters
AuthorizationNumber
Authorization (numerical) to be verified.
Return value
TRUE
The user has the specified authorization.
FALSE
The user does not have the specified authorization.
Example
The following program code authenticates users by means of IsUserAuthorized function and
writes the value to the boolean tag ok.
{
BOOL ok;
DWORD authnumber;
//error handling
if(ok)
{
// user authorized
printf ( "User is authorized." );
}
else
{
// user not authorized
printf ( "Authorization failed." );
}
...
}
2.1.24 LinearScaling
Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the linear
function Y= (a *X) + b.
The inverse of this function is the "InvertLinearScaling" system function.
Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag must
be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to the
auxiliary tags.
Parameters
Y
The tag which is assigned the value calculated from the linear equation.
a
The value with which is multiplied.
X
The tag that contains the value used for calculation.
b
The value that is added.
Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.
{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;
// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);
2.1.25 ReportJob
Description
A print job or the preview for a print job is started depending on the value of the NameOfMethod
parameter.
Can only be used in C scripting.
Syntax
void ReportJob(PrintJobName, NameOfMethod)
Parameters
PrintJobName
Pointer to the name of the print job
NameOfMethod
Defines whether to start the print job or a print job preview:
• PRINTJOB: Print job is started.
• PREVIEW: Preview of the print job is started.
Example
The following program code executes a preview or print job for each content of the printmethod
tag. The printmethod tag is read by an I/O field that is connected to the strPrintJobMethod tag.
{
char* pszPrintjobName;
char* printmethod;
//error handling
if(printmethod=="PRINTJOB")
{
// message for printing completed
printf("printing done");
...
}
else
{
// User defined code if the
// job is a preview or failed
...
}
}
2.1.26 ResetBit
Description
Sets the value of a "Bool" type tag to 0 (FALSE).
Parameters
Tag
The BOOL type tag which is set to 0 (FALSE).
Example
The following program code sets the value of the Boolean tag bStatus to 0 by means of the
ResetBit function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=1
myTag.Value=bValue
'Reset Bit
ResetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 1;
BOOL bSaved = bStatus;
//Reset bit
ResetBit (bStatus);
2.1.27 ResetBitInTag
Description
Sets a bit in the specified tag to 0 (FALSE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.
Parameters
Tag
The tag in which a bit is set to 0 (FALSE).
Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Example
The following program code sets a bit to 0 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
'Reset Bit
bitposition=2
ResetBitInTag myTag, bitposition
bValue=myTag.Value
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 2;
bSaved = GetTagByte("bStatusWord");
2.1.28 Set_Focus
Function
Sets the focus on the specified object.
Syntax
BOOL Set_Focus(lpszPictureName, lpszObjectName)
Parameters
lpszPictureName
Screen name
lpszObjectName
Object name
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
2.1.29 SetBit
Description
Sets the value of a "Bool" type tag to 1 (TRUE).
Parameters
Tag
The BOOL type tag which is set to 1 (TRUE).
Example
The following program code sets the value of the Boolean tag bStatus to 1 by means of the SetBit
function and outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, strResult
'Set value
bValue=0
myTag.Value=bValue
'Set Bit
SetBit myTag
bValue=myTag.Value
//Programming language: C
{
BOOL bStatus = 0;
BOOL bSaved = bStatus;
//Set bit
SetBit (bStatus);
2.1.30 SetBitInTag
Description
Sets a bit in the given tag to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.
Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system function
instead.
Parameters
Tag
The tag in which a bit is set to 1 (TRUE).
Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.
Note
The guaranteed update of the tags used with actual process values is absolutely conditional in
terms of reliable functionality. You should therefore configure the tag in an I/O field or assign the
system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.
Example
The following program code sets a bit to 1 at the specified bitposition in the bStatusWord tag and
outputs the result along with the original bSaved value.
'Programming language: VB
Dim myTag
Dim myOutputField
Dim bValue, bSaved, bitposition, strResult
//Programming language: C
{
BYTE bSaved;
BYTE bitposition = 1;
bSaved = GetTagByte("bStatusWord");
2.1.31 SetLanguageByLocaleID
Description
Changes the language setting in Runtime.
Can only be used in C scripting.
Syntax
BOOL SetLanguageByLocaleID(dwLocaleID);
Parameters
dwLocaleID
Language ID of the language to be set
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the SetLanguage function to set the current runtime language
to German and saves the return value to the ok tag.
{
BOOL ok;
DWORD old_language;
DWORD new_language;
//error handling
if(ok)
{
// succeeded
printf ( "RT language is now German." );
}
else
{
// failed
printf ( "RT language was not updated." );
}
//print language code
printf ("Former language code: %d\r\n", old_language);
printf ("Current language code: %d\r\n", new_language);
}
See also
GetLanguageByLocaleID (Page 1384)
2.1.32 SetLanguageByName
Description
Changes the language setting in Runtime by the country name of the language to be set.
Can only be used in C scripting.
Syntax
Bool SetLanguageByName(lpszLanguage);
Parameters
lpszLanguage
Pointer to the language abbreviation according to "RFC 1766" format.
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
2.1.33 SetLink
Function
Creating a tag connection of object properties
Syntax
BOOL SetLink(LPCTSTR lpszPictureName, LPCTSTR lpszObjectName, LPCTSTR
lpszPropertyName, LPLINKINFO *pLink);
Parameter
lpszPictureName
Screen name
lpszObjectName
Object name
lpszPropertyName
Name of the object property
pLink
Pointer to a structure of the type: LINKINFO
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
See also
Structure definition LINKINFO (Page 1539)
2.1.34 SetProp
2.1.34.1 SetPropBOOL
Description
Sets an object property of data type "BOOL".
Can only be used in C scripting.
Syntax
BOOL SetPropBOOL(ScreenName, Object, NameOfTheProperty, Value)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Value
Value assigned to the object property of data type "BOOL".
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the SetPropBool function to set the property of the
gs_graph_iofield object to "Visible". The return value is saved to the ok tag.
{
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "IO field is visible." );
}
else
{
// failed
printf ( "Error - visibility not set" );
}
...
}
2.1.34.2 SetPropChar
Description
Sets an object property of data type "char".
Can only be used in C scripting.
Syntax
BOOL SetPropChar(ScreenName, Object, NameOfTheProperty, Value)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Value
Value assigned to the object property of data type "char".
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the SetPropChar function to set the Tooltiptext property of the
gs_graph_iofield object to the "Tooltiptext 1" value. The return value is saved to the ok tag.
{
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "Property of Tooltiptext is now Tooltiptext 1." );
}
else
{
// failed
printf ( "Error - property not set" );
}
...
}
2.1.34.3 SetPropDouble
Description
Sets an object property of data type "Double".
Can only be used in C scripting.
Syntax
BOOL SetPropDouble(ScreenName, Object, NameOfTheProperty, Value)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Value
Value assigned to the object property of data type "double".
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code accesses an object property in the screenName screen. In this
example, the SetPropDouble function sets the property (radius) of "Circle_1" to the value 10. The
return value is saved to the ok tag.
{
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "Radius was set." );
}
else
{
// failed
printf ( "Error - radius not set" );
}
...
}
2.1.34.4 SetPropLong
Description
Sets an object property of data type "long".
Can only be used in C scripting.
Syntax
BOOL SetPropLong(ScreenName, Object, NameOfTheProperty, Value)
Parameters
ScreenName
Screen name
Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.
NameOfTheProperty
Name of the object property
Value
Value assigned to the object property of data type "long".
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code uses the SetPropLong function to change the foreground color of
an object: In "Screen_1", the "ForeColor property of the "Button1" object is set to the value 65333
(red). The return value is saved to the ok tag.
{
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "Color was set." );
}
else
{
// failed
printf ( "Error - color not set" );
}
...
}
2.1.35 SetPropertyByConstant
Description
Specifies the value of an object property as a string.
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property is changed.
Value
The value assigned to the property.
Example
The SetPropertyByConstant function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object is
set to the value 26.
{
//Programming language: C
//Name of the picture: Trends
//Name of the f(t) trend view control: Control_1
{
//Programming language: C
//Name of the picture: Trends
Alternatively, use the password ZERO or a space string instead of the second parameter
(object).
2.1.36 SetPropertyByProperty
Description
Specifies the value of an object property with another object property.
Parameters
Screen name
Name of the screen that contains the object.
Object
Name of the object whose property value is transferred to the target object.
Property name
Name of the property whose value is transferred to the target object.
Example
The following program code uses the SetPropertyByProperty function to set the property
"ToolbarButtonClick" of the object "Control_1" in the original screen Trend_1": on the
corresponding property in the destination screen "Trend_2".
{
//Programming language: C
//Name of source picture: Trend_1
//Name of target picture: Trend_2
//Name of the f(t) trend view control: Control_1
2.1.37 SetPropertyByTag
Description
Specifies the value of an object property with a tag value.
If you want to specify the property of a screen by means of a tag value, the "Object"
parameter must be empty. For this purpose, use the following syntax, for example:
SetPropertyByTag Screen_name, Property_name, Tag_name
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object containing the property to be set with the tag value.
Tag name
Name of the tag that contains the value of the property.
Example
The SetPropertyByTag function is used in the following program code to change an object
property: When you click on the object, the object name and the screen in which the object is
located are transferred. The CaptionText in the screen window contains the value of the
HMI_value_1 tag.
{
//Programming language: C
SetPropertyByTag (screenName, objectName, "CaptionText", "HMI_value_1");
Example
The SetPropertyByTag function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object is
set to the value 26.
{
//Programming language: C
//Name of the picture: Trends
//Name of the f(t) trend view control: Control_1
2.1.38 SetPropertyByTagIndirect
Description
Writes the value of an indirect addressed tag to an object property. The tag transferred as
parameter contains the name of a second tag the value of which is read.
Parameters
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property you want to change.
Tag name
Name of the tag which, in turn, contains the name of the tag whose value is read.
Example
The SetPropertyByTagIndirect function is used in the following program code to change an
object property: .
{
//Programming language: C
SetPropertyByTagIndirect (GetParentScreen(screenName), GetParentScreenWindow(screenName),
"ScreenName", "HMI_value_1");
2.1.39 SetTag
Description
The SetTagXXX function calculates the value of a tag of the specified data type.
Can only be used in C scripting.
The following table shows the different SetTag functions for setting the tag
value:
Note
Error message when using a tag of WString type
If you use a WString type tag in a SetTag system function that was converted into a C script, an
error message is generated in the Global Script diagnostics window when the function is
executed. The function is correctly executed despite the error message.
The following SetTag functions are affected:
• SetTagWithOperatorEvent
• SetTagIndirect
• SetTagByTagIndirect
• SetTagIndirectByTagIndirect
• SetTagByProperty
• SetTagIndirectByProperty
Syntax
BOOL<FunctionName><(Parameter)>;
Parameter
Tag_Name
Tag name
value
Value of the tags in the specified data type.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagBit function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.
{
BOOL ok;
BOOL bvalue;
See also
Quality codes of HMI tags (Page 1550)
VariableStateType property (Page 1554)
2.1.39.2 SetTagDateTime
Function
Sets the value of a tag of data type "Date/Time".
Syntax
BOOL SetTagDateTime(Tag_Name, value);
Parameter
Tag_Name
Tag name
value
Value of the tag in the data type "Date/Time".
Return value
TRUE
The function itself has been completed without any errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Description
Sets the values of several tags. The system function will end only after the AS has reported the
acceptance of the value.
The system function can be used in C scripting only.
The system function must be given a DWORD array, in the member of which the status of the
individual tags will be located after the system function has been called. The size of the array
must be large enough to provide sufficient storage space for the status.
For more information, refer to the FAQs on the Internet, entry ID 26712371 (https://
support.industry.siemens.com/cs/us/en/view/26712371).
Syntax
BOOL SetTagMultiStateWait(pdwState, pFormat,...);
Parameters
pdwState
Field in which the tag status is saved.
pFormat
Format description for all the requested tags along with the name and value for each tag.
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagMultiStateWait function to set the value of several
tags.
1. Creation of a DWord arrays of the necessary size (number of tags)
2. Creation of the tags that will contain the values to be transferred to the WinCC tags by means
of the SetTagMultiStateWait function
3. Writing the values of the recently declared tags to the WinCC tags:
– gs_tag_bit including the tag value "lValue1"
– gs_tag_SByte including the tag value in the address "&lValue2"
– etc.
{
#define DATA_SIZE 5
DWORD dwData[DATA_SIZE];
See also
Constants (Page 1555)
Entry 26712371 (https://support.industry.siemens.com/cs/us/en/view/26712371)
Description
The values of several tags are set in the specified format. The system function will end only after
the AS has reported the acceptance of the value.
Can only be used in C scripting.
For more information, refer to the FAQs on the Internet, entry ID 26712371 (https://
support.industry.siemens.com/cs/us/en/view/26712371).
Syntax
BOOL SetTagMultiWait(pFormat,...);
Parameters
pFormat
Format description for all the requested tags along with the name and value for each tag.
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagMultiWait function to change the value of several
tags. The return value is saved to the ok tag.
{
BOOL ok;
//memory for values allocated via SysMalloc
DWORD dwVar1Value;
char* szVar2Value;
double dbVar3Value;
//settings
ok=SetTagMultiWait("%d%s%f", "Ernie_word", 16,
"Ernie_char", "Hallo Welt",
"Ernie_double", 55.4711);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
Example
The GetTagMultiWait function is used in the following program code to read several tags of
different types:
1. Declaration of three tags as memory for three different tag types
2. Declaration of the boolean tag ok for buffering the return value (TRUE/FALSE)
3. Reading the three tags and saving the values to the corresponding addresses.
The return value of the function is saved to the ok tag.
4. Output of the three tags with tag type prefix
DWORD dwVar1Value;
char* szVar2Value;
//Memory for the tag value is allocated by the function SysMalloc
double dbVar3Value;
BOOL ok;
See also
Entry 26712371 (https://support.industry.siemens.com/cs/us/en/view/26712371)
Description
Sets the value of a tag of a specified data type. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different SetTagStateXXX functions for reading the tag value:
Syntax
BOOL <FunctionName><(Parameter)>;
Example: BOOL SetTagBitState(Tag_Name, value, lp_dwstate);
Parameters
Tag_Name
Tag name
value
Value of the tags of a specified type.
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pFormat
Format description for all the requested tags along with name and value for each tag.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagBitState function to set the value of the gs_tag_bit
tag to TRUE and saves the return value to the ok tag. ""&dwstate" is the address of the tag in
which the tag status is stored.
The saved return value can be processed in the following code.
{
DWORD dwstate;
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
printf ("Status of gs_tag_bit: %d\r\n", dwstate);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}
See also
Constants (Page 1555)
Description
Sets the value of a tag of a specified data type. The system function will end only after the AS has
reported the acceptance of the value. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different SetTagStateWait functions for setting the tag value:
Syntax
BOOL<FunctionName><(Parameter)>;
Example: BOOL SetTagBitStateWait(Tag_Name, value, lp_dwstate);
Parameters
Tag_Name
Tag name
value
Value of the tags of a specified type.
lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagBitStateWait function to set the value of the
gs_tag_bit tag to TRUE and saves the return value to the ok tag. ""&dwstate" is the address of the
tag in which the tag status is stored.
{
DWORD dwstate;
BOOL ok;
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
printf ("Status of gs_tag_bit: %d\r\n", dwstate);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}
See also
Constants (Page 1555)
Description
Enables the transfer of a value in the form of a variant and sets the pointer to the value of data
type "Variant".
Can only be used in C scripting.
Syntax
BOOL SetTagValue(lpdmVarKey, lpdmValue, dwState, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmValue
Pointer to a structure of data type "Variant". Refer to relevant technical references for the
description of data type VARIANT.
lpdmError
Pointer on the structure that contains the error description.
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The SetTagValue function is used in the following program code to transfer the value in varKey.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
// tags for setting the value
DM_VARKEY varKey;
LPVARIANT value;
LPCMN_ERROR error1:
BOOL keyFound;
if (keyFound)
{
// succeeded, get the new value
GetTagValue(&varKey, &result, &error);
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}
Description
Enables the transfer of a value in the form of a variant and sets the pointer to the value of data
type "Variant". The system function will end only after the AS has reported the acceptance of the
value.
Can only be used in C scripting.
Syntax
BOOL SetTagValueWait(lpdmVarKey, lpdmValue, dwState, lpdmError);
Parameters
lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"
lpdmValue
Pointer to a structure of data type "Variant". Refer to relevant technical references for the
description of data type VARIANT.
dwState
Status of the tags that is returned after the system function cycle.
lpdmError
Pointer on the structure that contains the error description.
Return value
TRUE
System function completed without errors.
There is no check to see if the tag was written without any errors.
FALSE
An error has occurred.
Example
The SetTagValueWait function is used in the following program code to transfer the value in
varKey.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).
{
// tags for setting the value
DM_VARKEY varKey;
LPVARIANT value;
LPCMN_ERROR error1:
BOOL keyFound;
if (keyFound)
{
// succeeded, get the new value
GetTagValueWait(&varKey, &result, &error);
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}
Description
Sets the value of a tag of a specified data type. The system function will end only after the AS has
reported the acceptance of the value.
Can only be used in C scripting.
The following table lists the different SetTagWait functions for setting the tag value:
Syntax
BOOL <FunctionName><(Parameter)>;
Example: BOOL SetTagBitWait(Tag_Name, value);
Parameters
Tag_Name
Tag name
value
Value of the tags of a specified type.
pValue
Pointer to a byte field containing the value of the raw data tags.
size
Length of the byte field in bytes
Return value
TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.
FALSE
An error has occurred.
Example
The following program code uses the SetTagBitWait function to set the value of the gs_tag_bit
tag to TRUE and saves the return value to the ok tag.
{
BOOL ok;
BOOL bvalue;
2.1.39.10 SetTag
Description
Assigns a new value to the given tag.
Note
This system function can be used to assign strings and numbers, depending on the type of tag.
Parameters
Tag
The tag to which the given value is assigned.
Value
The value which the given tag is assigned.
Note
The "SetTag" system function is only executed after a connection has been established.
Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.
{
BOOL ok;
BOOL bvalue;
2.1.39.11 SetTagByProperty
Description
Specifies a tag value with the value of an object property. The change is also logged in the alarm
system.
Parameters
Tag name
Name of the tag whose value is specified by the object property.
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property supplies the tag value.
Example
The following program code returns the value of the selected text when you click in a combo box.
{
char* rt_value;
...
}
2.1.39.12 SetTagByTagIndirect
Description
Writes the value of an indirect addressed tag to a tag. The tag transferred as parameter contains
the name of a second tag the value of which is read. The change in the alarm system is logged
via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag which supplies the tag value.
Example
The following program code writes the value of the tag Tag4 to the tag Tag1.
{
SetTag ("IndirectRead", "Tag4");
SetTagByTagIndirect ("Tag1", "IndirectRead", hmiWithoutOperatorEvent);
...
}
2.1.39.13 SetTagIndirect
Description
Writes a value to an indirect addressed tag. The tag transferred as output parameter contains the
name of a second tag the value of which is changed by the function. The change in the alarm
system is logged via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Value
Value which is to be written.
Example
The following program code writes the value "value" to the tag Tag3.
{
int value;
2.1.39.14 SetTagIndirectByProperty
Description
Writes the value of an object property to an indirectly addressed tag. The tag transferred as
output parameter contains the name of a second tag the value of which is changed by the
function. The change in the alarm system is logged via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Screen name
Name of the screen that contains the object.
Screen object
Name of the object whose property supplies the value.
Example
The following program code writes the value of the object property "Background color" to the tag
Tag2.
{
SetTag ("IndirectWrite", "Tag2");
SetTagIndirectByProperty ("IndirectWrite", screenName, objectName, "BackColor",
hmiWithoutOperatorEvent);
...
}
2.1.39.15 SetTagIndirectByTagIndirect
Description
Writes the value of an indirectly addressed tag to an indirectly addressed tag. The tag transferred
as output parameter contains the name of a second tag the value of which is changed by the
function. The tag transferred as parameter contains the name of a second tag the value of which
is read. The change in the alarm system is logged via an operator input alarm.
Parameters
Tag name
Name of a string tag which contains the name of a tag whose value is to be changed.
Tag name
Name of the indirect tag that returns the tag value.
Example
The following program code writes the value of the tag "Tag4" to the tag "Tag2".
{
SetTag ("IndirectWrite", "Tag2");
SetTag ("IndirectRead", "Tag4");
SetTagIndirectByTagIndirect ("IndirectWrite", "IndirectRead");
...
}
2.1.39.16 SetTagIndirectWithOperatorEvent
Description
Specifies the indirect name for a tag. The change is also logged in the alarm system.
Parameters
LpValue
Name of the tag written to the tag.
2.1.39.17 SetTagWithOperatorEvent
Description
Specifies the value for a tag. The change is also logged in the alarm system.
Parameters
Value
Value written to the tag.
Example
The following program code transfers the value from the "value" tag to the "result" tag when you
click the corresponding button.
//Programming language: C
{
SetTagWithOperatorEvent ("result", "value");
...
}
2.1.40 StartProgram
Description
Starts the specified program with the specified parameters.
The system function can be used in C scripting only
Syntax
void StartProgram(Program_name, Program_parameters, Display_mode,
Wait_for_program_end);
Parameters
Program_name
Path and name of the program to be started.
Program_parameters
Parameters to be used for start-up. Information on the possible parameters can be found in
the description of the program to be started.
Display_mode
Defines the display mode in which the program is started:
0 (hmiShowNormal) = Display in window
1 (hmiShowMinimized) = Display in minimized window
2 (hmiShowMaximized) = Display in maximized window
3 (hmiShowMinimizedAndInactive) = Display in inactive and minimized window
Wait_for_program_end
The parameter is not evaluated by WinCC Runtime Professional.
Example
The following program code starts the calc.exe program in the minimized window.
{
BOOL Wait_for_program_end;
char* number;
2.1.41 StopRuntime
Description
Exits the runtime software and thereby the project running on the HMI device.
Parameters
Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)
Example
The following program code shuts down Runtime and the operating system.
2.1.42 StoreScreen
Description
Saves the current screen. This screen can be opened with the ActivateStoredScreen system
function.
Can only be used in C scripting.
Syntax
BOOL StoreScreen();
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
The following program code writes the return value of the StoreScreen function to the
screen_stored tag and calls the stored screen, provided that this was saved without errors.
{
BOOL screen_stored;
screen_stored = StoreScreen();
//user defined code
...
//error handling
if(screen_stored)
{
// succeeded
ActivateStoredScreen();
printf ( "Stored screen is now activated.\r\n" );
}
else
{
// failed
printf ( "Error - no screen stored." );
}
...
}
See also
ActivateStoredScreen (Page 1376)
2.1.43 SystemTimeToDate
Description
Converts a date-clock time specification in SYSTEMTIME format into the DATE data format.
Can only be used in C scripting.
Syntax
SystemTimeToDate(Value, PointerToTime);
Parameters
Value
Value in SYSTEMTIME data format
Pointer to time
Pointer to the result in the DATE format
Return value
TRUE
System function completed without errors.
FALSE
An error has occurred.
Example
BOOL BRet;
SYSTEMTIME st_1, st_2;
DATE d_1, d_2; // wtypes.h. DATE type. Visual Studio documnetation.
GetSystemTime( &st_1 );
2.1.44 TriggerOperatorEvent
Description
The TriggerOperatorEvent system function triggers an operator input alarm.
Syntax
int TriggerOperatorEvent(dwFlags, dwMsgNum, lpszObjectName, dwMyTextID, doValueOld,
doValueNew, pszComment);
Parameters
dwFlags
FLAG_COMMENT_PARAMETER (0x001): Specifies that the comment is input by means of the
parameter.
FLAG_COMMENT_DIALOG (0x003): Specifies that the comment is input by means of a dialog.
FLAG_TEXTID_PARAMETER (0x100): Specifies that the comment is specified by means of a
Text ID. To do so, configure a text list entry in the "C text list" tab of the "Text and graphics
list" editor.
dwMsgNum
Number of the operator input alarm that is triggered.
lpszObjectName
Pointer to the name of the tag with the old value and the new value.
dwMyTextID
ID of the text to be used as comment.
If you are using "FLAG_COMMENT_PARAMETER" (0x001) or "FLAG_COMMENT_DIALOG"
(0x003) for the parameter "dwFlags", enter the value 0 for the parameter "dwMyTextID".
If you are using "FLAG_TEXTID_PARAMETER" (0x100) for the parameter "dwFlags", enter the
ID of the text list entry for the parameter "dwMyTextID". You can configure the text list entry
in the "C text list" tab of the "Text and graphics list" editor.
doValueOld
Old value.
doValueNew
New value.
pszComment
Pointer to the text to be used as comment.
Return value
0
System function completed without errors.
-101
Editing of the operator input alarm could not be started.
-201
An error has occurred when calling "MSRTGetComment()".
-301
An error has occurred when calling "MSRTCreateMsgInstanceWithComment()".
2.1.45 UA (Recipe)
2.1.45.1 uaArchiveClose
Description
Terminates the connection to the current recipe.
Can only be used in C scripting.
Syntax
BOOL uaArchiveClose (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful closing of the recipe
FALSE
Error
2.1.45.2 uaArchiveDelete
Description
Deletes the data from a recipe. The configured recipe, however, is retained.
Can only be used in C scripting.
Syntax
BOOL uaArchiveDelete (
UAHARCHIVE hArchive,
LPCSTR pszWhere )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszWhere
This string contains the SQL selection expression. It defines which data records are to be
deleted. The expression is equivalent to the SQL instruction "DELETE FROM <archive> WHERE
pszWhere".
Warning! If this string is empty, the entire recipe will be deleted.
Return value
TRUE
Successful deletion of the recipe
FALSE
Error
2.1.45.3 uaArchiveExport
Description:
Exports the current recipe to a log in CSV format.
Can only be used in C scripting.
Syntax
BOOL uaArchiveExport (
UAHARCHIVE hArchive,
LPCSTR pszDestination,
LONG lType,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using UaQueryArchive or
UaQueryArchiveByName.
LPCSTR pszDestination
File name of the target archive. When calling the function on a client, the path specified
refers to the server.
LONG lType
Data format of the target archive. Two formats are available:
• UA_FILETYPE_DEFAULT = 0: Default file format = CSV
• UA_FILETYPE_CSV = 1: CSV file format
LONG lOptions
Reserved for future expansions. Must be 0.
Return value
TRUE
Successful export of the recipe
FALSE
Error
2.1.45.4 uaArchiveGetCount
Description
Reads the number of data records.
Can only be used in C scripting.
Syntax
LONG uaArchiveGetCount(
UAHARCHIVE hArchive,
LONG * plCount )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .
LONG plCount
Pointer to a tag in which the number of data records should be stored.
Return value
Number of data records.
0 = Log is empty or error has occurred. Must be queried by means of uaGetLastError() .
2.1.45.5 uaArchiveGetFieldLength
Description
Reads the length of a field in the current data record.
Can only be used in C scripting.
Syntax
LONG uaArchiveGetFieldLength(
UAHARCHIVE hArchive,
LONG lField )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
Return value
Length of the current field.
2.1.45.6 uaArchiveGetFieldName
Description
Reads the name of a field in the current data record.
Can only be used in C scripting.
Syntax
VOID uaArchiveGetFieldName (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszName,
LONG cMaxLen )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
LPCSTR pszName
Field Name
LONG cMaxLen
Maximum length
2.1.45.7 uaArchiveGetFields
Description
Reads the number of configured data fields, which also includes the "ID", "Last User", and "Last
Access" fields. In the Runtime calls, the indexes of the configured fields are indicated 1 to N. The
field ID has the index 0. The fields "Last User" and "Last Access" are appended to the end of the
configured fields.
Can only be used in C scripting.
Syntax
LONG uaArchiveGetFields (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
Number of configured fields.
2.1.45.8 uaArchiveGetFieldType
Description
Reads the type of a field in the current data record.
Can only be used in C scripting.
Syntax
LONG uaArchiveGetFieldType (
UAHARCHIVE hArchive,
LONG lField )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
Return value
Type of the current field.
The symbolic definitions of the field types are:
UA_FIELDTYPE_INTEGER
UA_FIELDTYPE_DOUBLE
UA_FIELDTYPE_STRING
UA_FIELDTYPE_DATETIME
2.1.45.9 uaArchiveGetFieldValueDate
Description
Reads the date and time of a field in the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveGetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .
LONG lField
Field number, with lField = 1 addressing the first field.
LPSYSTEMTIME pstDateTime
Pointer to a tag of the type SYSTEMTIME
Return value
TRUE
Successful reading of date and time
FALSE
Error
2.1.45.10 uaArchiveGetFieldValueDouble
Description
Reads the Double value of a field in the current data record.
The system function can be used in C scripting only.
BOOL uaArchiveGetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double* pdValue )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
double* pdValue
Pointer to tag for the current field content.
Return value
TRUE
Successful reading of field value
FALSE
Error
2.1.45.11 uaArchiveGetFieldValueFloat
Description
Reads Float value of a field in the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveGetFieldValueFloat (
UAHARCHIVE hArchive,
LONG lField,
FLOAT* pfValue )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
FLOAT* pfValue
Pointer to Float tag for the current field content.
Return value
TRUE
Successful reading of field value
FALSE
Error
2.1.45.12 uaArchiveGetFieldValueLong
Description
Reads the Long Integer value of a field in the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveGetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG* pdValue )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
LONG* pdValue
Pointer to Long tag for the current field content.
Return value
TRUE
2.1.45.13 uaArchiveGetFieldValueString
Description
Reads the string of a field in the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveGetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPSTR pszString,
LONG cMaxLen )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first field.
LPCSTR pszString
Field value as string.
LONG cMaxLen
Maximum length of the string.
Return value
TRUE
Successful reading of field value
FALSE
Error
2.1.45.14 uaArchiveGetFilter
Description
Reads the filter of the current data record. Additional information can be found in the appendix
under "SQL Statements".
Can only be used in C scripting.
Syntax
VOID uaArchiveGetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter,
LONG cMaxLen )
The system function can be used in C scripting only.
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPSTR pszFilter
Read filter.
LONG cMaxLen
Maximum length
2.1.45.15 uaArchiveGetID
Description
uaArchiveGetID reads the ID of the recipe.
The recipe ID serves internal purposes and may differ from the number given in the recipe.
Can only be used in C scripting.
Syntax
LONG uaArchiveGetID (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
ID of the recipe.
2.1.45.16 uaArchiveGetName
Description
Reads the name of the recipe.
Can only be used in C scripting.
Syntax
VOID uaArchiveGetName (
UAHARCHIVE hArchive,
LPSTR pszName,
LONG cMaxLen )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPSTR pszName
Pointer to buffer for recipe name.
LONG cMaxLen
Maximum length
Example
char Filling [40];
uaArchiveGetName( hArchive, bottling, 39 );
2.1.45.17 uaArchiveGetSor
Description
uaArchiveGetSort reads the sorting of the recipe.
Can only be used in C scripting.
Syntax
VOID uaArchiveGetSort (
UAHARCHIVE hArchive,
LPSTR pszSort,
LONG cMaxLen )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszSort
Sorting
LONG cMaxLen
Maximum length
2.1.45.18 uaArchiveImport
Description
uaArchivImport imports a recipe with CSV data format. The structure of the destination recipe
must be identical to that of the imported recipe.
Syntax
BOOL uaArchiveImport (
UAHARCHIVE hArchive,
LPCSTR pszSource,
LONG lType,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszSource
File name of the source archive.
LONG lType
Data format of the source archive. Two formats are available:
UA_FILETYPE_DEFAULT = 0: Default file format = CSV
UA_FILETYPE_CSV = 1: CSV file format
LONG lOptions
Reserved for future expansions. Must be 0.
Return value
TRUE
Successful import of the recipe.
FALSE
Error
2.1.45.19 uaArchiveInsert
Description
Inserts the local data record buffer into the current database. Before you call uaArchiveInsert,
use the "uaArchiveSetFieldValue..." system functions to enter the data in the fields of the local
data buffer so that the new data record contains useful data.
Use system function "uaArchiveSetFieldValueLong" to enter the internal column "ID" in the
current data record. Can only be used in C scripting.
Syntax
BOOL uaArchiveInsert (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful insertion of the data record.
2.1.45.20 uaArchiveMoveFirst
Description
Goes to the first data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveMoveFirst (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful jumping in the recipe
FALSE
Error
2.1.45.21 uaArchiveMoveLast
Description
Goes to the last data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveMoveLast (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .
Return value
TRUE
Successful jumping in the recipe
FALSE
Error
2.1.45.22 uaArchiveMoveNext
Description
Goes to the next data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveMoveNext (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful jumping in the recipe
FALSE
Error
2.1.45.23 uaArchiveMovePrevious
Description
Goes to the previous data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveMovePrevious (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful jumping in the recipe
FALSE
Error
2.1.45.24 uaArchiveOpen
Description
uaArchiveOpen must be called before all RT functions (e.g. uaArchiveMoveFirst,
uaArchiveMoveLast, uaArchiveMoveNext, uaArchiveMovePrevious, uaArchiveDelete,
uaArchiveUpdate, uaArchiveInsert, uaArchiveGetID, uaArchiveGetFields,
uaArchiveGetFieldType, uaArchiveGetFieldValueDate, uaArchiveGetFieldValueDouble,
uaArchiveGetFieldValueFloat, uaArchiveGetFieldValueLong, uaArchiveGetFieldValueString,
uaArchiveSetFieldValueDate, uaArchiveSetFieldValueDouble, uaArchiveSetFieldValueFloat,
uaArchiveSetFieldValueLong and uaArchiveSetFieldValueString).
Note
Sort and filter recipes
You may apply the "uaArchiveSetSort" and "uaArchiveSetFilter" system functions to a recipe
without having to open this recipe by means of "uaArchiveOpen".
Syntax
BOOL uaArchiveOpen (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful opening of the recipe
FALSE
Error
2.1.45.25 uaArchiveReadTagValues
Description
Reads the current value from the field tag.
Can only be used in C scripting.
Syntax
BOOL uaArchiveReadTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG* pnFields
Reserved for future applications (NULL)
LONG cFields
Number of field indices transferred (size of array pnFields).
Reserved for future applications (0)
LONG lOptions
Reserved for future applications (0)
In the case of all other values of lOptions, the data is inserted at the position of the pointer.
Return value
TRUE
Successful reading in the recipe
FALSE
Error
2.1.45.26 uaArchiveReadTagValuesByName
Description
Reads the tag values in the current data.
Can only be used in C scripting.
Syntax
BOOL uaArchiveReadTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszFields
Reserved for future applications (NULL)
LONG lOptions
Reserved for future applications (0)
Return value
TRUE
Successful reading in the recipe
FALSE
Error
2.1.45.27 uaArchiveRequery
Description
On completion of the call of uaArchiveSetFilter and uaArchiveSetSort, reload the recipe by
means of uaArchiveRequery.
Note
Sort and filter recipes
You may apply the "uaArchiveSetSort" and "uaArchiveSetFilter" system functions to a recipe
without having to open this recipe by means of "uaArchiveOpen". In this case you do no have to
call the system function "uaArchiveRequery".
Syntax
BOOL uaArchiveRequery(
UAHARCHIVE hArchive )
Can only be used in C scripting.
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful requery
FALSE
Error
2.1.45.28 uaArchiveSetFieldValueDate
Description
Writes the date and time into a field of the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveSetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first configured field. The ID field is addressed
with lField = 0.
LPSYSTEMTIME pstDateTime
Date and Time
Return value
TRUE
Successful writing of date and time
FALSE
Error
2.1.45.29 uaArchiveSetFieldValueDouble
Description
Writes a Double value into a field of the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveSetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double dValue )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0.
double dValue
Field value
Return value
TRUE
Successful writing of field value
FALSE
Error
2.1.45.30 uaArchiveSetFieldValueFloat
Description:
Writes a Float value into a field of the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveSetFieldValueFloat (
UAHARCHIVE hArchive,
LONG lField,
float fValue )
Parameters:
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
Field number, with lField = 1 addressing the first configured field. The ID field is addressed
with lField = 0.
float fValue
Field value
Return value:
TRUE
Successful writing of field value
FALSE
Error
2.1.45.31 uaArchiveSetFieldValueLong
Description
Writes a Long Integer value into a field of the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveSetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG dValue )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0.
LONG dValue
Field value
Return value
TRUE
Successful writing of field value
FALSE
Error
2.1.45.32 uaArchiveSetFieldValueString
Description
Writes a String into a field of the current data record.
Can only be used in C scripting.
Syntax
BOOL uaArchiveSetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszString )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0 .
LPCSTR pszString
Field value
Return value
TRUE
Successful writing of field value
FALSE
Error
2.1.45.33 uaArchiveSetFilter
Description
Sets the filter. You can call the system function without having opened the recipe with
"uaArchiveOpen".
Note
If you have opened the recipe with "uaArchiveOpen", reload the recipe after filtering by means
of "uaArchiveRequery".
Syntax
VOID uaArchiveSetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPSTR pszFilter
Filter to be set.
2.1.45.34 uaArchiveSetSort
Description
Sets the sorting of the recipe. You can call the system function without having opened the recipe
with "uaArchiveOpen".
Note
If you have opened the recipe with "uaArchiveOpen", reload the recipe after sorting by means of
"uaArchiveRequery".
Syntax
BOOL uaArchiveSetSort (
UAHARCHIVE hArchive,
LPSTR pszSort )
The system function can be used in C scripting only.
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszSort
Sorting
Return value
TRUE
Successful setting of the sorting
FALSE
Error
2.1.45.35 uaArchiveUpdate
Description
Updates the open recipe. All data changes of a recipe are transferred to the database. The
configuration of the recipe remains unchanged.
Can only be used in C scripting.
Syntax
BOOL uaArchiveUpdate (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful update of the recipe
FALSE
"Update_failed" error = 106
This error occurs when there is a consistency violation. Example: The "Field requires a value"
flag is set in a field, but no value has been entered there.
2.1.45.36 uaArchiveWriteTagValues
Description
Writes the values of the current data record into the tags.
Can only be used in C scripting.
Syntax
BOOL uaArchiveWriteTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LONG* pnFields
Reserved for future applications (NULL)
LONG cFields
Reserved for future applications (0)
LONG lOptions
Reserved for future applications (0)
Return value
TRUE
Successful reading in the recipe
FALSE
Error
2.1.45.37 uaArchiveWriteTagValuesByName
Description
Writes the values of the current data record into the tags. The access is based on the names of
the recipe and field.
Can only be used in C scripting.
Syntax
BOOL uaArchiveWriteTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
LPCSTR pszFields
Reserved for future applications (NULL)
LONG lOptions
Reserved for future applications (0)
Return value
TRUE
Successful reading in the recipe
FALSE
Error
2.1.45.38 uaConnect
Description
Establishes connection to recipes (Runtime).
Syntax
BOOL uaConnect (
UAHCONNECT* phConnect )
Parameters
UAHCONNECT* phConnect
Pointer to handle for newly connected recipe.
Return value
TRUE
Successful connection of a recipe
FALSE
Error
2.1.45.39 uaDisconnect
Description
If a connection to recipes (Runtime) exists, it will be disconnected.
Can only be used in C scripting.
Syntax
BOOL uaDisconnect (
UAHCONNECT hConnect )
Parameters
UAHCONNECT hConnect
Handle for the connected recipe (Runtime). The handle is generated using uaConnect.
Return value
TRUE
Successful disconnection of a recipe
FALSE
Error
2.1.45.40 uaGetArchive
Description
Reads the recipe configuration.
Can only be used in C scripting.
Syntax
BOOL uaGetArchive (
UAHCONFIG hConfig,
long lArchive,
UACONFIGARCHIVE* pArchive )
Parameters
UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.
long lArchive,
Archive index (0 to (uaGetNumArchives()-1))
UACONFIGARCHIVE* pArchive
Pointer to buffer for receiving the recipe configuration
Return value
TRUE
Successful access to the recipe
FALSE
Error
2.1.45.41 uaGetField
Description:
Reads the field configuration.
Can only be used in C scripting.
Syntax
BOOL uaGetField (
UAHCONFIG hConfig,
long lArchive,
long lField,
UACONFIGFIELD* pField )
Parameters:
UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.
long lArchive,
Archive index (0 to (uaGetNumArchives()-1))
long lField,
The field number; if lField = 0 the first field is addressed.
UACONFIGFIELD* pArchive
Pointer to buffer for receiving the field configuration.
Return value
TRUE
Successful access to the recipe
FALSE
Error
2.1.45.42 uaGetLastError
Description
The system functions of the WinCC script language return a BOOL value; TRUE corresponds to
error-free processing. If FALSE is returned, you can use "uaGetLastError()" and
"uaGetLastHResult()" to read the error of the last system function.
Can only be used in C scripting.
If you do not call uaGetLastError() until several system functions have been processed,
uaGetLastError() will return the most recent error. You should call a "uaGetLastError()" and
"uaGetLastHResult()" system function whenever FALSE is returned to identify the system
function that triggered the error.
Example:
INT uaGetLastError()
Return value
Error status of the last system function executed. uaGetLastError() can return the following
errors:
UA_ERROR_SUCCESS
UA_ERROR_GENERIC
UA_ERROR_CONNECT_FAILED
UA_ERROR_OPEN_FAILED
UA_ERROR_CLOSE_FAILED
UA_ERROR_REQUERY_FAILED
UA_ERROR_MOVE_FAILED
UA_ERROR_INSERT_FAILED
UA_ERROR_UPDATE_FAILED
UA_ERROR_DELETE_FAILED
UA_ERROR_IMPORT_FAILED
UA_ERROR_EXPORT_FAILED
UA_ERROR_READ_FAILED
UA_ERROR_WRITE_FAILED
UA_ERROR_GET_FAILED
UA_ERROR_SET_FAILED
UA_ERROR_INVALID_NAME
UA_ERROR_INVALID_TYPE
UA_ERROR_INVALID_NUMRECS
UA_ERROR_INVALID_COMMTYPE
UA_ERROR_INVALID_LENGTH
UA_ERROR_INVALID_PRECISION
UA_ERROR_NULL_POINTER
UA_ERROR_INVALID_POINTER
UA_ERROR_INVALID_HANDLE
UA_ERROR_INVALID_INDEX
UA_ERROR_SERVER_UNKNOWN
These error constants as well as the predefines of the user archive routines are located in
CCUACAPI.H.
2.1.45.43 uaGetLastHResult
Description
Reads the last occurred COM error. This system function is used primarily to analyze
incompatibility in the COM implementation or to identify registry errors and communication
errors.
This system function must always be called in addition to UAGetLastError if one of the user
archive system functions (e.g uaConnect) returns the value "FALSE" to signal an error.
Can only be used in C scripting.
Syntax
LONG uaGetLastHResult()
Return value
Last occurred COM error
2.1.45.44 uaGetNumArchives
Description
Reads the number of recipes currently configured.
Can only be used in C scripting.
Syntax
LONG uaGetNumArchives (
UAHCONFIG hConfig )
Parameters
UAHCONFIG hConfig
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.
Return value
Number of recipes currently configured. In case of an error, -1 will be returned.
2.1.45.45 uaGetNumFields
Description
Supplies the number of the configured fields. The "ID", "Last User" and "Last Access" fields are not
included. Indexes are specified from 0 to uaGetNumFields() -1 in the configuration calls.
Can only be used in C scripting.
Syntax
LONG uaGetNumFields (
UAHCONFIG hConfig,
long lArchive )
Parameters
UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.
long lArchive,
Archive index (0 to (uaGetNumArchives()-1))
Return value
Number of configured fields. In case of an error, -1 will be returned.
2.1.45.46 uaQueryArchive
Description
Establishes a connection to the recipe for Runtime operation. UaQueryArchive creates the
handle UAHARCHIVE.
Can only be used in C scripting.
Syntax
BOOL uaQueryArchive (
UAHCONNECT hConnect,
LONG lArchive,
UAHARCHIVE* phArchive )
Parameters
UAHCONNECT hConnect
Handle of the connected recipe (Runtime). The handle is generated using uaConnect.
LONG lArchive
ID of the archive to be connected
UAHARCHIVE* phArchive
Pointer to handle of the recipe
Return value
TRUE
Successful generation of the handle to the recipe.
FALSE
Error
Comment
If you use User Archives functions in a client project that works with redundant server pairs, the
user archives connection cannot be switched automatically to the new master when switching
masters. In this case, all user archives calls return the LastError UA_ERROR_SERVER_UNKNOWN
= 1004, which means that the user programs must execute a new uaQueryArchive() or
uaQueryArchiveByName() and uaArchiveOpen().
2.1.45.47 uaQueryArchiveByName
Description
Establishes a connection to the recipe for Runtime operation using the recipe name.
UaQueryArchiveByName creates the UAHARCHIVE handle for the recipe.
Can only be used in C scripting.
Syntax
BOOL uaQueryArchiveByName (
UAHCONNECT hConnect,
LPCSTR pszName,
UAHARCHIVE* phArchive )
Parameters
UAHCONNECT hConnect
Handle of the connected recipe (Runtime). The handle is generated using uaConnect.
LPCSTR pszName
Name of the recipe. With a client project, you can add a server prefix with ‘::‘ to the recipe
name as a separator, if a server other than the default server is used.
UAHARCHIVE* phArchive
Pointer to handle of the recipe
Return value
TRUE
Successful generation of the handle to the recipe.
FALSE
Error
Comment
If you use User Archives functions in a client project that works with redundant server pairs, the
user archives connection cannot be switched automatically to the new master when switching
masters. In this case, all user archives calls return the LastError UA_ERROR_SERVER_UNKNOWN
= 1004, which means that the user programs must execute a new uaQueryArchive() or
uaQueryArchiveByName() and uaArchiveOpen().
2.1.45.48 UaQueryConfiguration
Description
Establishes a connection to the recipe for the configuration.
Can only be used in C scripting.
Syntax
BOOL uaQueryConfiguration (
UAHCONFIG* phConfig )
Parameters
UAHCONFIG* phConfig,
Pointer to handle of the recipe.
Return value
TRUE
Successful access to recipe
FALSE
Error
2.1.45.49 uaReleaseArchive
Description
Releases the connection to the current recipe.
Can only be used in C scripting.
Syntax
BOOL uaReleaseArchive (
UAHARCHIVE hArchive )
Parameters
UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.
Return value
TRUE
Successful release of connection to the recipe.
FALSE
Error
Comment
The "hArchive" handle must be set to "NULL" on successful release to make absolutely sure that
the "UA_ERROR_INVALID_HANDLE" error is triggered on further use of the invalid handle and
without the respective function dwelling at the COM interface for a longer period of time.
2.1.45.50 uaReleaseConfiguration
Description
Releases connection to recipes (configuration).
Can only be used in C scripting.
Syntax
BOOL uaReleaseConfiguration (
UAHCONFIG hConfig,
BOOL bSave )
Parameters
UAHCONFIG hConfig
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.
BOOL bSave
Saves changes made to the configuration before releasing the connection to recipes for the
configuration.
TRUE = Save Changes, FALSE = Discard Changes
Warning: Save changes (bSave = TRUE) may only be used when Runtime
is not active! You can check whether Runtime is active by requesting uaIsActive().
Return value
TRUE
Successful connection release
FALSE
Error
2.2 C-bib
Function overview
The following ctype functions are available:
• long int isalnum (long int x);
• long int isalpha (long int x);
• long int isdigit (long int x);
• long int isgraph (long int x);
• long int islower (long int x);
• long int isprint (long int x);
• long int ispunct (long int x);
• long int isspace (long int x);
• long int isupper (long int x);
• long int isxdigit (long int x);
• long int tolower (long int x);
• long int toupper (long int x);
For a description of the ctype functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.
Introduction
The c_bib function group contains C functions from the C library and is divided into:
• ctype
• math
• memory
• stdio
• stdlib
• string
• time
stdio itself is again divided into:
• char_io
• directio
• error
• file
• file_pos
• output
For a description of these functions see the relevant specialist literature.
Function overview
The following math functions are available:
• double acos (double x);
• double asin (double x);
• double atan (double x);
• double atan2 (double x, double y);
• double ceil (double x);
• double cos (double x);
• double cosh (double x);
• double exp (double x);
• double fabs (double x);
• double floor (double x);
• double fmod (double x, double y);
Function overview
The following memory functions are available:
• long int memcmp (const void* cs, const void* ct, size_t n);
• void* memchr (const void* cs, long int c, size_t n);
• void* memcpy (void* s, const void* ct, size_t n);
• void* memmove (void* s, const void* ct, size_t n);
• void* memset (void* s, long int c, size_t n);
For a description of the memory functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.
Function overview
The following multibyte functions are available:
• int _ismbcalnum( unsigned int c )
• int _ismbcalpha( unsigned int c )
• int _ismbcdigit( unsigned int c )
• int _ismbcgraph( unsigned int c )
• int _ismbclower( unsigned int c )
• int _ismbcprint( unsigned int c )
• int _ismbcpunct( unsigned int c )
• int _ismbcspace( unsigned int c )
• int _ismbcupper( unsigned int c )
• int _mbscmp(const unsigned char *string1, const unsigned char *string2 )
• int _mbsncmp( const unsigned char *string1, const unsigned char *string2, size_t count )
• int _mbsrchr( const unsigned char *string, unsigned int c )
• size_t _mbscspn( const unsigned char *string, const unsigned char *strCharSet )
• size_t _mbsspn( const unsigned char *string, const unsigned char *strCharSet )
• size_t _mbstrlen( const char *string )
• size_t _mbslen( const unsigned char *string )
• unsigned char *_mbscat( unsigned char *strDestination, const unsigned char *strSource)
• unsigned char *_mbschr( const unsigned char *string, unsigned int c )
• unsigned char *_mbscpy( unsigned char *strDestination, const unsigned char *strSource )
• unsigned char *_mbsdec( const unsigned char *start, const unsigned char *current )
• unsigned char *_mbsinc( const unsigned char *current ) size_t _mbclen( const unsigned
char *c );
• unsigned char *_mbsncat( unsigned char *strDest, const unsigned char *strSource, size_t
count)
• unsigned char *_mbsncpy( unsigned char *strDest, const unsigned char *strSource, size_t
count)
• unsigned char *_mbspbrk( const unsigned char*string, const unsigned char *strCharSet )
• unsigned char *_mbsstr( const unsigned char *string, const unsigned char *strCharSet )
• unsigned char *_mbstok( unsigned char*strToken, const unsigned char *strDelimit )
A description of the multibyte functions can be found in the specialist literature on
programming language C.
The functions can be used in C scripts only.
Function overview
The following stdio functions are available:
• char* fgets (char* s, long int n, FILE* stream);
• char* tmpnam (char* s);
• FILE* fopen (const char* name, const char* mode);
• FILE* freopen (const char* filename, const char* mode, FILE* stream);
• FILE* tmpfile ();
• fprintf();
• long int fclose (FILE* stream);
• long int feof (FILE* stream);
• long int ferror (FILE* stream);
• long int fflush (FILE* stream);
• long int fgetc (FILE* stream);
• long int fgetpos (FILE* stream, fpos_t* ptr);
• long int fputc (long int c, FILE* stream);
• long int fputs (const char* s, FILE* stream);
• long int fseek (FILE* stream, long int offset, long int origin);
• long int fsetpos (FILE* stream, const fpos_t* ptr);
• long int ftell (FILE* stream);
• long int getc (FILE* stream);
• long int putc (long int c, FILE* stream);
• long int remove (const char* filename);
• long int rename (const char* oldname, const char* newname);
• long int setvbuf (FILE* stream, char* buf, long int mode, size_t size);
• long int ungetc (long int c, FILE* stream);
• long int vfprintf (FILE* stream, const char* format, va_list arg);
• long int vsprintf (char* s, const char* format, va_list arg);
• printf();
• size_t fread (void* ptr, size_t size, size_t nobj, FILE* stream);
• size_t fwrite (void* ptr, size_t size, size_t nobj, FILE* stream);
• void clearerr (FILE* stream);
• void rewind (FILE* stream);
• void setbuf (FILE* stream, char* buf);
For a description of the studio functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.
Function overview
The following stdlib functions are available:
• char* getenv (const char* name);
• div_t div (long int num, long int denom);
• double atof (const char* s);
• double strtod (const char* s, char** endp);
• ldiv_t ldiv (long int num, long int denom);
• long int abs (long int n);
• long int atoi (const char* s);
• long int atol (const char* s);
• long int labs (long int n);
• long int rand ();
• long int srand (unsigned long int seed);
• long int strtol (const char* s, char** endp, long int base);
• long int system (const char* s);
• unsigned long int strtoul (const char* s, char** endp, long int base);
• void abort ();
• void* bsearch (const void* key, const void* base, size_t n, size_t size, long int(* cmp) (const
• void* calloc (size_t nobj, size_t size);
• void exit (long int status);
• void free (void* p);
• void* keyval, const void* datum));
• void* malloc (size_t size);
• void qsort (void* base, size_t n, size_t size, long int* cmp, const void* , const void* );
• void* realloc (void* p, size_t size);
For a description of the stdlib functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.
Function overview
The following string functions are available:
• char* strcat (char* s, const char* ct);
• char* strchr (const char* cs, long int c);
• char* strcpy (char* s, const char* ct);
• char* strerror (size_t n);
• char* strncat (char* s, const char* ct, size_t n);
• char* strncpy (char* s, const char* ct, size_t n);
• char* strpbrk (const char* cs, const char* ct);
• char* strrchr (const char* cs, long int c);
• char* strstr (const char* cs, const char* ct);
• char* strtok (char* s, const char* ct);
• long int strcmp (const char* cs, const char* ct);
• long int strncmp (const char* cs, const char* ct, size_t n);
• size_t strcspn (const char* cs, const char* ct);
• size_t strlen (const char* cs);
• size_t strspn (const char* cs, const char* ct);
For a description of the string functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.
Function overview
The following time functions are available:
• char* asctime (const struct tm* tp);
• char* ctime (const time_t* tp);
• clock_t clock ();
• double difftime (time_t time2, time_t time1);
• size_t strftime (char* s, size_t smax, const char* fmt, const struct tm* tp);
• struct tm* gmtime (const time_t* tp);
• struct tm* localtime (const time_t* tp);
typedef struct {
DWORD dwCurrentThreadID; Thread ID of the current thread
DWORD dwErrorCode1; Error code 1
DWORD dwErrorCode2; Error code 2
BOOL bCycle; cycle/acycle
char* szApplicationName; Name of the application
char* szFunctionName; Name of the function
char* szTagName; Name of the tag
LPVOID lpParam; Pointer to the action stack
DWORD dwParamSize; Size of the action stack
DWORD dwCycle; Cycle of the tag
CMN_ERROR* pError; Pointer to CMN_ERROR
} CCAPErrorExecute;
Members
The meaning of the individual error IDs and the structure elements depending on them are
specified in the following table:
Error structure
The OnErrorExecute function uses the error structure to evaluate or to output error messages,
if marked by an "x" in the pError column.
typedef struct {
DWORD dwCurrentThreadID; ThreadID of the current Thread
DWORD dwCode; Code
BOOL bCycle; cycle/acycle
char* szApplicationName; Name of the Application
char* szFunctionName; Name of the Function
LPVOID lpParam; Pointer to the Action-Stack
DWORD dwParamSize; size of the Action-Stack
double dblTime;
DWORD dwFlags; flags
} CCAPTime;
Members
dwCode
The structure element dwCode provides information on calling of OnTime:
dwFlags
The structure element dwFlags provides information on the output type:
struct CMNERRORSTRUCT {
DWORD dwError1,
DWORD dwError2,
DWORD dwError3,
DWORD dwError4,
DWORD dwError5;
TCHAR szErrorText[MAX_ERROR_LEN];
}
CMN_ERROR
Description
The extended error structure contains the error code and an error text for the error that has
occurred. Each application can use the error structure to evaluate or to output error messages.
Members
dwError1 .. dwError5
These entries can be used in any way by the API functions.
The API descriptions inform about the values the respective entries contain in case of an
error. If not specified otherwise, the error codes are present in dwError1.
szErrorText
Buffer for the text description of the error cause
The content is determined from the resources and therefore language-dependent.
typedef struct {
DWORD dwType;
DWORD dwSize;
char szTypeName[MAX_DM_TYPE_NAME + 1];
}
DM_TYPEREF;
Members
dwType
Specifies the tag type
dwSize
Specifies the length of the data type in bytes.
szTypeName
In the case of structure tags, contains the name of the structure type
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
}
DM_VAR_UPDATE_STRUCT;
Members
dmTypeRef
Contains information on the data type. For performance reasons, nothing is entered into this
structure in case of cyclic requests.
dmVarKey
Specifies the tags to be edited.
dmValue
Tag value
Upon access to the value of the VARIANT a ".u." has to be inserted between the name of the
VARIANT and the name of the member.
Example
// Supply variant
myVariant.vt = VT_I4;
myVariant.u.lVal = 233;
A description of the data type VARIANT can be found in the associated documentation.
The VARIANT dmValue must be initialized with VariantInit() before first use and
enabled again with VariantClear(&dmValue) after use. For this reason, the structure
DM_VAR_UPDATE_STRUCT must not be deleted with ZeroMemory() or memset().
dwState
Identifies the tag status.
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
DWORD dwQualityCode;
}
DM_VAR_UPDATE_STRUCTEX;
Members
dmTypeRef
Contains information on the data type. For performance reasons, nothing is entered into this
structure in case of cyclic requests.
dmVarKey
Specifies the tags to be edited.
dmValue
Tag value
Upon access to the value of the VARIANT a ".u." has to be inserted between the name of the
VARIANT and the name of the member.
Example
// Supply variant
myVariant.vt = VT_I4;
myVariant.u.lVal = 233;
A description of the data type VARIANT can be found in the associated documentation.
The VARIANT dmValue must be initialized with VariantInit() before first use and
enabled again with VariantClear(&dmValue) after use. For this reason, the structure
DM_VAR_UPDATE_STRUCTEX must not be deleted with ZeroMemory() or memset().
dwState
Identifies the tag status.
dwQualityCode
Identifies the QualityCode tag.
typedef struct {
DWORD dwKeyType;
DWORD dwID;
char szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARKEY;
Members
dwKeyType
Defines whether the tag is to be addressed by a key ID or by its name.
DM_VARKEY_ID Specification via key ID
DM_VARKEY_NAME Specification via tag name
dwID
Contains the key ID of the tags if dwKey type is set accordingly.
szName
Contains the name of the tag if dwKey type is set accordingly.
lpvUserData
Pointer to application-specific data
typedef struct {
LINKTYPE LinkType;
DWORD dwCycle;
TCHAR szLinkName[256];
}
LINKINFO;
Members
LinkType
LinkType are enumeration constants defined in the "Trigger.h" file. They are to be integrated into
your script with the "#include "Trigger.h" command and the corresponding enumeration
constants.
BUBRT_LT_NOLINK 0 no shortcut
BUBRT_LT_VARIABLE_DIRECT 1 direct tag
BUBRT_LT_VARIABLE_INDIRECT 2 indirect tag
BUBRT_LT_ACTION 3 C action
BUBRT_LT_ACTION_WIZARD 4 Dynamic Dialog
BUB_LT_DIRECT_CONNECTION 5 Direct connection
BUBRT_LT_ACTION_WIZARD_INPROC 6 Dynamic Dialog
For the SetLink function, only the enumeration constants BUBRT_LT_VARIABLE_DIREKT and
BUBRT_LT_VARIABLE_INDIRECT may be used. The GetLink function allows to return all listed
enumeration constants.
dwCycle
Update cycle time
szLinkName
Tag name
See also
SetLink (Page 1443)
GetLink (Page 1380)
typedef struct {
CHAR szFilterName[MSG_MAX_TEXTLEN+1];
WORD dwFilter;
SYSTEMTIME st[2];
DWORD dwMsgNr[2];
DWORD dwMsgClass;
DWORD dwMsgType[MSG_MAX_CLASS];
DWORD dwMsgState;
WORD wAGNr[2];
WORD wAGSubNr[2];
DWORD dwArchivMode;
char szTB[MSG_MAX_TB][
MSG_MAX_TB_CONTENT+1]
DWORD dwTB;
Double dPValue[MSG_MAX_PVALUE][2];
DWORD dwPValue[2];
DWORD dwMsgCounter[2];
DWORD dwQuickSelect;
}
MSG_FILTER_STRUCT;
Description
In this structure the criteria are specified.
Members
dwFilter
The filter conditions are defined by means of the following constants from the file
"m_global.h":
st
Date/time from - to
Where st[0] is the start time (from), st[1] the end time (to)
Assign these fields for the criteria: MSG_FILTER_DATE, MSG_FILTER_DATE_FROM,
MSG_FILTER_DATE_TO, MSG_FILTER_TIME, MSG_FILTER_TIME_FROM, bzw.
MSG_FILTER_TIME_TO
If the current time is needed to pass a SYSTEMTIME- parameter, use the GetLocalTime
function and not GetSystemTime.. There is usually a considerable difference between these
two functions.
dwMsgNr
Message number from - to
Where dwMsgNr[0] is start no. (from), dwMsgNr[1] the end no. (to)
Assign these fields for the criteria: MSG_FILTER_NR, MSG_FILTER_NR_FROM bzw.
MSG_FILTER_NR_TO
dwMsgClass
Message classes bit-coded.
Assign this field for the criterion: MSG_FILTER_CLASS
dwMsgType
Message type per alarm class, bit-coded
Assign this field for the criterion: MSG_FILTER_CLASS
dwMsgState
Message status bit-coded.
Assign this field for the criterion: MSG_FILTER_STATE
wAGNr
AGNr from - to
Assign these fields for the criteria: MSG_FILTER_AG_FROM or MSG_FILTER_AG_TO
wAGSubNr
AGSubNr from - to
Assign this field for the criteria: MSG_FILTER_AGSUB_FROM or MSG_FILTER_AGSUB_TO
dwArchivMode
Logging / reporting
Must be assigned 0.
szTB
Texts of the text blocks
Assign these fields for the criterion: MSG_FILTER_TEXT
dwTB
Active text blocks (from - to, bit-coded)
Assign this field for the criterion: MSG_FILTER_TEXT
dPValue
Process values from - to
Assign these fields for the criterion: MSG_FILTER_PVALUE
dwPValue
Active process values (from - to, bit-coded)
Assign this field for the criterion: MSG_FILTER_PVALUE
dwMsgCounter
Internal message counter from - to
Assign these fields for the criteria: MSG_FILTER_COUNTER_FROM, MSG_FILTER_COUNTER_TO
dwQuickSelect
Quick selection for hour, day, month
The parameter is reserved for future upgrades and must be preset to 0.
Assign this field for the criterion: MSG_FILTER_QUICKSELECT
LOWORD Type:
typedef struct {
DWORD dwMsgState;
DWORD dwMsgNr;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
DWORD dwCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL_STRUCT mtTextValue[MSG_MAX_PVALUE];
}
MSG_RTDATA_STRUCT;
Members
dwMsgState
Message status
dwMsgNr
Message number
stMsgTime
Date/Time: Telegram time depending on the calling function
dwTimeDiff
Duration coming/Telegram time in seconds
dwCounter
Internal message counter
dwFlags
Message flags in the database
wPValueUsed
Process values used, bit-coded. Every bit may only be set in one of the two structure
elements "wPValueUsed" or "wTextValueUsed". An accompanying value may either be a
number or a text.
wTextValueUsed
text values used, bit-coded. Every bit may only be set in one of the two structure elements
"wPValueUsed" or "wTextValueUsed". An accompanying value may either be a number or a
text.
Introduction
Runtime API describes the open programming interface of WinCC. By means of the API
functions, you make use of the internal functions of WinCC in separate applications and access
data of HMI tags or archive data.
Note
Siemens assumes no liability and makes no warranty that data and information transported via
API interfaces are compatible with software of third parties.
We expressly point out that improper use of the API interface can result in data loss or production
outage.
Examples:
• MSRTCreateMsgPlus(): Create alarm
• DMGetValue(): Get tag value
Requirements
• Programming environment is installed, e.g., MS Visual Studio
• WinCC Runtime Professional is installed.
Use
You use the API functions in the following places:
• Within WinCC: In user-defined C-functions and local C-scripts.
• Outside of WinCC: In Windows applications that are created in the C/C++ programming
language. To use Runtime API in the programming languages C# or VB.net, you must
program a corresponding conversion.
3.2.1 Basics
Overview
See also
VariableStateType property (Page 1554)
Overview of the functions (Page 1549)
Overview
See also
DMGetDataLocale (Page 1649)
Overview of structures (Page 1548)
Conversion routines (Control Center) (Page 1560)
Introduction
The "Quality Code" is required to evaluate the status and quality of a tag. The quality of the entire
value transfer and value processing of the respective HMI tag is summarized in the indicated
Quality Code. For example, it is possible to determine from the Quality Code whether the current
value is a start value or substitute value.
The quality codes are prioritized. If several codes occur at the same time, the Quality Code
reflecting the lowest quality is displayed.
Structure
The Quality Code has the following binary structure:
QQSSSSLL
Q: Quality
S: Substatus of the quality
L: Limits. This value is optional.
Note
The Quality Code shown in the "Quality" table are base values for the quality stages. Making use
of the substatus and limit elements gives rise to intermediate values over and above the quality
stage concerned.
Quality
The first two digits specify the quality of the tag.
Q Q S S S S L L
2 2 2 2 2 2 2 2
7 6 5 4 3 2 1 0
Substatus
The quality alone is not enough. Individual qualities are divided into substatuses. The Quality
Code is binary-coded. The value must be converted to hexadecimal format for analysis of the
Quality Code.
Code Quality Q Q S S S S L L
(Hex)
0x23 Bad Device passivated - Diagnostic alerts inhibited 0 0 1 0 0 0 1 1
0x3F Bad Function check - Local override 0 0 1 1 1 1 1 1
0x1C Bad Out of Service - The value is not reliable because the block is not 0 0 0 1 1 1 - -
being evaluated, and may be under construction by a config‐
urer. Set if the block mode is O/S.
0x73 Uncertain Simulated value - Start 0 1 1 1 0 0 1 1
0x74 Uncertain Simulated value - End 0 1 1 1 0 1 - -
0x84 Good Active Update event - Set if the value is good and the block has 1 0 0 0 0 1 - -
(Non-Cas‐ an active Update event.
cade)
0x24 Bad Maintenance alarm - More diagnostics available. 0 0 1 0 0 1 - -
0x18 Bad No Communication, with no usable value - Set if there has 0 0 0 1 1 0 - -
never been any communication with this value since it was last
"Out of Service".
0x14 Bad No Communication, with last usable value - Set if this value had 0 0 0 1 0 1 - -
been set by communication, which has now failed.
0x0C Bad Device Failure - Set if the source of the value is affected by a 0 0 0 0 1 1 - -
device failure.
0x10 Bad Sensor failure 0 0 0 1 0 0 - -
Code Quality Q Q S S S S L L
(Hex)
0x08 Bad Not Connected - Set if this input is required to be connected and 0 0 0 0 1 0 - -
is not connected.
0x04 Bad Configuration Error - Set if the value is not useful because there 0 0 0 0 0 1 - -
is some inconsistency regarding the parameterization or con‐
figuration, depending on what a specific manufacturer can de‐
tect.
0x00 Bad non-specific - There is no specific reason why the value is bad. 0 0 0 0 0 0 - -
Used for propagation.
0x28 Bad Process related - Substitute value 0 0 1 0 1 0 - -
0x2B Bad Process related - No maintenance 0 0 1 0 1 0 1 1
0x68 Uncertain Maintenance demanded 0 1 1 0 1 0 - -
0x60 Uncertain Simulated value - Set when the process value is written by the 0 1 1 0 0 0 - -
operator while the block is in manual mode.
0x64 Uncertain Sensor calibration 0 1 1 0 0 1 - -
0x5C Uncertain Configuration error 0 1 0 1 1 1 - -
0x58 Uncertain Sub-normal 0 1 0 1 1 0 - -
0x54 Uncertain Engineering Unit Range Violation - Set if the value lies outside 0 1 0 1 0 1 - -
of the set of values defined for this parameter. The Limits de‐
fine which direction has been exceeded.
0x50 Uncertain Sensor conversion not accurate 0 1 0 1 0 0 - -
0x4B Uncertain Substitute (constant) 0 1 0 0 1 0 1 1
0x78 Uncertain Process related - No maintenance 0 1 1 1 1 0 - -
0x4C Uncertain Initial Value - Value of volatile parameters during and after 0 1 0 0 1 1 - -
reset of the device or of a parameter.
0x48 Uncertain Substitute value - Predefined value is used instead of the cal‐ 0 1 0 0 1 0 - -
culated one. This is used for fail safe handling.
0x44 Uncertain Last Usable Value - Whatever was writing this value has stop‐ 0 1 0 0 0 1 - -
ped doing so. This is used for fail safe handling.
0x40 Uncertain Non-specific - There is no specific reason why the value is un‐ 0 1 0 0 0 0 - -
certain. Used for propagation.
0xE0 Good Initiate Fail Safe (IFS) - The value is from a block that wants its 1 1 1 0 0 0 - -
(Cascade) downstream output block (e.g. AO) to go to Fail Safe.
0xD8 Good Local Override (LO) - The value is from a block that has been 1 1 0 1 1 0 - -
(Cascade) locked out by a local key switch or is a Complex AO/DO with
interlock logic active. The failure of normal control must be
propagated to a function running in a host system for alarm
and display purposes. This also implies "Not Invited".
0xD4 Good Do Not Select (DNS) - The value is from a block which should 1 1 0 1 0 1 - -
(Cascade) not be selected, due to conditions in or above the block.
0xCC Good Not Invited (NI) - The value is from a block which does not have 1 1 0 0 1 1 - -
(Cascade) a target mode that would use this input.
0xC8 Good Initialization Request (IR) - The value is an initialization value 1 1 0 0 1 0 - -
(Cascade) for a source (back calculation input parameter), because the
lower loop is broken or the mode is wrong.
0xC4 Good Initialization Acknowledge (IA) - The value is an initialized val‐ 1 1 0 0 0 1 - -
(Cascade) ue from a source (cascade input, remote-cascade in, and re‐
mote-output in parameters).
Code Quality Q Q S S S S L L
(Hex)
0xC0 Good OK - No error or special condition is associated with this value. 1 1 0 0 0 0 - -
(Cascade)
0xA0 Good Initiate fail safe 1 0 1 0 0 0 - -
(Non-Cas‐
cade)
0x98 Good Unacknowledged Critical Alarm - Set if the value is good and 1 0 0 1 1 0 - -
(Non-Cas‐ the block has an unacknowledged Alarm with a priority greater
cade) than or equal to 8.
0x94 Good Unacknowledged Advisory Alarm - Set if the value is good and 1 0 0 1 0 1 - -
(Non-Cas‐ the block has an unacknowledged Alarm with a priority less
cade) than 8.
0x90 Good Unacknowledged Update event - Set if the value is good and 1 0 0 1 0 0 - -
(Non-Cas‐ the block has an unacknowledged Update event.
cade)
0x8C Good Active Critical Alarm - Set if the value is good and the block has 1 0 0 0 1 1 - -
(Non-Cas‐ an active Alarm with a priority greater than or equal to 8.
cade)
0x88 Good Active Advisory Alarm - Set if the value is good and the block 1 0 0 0 1 0 - -
(Non-Cas‐ has an active Alarm with a priority less than 8.
cade)
0xA8 Good Maintenance demanded 1 0 1 0 1 0 - -
(Non-Cas‐
cade)
0xA4 Good Maintenance required 1 0 1 0 0 1 - -
(Non-Cas‐
cade)
0xBC Good Function check - Local override 1 0 1 1 1 1 - -
(Non-Cas‐
cade)
0x80 Good OK - No error or special condition is associated with this value. 1 0 0 0 0 0 - -
(Non-Cas‐
cade)
Limit
The Quality Codes can be further subdivided by limits. Limits are optional.
Q Q S S S S L L
O.K. - The value is free to move. - - - - - - 0 0
Low limited - The value has acceded its low limits. - - - - - - 0 1
High limited - The value has acceded its high limits. - - - - - - 1 0
Constant (high and low limited) - The value cannot move, no matter what the - - - - - - 1 1
process does.
See also
VariableStateType property (Page 1554)
SetTag (Page 1456)
GetTag (Page 1397)
Description
Returns the type of tag supervision that dynamizes a property or event: No supervision, quality
code or tag status. Read access.
Index VariableStateType
0 hmiNoVariableState
1 hmiVariableQCState
2 hmiVariableState
Example
The "GetVariableStateType()" procedure reads the type of supervision for the current document.
In this example, the type of supervision is output in a message:
Sub GetVariableStateType()
'VBA819
Dim objDyn As HMIDynamicDialog
Set objDyn =
ActiveDocument.Properties("Width").CreateDynamic(hmiDynamicCreationTypeDynamicDialog,
"'TestVal'")
MsgBox objDyn.VariableStateType
objDyn.Delete
End Sub
See also
Quality codes of HMI tags (Page 1550)
Overview of structures (Page 1548)
Constants (Page 1555)
Conversion routines (Control Center) (Page 1560)
SetTag (Page 1456)
GetTag (Page 1397)
3.2.1.5 Constants
General definitions
Tag types
Property flags
Logging flags
Status flags
You can monitor the tag status of individual WinCC tags in Runtime. The tag status also includes
violations of the configured measuring range limits as well as the status of the connection
between WinCC and the automation system.
The quality code includes information about the quality of a tag, regardless of where this
code was formed. It takes into consideration the status of the entire value transfer and value
processing.
If a violation occurs at the low limit of the measuring range in the system, for example,
the quality code "0x55" is always reported. This measuring range violation can occur in
the WinCC data manager as well as in the field device. You can use the tag status to
determine whether this measuring range violation occurred in WinCC or before the value was
transferred to WinCC.
If the tag status reports a limit violation with the code 0x0010, for example, the low range
limit configured in WinCC has been violated. If the tag status does not report a limit violation,
the quality code transferred to WinCC already contained the limit violation.
0x0000 No error
DM_VARSTATE_NOT_ESTABLISHED 0x0001 Connection to partner not established
DM_VARSTATE_HANDSHAKE_ERROR 0x0002 Protocol error
DM_VARSTATE_HARDWARE_ERROR 0x0004 Network module defective
DM_VARSTATE_MAX_LIMIT 0x0008 Configured high limit violated
DM_VARSTATE_MIN_LIMIT 0x0010 Configured low limit violated
DM_VARSTATE_MAX_RANGE 0x0020 Format limit exceeded
DM_VARSTATE_MIN_RANGE 0x0040 Format limit fallen below
DM_VARSTATE_CONVERSION_ERROR 0x0080 Display conversion error (in conjunction with
DM_VARSTATE_..._RANGE))
DM_VARSTATE_STARTUP_VALUE 0x0100 Initial value of tag
DM_VARSTATE_DEFAULT_VALUE 0x0200 Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR 0x0400 Addressing error in channel
DM_VARSTATE_INVALID_KEY 0x0800 Tag not found/not available
DM_VARSTATE_ACCESS_FAULT 0x1000 Access to tag denied
DM_VARSTATE_TIMEOUT 0x2000 Timeout/no feedback from channel
DM_VARSTATE_SERVERDOWN 0x4000 Server is down
Notification classes
Notification codes
Computer type
Registered messages
DM_OHIOLANGUAGE "WM_OHIOLANGUAGE"
See also
VariableStateType property (Page 1554)
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
See also
CMN_ERROR (Page 2511)
Overview
No. Conversion routines for the "Signed 8-bit value" data type
0 CharToSignedByte
1 CharToUnsignedByte
2 CharToUnsignedWord
3 CharToUnsignedDword
4 CharToSignedWord
5 CharToSignedDword
6 CharToMSBByte
7 CharToMSBWord
8 CharToMSBDword
9 CharToBCDByte
10 CharToBCDWord
11 CharToBCDDword
12 CharToSignedBCDByte
13 CharToSignedBCDWord
14 CharToSignedBCDDword
15 CharToExtSignedBCDByte
16 CharToExtSignedBCDWord
17 CharToExtSignedBCDDword
18 CharToAikenByte
19 CharToAikenWord
20 CharToAikenDword
21 CharToSignedAikenByte
22 CharToSignedAikenWord
23 CharToSignedAikenDword
24 CharToExcessByte
25 CharToExcessWord
26 CharToExcessDword
27 CharToSignedExcessByte
28 CharToSignedExcessWord
29 CharToSignedExcessDword
> 29 (CharToSignedByte)
No. Conversion routines for the "Unsigned 8-bit value" data type
0 ByteToUnsignedByte
1 ByteToUnsignedWord
2 ByteToUnsignedDword
3 ByteToSignedByte
4 ByteToSignedWord
5 ByteToSignedDword
6 ByteToBCDByte
7 ByteToBCDWord
8 ByteToBCDDword
9 ByteToAikenByte
10 ByteToAikenWord
11 ByteToAikenDword
12 ByteToExcessByte
13 ByteToExcessWord
14 ByteToExcessDword
> 14 (ByteToUnsignedByte)
4 WordToSignedWord
5 WordToSignedDword
6 WordToBCDByte
7 WordToBCDWord
8 WordToBCDDword
9 WordToAikenByte
10 WordToAikenWord
11 WordToAikenDword
12 WordToExcessByte
13 WordToExcessWord
14 WordToExcessDword
15 WordToSimaticBCDCounter
16 WordToSimaticCounter
> 16 (WordToUnsignedWord)
26 LongToExcessDword
27 LongToSignedExcessByte
28 LongToSignedExcessWord
29 LongToSignedExcessDword
30 LongToSimaticBCDTimer
31 (LongToSignedDword)
32 (LongToSignedDword)
33 (LongToSignedDword)
34 LongToSimaticTimer
> 34 (LongToSignedDword)
5 FloatToSignedWord
6 FloatToSignedDword
7 FloatToDouble
8 FloatToMSBByte
9 FloatToMSBWord
10 FloatToMSBDword
11 FloatToBCDByte
12 FloatToBCDWord
13 FloatToBCDDword
14 FloatToSignedBCDByte
15 FloatToSignedBCDWord
16 FloatToSignedBCDDword
17 FloatToExtSignedBCDByte
18 FloatToExtSignedBCDWord
19 FloatToExtSignedBCDDword
20 FloatToAikenByte
21 FloatToAikenWord
22 FloatToAikenDword
23 FloatToSignedAikenByte
24 FloatToSignedAikenWord
25 FloatToSignedAikenDword
26 FloatToExcessByte
27 FloatToExcessWord
28 FloatToExcessDword
29 FloatToSignedExcessByte
30 FloatToSignedExcessWord
31 FloatToSignedExcessDword
32 FloatToSimaticBCDTimer
33 (FloatToFloat)
34 (FloatToFloat)
35 (FloatToFloat)
36 FloatToS5Float
37 FloatToSimaticTimer
> 37 (FloatToFloat)
6 DoubleToSignedDword
7 DoubleToFloat
8 DoubleToMSBByte
9 DoubleToMSBWord
10 DoubleToMSBDword
11 DoubleToBCDByte
12 DoubleToBCDWord
13 DoubleToBCDDword
14 DoubleToSignedBCDByte
15 DoubleToSignedBCDWord
16 DoubleToSignedBCDDword
17 DoubleToExtSignedBCDByte
18 DoubleToExtSignedBCDWord
19 DoubleToExtSignedBCDDword
20 DoubleToAikenByte
21 DoubleToAikenWord
22 DoubleToAikenDword
23 DoubleToSignedAikenByte
24 DoubleToSignedAikenWord
25 DoubleToSignedAikenDword
26 DoubleToExcessByte
27 DoubleToExcessWord
28 DoubleToExcessDword
29 DoubleToSignedExcessByte
30 DoubleToSignedExcessWord
31 DoubleToSignedExcessDword
32 DoubleToSimaticBCDTimer
33 (DoubleToDouble)
34 (DoubleToDouble)
35 (DoubleToDouble)
36 DoubleToS5Float
37 DoubleToSimaticTimer
> 37 (DoubleToDouble)
See also
VariableStateType property (Page 1554)
Overview of the functions (Page 1549)
3.2.2 Structures
3.2.2.1 DM_CONNECTION_DATA
Declaration
typedef struct {
CHAR szConnection[
MAX_DM_CONNECTION_NAME +3];
CHAR szUnitName[MAX_DM_UNIT_NAME +1];
CHAR szCommon[MAX_DM_CON_COMMON +1];
CHAR szSpecific[MAX_DM_CON_SPECIFIC +1];
DWORD dwVarNum;
}
DM_CONNECTION_DATA;
Members
szConnection
Name of the logical connection
szUnitName
Names of the channel unit
szCommon
The parameter is reserved for future development.
szSpecific
szSpecific contains the address parameters for the connection, e.g. Ethernet address, slot
number.... Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
dwVarNum
Number of assigned tags
Required files
dmclient.h
API functions
See also
DM_ENUM_CONNECTION_PROC (Page 1794)
3.2.2.2 DM_CONNKEY
Declaration
typedef struct {
CHAR szName[ MAX_DM_CONNECTION_NAME + 1 ];
LPVOID lpvUserData;
}
DM_CONNKEY;
Members
szName
Name of the logical connection
lpvUserData
Pointer to application-specific data
Required files
dmclient.h
API functions
See also
DMEnumConnectionData (Page 1791)
3.2.2.3 DM_CYCLE_INFO
Declaration
typedef struct {
DWORD dwCycleTime;
DWORD dwCycleIndex;
char szDescription[ MAX_DM_CYCLE_NAME + 1 ];
}
DM_CYCLE_INFO;
Members
dwCycleTime
Time base of the update cycle
dwCycleIndex
identifies the order within the list of update cycles.
szDescription
Description of the update cycle.
Required files
dmclient.h
API functions
See also
DM_ENUM_CYCLES_PROC (Page 1642)
3.2.2.4 DM_DATA_SERVICE
Declaration
typedef struct {
DWORD dwTeleType;
char szService[MAX_DM_SERVICE_NAME + 1];
char szSendingApp[MAX_DM_APP_NAME + 1];
DWORD dwSendingMachine;
DWORD dwDataSize;
BYTE byData[1];
}
DM_DATA_SERVICE;
Members
dwTeleType
The parameter is reserved for future development and must be preset to 0.
szService
Name of the data transport channel. This name corresponds to the one assigned during the
installation of the service (DMInstallDataService).
szSendingApp
logical name of the sender. This name corresponds to the application name specified for
DMConnect.
dwSendingMachine
Index of the computer from which the packet was sent (0 - .63). All computers registered in
the computer list can be accessed by their index for the API functions. The first entry in the
computer list has the index "0".
dwDataSize
Size of the data packet in bytes:Data[0] ... byData[dwDataSize - 1]
byData
Pointer to the data
Required files
dmclient.h
API functions
DM_DATA_SERVICE_PROC (Page 1670) List data transport channels (callback), install data
transport channel (callback)
See also
DM_DATA_SERVICE_PROC (Page 1670)
3.2.2.5 DM_DIRECTORY_INFO
Declaration
typedef struct {
char szProjectDir[_MAX_PATH + 1 ];
char szProjectAppDir[_MAX_PATH + 1 ];
char szGlobalLibDir[_MAX_PATH + 1 ];
char szProjectLibDir[_MAX_PATH + 1 ];
char szLokalProjectAppDir[_MAX_PATH + 1 ];
}
DM_DIRECTORY_INFO;
Members
szProjectDir
Full path of the project directory, e.g. D:\WinCC\Projekt1
szProjectAppDir
Full path of the subdirectory of the application in the project directory,
e.g.:D:\WinCC\Projekt1\GraCS
szGlobalLibDir
Full path of the cross-project library directory, e.g. D:\WinCC\aplib
szProjectLibDir
Full path of the project-based library directory, e.g. D:\WinCC\Projekt1\Library
szLokalProjectAppDir
Full path of the subdirectory of the application in the project directory on the local computer.
Required files
dmclient.h
API functions
DMGetProjectDirectory (Page 1659) Get path and file names of the configuration data
See also
DMGetProjectDirectory (Page 1659)
3.2.2.6 DM_DLGOPTIONS
Declaration
typedef struct {
DWORD dwFlags;
LPRECT lprcPreference;
DM_TEST_DROP_TARGET_PROC lpfnTestDropTarget;
DM_DROP_TARGET_PROC lpfnDropTarget;
LPVOID lpvUser;
}
DM_DLGOPTIONS;
Members
dwFlags
dwFlags is used to specify the reaction of the dialog or dialog box:
lprcPreference
Pointer to a RECT type structure with information about the size of the dialog box. If
lprcPreference == NULL, the dialog appears centered and with a predefined size.
lpfnTestDropTarget
The parameter is reserved for future development and must be preset to NULL.
lpfnDropTarget
The parameter is reserved for future development and must be preset to NULL.
lpvUser
Pointer to application-specific data.
Required files
dmclient.h
API functions
See also
DMShowVarDatabase (Page 1758)
DMShowVarDatabaseMulti (Page 1763)
3.2.2.7 DM_FORMAT_INFO
Declaration
typedef struct {
DWORD dwID;
char szName[MAX_DM_FORMAT_NAME + 1];
}
DM_FORMAT_INFO;
Members
dwID
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.
szName
Name of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.
Required files
dmclient.h
API functions
See also
DM_ENUM_FORMATS_PROC (Page 1639)
3.2.2.8 DM_MACHINE_TABLE
Declaration
typedef struct {
LONG nNumMachines;
LONG nLocalMachine;
DM_SD_TARGET_MACHINE tm[MAX_DM_OHIO_MACHINES];
}
DM_MACHINE_TABLE;
Members
nNumMachines
Number of computers in the project (the max. number MAX_DM_OHIO_MACHINES may not
be exceeded).
nLocalMachine
Index of the entry of the local computer in the computer list.
All computers registered in the computer list can be accessed by their index for the API
functions. The first entry in the computer list has the index "0".
tm
Full DM_SD_TARGET_MACHINE (Page 1578) type array with information about the computers
involved in the project. Only nNumMachines of these structures are passed here, however
(therefore max. usable index = (nMumMachines - 1) ).
Required files
dmclient.h
API functions
See also
DM_SD_TARGET_MACHINE (Page 1578)
DMGetMachineTable (Page 1652)
3.2.2.9 DM_PROJECT_INFO
Declaration
typedef struct {
char szProjectFile[ _MAX_PATH + 1 ];
char szDSNName[ MAX_DM_DSN_NAME + 1 ];
DWORD dwDataLocale;
}
DM_PROJECT_INFO;
Members
szProjectFile
File name of the project, including path and extension.
szDSNName
Data source name of the database
dwDataLocale
Code of the language that is used during configuration.
Required files
dmclient.h
API functions
See also
DM_ENUM_OPENED_PROJECTS_PROC (Page 1657)
DMEnumOpenedProjects (Page 1656)
DMGetProjectInformation (Page 1660)
3.2.2.10 DM_SEND_DATA_STRUCT
Declaration
typedef struct {
BOOL fHighPriority;
char szService[MAX_DM_SERVICE_NAME + 1];
DWORD dwTargetMachineFlags;
DWORD dwTargetMachines;
DM_SD_TARGET_MACHINE dmTargetMachine[
MAX_DM_OHIO_MACHINES];
DWORD dwTargetApps;
DM_SD_TARGET_APP dmTargetApp[
MAX_DM_OHIO_APPLICATIONS];
DWORD dwDataSize;
BYTE byData[1];
}
DM_SEND_DATA_STRUCT;
Members
fHighPriority
fHighPriority indicates the priority for the data communication:
1 High priority
0 Normal priority
szService
Name of the service to be used. In order for an application to receive data, not only do the
conditions of dwTargetMachineFlags have to be met, but also the corresponding service has
to be installed through DMInstallDataService.
dwTargetMachineFlags
dwTargetMachineFlags indicate the applications to which data should be set with the
DMSendApplicationData function.
dwTargetMachines
Number of completed structures dmTargetMachine.
Reserved for future development, must be filled with 0.
dmTargetMachine
Pointer to the DM_SD_TARGET_MACHINE (Page 1578) structure for specifying the computer
to which the data is to be sent. Only the szMachineName parameter is relevant here.
Reserved for future development, should be fully initialized with 0L.
dwTargetApps
Number of completed structures dmTargetApp.
dmTargetApp
DM_SD_TARGET_APP (Page 1579) type structures contain the names of the applications to
which the data is to be sent.
dwDataSize
Amount of data to be sent in bytes
byData
Array containing the data to be sent
Comments
The DMSendApplicationData function is only implemented locally.
The members present in this structure for remote access are reserved for future development.
dwTargetMachineFlags can only be filled with DM_SD_LOCAL, any other specification results in
errors, and dwTargetMachines must be 0L.
Required files
dmclient.h
API functions
See also
DMSendApplicationData (Page 1674)
DM_SD_TARGET_MACHINE (Page 1578)
DM_SD_TARGET_APP (Page 1579)
3.2.2.11 DM_SD_TARGET_MACHINE
Declaration
typedef struct {
BOOL fServer;
BOOL fLocal;
char szMachineName[
MAX_COMPUTERNAME_LENGTH + 1];
}
DM_SD_TARGET_MACHINE;
Members
fServer
Indicates whether the computer at hand is a server or a client.
The parameter is not relevant for the purposes of data communication
(DM_SEND_DATA_STRUCT).
fLocal
Indicates whether the querying application is running on the local computer or another
computer configured in the network.
The parameter is not relevant for the purposes of data communication
(DM_SEND_DATA_STRUCT).
szMachineName
Computer name
Comments
DM_SD_TARGET_MACHINE is part of the DM_MACHINE_TABLE (Page 1574)
and DM_SEND_DATA_STRUCT (Page 1576) structures.
Required files
dmclient.h
See also
DM_MACHINE_TABLE (Page 1574)
DM_SEND_DATA_STRUCT (Page 1576)
3.2.2.12 DM_SD_TARGET_APP
Declaration
typedef struct {
char szAppName[MAX_DM_APP_NAME + 1];
}
DM_SD_TARGET_APP;
Members
szAppName
For szAppName, use the name of the application used for calling DMConnect.
Comments
DM_SD_TARGET_APP is part of the DM_SEND_DATA_STRUCT (Page 1576) structure.
Required files
dmclient.h
See also
DM_SEND_DATA_STRUCT (Page 1576)
3.2.2.13 DM_TYPEREF
Declaration
typedef struct {
DWORD dwType;
DWORD dwSize;
char szTypeName[MAX_DM_TYPE_NAME + 1];
}
DM_TYPEREF;
Members
dwType
The type of tag is specified in dwType:
dwSize
dwSize specifies the length of the data type (in bytes) on the OS.
szTypeName
The name of the structure type for structure tags is in szTypeName.
Comments
DM_TYPEREF is used in the DM_VAR_UPDATE_STRUCT (Page 1581) and DM_VARIABLE_DATA
(Page 1590) structures.
Required files
dmclient.h
API functions
See also
DM_VAR_UPDATE_STRUCT (Page 1581)
DMGetVarType (Page 1728)
DM_VARIABLE_DATA (Page 1590)
DM_VAR_UPDATE_STRUCTEX (Page 1583)
DM_VARIABLE_DATA4 (Page 1592)
3.2.2.14 DM_VAR_UPDATE_STRUCT
Declaration
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
}
DM_VAR_UPDATE_STRUCT;
Members
dmTypeRef
The DM_TYPEREF (Page 1579) structure contains information on the tag type.
Exception: For performance reasons, nothing is entered into this structure in case of cyclic
requests.
dmVarKey
The tag to be processed is specified through the DM_VARKEY (Page 1594) structure.
dmValue
Tag value.
Note
The dmValue VARIANT must be initialized with VariantInit(&dmValue) before its first use and
then released with VariantClear(&dmValue) after its use.
Only an array of several DM_VAR_UPDATE_STRUCT can be pre-initialized before its first use with
ZeroMemory() or memset(). This affects the VARIANT dmValue contained here like a
VariantInit(&dmValue), since 0 corresponds to a VT_EMPTY.
The DM_VAR_UPDATE_STRUCT structure may not be cleared with ZeroMemory() or memset()
once it has been used. VARIANT then contains data that may be of the VT_BSTR type.
If the tag type is VT_BSTR, problems can occur in memory management (memory leak), if no
VariantClear(&dmValue) is made before allocated DM_VAR_UPDATE_STRUCT structures are
deleted with delete[].
(0x0000) No error
DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not establish‐
ed
DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Protocol error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network module faulty
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated
DM_VARSTATE_MAX_RANGE (0x0020) High format limit violated
DM_VARSTATE_MIN_RANGE (0x0040) Low format limit violated
DM_VARSTATE_CONVERSION_ERROR (0x0080) Display conversion error (in conjunc‐
tion with DM_VARSTATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE (0x0100) Initialization value of tag
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Addressing error in the channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag not permitted
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down
Required files
dmclient.h
API functions
See also
DM_NOTIFY_VARIABLE_PROC (Page 1808)
DM_VARKEY (Page 1594)
DMGetValue (Page 1691)
DM_TYPEREF (Page 1579)
3.2.2.15 DM_VAR_UPDATE_STRUCTEX
Declaration
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
DWORD dwQualityCode;
}
DM_VAR_UPDATE_STRUCTEX;
Members
dmTypeRef
The DM_TYPEREF (Page 1579) structure contains information on the tag type.
Exception: For performance reasons, nothing is entered into this structure in case of cyclic
requests.
dmVarKey
The tag to be processed is specified through the DM_VARKEY (Page 1594) structure.
dmValue
Tag value.
Note
The VARIANT dmValue must be initialized with VariantInit(&dmValue) before its first use and
then released with VariantClear(&dmValue) after its use.
Only an array of several DM_VAR_UPDATE_STRUCT can be pre-initialized before its first use with
ZeroMemory() or memset(). This affects the VARIANT dmValue contained here like a
VariantInit(&dmValue), since 0 corresponds to a VT_EMPTY.
The DM_VAR_UPDATE_STRUCTEX structure may not be cleared with ZeroMemory() or memset()
once it has been used. VARIANT then contains data that may be of the VT_BSTR type.
If the tag type is VT_BSTR, problems can occur in memory management (memory leak), if no
VariantClear(&dmValue) is made before allocated DM_VAR_UPDATE_STRUCTEX structures are
deleted with delete[].
dwState
Indicates whether the value of the tag was successfully changed or whether errors have
occurred:
dwQualityCode
Quality code of the tag value.
The quality code is formed as follows:
DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not estab‐ Bad, not connected, 0x08
lished
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel Uncertain, last usable value, 0x44
DM_VARSTATE_HANDSHAKE_ERROR Protocol error Bad, no communication (no usable val‐
(0x0002) ue), 0x18
DM_VARSTATE_ADDRESS_ERROR (0x0400) Addressing error in the channel Bad, configuration error, value not ac‐
cepted, 0x04
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available Bad, configuration error, value not ac‐
cepted, 0x04
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag not permitted Bad, configuration error, value not ac‐
cepted, 0x04
DM_VARSTATE_MAX_RANGE (0x0020) High format limit violated Uncertain, engineering unit range viola‐
tion, high limit set, 0x56
DM_VARSTATE_MIN_RANGE (0x0040) Low format limit violated Uncertain, engineering unit range viola‐
tion, low limit set, 0x55
DM_VARSTATE_CONVERSION_ERROR Display conversion error Uncertain, engineering unit range viola‐
(0x0080) tion, no limits set, 0x54
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated Mapping to the Limit-Bit HIGH, 0x01,
logical OR linking with the other tag sta‐
tus, for example good (cascade), ok, re‐
sults in 0xC2
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated Mapping to the Limit-Bit LOW, 0x02, log‐
ical OR linking with the other tag status,
for example good (cascade), ok, results
in 0xC1
DM_VARSTATE_STARTUP_VALUE (0x0100) Initialization value of tag Uncertain, initial value, 0x4C
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of tag Uncertain, substitute-set, 0x48
Required files
dmclient.h
API functions
See also
DM_NOTIFY_VARIABLEEX_PROC (Page 1819)
DM_TYPEREF (Page 1579)
DM_VARKEY (Page 1594)
DMGetValueEx (Page 1693)
3.2.2.16 DM_VARFILTER
Declaration
typedef struct {
DWORD dwFlags;
DWORD dwNumTypes;
LPDWORD pdwTypes;
LPSTR lpszGroup;
LPSTR lpszName;
LPSTR lpszConn;
}
DM_VARFILTER;
Members
dwFlags
The dwFlags parameter can be used to set a selection criterion for the tags:
DM_VARFILTER_TYPE 0x00000001 The tag type (pdwTypes) is used as the selection criterion.
DM_VARFILTER_GROUP 0x00000002 The group name (lpszGroup) is used as the selection cri‐
terion.
DM_VARFILTER_NAME 0x00000004 The tag name (lpszName) is used as the selection crite‐
rion.
DM_VARFILTER_CONNECTION 0x00000008 The name of the logical connection (lpszConn) is used as
the selection criterion.
DM_VARFILTER_FAST_CALLBACK 0x00010000 (Flag for DMEnumVariables): If this flag is set, the call‐
back data is no longer buffered. The callback therefore
returns the data directly from the database.
The advantage of the flag is a faster response before the
first callback is sent. At the same time, it avoids heavy
memory load for a large amounts of data.
Caution
You may not call any other DMClient function in this call‐
back. A blockade may otherwise occur.
DM_VARFILTER_LOCAL_ONLY 0x00020000 (Flag for DMEnumVariables): If this flag is set, only local
tags are enumerated. Tags used in the project from other
servers are not required.
dwNumTypes
Number of tag types specified in pdwTypes.
pdwTypes
pdwTypes identifies the tag types that are to be used as a selection criterion.
lpszGroup
Pointer to the name of the tag group. This name should be used as a selection criterion.
Wildcards are prohibited.
lpszName
Pointer to the name of a tag. This name should be used as a selection criterion. Wildcards are
prohibited.
lpszConn
Pointer to the name of a logical connection. This name should be used as a selection
criterion. Wildcards are prohibited.
Required files
dmclient.h
API functions
See also
DMEnumVariables (Page 1688)
DMShowVarDatabase (Page 1758)
DMShowVarDatabaseMulti (Page 1763)
3.2.2.17 DM_VARGRP_DATA
Declaration
typedef struct {
CHAR szName[ MAX_DM_VAR_NAME + 1 ];
DWORD dwCreatorID;
WORD dwVarNum;
LPVOID lpvUserData;
}
DM_VARGRP_DATA;
Members
szName
Name of the tag group
dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.
dwVarNum
Number of tags within the tag group
lpvUserData
Pointer to application-specific data.
Required files
dmclient.h
API functions
See also
DM_ENUM_VARGRP_PROC (Page 1687)
3.2.2.18 DM_VARGRPKEY
Declaration
typedef struct {
CHAR szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARGRPKEY;
Members
szName
Name of the tag group
lpvUserData
Pointer to application-specific data.
Required files
dmclient.h
API functions
See also
DMEnumVarGrpData (Page 1683)
3.2.2.19 DM_VARIABLE_DATA
Declaration
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARLIMIT dmVarLimit;
VARIANT dmStart;
VARIANT dmDefault;
DWORD dwNotify;
DWORD dwFlags;
CHAR szSpecific[MAX_DM_VAR_SPECIFIC +1];
CHAR szGroup[MAX_DM_GROUP_NAME +1];
CHAR szConnection[
MAX_DM_CONNECTION_NAME +1];
CHAR szChannel[_MAX_PATH +1];
CHAR szUnit[MAX_DM_UNIT_NAME +1];
}
DM_VARIABLE_DATA;
Members
dmTypeRef
The DM_TYPEREF (Page 1579) structure contains information on the tag type.
dmVarLimit
The DM_VARLIMIT (Page 1597) structure contains information on the limits of a tag.
dmStart
Start value of the tag. Must be release with VariantClear(&dmStart) after use.
dmDefault
Substitute value of tag. Must be release with VariantClear(&dmDefault) after use.
dwNotify
dwNotify specifies the events that generate a report entry:
dwFlags
indicates how the substitute value should be used:
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that appears in the properties of a tag in WinCC in the Parameter
column.
szGroup
Name of the group to which the tag belongs.
This value is not provided for server tags on the multi-client.
szConnection
Name of the logical connection to which the tag is linked.
szChannel
File name of the channel driver.
szUnit
Name of the channel unit to which the tag is linked.
Required files
dmclient.h
API functions
See also
DM_TYPEREF (Page 1579)
DM_ENUM_VARIABLE_PROC (Page 1678)
DM_VARLIMIT (Page 1597)
DMEnumVarData (Page 1676)
3.2.2.20 DM_VARIABLE_DATA4
Declaration
typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARLIMIT dmVarLimit;
VARIANT dmStart;
VARIANT dmDefault;
DWORD dwNotify;
DWORD dwFlags;
CHAR szSpecific[MAX_DM_VAR_SPECIFIC +1];
CHAR szGroup[MAX_DM_GROUP_NAME +1];
CHAR szConnection[
MAX_DM_CONNECTION_NAME +1];
CHAR szChannel[_MAX_PATH +1];
CHAR szUnit[MAX_DM_UNIT_NAME +1];
MCP_VARIABLE_SCALES Scaling;
DWORD dwASDataSize;
DWORD dwOSDataSize;
DWORD dwVarProperty;
DWORD dwFormat;
}
DM_VARIABLE_DATA4;
Members
dmTypeRef
The DM_TYPEREF (Page 1579) structure contains information on the tag type.
dmVarLimit
The DM_VARLIMIT (Page 1597) structure contains information on the limits of a tag.
dmStart
Start value of the tag. Must be release with VariantClear(&dmStart) after use.
dmDefault
Substitute value of tag. Must be release with VariantClear(&dmDefault) after use.
dwNotify
dwNotify specifies the events that generate a report entry:
dwFlags
Indicates how the substitute value should be used:
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
szGroup
Name of the group to which the tag belongs.
szConnection
Name of the logical connection to which the tag is linked.
szChannel
File name of the channel driver.
szUnit
Name of the channel unit to which the tag is linked.
Scaling
MCP_VARIABLE_SCALES (Page 1620) Structure with the description of tag scaling.
dwASDataSize
Length of the tags in the PLC (number of bits)
dwOSDataSize
Length of the tags in the OS (number of bits)
dwVarProperty
Indicates whether this is an internal or external tag:
dwFormat
Number of the conversion routine used. You can find more detailed information in the
"Conversion routines" section.
Required files
dmclient.h
API functions
See also
DMEnumVarData4 (Page 1679)
DM_ENUM_VARIABLE_PROC4 (Page 1682)
DM_TYPEREF (Page 1579)
DM_VARLIMIT (Page 1597)
MCP_VARIABLE_SCALES (Page 1620)
3.2.2.21 DM_VARKEY
Declaration
typedef struct {
DWORD dwKeyType;
DWORD dwID;
char szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARKEY;
Members
dwKeyType
dwKeyType defines whether the tag is to be addressed by a key ID or by its name.
When DM_VARKEY is used as the return structure, both types can be set if the key ID and tag
name are returned.
When DM_VARKEY is used as a source parameter, the tag name should be preferably set,
since the server prefix can only be specified there. If the key ID is used, operation is always
local.
dwID
Contains the key ID of the tag, if dwKeyType is set accordingly.
szName
Contains the name of the tag, if dwKeyType is set accordingly.
lpvUserData
Pointer to application-specific data.
Comments
The DM_VARKEY structure is part of the DM_VAR_UPDATE_STRUCT (Page 1581) structure.
Required files
dmclient.h
API functions
See also
DMStartVarUpdate (Page 1806)
DM_VAR_UPDATE_STRUCT (Page 1581)
DMGetValue (Page 1691)
DMGetValueWait (Page 1704)
DMGetVarInfo (Page 1710)
DMGetVarLimits (Page 1721)
DMGetVarType (Page 1728)
DMSetValue (Page 1734)
DMSetValueMessage (Page 1740)
DMSetValueWait (Page 1744)
DMSetValueWaitMessage (Page 1749)
DMShowVarDatabase (Page 1758)
DMEnumVarData (Page 1676)
DM_ENUM_VAR_PROC (Page 1690)
DM_ENUM_VARIABLE_PROC (Page 1678)
DM_ENUM_TYPEMEMBERS_PROC (Page 1779)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 1783)
DM_NOTIFY_SELECT_VAR_PROC (Page 1770)
DMStartVarUpdateEx (Page 1809)
DM_VAR_UPDATE_STRUCTEX (Page 1583)
DM_ENUM_VARIABLE_PROC4 (Page 1682)
DMGetValueEx (Page 1693)
DMGetValueWaitEx (Page 1706)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 1786)
MSG_CSDATA_STRUCT_PLUS (Page 2370)
3.2.2.22 DM_VARLIMIT
Declaration
typedef struct {
VARIANT dmMaxRange;
VARIANT dmMinRange;
VARIANT dmMaxLimit;
VARIANT dmMinLimit;
}
DM_VARLIMIT;
Members
dmMaxRange
High limit of the format conversion
dmMinRange
Low limit of the format conversion
dmMaxLimit
High limit of the tag.
dmMinLimit
Low limit of the tag.
Comments
DM_VARLIMIT is part of the DM_VARIABLE_DATA (Page 1590) structure. All VARIANT must be
release with VariantClear(&dmxxx) after use.
Required files
dmclient.h
API functions
See also
DM_VARIABLE_DATA (Page 1590)
DMGetVarLimits (Page 1721)
DM_VARIABLE_DATA4 (Page 1592)
3.2.2.23 MCP_NEWVARIABLE_DATA
Declaration
typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
}
MCP_NEWVARIABLE_DATA;
Members
dwFlags
dwFlags indicates how the tag should be processed:
szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in RT with
DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with
an error (DM_E_NOT_CONNECTED).
szConnection
Name of the logical connection assigned to the tag.
szVarName
Name of the tag to be processed.
szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.
Common
MCP_VARIABLE_COMMON (Page 1608) Structure with the description of the tag.
Protocol
The MCP_VARIABLE_PROTOCOL (Page 1617) structure with the description of how limit
violations are handled by the tag.
Limits
MCP_VARIABLE_LIMITS (Page 1612) Structure with the limits of the tag.
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
Comments
The MCP_NEWVARIABLE_DATA_EX (Page 1604) structure has a similar use for extended
functionality.
Required files
dmclient.h
API functions
See also
GAPICreateNewVariable (Page 1771)
MCP_VARIABLE_PROTOCOL (Page 1617)
MCP_VARIABLE_COMMON (Page 1608)
MCP_VARIABLE_LIMITS (Page 1612)
MCP_NEWVARIABLE_DATA_EX (Page 1604)
3.2.2.24 MCP_NEWVARIABLE_DATA_4
Declaration
typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_4;
Members
dwFlags
dwFlags indicates how the tag should be processed:
szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected with the error, DM_E_NOT_CONNECTED.
szConnection
Name of the logical connection assigned to the tag.
szVarName
Name of the tag to be processed.
szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.
Common
MCP_VARIABLE_COMMON (Page 1608) Structure with the description of the tag.
Protocol
The MCP_VARIABLE_PROTOCOL (Page 1617) structure with the description of how limit
violations are handled by the tag.
Limits
MCP_VARIABLE_LIMITS (Page 1612) Structure with the limits of the tag.
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
Scaling
MCP_VARIABLE_SCALES (Page 1620) Structure with the description of tag scaling.
Comments
The MCP_NEWVARIABLE_DATA_EX4 (Page 1606) structure has a similar use for extended
functionality.
Required files
dmclient.h
API functions
See also
MCP_VARIABLE_COMMON (Page 1608)
MCP_VARIABLE_LIMITS (Page 1612)
MCP_VARIABLE_PROTOCOL (Page 1617)
GAPICreateNewVariable4 (Page 1772)
MCP_VARIABLE_SCALES (Page 1620)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
GAPICreateNewVariableEx4 (Page 1775)
3.2.2.25 MCP_NEWVARIABLE_DATA_5
Declaration
typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS5 Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_5;
Members
dwFlags
dwFlags indicates how the tag should be processed:
szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
szConnection
Name of the logical connection assigned to the tag.
szVarName
Name of the tag to be processed.
szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.
Common
MCP_VARIABLE_COMMON (Page 1608) Structure with the description of the tag.
Protocol
The MCP_VARIABLE_PROTOCOL (Page 1617) structure with the description of how limit
violations are handled by the tag.
Limits
MCP_VARIABLE_LIMITS5 (Page 1614) Structure with the limits of the tag.
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
Scaling
MCP_VARIABLE_SCALES (Page 1620) Structure with the description of tag scaling.
Comments
The MCP_NEWVARIABLE_DATA_EX4 (Page 1606) structure has a similar use for extended
functionality.
Required files
dmclient.h
API functions
See also
GAPICreateNewVariable5 (Page 1774)
MCP_VARIABLE_COMMON (Page 1608)
MCP_VARIABLE_LIMITS5 (Page 1614)
MCP_VARIABLE_PROTOCOL (Page 1617)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
MCP_VARIABLE_SCALES (Page 1620)
3.2.2.26 MCP_NEWVARIABLE_DATA_EX
Declaration
typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON_EX Common;
MCP_VARIABLE_PROTOCOL_EX Protocol;
MCP_VARIABLE_LIMITS_EX Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1]
}
MCP_NEWVARIABLE_DATA_EX;
Members
dwFlags
dwFlags indicates how the tag should be processed:
szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected with the error, DM_E_NOT_CONNECTED.
szConnection
Name of the logical connection assigned to the tag.
szVarName
Name of the tag to be processed.
szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.
Common
MCP_VARIABLE_COMMON_EX (Page 1610) Structure with the description of the tag.
Protocol
The MCP_VARIABLE_PROTOCOL_EX (Page 1619) structure with the description of how limit
violations are handled by the tag.
Limits
MCP_VARIABLE_LIMITS_EX (Page 1616) Structure with the limits of the tag.
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
Comments
The MCP_NEWVARIABLE_DATA (Page 1598) structure has a similar use.
Required files
dmclient.h
API functions
See also
MCP_NEWVARIABLE_DATA (Page 1598)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 1783)
MCP_VARIABLE_COMMON_EX (Page 1610)
MCP_VARIABLE_LIMITS_EX (Page 1616)
MCP_VARIABLE_PROTOCOL_EX (Page 1619)
3.2.2.27 MCP_NEWVARIABLE_DATA_EX4
Declaration
typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON_EX Common;
MCP_VARIABLE_PROTOCOL_EX Protocol;
MCP_VARIABLE_LIMITS_EX Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1]
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_EX4;
Members
dwFlags
dwFlags indicates how the tag should be processed:
szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected with the error, DM_E_NOT_CONNECTED.
szConnection
Name of the logical connection assigned to the tag.
szVarName
Name of the tag to be processed.
szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.
Common
MCP_VARIABLE_COMMON_EX (Page 1610) Structure with the description of the tag.
Protocol
The MCP_VARIABLE_PROTOCOL_EX (Page 1619) structure with the description of how limit
violations are handled by the tag.
Limits
MCP_VARIABLE_LIMITS_EX (Page 1616) Structure with the limits of the tag.
szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in
the block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.
Scaling
MCP_VARIABLE_SCALES (Page 1620) Structure with the description of tag scaling.
Comments
The MCP_NEWVARIABLE_DATA_4 (Page 1600) structure has a similar use.
Required files
dmclient.h
API functions
See also
MCP_NEWVARIABLE_DATA_4 (Page 1600)
MCP_NEWVARIABLE_DATA_5 (Page 1602)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 1786)
MCP_VARIABLE_COMMON_EX (Page 1610)
MCP_VARIABLE_LIMITS_EX (Page 1616)
MCP_VARIABLE_PROTOCOL_EX (Page 1619)
MCP_VARIABLE_SCALES (Page 1620)
3.2.2.28 MCP_VARIABLE_COMMON
Declaration
typedef struct {
DWORD dwVarType;
DWORD dwVarLength;
DWORD dwVarProperty;
DWORD dwFormat;
}
MCP_VARIABLE_COMMON;
Members
dwVarType
The type of tag is specified in dwVarType:
dwVarLength
The specification of the tag length us only relevant for text tags DM_VARTYPE_TEXT_8 and
DM_VARTYPE_TEXT_16.
The text length is specified in characters here (1 to 255).
dwVarProperty
Indicates whether this is an internal or external tag:
dwFormat
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.
Comments
MCP_VARIABLE_COMMON is part of the MCP_NEWVARIABLE_DATA (Page 1598)
and MCP_NEWVARIABLE_DATA_4 (Page 1600) structures.
The MCP_VARIABLE_COMMON_EX (Page 1610) structure has a similar use for extended
functionality.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA (Page 1598)
MCP_NEWVARIABLE_DATA_4 (Page 1600)
MCP_VARIABLE_COMMON_EX (Page 1610)
MCP_NEWVARIABLE_DATA_5 (Page 1602)
3.2.2.29 MCP_VARIABLE_COMMON_EX
Declaration
typedef struct {
DWORD dwVarType;
DWORD dwCreatorID
DWORD dwVarLength;
DWORD dwVarProperty;
DWORD dwFormat;
DWORD dwOSOffset;
DWORD dwASOffset;
char szStructTypeName
}
MCP_VARIABLE_COMMON_EX;
Members
dwVarType
The type of tag is specified in dwVarType:
dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.
dwVarLength
The specification of the tag length us only relevant for text tags DM_VARTYPE_TEXT_8 and
DM_VARTYPE_TEXT_16. The text length is specified in characters here (1 to 255).
dwVarProperty
Indicates whether this is an internal or external tag:
dwFormat
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.
dwOSOffset
The parameter is reserved for future development and must be preset to 0.
dwASOffset
Offset in the buffer of the PLC
szStructTypeName
Name of the structure type
Comments
MCP_VARIABLE_COMMON_EX is part of the MCP_NEWVARIABLE_DATA_EX (Page 1604)
structure.
The MCP_VARIABLE_COMMON (Page 1608) structure has a similar use.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA (Page 1598)
MCP_VARIABLE_COMMON (Page 1608)
MCP_NEWVARIABLE_DATA_EX (Page 1604)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
3.2.2.30 MCP_VARIABLE_LIMITS
Declaration
typedef struct {
double dTopLimit;
double dBottomLimit;
double dStartValue;
double dSubstituteValue;
BOOL bTopLimit;
BOOL bBottomLimit;
BOOL bStartValue;
BOOL bConnectionErr;
BOOL bTopLimitValid;
BOOL bBottomLimitValid;
BOOL bStartValueValid;
BOOL bSubstValueValid;
}
MCP_VARIABLE_LIMITS;
Members
dTopLimit
Value of high limit of the tag
dBottomLimit
Value of low limit of the tag
dStartValue
Start value of the tag
dSubstituteValue
Substitute value of tag
bTopLimit
If this parameter is set, the substitute value should be used if the value of the tag exceeds the
value specified in dTopLimit.
bBottomLimit
If this parameter is set, the substitute value should be used if the value of the tag falls below
the value specified in dBottomLimit.
bStartValue
If this parameter is set, the substitute value should be used as a start value.
bConnectionErr
If this parameter is set, the substitute value should be used when when a connection error
occurs.
bTopLimitValid
If this parameter is set, the value specified in dTopLimit applies the high limit.
bBottomLimitValid
If this parameter is set, the value specified in dBottomLimit applies the low limit.
bStartValueValid
If this parameter is set, the value specified in dStartValue applies the start value.
bSubstValueValid
If this parameter is set, the value specified in dSubstitudeValue applies the substitute value.
Comments
MCP_VARIABLE_Limits is part of the MCP_NEWVARIABLE_DATA (Page 1598)
and MCP_NEWVARIABLE_DATA_4 (Page 1600) structures.
The MCP_VARIABLE_LIMITS_EX (Page 1616) structure has a similar use for extended
functionality.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA (Page 1598)
MCP_NEWVARIABLE_DATA_4 (Page 1600)
MCP_VARIABLE_LIMITS_EX (Page 1616)
3.2.2.31 MCP_VARIABLE_LIMITS5
Declaration
typedef struct {
VARIANT varTopLimit;
VARIANT varBottomLimit;
VARIANT varStartValue;
VARIANT varSubstituteValue;
BOOL bTopLimit;
BOOL bBottomLimit;
BOOL bStartValue;
BOOL bConnectionErr;
BOOL bTopLimitValid;
BOOL bBottomLimitValid;
BOOL bStartValueValid;
BOOL bSubstValueValid;
}
MCP_VARIABLE_LIMITS5;
Members
varTopLimit
Value of high limit of the tag
varBottomLimit
Value of low limit of the tag
varStartValue
Start value of the tag
varSubstituteValue
Substitute value of tag
bTopLimit
If this parameter is set, the substitute value should be used if the value of the tag exceeds the
value specified in dTopLimit.
bBottomLimit
If this parameter is set, the substitute value should be used if the value of the tag falls below
the value specified in dBottomLimit.
bStartValue
If this parameter is set, the substitute value should be used as a start value.
bConnectionErr
If this parameter is set, the substitute value should be used when when a connection error
occurs.
bTopLimitValid
If this parameter is set, the value specified in dTopLimit applies the high limit.
bBottomLimitValid
If this parameter is set, the value specified in dBottomLimit applies the low limit.
bStartValueValid
If this parameter is set, the value specified in dStartValue applies the start value.
bSubstValueValid
If this parameter is set, the value specified in dSubstitudeValue applies the substitute value.
Comments
MCP_VARIABLE_LIMITS5 is part of the MCP_NEWVARIABLE_DATA_5 (Page 1602) structure and
is needed specify text tags with start and substitute values using the GAPICreateNewVariable5
(Page 1774) function.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA_5 (Page 1602)
GAPICreateNewVariable5 (Page 1774)
3.2.2.32 MCP_VARIABLE_LIMITS_EX
Declaration
typedef struct {
double dTopLimit
double dBottomLimit;
double dStartValue;
double dSubstituteValue;
DWORD dwLimitFlags
DWORD dwTextBibStartText;
char szTextStartText[255];
DWORD dwTextBibSubstitude;
char szTextSubstitude[255]
}
MCP_VARIABLE_LIMITS_EX;
Members
dTopLimit
Value of high limit of the tag
dBottomLimit
Value of low limit of the tag
dStartValue
Start value of the tag
dSubstituteValue
Substitute value of tag
LimitFlags
The LimitFlags parameter specifies the validity of the default values and limits of a tag:
dwTextBibStartText
The parameter is only relevant for text tags. It the text to be used as the start value should be
read from the project text, enter the ID of the corresponding text here.
szTextStartText
The parameter is only relevant for text tags. Specify the text to be used as the start value
directly under szTextStartText.
dwTextBibSubstitude
The parameter is only relevant for text tags. It the text to be used as the substitute value
should be read from the project text, enter the ID of the corresponding text here.
szTextSubstitude
The parameter is only relevant for text tags. Specify the text to be used as the substitute
value directly under szTextSubstitude.
Comments
MCP_VARIABLE_LIMITS_EX is part of the MCP_NEWVARIABLE_DATA_EX (Page 1604) structure.
The MCP_VARIABLE_LIMITS (Page 1612) structure has a similar use.
Required files
dmclient.h
See also
MCP_VARIABLE_LIMITS (Page 1612)
MCP_NEWVARIABLE_DATA_EX (Page 1604)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
3.2.2.33 MCP_VARIABLE_PROTOCOL
Declaration
typedef struct {
BOOL bTopLimitErr;
BOOL bBottomLimitErr;
BOOL bTransformationErr;
BOOL bWriteErr;
BOOL bWriteErrApplication;
BOOL bWriteErrProzess;
}
MCP_VARIABLE_PROTOCOL;
Members
bTopLimitErr
A report entry is generated when the value of the tag exceeds the high limit.
bBottomLimitErr
A report entry is generated when the value of the tag falls below the low limit.
bTransformationErr
A report entry is generated when a conversion error occurs.
bWriteErr
A report entry is generated with each unauthorized write access.
bWriteErrApplication
A report entry is generated with each unauthorized write access by the application.
bWriteErrProzess
A report entry is generated with each unauthorized write access by the process.
Comments
MCP_VARIABLE_PROTOCOL is part of the MCP_NEWVARIABLE_DATA (Page 1598)
and MCP_NEWVARIABLE_DATA_4 (Page 1600) structures.
The MCP_VARIABLE_PROTOCOL_EX (Page 1619) structure has a similar use for extended
functionality.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA (Page 1598)
MCP_NEWVARIABLE_DATA_4 (Page 1600)
MCP_VARIABLE_PROTOCOL_EX (Page 1619)
MCP_NEWVARIABLE_DATA_5 (Page 1602)
3.2.2.34 MCP_VARIABLE_PROTOCOL_EX
Declaration
typedef struct {
DWORD dwProtocolFlags
}
MCP_VARIABLE_PROTOCOL_EX;
Members
dwProtocolFlags
You can use the dwProtocolFlags parameter to determine which events generate a report
entry:
Comments
MCP_VARIABLE_PROTOCOL_EX is part of the MCP_NEWVARIABLE_DATA_EX (Page 1604)
structure.
The MCP_VARIABLE_PROTOCOL (Page 1617) structure has a similar use.
Required files
dmclient.h
See also
MCP_VARIABLE_PROTOCOL (Page 1617)
MCP_NEWVARIABLE_DATA_EX (Page 1604)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
3.2.2.35 MCP_VARIABLE_SCALES
Declaration
typedef struct {
DWORD dwVarScaleFlags;
double doMinProc;
double doMaxProc;
double doMinVar;
double doMaxVar;
}
MCP_VARIABLE_SCALES;
Members
dwVarScaleFlags
DM_VARSCALE_NOSCALE: No scaling
DM_VARSCALE_LINEAR: Linear scaling
doMinProc
Lowest value of the tag in the process
doMaxProc
Highest value of the tag in the process
doMinVar
Lowest value of the tag in WinCC
doMaxVar
Highest value of the tag in WinCC
Comments
MCP_VARIABLE_SCALES is part of the MCP_NEWVARIABLE_DATA_4 (Page 1600) structure.
Required files
dmclient.h
See also
MCP_NEWVARIABLE_DATA_4 (Page 1600)
MCP_NEWVARIABLE_DATA_5 (Page 1602)
3.2.3.1 DMActivateRTProject
Use
This function enabled the project open in WinCC.
Declaration
BOOL DMActivateRTProject (
LPCMN_ERROR lpdmError);
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Project enabled.
FALSE
Error.
Comment
This function is processed internally asynchronously. If the instruction is correctly forwarded
internally, it always returns TRUE. If, for example, the name of the server computer in the project
is specified incorrectly, no error is reported.
A successful start is checked with DMGetRTProject(..) .
If a check for a correct computer name is required, use the DMGetMachineTable(..) and
GetComputername(..) functions.
Required files
dmclient.h
dmclient.lib
dmclient.dll
See also
DMGetMachineTable (Page 1652)
3.2.3.2 DMAddNotify
Declaration
BOOL DMAddNotify (
DM_NOTIFY_PROC lpfnNotify,
LPVOID lpvUser,
LPDWORD lpdwNotifyCookie,
LPCMN_ERROR lpdmError);
Description
Connect a further notify function call to DMClient. The notify functionality corresponds with the
functionality you can specify for DMConnect.
Parameters
lpfnNotify
Pointer to further notify functions.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the notify function.
lpdwNotifyCookie
Pointer to a DWORD, in which a cookie to the notify is returned.
The cookie is later required again in the DMRemoveNotify function to remove notify editing
again.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Additional notify function connected.
FALSE
Error
Comments
The function is required in case a DMConnect has been performed within the process already but
no access is possible to the notify function specified there. This way, an additional notify can be
included to also evaluate the notify functions involved.
If, e.g., you use a DLL with DMClient functionality you created yourself within a global script
function, it is no longer possible to perform a DMConnect there. A DMConnect has been
performed already using the script and notification is no longer possible.
On rare occasions, the notify may be returned even before the function call has returned.
The notify functions included here in addition must be removed again using
DMRemoveNotify before DMDisconnect. Also, the notify function must not be a member
function of a class object which can be destroyed or deleted prematurely. Eventually, a notify
call is pendant following a DMRemoveNotify.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Button AddNotify:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)
{
AddNotify();
}
Project function AddNotify:
extern BOOL DM_NotifyProcA(DWORD dwNotifyClass,
DWORD dwNotifyCode,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUser);
void AddNotify()
{
BOOL bRet = FALSE;
DWORD dwNotifyCookie = 0L;
LPVOID lpvUser = NULL;
CMN_ERRORA err;
memset(&err, 0, sizeof(CMN_ERRORA));
dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");
if (dwNotifyCookie)
{
printf("\r\nremove first previous Notify Cookie=%08lx",
dwNotifyCookie);
if (FALSE == bRet)
{
printf("\r\nERROR: DMRemoveNotifyA
[%s],%ld,%ld,%ld,%ld,%ld",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}
dwNotifyCookie = 0L;
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}
memset(&err, 0, sizeof(CMN_ERRORA));
lpvUser = (LPVOID)dwNotifyCookie; //set only for show in notify
bRet = DMAddNotifyA(DM_NotifyProcA,
lpvUser,
&dwNotifyCookie,
&err);
if (bRet)
{
printf("\r\nNotify added, Cookie=%08lx!",
dwNotifyCookie);
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}
else
{
printf("\r\nERROR: DMAddNotifyA
[%s],%ld,%ld,%ld,%ld,%ld",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}
}
Project function DM_NotifyProcA:
extern void RemoveNotify();
printf("\r\nDM_NOTIFY_CLASS_ERROR:
DM_NOTIFY_SYSNET_ERROR");
bShowParams = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_ERROR:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
case DM_NOTIFY_CLASS_WARNING:
switch (dwNotifyCode)
{
case DM_NOTIFY_QUEUE_50_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_50_PERCENT");
break;
case DM_NOTIFY_QUEUE_60_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_60_PERCENT");
break;
case DM_NOTIFY_QUEUE_70_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_70_PERCENT");
break;
case DM_NOTIFY_QUEUE_80_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_80_PERCENT");
break;
case DM_NOTIFY_QUEUE_90_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_90_PERCENT");
break;
case DM_NOTIFY_QUEUE_OVERFLOW:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_OVERFLOW");
break;
case DM_NOTIFY_CYCLES_CHANGED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_CYCLES_CHANGED");
bShowParams = TRUE;
break;
case DM_NOTIFY_MACHINES_CHANGED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_MACHINES_CHANGED");
bShowParams = TRUE;
break;
case DM_NOTIFY_PROJECT_OPENED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_OPENED [%s]",
(LPSTR)lpbyData);
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_PROJECT_CLOSED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_CLOSE");
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_SYSTEM_LOCALE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_SYSTEM_LOCALE [%ld]",
*(DWORD*)lpbyData);
break;
case DM_NOTIFY_DATA_LOCALE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_DATA_LOCALE [%ld]",
*(DWORD*)lpbyData);
break;
case DM_NOTIFY_PROJECT_RUNTIME:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_ROJECT_RUNTIME [%s]",
(LPSTR)lpbyData);
break;
case DM_NOTIFY_PROJECT_EDIT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_EDIT [%s]",
(LPSTR)lpbyData);
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_HOTKEY_CHANGE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_HOTKEY_CHANGE");
bShowParams = TRUE;
break;
case DM_NOTIFY_URSEL:
printf("\r\nDM_NOTIFY_CLASS_WARNING: DM_NOTIFY_URSEL");
bShowParams = TRUE;
break;
case DM_NOTIFY_BODO:
printf("\r\nDM_NOTIFY_CLASS_WARNING: DM_NOTIFY_BODO");
bShowParams = TRUE;
break;
case DM_NOTIFY_BEGIN_PROJECT_EDIT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_BEGIN_PROJECT_EDIT [%s]",
(LPSTR)lpbyData);
bShowParams = TRUE;
bSpecialActionRemoveNotify = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_WARNING:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
case DM_NOTIFY_CLASS_DATA:
switch (dwNotifyCode)
{
case DM_NOTIFY_APPLICATION_DATA:
printf("\r\nDM_NOTIFY_CLASS_DATA:
DM_NOTIFY_APPLICATION_DATA:");
bShowParams = TRUE;
break;
case DM_NOTIFY_VARIABLE_DATA:
printf("\r\nDM_NOTIFY_CLASS_DATA:
DM_NOTIFY_VARIABLE_DATA:");
bShowParams = TRUE;
break;
case DM_NOTIFY_FIRE_DATA:
// the data sended with DMFireNotifyData is char text
printf("\r\nDM_NOTIFY_CLASS_DATA: DM_NOTIFY_FIRE_DATA:
(data as text: [%s])",
(char*)lpbyData);
bShowParams = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_DATA:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
default:
printf("\r\nunknown dwNotifyClass[%08lx],
dwNotifyCode[%08lx]",
dwNotifyClass,
dwNotifyCode);
bShowParams = TRUE;
}
if (bShowParams)
{
printf("\r\ndwNotifyClass=%08lx, dwNotifyCode=%08lx,
dwItems=%ld, lpbyData=%08lx, lpvUser=%08lx",
dwNotifyClass,
dwNotifyCode,
dwItems,
lpbyData,
(DWORD)lpvUser);
}
if (bSpecialActionRemoveNotify)
{
printf("\r\nHave to remove notify if RT exits:");
RemoveNotify();
}
3.2.3.3 DMChangeDataLocale
Use
Provides notification of switching of the runtime language to all applications connected with
DMConnect.
Declaration
BOOL DMChangeDataLocale (
LPCTSTR lpszProjectFile,
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
dwLocaleID
Pointer to the code of the newly selected language. Possible values are the codes of all
languages configured in the text library.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Notify applications when language is switched.
FALSE
Error.
Comment
The application is notified via the callback function DM_NOTIFY_PROC (Page 1633) with the
following parameters:
dwNotifyClass DM_NOTIFY_CLASS_WARNING
dwNotifyCode DM_NOTIFY_DATA_LOCALE
lpbyData Pointer to the code of the newly configured lan‐
guage.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_NOTIFY_PROC (Page 1633)
DMEnumOpenedProjects (Page 1656)
DMGetRuntimeProject (Page 1662)
3.2.3.4 DMConnect
Use
Establishment of a connection by application to the data manager. Only one DMConnect can be
performed in an application (process). Additional calls return the error
DM_E_ALREADY_CONNECTED.
Declaration
BOOL DMConnect (
LPTSTR lpszAppName,
DM_NOTIFY_PROC lpfnNotify,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );
Parameters
lpszAppName
Pointer to the name of the calling application. Any name can be selected since the parameter
is used for internal identification.
The length of application name is limited to MAX_DM_APP_NAME (32 characters). Longer
names lead to errors in the embedded OHIOIPC.DLL and to termination with the error
DM_E_NOT_CONNECTED.
lpfnNotify
Pointer to the notification function for administrative messages from the data manager to the
application.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
The Notify routine should still be available after DMDisConnect, since the late calls may arrive.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Set up connection to data manager.
FALSE
Error.
Comment
In the WinCC variants that are implemented on the operating system platforms with multi-
threading support, the calls for the notification function are executed asynchronous to the
calling process.
You need to configure appropriate synchronization within the application.
If data manager functions are distributed to multiple threads in a program, run DMConnect in
each of these threads and a DMDisconnet at the end.
First, use DMGetConnectionState to check if another thread has already established
a connection. If a connection already exists, you may not perform DMConnect or
DMDisConnect.
To avoid this conflict, combine the function calls to the data manager in a single thread and
execute the calls only from there.
If data manager functions are swapped out to a DLL that is embedded in an application with
the data manager functions, check if the connection can be established and terminated via
the DLL. In this case, the application must always secure its own data manager function calls
with DMGetConnectionState. However, this offers no protection against disconnection when
the thread is encapsulated in the DLL.
Therefore, define your own connection establishment in a flag, so that DMDisConnect is only
carried out in the desired situation.
An unchecked DMConnect call with Notify that returns the DM_E_ALREADY_CONNECTED
error message may cancel the Notify of a previous call and lead to undesirable results.
Pointers to data ranges passed to the callback function are only valid within the function, in
other words, the data manager may release allocated memory areas after the return of the
callback. If the application requires access to the data beyond the time of the call, it must
copy it accordingly.
In addition, pointers to memory areas on the platforms that only support this only have read
access, so that a write access to relevant data cause a protection fault!
The return value of the callback is currently not evaluated and will only be of significance in
future versions. The application should return TRUE by default here.
API DLLs must not be directly used in (ISS) services because the internal resources required
there are not available.
If you use data manager functions, such as a wrapper, in a managed environment
(C#), ensure that multiple ApplicationDomains in an application run in the same process.
Therefore, only one DMConnect is permitted in all ApplicationDomains.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Connection to DM (Page 1825) "DM01.cpp"
See also
DM_NOTIFY_PROC (Page 1633)
DMDisconnect (Page 1636)
DMGetConnectionState (Page 1648)
Connection to DM (Page 1825)
APConnect (Page 1948)
3.2.3.5 DM_NOTIFY_PROC
Description
In order for your application to provide notification of language switching, for example, you
need to provide a DM_NOTIFY_PROC type callback function.
Declaration
BOOL ( * DM_NOTIFY_PROC) (
DWORD dwNotifyClass,
DWORD dwNotifyCode,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUser);
Parameters
dwNotifyClass
identifies the notification class:
DM_NOTIFY_CLASS_ERROR (0x00000001)
DM_NOTIFY_CLASS_WARNING (0x00000002)
DM_NOTIFY_CLASS_DATA (0x00000003)
dwNotifyCode
Notification code
for DM_NOTIFY_CLASS_ERROR:
DM_NOTIFY_SHUTDOWN (0x00000001) Data manager is closed
DM_NOTIFY_PROCESSNET_ERROR (0x00000002) Error on the process bus
DM_NOTIFY_SYSNET_ERROR (0x00000003) Error on the system bus
for DM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_50_PERCENT (0x00000001) Fill level of application queue
50%
DM_NOTIFY_QUEUE_60_PERCENT (0x00000002) Fill level of application queue
60%
DM_NOTIFY_QUEUE_70_PERCENT (0x00000003) Fill level of application queue
70%
DM_NOTIFY_QUEUE_80_PERCENT (0x00000004) Fill level of application queue
80%
DM_NOTIFY_QUEUE_90_PERCENT (0x00000005) Fill level of application queue
90%
DM_NOTIFY_QUEUE_OVERFLOW (0x00000006) Overflow of the application
queue
DM_NOTIFY_CYCLES_CHANGED (0x00000010) Rescan update cycles
DM_NOTIFY_MACHINES_CHANGED (0x00000011) Rescan computer list
DM_NOTIFY_PROJECT_OPENED (0x00000012) Load project
DM_NOTIFY_PROJECT_CLOSE (0x00000013) Close project
DM_NOTIFY_SYSTEM_LOCALE (0x00000014) Switch configuration language
DM_NOTIFY_DATA_LOCALE (0x00000015) Switch GUI language
DM_NOTIFY_PROJECT_RUNTIME (0x00000016) Enable project
DM_NOTIFY_PROJECT_EDIT (0x00000017) Disable project
DM_NOTIFY_HOTKEY_CHANGE (0x00000018) A hot key was changed
for DM_NOTIFY_CLASS_DATA:
DM_NOTIFY_APPLICATION_DATA (0x00000001) Application data
DM_NOTIFY_VARIABLE_DATA (0x00000002) Tag data
You can find more information in the notification codes in the description of the constants.
lpbyData
Pointer to the data provided within the DM_NOTIFY_CLASS_DATA class.
dwItems
Number of entries in lpbyData.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
The return values depend on your implementation.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
When a program reports a notify routine, it must empty its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the DMConnect function call has
returned.
Required files
dmclient.h
Related functions
Examples
AUTOHOTSPOT "DM01.cpp"
See also
DMConnect (Page 1630)
3.2.3.6 DMDeactivateRTProject
Use
The project in the runtime mode is disabled.
Declaration
BOOL DMDeactivateRTProject (
LPCMN_ERROR lpdmError);
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Project disabled.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestDeactivateRuntimeProject (Page 1837) "TESTCDoc.cpp"
See also
OnTestDeactivateRuntimeProject (Page 1837)
3.2.3.7 DMDisconnect
Use
This function is used by an application to terminate an existing connection to the data manager.
Declaration
BOOL DMDisConnect (
LPCMN_ERROR lpdmError );
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection terminated.
FALSE
Error.
Comments
If no connection to the data manager has been established with the DMConnect function, the
return value is FALSE. The lpdmError->dwError error code contains the
DM_E_NOT_CONNECTED, value, no connection to the data manager.
Note
The call must not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the program.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Connection to DM (Page 1825) "DM01.cpp"
See also
DMConnect (Page 1630)
Connection to DM (Page 1825)
3.2.3.8 DMEnumNumberFormats
Use
The function lists all format conversions available within FORMAT.DLL .
Declaration
BOOL DMEnumNumberFormats (
LPDWORD lpdwItems,
DM_ENUM_FORMATS_PROC lpfnFormat,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpdwItems
Pointer to a double word of the application, which contains the number of enumerated
format data after the call.
lpfnFormat
Pointer to your callback function that is called for every available number format.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Format conversions listed.
FALSE
Error.
Comments
Pointers passed to the callback are only valid within this, since the system releases all allocated
memory areas once the function returns. If an application requires access to the data beyond
this, it must copy it accordingly.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_ENUM_FORMATS_PROC (Page 1639)
3.2.3.9 DM_ENUM_FORMATS_PROC
Description
In order to evaluate the format conversions listed by the system, you must provide a
DM_ENUM_FORMATS_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_FORMATS_PROC) (
LPDM_FORMAT_INFO lpdmFormat,
DWORD dwItem,
LPVOID lpvUser );
Parameters
lpdmFormat
Pointer to a DM_FORMAT_INFO (Page 1573) type structure with the data of a format
conversion.
dwItem
Continuous call counter. If the enumeration is not canceled prematurely, dwItem will contain
the number of available format conversions.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DMEnumNumberFormats (Page 1638)
DM_FORMAT_INFO (Page 1573)
3.2.3.10 DMEnumUpdateCycles
Use
The function lists all update cycles defined in the system. The function passes an information
structure for the cycle each time the callback function is called.
Declaration
BOOL DMEnumUpdateCycles (
LPCSTR lpszProjectFile,
LPDWORD lpdwItems,
DM_ENUM_CYCLES_PROC lpfnCycle,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdwItem
Pointer to a double word of the application, which contains the number of enumerated cycle
data after the call.
lpfnCycle
Pointer to your callback function that is called for every available update cycle.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Update cycles listed
FALSE
Error
Comments
Pointers passed to the callback function are only valid within the function, since the system
releases all allocated memory areas once the function returns.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestUpdateCycles (Page 1845) "TESTCDoc.cpp"
See also
DM_ENUM_CYCLES_PROC (Page 1642)
OnTestUpdateCycles (Page 1845)
3.2.3.11 DM_ENUM_CYCLES_PROC
Description
In order to evaluate the update cycles listed by the system, you must provide a
DM_ENUM_CYCLES_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_CYCLES_PROC) (
LPDM_CYCLE_INFO lpdmCycle,
DWORD dwItem,
LPVOID lpvUser);
Parameters
lpdmCycle
Pointer to a DM_CYCLE_INFO (Page 1569) type structure with the data of an update cycle.
dwItem
Continuous call counter. If the enumeration is not canceled prematurely, dwItem will contain
the number of available update cycles.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DMEnumUpdateCycles (Page 1641)
DM_CYCLE_INFO (Page 1569)
3.2.3.12 DMExitWinCC
Use
You can use this function to close WinCC.
Declaration
BOOL DMExitWinCC (
VOID);
Parameters
None
Comments
You can also use the DMExitWinCCEx to specify how the operating system should react to the
closing of WinCC.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestWinCCShutdown (Page 1862) "TESTCDoc.cpp"
See also
OnTestWinCCShutdown (Page 1862)
DMExitWinCCEx (Page 1645)
3.2.3.13 DMExitWinCCEx
Use
You can use this function to close WinCC. You can also specify how the operating system reacts
after WinCC is closed.
Declaration
BOOL DMExitWinCCEx (
DWORD dwMode );
Parameters
dwMode
You can use dwMode to specify various ways the operating system should react after WinCC
is closed.
Comments
With the DM_SDMODE_WINCC parameter, the function has the same effect as DMExitWinCC.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DMExitWinCC (Page 1644)
3.2.3.14 DMFireNotifyData
Declaration
BOOL DMFireNotifyData (
DWORD dwNotifyCookie,
DWORD dwByteCount,
LPBYTE lpbyData,
LPCMN_ERROR lpdmError);
Description
Sends an additional notify to a connected notify using the specified cookie identifier.
Parameters
dwNotifyCookie
Cookie for an additional notify function which was connected using DMAddNotify.
If "0" is specified the notify data is sent to all active notifies (broadcast).
dwByteCount
Size of the data buffer to be sent in BYTE.
lpbyData
Pointer to a byte buffer that contains the notify data to be sent.
The size of the buffer is specified by dwByteCount.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Notify data sent.
FALSE
Error
Comments
The sent notify is edited in the said notify routine under
dwNotifyClass=DM_NOTIFY_CLASS_DATA and dwNotifyCode=DM_NOTIFY_FIRE_DATA.
If a DMDisconnect is performed without previously removing the additional notify functions,
a final DM_NOTIFY_SHUTDOWN is issued again to all these notify functions which are then
removed internally using administration. You can then discard the connection and the
cookies as they are no longer valid.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Button DMFireNotifyData:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)
{
DWORD dwNotifyCookie;
CHAR* pszNotifyText;
CMN_ERROR err;
BOOL bRet;
dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");
pszNotifyText = GetTagChar("DMNotifySendText");
memset(&err, 0, sizeof(err));
bRet = FALSE;
bRet = DMFireNotifyData(dwNotifyCookie,
strlen(pszNotifyText)*sizeof(CHAR)+1,
(LPBYTE)pszNotifyText, &err);
if (FALSE == bRet)
{
printf("\r\nERROR: DMFireNotifyData [%s],%ld,%ld,%ld,%ld,%ld",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}
3.2.3.15 DMGetConnectionState
Use
You can use this function to query for a connection to the data manager, for example, to check
whether the DMConnect function call has been correctly executed.
Declaration
BOOL DMGetConnectionState (
LPCMN_ERROR lpdmError);
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established.
FALSE
Error or no connection.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Connection to DM (Page 1825) "DM01.cpp"
See also
DMConnect (Page 1630)
Connection to DM (Page 1825)
3.2.3.16 DMGetDataLocale
Use
The function returns the ID of the currently selected runtime language.
Declaration
BOOL DMGetDataLocale (
LPDWORD lpdwLocaleID,
LPCMN_ERROR lpdmError);
Parameters
lpdwLocaleID
Pointer to the code of the currently configured language. Return values are the codes of all
languages configured in the text library.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get language ID.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.3.17 DMGetHotkey
Use
This function determines the action associated with a hotkey.
Declaration
BOOL DMGetHotKey (
DWORD dwHotKeyAction,
LPDWORD lpdwHotKey,
LPCMN_ERROR lpdmError);
Parameters
dwHotKeyAction
Action
lpdwHotKey
Pointer to the memory location where the hotkey is stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get hotkey ID.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.3.18 DMGetMachineInfo
Use
This function is used by an application to determine the startup parameters of the specific
computer. For this to occur, the application must have the relevant entries for the computer
properties made with the project management functions beforehand.
Declaration
BOOL DMGetMachineInfo (
LPCSTR lpszLogicalName,
LPVOID lpvData,
LPDWORD lpdwSize,
LPCMN_ERROR lpdmError);
Parameters
lpszLogicalName
Pointer to the logical name of the Explorer DLL whose startup parameters are queried.
lpvData
Pointer to a data range through which the data of the startup parameters are passed to the
application.
lpdwSize
If lpvData = 0, the size of the data range is specified in lpdwSize.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get information about the local PC.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.3.19 DMGetMachineTable
Use
You can use this function to determine information on individual PCs in addition to the number
of PCs involved in the project.
Declaration
BOOL DMGetMachineTable (
LPCSTR lpszProjectFile,
LPDM_MACHINE_TABLE lpdmMachineTable,
LPCMN_ERROR lpdmError);
Parameters
lpdwProjectFile
Pointer to the name of the project file, including path and extension.
lpdmMachineTable
Pointer to the DM_MACHINE_TABLE (Page 1574) structure in which the data from the
computer list is stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data for computer list determined.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestMachines (Page 1840) "TESTCDoc.cpp"
See also
DM_MACHINE_TABLE (Page 1574)
OnTestMachines (Page 1840)
DMActivateRTProject (Page 1621)
3.2.3.20 DMRemoveNotify
Declaration
BOOL DMRemoveNotify (
DWORD dwNotifyCookie,
LPCMN_ERROR lpdmError);
Description
Removes an additionally connected notify function using its cookie identifier from the additional
notify list.
This function is only available in WinCC Version V7.2 or higher.
Parameters
dwNotifyCookie
Cookie for an additional notify function which was connected using DMAddNotify.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Additional notify function removed.
FALSE
Error
Comments
If a DMDisconnect is performed without previously removing the additional notify functions, a
final DM_NOTIFY_SHUTDOWN is issued again to all these notify functions which are then
removed internally using administration. You can then discard the connection and the cookies
as they are no longer valid.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Button RemoveNotify:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)
{
RemoveNotify ();
}
Project function RemoveNotify:
void RemoveNotify()
{
DWORD dwNotifyCookie = 0L;
CMN_ERRORA err;
BOOL bRet = FALSE;
memset(&err, 0, sizeof(CMN_ERRORA));
dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");
if (dwNotifyCookie)
{
bRet = DMRemoveNotify(dwNotifyCookie, &err);
if (bRet)
{
printf("\r\nNotify [%08lx] removed", dwNotifyCookie);
dwNotifyCookie = 0L;
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}
else
{
printf("\r\nERROR: DMRemoveNotifyA
[%s],%ld,%ld,%ld,%ld,%ld, Cookie=%08lx",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5,
dwNotifyCookie);
}
}
else
{
printf("\r\nNo Notify present to remove!");
}
}
3.2.4.1 DMEnumOpenedProjects
Use
Calls the passed callback function for each project open in WinCC.
Declaration
BOOL DMEnumOpenedProjects (
LPDWORD lpdwItems,
DM_ENUM_OPENED_PROJECTS_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpdwItems
Pointer to a double word, which contains the number of open projects when the
enumeration is completed.
lpfnEnum
Pointer to your callback function, which receives the project data.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Projects listed.
FALSE
Error.
Comments
Currently, only one project can be open in WinCC. You therefore only get the information for this
one project.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Enum open projects (Page 1830) "DM01.cpp"
OnTestOpenProjects (Page 1844) "TESTCDoc.cpp"
See also
DM_ENUM_OPENED_PROJECTS_PROC (Page 1657)
DM_PROJECT_INFO (Page 1575)
Enum open projects (Page 1830)
OnTestOpenProjects (Page 1844)
DMChangeDataLocale (Page 1629)
3.2.4.2 DM_ENUM_OPENED_PROJECTS_PROC
Description
In order to be able to evaluate the projects listed by the system, you must provide a callback
function of the DM_ENUM_OPENED_PROJECTS_PROC type.
Declaration
BOOL ( * DM_ENUM_OPENED_PROJECTS_PROC) (
LPDM_PROJECT_INFO lpInfo,
LPVOID lpvUser);
Parameters
lpInfo
Pointer to a DM_PROJECT_INFO (Page 1575) type structure with information about an open
project.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Comments
Currently, only one project can be open in WinCC. You therefore only get the information for this
one project.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
Examples
Enum open projects "DM01.cpp"
See also
DMEnumOpenedProjects (Page 1656)
DM_PROJECT_INFO (Page 1575)
Enum open projects (Page 1830)
3.2.4.3 DMGetProjectDirectory
Use
Returns the path to the configuration data for the given project that is valid for the application.
Declaration
BOOL DMGetProjectDirectory (
LPCSTR lpszAppName,
LPCSTR lpszProjectFile,
LPDM_DIRECTORY_INFO lpdmDirInfo,
LPCMN_ERROR lpdmError );
Parameters
lpszAppName
Pointer to the name of the application for which the path is to be determined.
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects.
lpdmDirInfo
Pointer to the DM_DIRECTORY_INFO (Page 1571) structure in which the path of the
configuration data is stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get path information.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestProjectPaths (Page 1842) "TESTCDoc.cpp"
See also
DM_DIRECTORY_INFO (Page 1571)
OnTestProjectPaths (Page 1842)
3.2.4.4 DMGetProjectInformation
Use
Determines relevant information about the given project, such as paths, data source name,
computer configuration, etc.
Declaration
BOOL DMGetProjectInformation (
LPCSTR lpszProjectFile,
LPDM_PROJECT_INFO lpProjectInfo,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in RT with
DMGetRuntimeProject.
lpProjectInfo
Pointer to the DM_PROJECT_INFO (Page 1575) structure in which the project information is
stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get project information
FALSE
Error
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
Inquire project informations (Page 1836) "DM01.cpp"
OnTestProjectInfo (Page 1841) "TESTCDoc.cpp"
See also
DM_PROJECT_INFO (Page 1575)
Inquire project informations (Page 1836)
OnTestProjectInfo (Page 1841)
3.2.4.5 DMGetRuntimeProject
Use
Returns the file name of the project that is in online mode. To determine all other project data
after successful execution, the calling application remembers the name of the project file
entered in lpszProjectFile.
Declaration
BOOL DMGetRuntimeProject (
LPSTR lpszProjectFile,
DWORD dwBufSize,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Buffer for storing the name of the project file, including path and extension. The buffer must
be at least _MAX_PATH characters in size.
dwBufSize
Size of the given buffer in characters.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Name of the enabled project determined.
FALSE
Error.
Comments
The call is successfully executed even when runtime has started but not all components are
enabled.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
Read tag (Page 1864) "DM02.cpp"
Write tag (Page 1869) "DM02.cpp"
OnTestRuntimeProject (Page 1844) "TESTCDoc.cpp"
See also
Read tag (Page 1864)
Write tag (Page 1869)
OnTestRuntimeProject (Page 1844)
DMChangeDataLocale (Page 1629)
3.2.4.6 DMOpenProjectDocPlus
Use
Opens the project specified in lpszProjectFile.
Declaration
BOOL DMOpenProjectDocPlus (
LPSTR lpszProjectFile,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file to be opened, including path and extension.
The release name (e.g. WinCC 50_Project_Odk) implicitly generated by WinCC cannot be
used as a path because it exists only as long as this project is open.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Project opened.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.4.7 DMOpenProjectPlus
Use
Selection of a project file via the standard selection dialog of the system. If the project is not yet
open in WinCC, the information required for the project is loaded.
When the execution is successful, the calling application should remember the name of the
project file entered in lpszProjectFile, since it can be used to determine all other information
about the project.
The name of the project file can later be determined with DMEnumOpenedProjects.
Declaration
BOOL DMOpenProjectPlus (
HWND hwndParent,
LPSTR lpszProjectFile,
DWORD dwBufSize,
LPCMN_ERROR lpdmError );
Parameters
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpszProjectFile
Pointer to the buffer for storing the name of the project file, including path and extension.
The buffer should be at least _MAX_PATH characters in size.
lpszProjectFile must be an empty string or a valid path of an existing project when the
function is called.
If lpszProjectFile is an empty string, the default selection dialog of the system (see above) is
called.
If lpszProjectFile is not empty, WinCC interprets the string contained in lpszProjectFile as the
project path and attempts to open it without opening the selection dialog.
The release name (e.g. WinCC 50_Project_Odk) implicitly generated by WinCC cannot be
used as a project path because it exists only as long as this project is open.
dwBufSize
Size of the given buffer in characters.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "CANCEL"
Comments
The process of opening a project may take several minutes.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
Open project by means of dialog (Page 1863) "DM01.cpp"
OnTestOpenProject (Page 1843) "TESTCDoc.cpp"
See also
Open project by means of dialog (Page 1863)
OnTestOpenProject (Page 1843)
3.2.5.1 DMClearBlockQueue
Use
Deletes all entries in the notification queue of the application.
Declaration
BOOL DMClearBlockQueue (
LPCMN_ERROR lpdmError );
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Notification queue is deleted.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.5.2 DMEnumDataServices
Use
DMEnumDataServices calls the passed callback function for each service already installed, as
long as the callback function returns TRUE.
Declaration
BOOL DMEnumDataServices (
LPDWORD lpdwItems,
DM_ENUM_DATA_SERVICE_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpdwItems
Pointer to a double word of the application, which contains the number of listed services
after the call.
lpfnEnum
Pointer to your callback function that is called for every installed service.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Services listed.
FALSE
Error.
Comment
Pointers passed to the callback are only valid within this, since the system releases all allocated
memory areas once the function returns. If an application requires access to the data beyond
this, it must copy it accordingly.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_ENUM_DATA_SERVICE_PROC (Page 1668)
DMInstallDataService (Page 1672)
3.2.5.3 DM_ENUM_DATA_SERVICE_PROC
Description
In order to evaluate the installed data transport channels listed by the system, you must provide
a DM_ENUM_DATA_SERVICE_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_DATA_SERVICE_PROC) (
LPCSTR pszService,
DM_DATA_SERVICE_PROC pfnService,
LPVOID lpvUser );
Parameters
pszService
Pointer to the logical name of the data transport channel.
pfnService
Pointer to your DM_DATA_SERVICE_PROC (Page 1670) type callback function, through which
the additional data of a service are made available.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DMEnumDataServices (Page 1667)
DM_DATA_SERVICE_PROC (Page 1670)
3.2.5.4 DM_DATA_SERVICE_PROC
Description
To enable your application to receive data, you must have a data transport channel installed via
DMInstallDataService and provide a DM_DATA_SERVICE_PROC type callback function.
You also need a callback function of this type if you want to evaluate the transport channels
(services) listed by the system.
Declaration
BOOL ( * DM_DATA_SERVICE_PROC) (
LPDM_DATA_SERVICE lpds,
LPVOID lpvUser);
Parameters
lpds
Pointer to a DM_DATA_SERVICE (Page 1570) type structure with the information on an
installed data transport channels (service).
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
Depending on the use of the callback function.
FALSE
Error
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
Required files
dmclient.h
Related functions
See also
DM_ENUM_DATA_SERVICE_PROC (Page 1668)
DM_DATA_SERVICE (Page 1570)
DMInstallDataService (Page 1672)
3.2.5.5 DMGetNumPendingBlocks
Use
This function is used by an application to determine the entries in its queue.
Declaration
BOOL DMGetNumPendingBlocks (
LONG *plEntries,
LPCMN_ERROR lpdmError);
Parameters
plEntries
After successful execution, the function contains the number of data packets in the queue of
the application.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number of entries in queue determined.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.5.6 DMInstallDataService
Use
Installs a transport channel (service) for data transfer between applications. The function
signals the readiness of the application to receive data sent by any other applications under the
specified service name. If a service is already installed under the given name, the callback
function installed for this is replaced by whatever is passed. If lpfnService == NULL , the service
installed lpszService is removed.
Declaration
BOOL DMInstallDataService (
LPCSTR lpszService,
DM_DATA_SERVICE_PROC lpfnService,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszService
Pointer to the name of the service. The transport channel is identified by this name, which
have have freely assigned.
lpfnService
Pointer to a callback function that is called when data is sent to the application through this
service.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data transport channel installed.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
DM_DATA_SERVICE_PROC (Page 1670) List data transport channels (callback), install data
transport channel (callback)
See also
DMEnumDataServices (Page 1667)
DM_DATA_SERVICE_PROC (Page 1670)
3.2.5.7 DMSendApplicationData
Use
The data passed in lpdmSendData are sent to all applications that meet the conditions specified
in the DM_SEND_DATA_STRUCT structure and have installed the service described under
szService using DMInstallDataService.
Declaration
BOOL DMSendApplicationData (
LPDM_SEND_DATA_STRUCT lpdmSendData,
LPCMN_ERROR lpdmError);
Parameters
lpdmSendData
Pointer to the DM_SEND_DATA_STRUCT (Page 1576) structure.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data sent to application.
FALSE
Error.
Comment
The function is only implemented locally.
The members in the DM_SEND_DATA_STRUCT structure for remote access to the
"TargetMachine" are reserved for future development.
The dwTargetMachineFlags can only be specified with DM_SD_LOCAL , any other specification
leads to errors and dwTargetMachines must be 0L.
Required files
dmclient.h
dmclient.lib
dmclient.dll
See also
DM_SEND_DATA_STRUCT (Page 1576)
3.2.5.8 DMSetBlockQueueSize
Use
This function specifies the maximum number of messages that can be held in the notification
queue of the application.
Declaration
BOOL DMSetBlockQueueSize (
LONG nCount,
LPCMN_ERROR lpdmError);
Parameters
nCount
Maximum number of messages.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Size of the queue set.
FALSE
Error.
Comment
The default value for 32-bit platforms is 1000 entries, which is usually sufficient.
Each message occupies address space of the application. Think carefully before increasing
the number of messages as this will slow processing by the application.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.6.1 DMEnumVarData
Use
The function is used to determine information about objects that are associated with a tag, for
example, associated tag group, channel unit, etc.
Declaration
BOOL DMEnumVarData (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DM_ENUM_VARIABLE_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarKey
Pointer to the beginning of a field for DM_VARKEY (Page 1594) type structures, through
which the tags to be listed are specified. As of V5.0 SP2, if no array is specified and supplied
with NULL, all tags are enumerated.
If an incorrect name or a false ID is given for DM_VARKEY , no errors are displayed because
some can be valid and some incorrect in a list. In order for the user to identify an incorrect
DM_VARKEY , a DM_VARIABLE_DATA (Page 1590) type structure is passed for this in the
callback, which is filled with 0.
dwItems
Number of tags whose data are listed (= number of tag specifications in lpdmVarKey). If the
number is set to 0, all tags are enumerated.
lpfnEnum
Pointer to your callback, which receives the information about a tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Information on the tag listed.
FALSE
Error
Comment
There is an advanced function, DMEnumVarData4.
Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single call
of DMEnumVarData4. Any necessary filtering should be performed here in the callback itself.
The change considerably improves performance.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARKEY (Page 1594)
DM_VARIABLE_DATA (Page 1590)
DM_ENUM_VARIABLE_PROC (Page 1678)
3.2.6.2 DM_ENUM_VARIABLE_PROC
Description
In order to evaluate information about a tag listed by the system, you must provide a
DM_ENUM_VARIABLE_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_VARIABLE_PROC) (
LPDM_VARKEY lpdmVarKey,
LPDM_VARIABLE_DATA lpdmVarData,
LPVOID lpvUser
Parameters
lpdmVarKey
Pointer to a DM_VARKEY (Page 1594) type structure for specification of the tag to be listed.
lpdmVarData
Pointer to a DM_VARIABLE_DATA (Page 1590) type structure with information about a tag.
When the structure completely filled with 0, an incorrect name or incorrect ID was given in
DM_VARKEY. Can be queried via lpdmVarData->dmTypeRef->dwType, for example.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DM_VARKEY (Page 1594)
DM_VARIABLE_DATA (Page 1590)
DMEnumVarData (Page 1676)
3.2.6.3 DMEnumVarData4
Use
The function is used to determine information about objects that are associated with a tag, for
example, associated tag group, channel unit, etc.
If differs from DMEnumVarData due to the additional specification of scaling information.
Declaration
BOOL DMEnumVarData4 (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DM_ENUM_VARIABLE_PROC4 lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarKey
Pointer to the beginning of a field for DM_VARKEY (Page 1594) type structures, through
which the tags to be listed are specified. If the parameter is set to NULL, all tags are
enumerated.
If an incorrect name or a false ID is given for DM_VARKEY , no errors are displayed because
some can be valid and some incorrect in a list. In order for the user to identify an incorrect
DM_VARKEY, a DM_VARIABLE_DATA4 (Page 1592) type structure is passed for this in the
callback, which is filled with 0.
dwItems
Number of tags whose data should be listed (= number of tag specifications in lpdmVarKey).
If the number is set to 0, all tags are enumerated.
lpfnEnum
Pointer to your callback, which receives the information about a tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Information on the tag listed.
FALSE
Error.
Comment
Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single call
of DMEnumVarData4. Any necessary filtering should be performed here in the callback itself.
The change considerably improves performance.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Enum Data of Tags (Page 1828) "DM01.cpp"
See also
DM_VARKEY (Page 1594)
DM_VARIABLE_DATA4 (Page 1592)
DM_ENUM_VARIABLE_PROC4 (Page 1682)
Enum Data of Tags (Page 1828)
3.2.6.4 DM_ENUM_VARIABLE_PROC4
Description
In order to evaluate information about a tag listed by the system, you must provide a
DM_ENUM_VARIABLE_PROC4 type callback function. This callback function differs from
DM_ENUM_VARIABLE_PROC due to the additional specification of scaling information.
Declaration
BOOL ( * DM_ENUM_VARIABLE_PROC4) (
LPDM_VARKEY lpdmVarKey,
LPDM_VARIABLE_DATA4 lpdmVarData,
LPVOID lpvUser
Parameters
lpdmVarKey
Pointer to a DM_VARKEY (Page 1594) type structure for specification of the tag to be listed.
lpdmVarData
Pointer to a DM_VARIABLE_DATA4 (Page 1592) type structure with information about a tag.
When the structure completely filled with 0, an incorrect name or incorrect ID was given in
DM_VARKEY. Can be queried via lpdmVarData->dmTypeRef->dwType, for example.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
Examples
Enum Data of Tags (Page 1828) "DM01.cpp"
See also
DMEnumVarData4 (Page 1679)
DM_VARKEY (Page 1594)
DM_VARIABLE_DATA4 (Page 1592)
Enum Data of Tags (Page 1828)
3.2.6.5 DMEnumVarGrpData
Use
The function returns information about the tag groups via the DM_ENUM_VARGRP_PROC
callback function, for example, name, creator ID and number of tags in the group.
Declaration
BOOL DMEnumVarGrpData (
LPSTR lpszProjectFile,
LPDM_VARGRPKEY lpdmVarGrpKey,
DWORD dwItems,
DM_ENUM_VARGRP_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarGrpKey
Pointer to the first of the DM_VARGRPKEY (Page 1589) type structures, through which the
tag group is specified.
dwItems
The number of tags whose data are listed.
lpfnEnum
Pointer to your callback, which receives the information about a tag group.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Information on the tag group listed.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestEnumGroupsAll (Page 1837) "TESTCDoc.cpp"
See also
DM_VARGRPKEY (Page 1589)
DM_ENUM_VARGRP_PROC (Page 1687)
OnTestEnumGroupsAll (Page 1837)
3.2.6.6 DMEnumVarGrpDataExStr
Declaration
BOOL DMEnumVarGrpDataExStr (
LPTSTR lpszProjectFile,
DWORD dwFlags,
LPVARIANT lpvdmVarGrpKey,
LPDWORD lpdwVarGrpCount,
DM_ENUM_VARGRP_PROC_EXSTR lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function returns tag group information by means of the DM_ENUM_VARGRP_PROC_EXSTR
callback function, for example, name, ID and number of tags in the group.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
dwFlags
Reserved for future use. Is to be filled with 0L.
lpvdmVarGrpKey
Pointer to the first structure of the "DM_VARGRPKEY" type specifying the tag groups.
Pointer to a VARIANT for this tag group list. You must create the list as VT_ARRAY |
VT_VARIANT as different data types such as VT_I4, VT_BSTR and under certain conditions
also VT_LPSTR can be different for each tag. Alternatively, you create a single VARIANT if only
one key is specified.
VT_EMPTY or NULL pointers are used to enumerate all groups.
lpdwVarGrpCount
Pointer to DWORD returning the number of tag groups.
lpfnCallback = NULL is used to initially determine how much memory is required for the tag
groups.
lpfnEnum
Pointer to your callback function which receives the tag group information.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Tag group information enumerated
FALSE
Error
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
3.2.6.7 DM_ENUM_VARGRP_PROC
Description
In order to evaluate information about a tag group listed by the system, you must provide a
DM_ENUM_VARGRP_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_VARGRP_PROC) (
LPDM_VARGRP_DATA lpdmVarGrpData,
LPVOID lpvUser );
Parameters
lpdmVarGrpData
Pointer to a DM_VARGRP_DATA (Page 1588) type structure with information about the tag
group.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DMEnumVarGrpData (Page 1683)
DM_VARGRP_DATA (Page 1588)
3.2.6.8 DMEnumVariables
Use
The function lists the names of all tags that match a certain selection criterion. The selection
criterion is determined by the DM_VARFILTER structure.
Declaration
BOOL DMEnumVariables (
LPCSTR lpszProjectFile,
LPDM_VARFILTER lpdmVarFilter,
DM_ENUM_VAR_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarFilter
Pointer to the DM_VARFILTER (Page 1586) structure in which the selection criterion is
specified.
lpfnEnum
Pointer to your callback function, which receives the tag names.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag names listed.
FALSE
Error.
Comment
Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single call
of DMEnumVarData4. Any necessary filtering should be performed here in the callback itself.
The change considerably improves performance.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestEnumVariables (Page 1838) "TESTCDoc.cpp"
See also
DM_VARFILTER (Page 1586)
DM_ENUM_VAR_PROC (Page 1690)
OnTestEnumVariables (Page 1838)
3.2.6.9 DM_ENUM_VAR_PROC
Description
In order to evaluate the names of tags listed by the system, you must provide a
DM_ENUM_VAR_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_VAR_PROC) (
LPDM_VARKEY lpdmVarKey,
LPVOID lpvUser
Parameters
lpdmVarKey
Pointer to a DM_VARKEY (Page 1594) type structure with the name of a tag.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
Additional callback calls are desirable.
FALSE
The callback series should be cancelled.
Comment
NOTICE
You may not call any other DMClient function in this callback. A blockade may otherwise occur.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DM_VARKEY (Page 1594)
DMEnumVariables (Page 1688)
3.2.6.10 DMGetValue
Use
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
The more advanced DMGetValueEx function, additionally returns the quality code in the
DM_VAR_UPDATE_STRUCTEX structure.
Declaration
BOOL DMGetValue (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
LPCMN_ERROR lpdmError);
Parameters
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag values to be read.
dwItems
Number of passed structures (corresponds to the number of tag values to be read).
lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCT (Page 1581) structure that contains the tag
values once the function returns.
lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error
occurs during the writing of a tag, the system writes the error information into the
appropriate structure. Therefore, remember to reserve space for these structures.
Return value
TRUE
Values determined.
FALSE
Error.
Comment
To provide an application the possibility of separate cycle management, a ZERO pointer is
specified as the callback function for DMStartVarUpdate. Then, the data manager updates the
tags according to the required cycle. However, the application remains responsible for the
timing of the readout obtained from the process image.
Since update requests for a tag can be present from several applications in different cycles,
the data manager always updates its process image based on the shortest requested cycle.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Read tag (Page 1864) "DM02.cpp"
OnTestVariablenGetvalue (Page 1848) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
DM_VAR_UPDATE_STRUCT (Page 1581)
DMGetValueWait (Page 1704)
DMSetValue (Page 1734)
Read tag (Page 1864)
OnTestVariablenGetvalue (Page 1848)
3.2.6.11 DMGetValueEx
Use
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
In contrast to DMGetValue, the quality code is also returned in the
DM_VAR_UPDATE_STRUCTEX structure.
Declaration
BOOL DMGetValueEx (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VAR_UPDATE_STRUCTEX lpdmvus,
LPCMN_ERROR lpdmError);
Parameters
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag values to be read.
dwItems
Number of passed structures (corresponds to the number of tag values to be read).
lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCTEX (Page 1583) structure that contains the tag
values once the function returns.
lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error
occurs during the writing of a tag, the system writes the error information into the
appropriate structure. Therefore, remember to reserve space for these structures.
Return value
TRUE
Values determined.
FALSE
Error.
Comment
To provide an application the possibility of separate cycle management, a NULL pointer can be
specified as the callback function for DMStartVarUpdate. Then, the data manager updates the
tags according to the required cycle. However, the application remains responsible for the
timing of the readout obtained from the process image.
Since update requests for a tag can be present from several applications in different cycles,
the data manager always updates its process image based on the shortest requested cycle.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_NOTIFY_VARIABLEEX_PROC (Page 1819)
DM_VAR_UPDATE_STRUCTEX (Page 1583)
DM_VARKEY (Page 1594)
DMGetValueWait (Page 1704)
DMSetValue (Page 1734)
DMGetValueWaitEx (Page 1706)
3.2.6.12 DMGetValueExStr
Declaration
BOOL DMGetValueExStr (
DWORD dwFlags,
LPVARIANT lpdmVarKey,
LPDM_VAR_UPDATE_STRUCT_EXSTR lpdmvus,
DWORD dwdmvusCount,
LPCMN_ERROR lpdmError);
Description
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
In contrast to DMGetValueEx, the DM_VARKEY structure is no longer used; as a result no
length constraint applies with tag names.
Parameters
dmFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of
the DM_VAR_UPDATE_STRUCT_EXSTR structure of DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.
lpvdmVarKey
Pointer to a VARIANT for the tag list. You must create the list as VT_ARRAY | VT_VARIANT, as
various data types such as VT_I4, VT_BSTR and, in some cases, also VT_LPSTR can be present.
This applies also to a single key.
lpdmvus
Pointer to the first of the DM_VAR_UPDATE_STRUCT_EXSTR structures which contains the
values of the tags after the return of the function.
dwdmvusCount
Number of DM_VAR_UPDATE_STRUCT_EXSTR structures passed (identical with the number
of tag values to be read). The number must conform with the size of the variant array in
lpvdmVarKey.
lpdmError
Pointer to the first "dwdmvusCount" error structure of the CMN_ERROR type. If a tag writing
error occurs, the system writes the error information into the corresponding structure.
Therefore, remember to reserve space for these structures.
Return value
TRUE
Values have been determined
FALSE
Error
Comment
In order to e.g. enable an application to manage its own cycle administration, a NULL pointer can
be specified for DMStartVarUpdate as a callback function. Then, the data manager updates the
tags according to the required cycle. However, the application remains responsible for the
timing of the readout obtained from the process image.
As update requests for a tag can be made by multiple applications operating with different
cycles, the data manager always updates its process image based on the shortest cycle time.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Script sample "Button DMGetValueExStr/DMSetValueExStr|DMGetValueWaitExStr/
DMSetValueWaitExStr":
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("kernel32.dll")
#define CP_ACP 0
VARIANT vVarKey;
VARIANT* pvElem;
VARIANT vdmValue;
SAFEARRAY* parrayKeys;
SAFEARRAY* parrayValues;
DWORD dwVal[4];
DWORD dwState[4];
DWORD dwMerk;
CMN_ERROR err;
CMN_ERROR errArray[4];
DM_VAR_UPDATE_STRUCT_EXSTR dmvus[4];
HRESULT hr;
long lInx;
BOOL bRet;
DWORD dwFlags;
DWORD* pdwVarState;
DWORD dwTAID;
memset(&err, 0, sizeof(err));
memset(dmvus, 0, sizeof(dmvus));
dwVal[0] = 1;
dwVal[1] = 2;
dwVal[2] = 3;
dwVal[3] = 4;
dwMerk = 0L;
memset(dwState, 0, sizeof(dwState));
pvElem = NULL;
parrayKeys = NULL;
parrayValues = NULL;
hr = 0L; //S_OK
lInx = 0L;
bRet = FALSE;
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
pdwVarState = dwState;
dwTAID = 0L;
VariantInit(&vVarKey);
parrayKeys = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vVarKey.vt = VT_ARRAY | VT_VARIANT;
vVarKey.u.parray = parrayKeys;
SafeArrayLock(parrayKeys);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_1";
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_2";
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_3";
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_4";
SafeArrayUnlock(parrayKeys);
printf("\r\ncall DMGetValueExStr:");
bRet = DMGetValueExStr(dwFlags, &vVarKey, dmvus, 4L, &err);
if (bRet == FALSE)
{
printf("\r\n error DMGetValueExStr, err=%ld,%ld,%ld,%ld,%ld,
[%s]",
err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
hr = VariantChangeType((VARIANTARG*)&(dmvus[i].vdmValue),
(VARIANTARG*)&(dmvus[i].vdmValue), 0, VT_I4);
if (hr)
{
printf("\r\n error VariantChangeType[%d] hr=%08lx",
i, hr);
}
else
{
if (dmvus[i].vdmValue.vt == VT_I4)
{
dwVal[i] = dmvus[i].vdmValue.u.lVal;
printf("\r\n Var[%d]:[%s] = %ld",
i, dmvus[i].vdmVarKey.u.pbVal,
dmvus[i].vdmValue.u.lVal);
}
else
{
printf("\r\n wrong datatype %ld, VT_I4 expected
after VariantChange",
dmvus[i].vdmValue.vt == VT_I4);
}
}
}
VariantInit(&vdmValue);
parrayValues = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vdmValue.vt = VT_ARRAY | VT_VARIANT;
vdmValue.u.parray = parrayValues;
SafeArrayLock(parrayValues);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[0];
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[1];
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[2];
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[3];
SafeArrayUnlock(parrayValues);
printf("\r\ncall DMSetValueExStr:");
memset(&err, 0, sizeof(err));
bRet = DMSetValueExStr(&vVarKey, &vdmValue, pdwVarState, &err);
if (bRet == FALSE)
{
printf("\r\n error DMSetValueExStr, err=%ld,%ld,%ld,%ld,%ld,
[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
printf("\r\n dwVarState[%d] = %ld", i, dwState[i]);
}
}
printf("\r\ncall DMGetValueWaitExStr:");
memset(&err, 0, sizeof(err));
bRet = DMGetValueWaitExStr(&dwTAID, dwFlags, &vVarKey, TRUE, 2000,
DM_NotifyVariableProcExStr_GetValueWait, dwVal, &err);
if (bRet == FALSE)
{
printf("\r\n error DMGetValueWaitExStr,
err=%ld,%ld,%ld,%ld,%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
printf("\r\n dwValue[%d] = %ld", i, dwVal[i]);
}
}
pvElem->u.pbVal = dwVal[2];
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[3];
SafeArrayUnlock(parrayValues);
printf("\r\ncall DMSetValueWaitExStr:");
memset(errArray, 0, sizeof(errArray));
bRet = DMSetValueWaitExStr(&dwTAID, &vVarKey, 4, &vdmValue,
pdwVarState, 2000, DM_CompletitionProc, NULL, errArray);
if (bRet == FALSE)
{
int i = 0;
for(i=0; i < 4; i++)
{
printf("\r\n error DMSetValueWaitExStr,
errArray[%d]=%ld,%ld,%ld,%ld,%ld,[%s]",
i, errArray[i].dwError1, errArray[i].dwError2,
errArray[i].dwError3,
errArray[i].dwError4, errArray[i].dwError5,
errArray[i].szErrorText);
}
}
else
{
}
pdwVal = (DWORD*)lpvUser;
// the DMGetValueWait used PROPVARIANT and the lpvUser is ptr to
OutDataArray (DWORDS)
printf("\r\n*** DM_NotifyVariableProcExStr_GetValueWait entry ***");
Project-Function DM_CompletitionProc:
return bRet;
}
3.2.6.13 DMGetValueWait
Use
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
In contrast to DMGetValue, this function forces a value-based update of the tag values.
The more advanced DMGetValueWaitEx function additionally returns the quality code in the
DM_NOTIFY_VARIABLEEX_PROC callback in the DM_VAR_UPDATE_STRUCTEX structure.
Declaration
BOOL DMGetValueWait (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLE_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag values to be read.
dwItems
Number of passed structures (corresponds to the number of tag values to be read).
fWaitForCompletition
If the fWaitForCompletition flag is set, the passed callback function is called only called when
either all the requested tags are updated or the specified timeout period is exceeded.
If fWaitForCompletition is not set, the passed callback function is called immediately. The
time characteristics correspond to the function DMGetValue.
dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated
when the waiting time expires, the callback function with corresponding error codes is called.
If the fWaitForCompletition == FALSE flag is set, the passed value is not evaluated.
lpfnVariable
Pointer to your DM_NOTIFY_VARIABLE_PROC callback function, which is called either after
the update of all requested tags or after the waiting period.
If fWaitForCompletition == FALSE, the callback function is called immediately with the values
currently set in the process image of the data manager.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Values determined.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestVariablenGetvaluewait (Page 1851) "TESTCDoc.cpp"
See also
DM_NOTIFY_VARIABLE_PROC (Page 1808)
DM_VARKEY (Page 1594)
DMGetValue (Page 1691)
DMGetValueEx (Page 1693)
DMSetValueWait (Page 1744)
OnTestVariablenGetvaluewait (Page 1851)
DMGetValueWaitEx (Page 1706)
3.2.6.14 DMGetValueWaitEx
Use
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
In contrast to DMGetValueEx, this function forces a value-based update of the tag values.
Declaration
BOOL DMGetValueWaitEx (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLEEX_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag values to be read.
dwItems
Number of passed structures (corresponds to the number of tag values to be read).
fWaitForCompletition
If the fWaitForCompletition flag is set, the passed callback function is called only called when
either all the requested tags are updated or the specified timeout period is exceeded.
If fWaitForCompletition is not set, the passed callback function is called immediately. The
time characteristics correspond to the function DMGetValue.
dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated
when the waiting time expires, the callback function with corresponding error codes is called.
If the fWaitForCompletition == FALSE flag is set, the passed value is not evaluated.
lpfnVariable
Pointer to your DM_NOTIFY_VARIABLEEX_PROC callback function, which is called either after
the update of all requested tags or after the waiting period.
If fWaitForCompletition == FALSE, the callback function is called immediately with the values
currently set in the process image of the data manager.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Values determined.
FALSE
Error.
Related functions
See also
DM_NOTIFY_VARIABLEEX_PROC (Page 1819)
DMGetValueWait (Page 1704)
DM_VARKEY (Page 1594)
DMGetValueEx (Page 1693)
DMSetValueWait (Page 1744)
3.2.6.15 DMGetValueWaitExStr
Declaration
BOOL DMGetValueWaitExStr (
LPDWORD pdwTAID,
DWORD dwFlags
LPVARIANT lpvdmVarKey,
LPVARIANT lpvCookie,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLE_PROC_EXSTR lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
Reads the value of one or more tags from the process image of the data manager. The value that
is read out is the one existing at the time of the most recent update.
In contrast to DMGetValueExStr, this function can be used to enforce a value-based update of
the tag values.
In contrast to DMGetValueEx, the DM_VARKEY structure is no longer used; as a result no
length constraint applies with tag names.
Parameters
pdwTAID
Pointer to a tag containing the transaction ID allocated by the data manager after the
function has been called successfully.
dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of
the DM_VAR_UPDATE_STRUCT_EXSTR structure of DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.
lpvdmVarKey
Pointer to a VARIANT for the tag list. You must create the list as VT_ARRAY | VT_VARIANT, as
various data types such as VT_I4, VT_BSTR and, in some cases, also VT_LPSTR can be present.
lpvCookie
Pointer to a VARIANT for an additional list of user-dependent data for each tag.
This is intended as substitute for lpvUserData of the previous DM_VARKEY and is also
returned in the DM_VAR_UPDATE_STRUCT_EXSTR structure for each tag.
fWaitForCompletition
If the fWaitForCompletion flag has been set, the callback function passed is not called before
all tags requested have been updated or the timeout time specified has been exceeded.
If the fWaitForCompletition flag has not been set, the callback function is called immediately.
The timing is identical with that of the DMGetValueExStr function.
dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated
when the waiting time expires, the callback function with corresponding error codes is called.
If the fWaitForCompletition flag = FALSE, the value passed is not evaluated.
lpfnVariable
Pointer to your DM_NOTIFY_VARIABLEEX_PROC_EXSTR callback function which is called
either after all requested tags have been updated or after the waiting time has expired.
If fWaitForCompletition = FALSE, the callback function is called immediately with the values
currently stored in the process image of the data manager.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Values have been determined
FALSE
Error
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
You can find samples on the DMGetValueExStr page.
3.2.6.16 DMGetVarInfo
Use
DMGetVarInfo determines the full tag key of a tag. This command can be used to obtain a tag
name associated with a tag ID and vice versa.
Declaration
BOOL DMGetVarInfo (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure to be completed with the tag keys.
dwItems
Number of completed structures.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Get tag key.
FALSE
Error.
Comment
Do not use the call alternating with calls for creating tags. If DMGetVarInfo is used after creating
a tag the first time, search lists are resorted, which costs an additional execution time.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestVariablenGetVarInfo (Page 1855) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
OnTestVariablenGetVarInfo (Page 1855)
3.2.6.17 DMGetVarInfoExStr
Declaration
BOOL DMGetVarInfoExStr (
LPCTSTR lpszProjectFile,
DWORD dwFlags,
LPVARIANT lpvdmVarKeyIn,
LPVARIANT lpvdmVarKeyOut,
LPCMN_ERROR lpdmError);
Description
Determines the complete tag key of a tag. This command enables you to obtain the tag name to
a tag ID and vice versa.
In contrast to DMGetVarInfo, the tag list is passed on as pointer to VARIANT with VT_ARRAY
| VT_VARIANT. It is returned in a second VARIANT. As a result, no length limit applies to tag
names.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT
lpvdmVarKeyOut, DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR can be specified here.
lpvdmVarKeyIn
Pointer to VARIANT with VT_ARRAY | VT_VARIANT to pass the tag list or single VARIANT when
only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
lpvdmVarKeyOut
Pointer to VARIANT used to return the corresponding values for lpvdmVarKeyIn.
Then, the tag ID for a given tag name in lpvdmVarKeyIn is returned or vice versa.
If the VARIANT is initialized with VT_EMPTY, a corresponding array is created and filled with
VT_ARRAY | VT_VARIANT of the same size as in lpvdmVarKeyIn.
If the VARIANT is not empty, a VariantClear is called first before a new one is created. A
VARIANT which is not initialized can result in an exception.
If the tag does not exist or cannot be accessed, the type of the corresponding entry remains
VT_EMPTY.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Tag keys have been determined
FALSE
Error
Comment
This call should not be used alternately with calls for creating tags. Whenever the DMGetVarInfo
or DMGetVarInfoExStr function is used for the first time after creating a tag search lists must be
sorted again. This requires additional runtime.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Examples
Script sample Button DMGetVarInfoExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("kernel32.dll")
#define CP_ACP 0
int MultiByteToWideChar(UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
LPWSTR lpWideCharStr,
int cchWideChar);
int WideCharToMultiByte(UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
LPSTR lpMultiByteStr,
int cbMultiByte,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar);
#pragma code()
parrayOUT = NULL;
//hr = E_FAIL;
nRet = 0;
printf("\r\n\r\n########## enter Test with DMGetVarInfoExStr
##########");
{
printf("\r\nerror SafeArrayPutElement: hr = %08lx", hr);
}
VariantClear(&vElem);
vElem.vt = VT_I4;
vElem.u.lVal = dwVarID3;
lInx = 2;
hr = SafeArrayPutElement(parrayIN, &lInx, &vElem);
vElem.vt = VT_I4;
vElem.u.lVal = dwVarID4;
lInx = 3;
hr = SafeArrayPutElement(parrayIN, &lInx, &vElem);
memset(&err, 0, sizeof(err));
bRet = DMGetVarInfoExStr(szProjectName, dwFlags, &vVarkeyIn,
&vVarkeyOut, &err);
if (!bRet)
{
printf("\r\n error DMGetVarInfoExStr[%s],
err=%ld,%ld,%ld,%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
if (err.dwError1 == DM_E_DONT_EXIST)
{
//reset error, elements will be checked each for error in
type (VT_EMPTY == not exist)
bRet = TRUE;
}
}
else
{
printf("\r\n DMGetVarInfoExStr return OK");
}
if (bRet)
{
if (vVarkeyOut.vt == VT_EMPTY)
{
printf("\r\n vVarkeyOut is VT_EMPTY");
}
else
{
parrayOUT = vVarkeyOut.u.parray;
lInx = 0;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4",
lInx, vElem.vt);
dwVarID1 = 0L;
}
else
{
dwVarID1 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_1",dwVarID1);
lInx = 1;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4",
lInx, vElem.vt);
dwVarID2 = 0L;
}
else
{
dwVarID2 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_2",dwVarID2);
lInx = 2;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_BSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_BSTR",
lInx, vElem.vt);
strcpy(szVarNam3, "error!!!");
}
else
{
nRet = WideCharToMultiByte(CP_ACP, 0L,
(WCHAR*)vElem.u.bstrVal, -1,
szVarNam3, 256, NULL, NULL);
}
SetTagChar("szVarKeyName_3",szVarNam3);
lInx = 3;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_BSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_BSTR",
lInx, vElem.vt);
strcpy(szVarNam4, "error!!!");
}
else
{
nRet = WideCharToMultiByte(CP_ACP, 0L,
(WCHAR*)vElem.u.bstrVal, -1,
szVarNam4, 256, NULL, NULL);
}
SetTagChar("szVarKeyName_4",szVarNam4);
printf("\r\n get vVarkeyOut:");
printf("\r\n dwVarID1=%ld, szVarNam1=[%s] (delivered
ID)", dwVarID1, szVarNam1);
printf("\r\n dwVarID2=%ld, szVarNam2=[%s] (delivered
ID)", dwVarID2, szVarNam2);
{
dwVarID1 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_1",dwVarID1);
lInx = 1;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4",
lInx, vElem.vt);
dwVarID2 = 0L;
}
else
{
dwVarID2 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_2",dwVarID2);
SafeArrayLock(parrayOUT);
lInx = 2;
SafeArrayPtrOfIndex(parrayOUT, &lInx, &pvElem);
if (pvElem->vt != VT_LPSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_LPSTR",
lInx, pvElem->vt);
strcpy(szVarNam3, "error!!!");
}
else
{
strncpy(szVarNam3, (LPSTR)pvElem->u.pbVal, 255);
szVarNam3[255] = 0;
}
SetTagChar("szVarKeyName_3",szVarNam3);
lInx = 3;
SafeArrayPtrOfIndex(parrayOUT, &lInx, &pvElem);
if (pvElem->vt != VT_LPSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_LPSTR",
lInx, pvElem->vt);
strcpy(szVarNam4, "error!!!");
}
else
{
strncpy(szVarNam4, (LPSTR)pvElem->u.pbVal, 255);
szVarNam4[255] = 0;
}
SetTagChar("szVarKeyName_4",szVarNam4);
SafeArrayUnlock(parrayOUT);
3.2.6.18 DMGetVarLimits
Use
DMGetVarLimits determines the limits for the specified tag, within which write operations are
possible with DMSetValue functions.
Declaration
BOOL DMGetVarLimits (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VARLIMIT lpdmVarLimit,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarKey
Pointer to a DM_VARKEY (Page 1594) type structure for specification of the tags.
dwItems
Number of completed structures.
lpdmVarLimit
Pointer to the DM_VARLIMIT (Page 1597) type structure in which the limits are is stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Limits determined.
FALSE
Error.
Comment
In addition to the high and low limits of a tag defined in the configuration, a further limit to the
allowed number range is set by any format specifications made.
The following example shows the relationships for a DM_VARTYPE_BYTE type tag that is
stored in an automation system as a byte in BCD format.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestVariablenGetvarlimits (Page 1856) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
DM_VARLIMIT (Page 1597)
OnTestVariablenGetvarlimits (Page 1856)
3.2.6.19 DMGetVarLimitsExStr
Declaration
BOOL DMGetVarLimitsExStr (
LPCTSTR lpszProjectFile,
LPVARIANT lpvdmVarKey,
LPDM_VARLIMIT lpdmVarLimit,
LPCMN_ERROR lpdmError );
Description
For the tags specified, DMGetVarLimitsExStr determines the limits within which it is possible to
execute write operations using the DMSetValueExStr functions.
In contrast to DMGetVarLimits, the tag list is passed as pointer to VARIANT with VT_ARRAY |
VT_VARIANT. As a result, no length limit applies to tag names.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT to pass the tag list or single VARIANT when
only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
lpdmVarLimit
Pointer to structures of the DM_VARLIMIT type to store the limit values.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Limit values have been determined
FALSE
Error
Comment
In addition to the configured high and low limits of a tag, a stored format instruction leads to a
further restriction of the valid numerical value range.
The following sample explains this situation for a tag of the DM_VARTYPE_BYTE type stored
in the AS in the BCD byte format.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Examples
Script sample Button DMGetVarLimitsExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("OleAut32.dll")
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound,
unsigned int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR*
rgIndices, void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
HRESULT VariantChangeType( VARIANTARG FAR* pvargDest, VARIANTARG
FAR* pvarSrc, unsigned short wFlags, VARTYPE vt);
#pragma code()
VARIANT vdmVarkey;
VARIANT* pvElem;
VARIANT vElem;
HRESULT hr;
CHAR szProjectName[256];
CMN_ERROR err;
BOOL bRet;
CHAR szVarNam1[256], szVarNam2[256], szVarNam3[256], szVarNam4[265];
SAFEARRAY* parray;
long lInx;
int nRet;
DM_VARLIMIT dmLimits[4];
int i;
memset(&err, 0, sizeof(err));
bRet = FALSE;
szProjectName[0] = 0;
VariantInit(&vElem);
VariantInit(&vdmVarkey);
parray = NULL;
nRet = 0;
i = 0;
memset(&err, 0, sizeof(err));
memset(dmLimits, 0, sizeof(DM_VARLIMIT)*4);
bRet = DMGetVarLimitsExStr(szProjectName, &vdmVarkey, dmLimits,
&err);
if (!bRet)
{
printf("\r\n error DMGetVarLimitsExStr[%s],
err=%ld,%ld,%ld,%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
bRet = TRUE; //clear error flag, the defect data is set to
VT_EMPTY
}
else
{
printf("\r\n DMGetVarLimitsExStr return OK");
}
if (bRet)
{
for (i = 0; i < 4; i++)
{
VariantClear(&vElem);
printf("\r\n dmLimits[%d]:{",i);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMaxRange, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMaxRange.vt))
{
printf("dmMaxRange=[%g], ", vElem.u.dblVal);
}
else
{
printf("dmMaxRange{VariantChangeType error hr =
0x%08lx, vt=0x%04x}",
hr, dmLimits[i].dmMaxRange.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMinRange, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMinRange.vt))
{
printf("dmMinRange=[%g], ", vElem.u.dblVal);
}
else
{
printf("dmMinRange{VariantChangeType error hr =
0x%08lx, vt=0x%04x}",
hr, dmLimits[i].dmMinRange.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMaxLimit, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMaxLimit.vt))
{
printf("dmMaxLimit=[%g], ", vElem.u.dblVal);
}
else
{
printf("dmMaxLimitVariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMaxLimit.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMinLimit, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMinLimit.vt))
{
printf("dmMinLimit=[%g]", vElem.u.dblVal);
}
else
{
printf("dmMinLimitVariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMinLimit.vt);
}
printf("}");
}
}
3.2.6.20 DMGetVarType
Use
DMGetVarType determines the type reference for the passed tags.
Declaration
BOOL DMGetVarType (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_TYPEREF lpdmTypeRef,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure with which the tag keys determined for the
type.
dwItems
Number of completed structures.
lpdmTypeRef
Pointer to the list of DM_TYPEREF (Page 1579) structures for returning the details about the
tag type.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data type determined.
FALSE
Error.
Comment
The configuration functions for creating tags pass the completed DM_VARREF and DM_TYPEREF
structures to the calling application with details of the data type of the tag.
To save memory space within the application, it does not necessarily have to remember the
type reference to each tag itself; it can query this information with DMGetVarType at any
time from the data manager.
Do not use the call alternating with calls for creating tags. If DMGetVarType is used after
creating a tag the first time, search lists are resorted, which costs an additional execution
time.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestVariablenGetvartype (Page 1857) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
DM_TYPEREF (Page 1579)
OnTestVariablenGetvartype (Page 1857)
3.2.6.21 DMGetVarTypeExStr
Declaration
BOOL DMGetVarTypeExStr (
LPCTSTR lpszProjectFile,
LPVARIANT lpvdmVarKey,
LPDM_TYPEREF_EXSTR lpdmTypeRef,
LPCMN_ERROR lpdmError);
Description
Determines the type reference for the tags passed.
In contrast to DMGetVarType, the tag list is passed as pointer to VARIANT with VT_ARRAY |
VT_ VARIANT. As a result, no length limit applies to tag names. This applies also for the type
names in the DM_TYPEREF_EXSTR structures.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing the tag list.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
lpdmTypeRef
Pointer to the list of DM_TYPEREF_EXSTR structures that return tag type information.
The list must have at least the size of the variant array in lpvdmVarKey. The pointers
lpszTypeName and dwBufferCount must be initialized and point to a separate string array.
If lpszTypeName is NULL check the return. Allocated pointer has to enable it again.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Data type has been determined
FALSE
Error
Comment
In order to economize the memory management within the application, the application is not
forced to store the type reference for each tag. Instead, it can obtain this information from the
data manager anytime by means of DMGetVarType.
This call should not be used alternately with calls for creating tags. Whenever the
"DMGetVarType" or "DMGetVarTypeExStr" function is used for the first time after creating
a tag, search lists must be sorted again. This requires additional runtime.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Examples
Script sample Button DMGetVarTypeExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("OleAut32.dll")
VARIANT vdmVarkey;
VARIANT* pvElem;
HRESULT hr;
CHAR szProjectName[256];
CMN_ERROR err;
BOOL bRet;
CHAR szVarNam1[256], szVarNam2[256], szVarNam3[256], szVarNam4[256];
SAFEARRAY* parray;
long lInx;
int nRet;
DM_TYPEREF_EXSTR dmTypeRef[4];
CHAR szTypeName[4][256];
int i;
memset(&err, 0, sizeof(err));
memset(dmTypeRef, 0, sizeof(DM_TYPEREF_EXSTR)*4);
szTypeName[0][0] = 0;
szTypeName[1][0] = 0;
szTypeName[2][0] = 0;
szTypeName[3][0] = 0;
bRet = FALSE;
szProjectName[0] = 0;
VariantInit(&vdmVarkey);
parray = NULL;
nRet = 0;
i = 0;
dmTypeRef[i].lpszTypeName = NULL;
dmTypeRef[i].dwNameCharCount = 0L;
//set name store for next read (no need to free after
call)
dmTypeRef[i].lpszTypeName = szTypeName[i];
dmTypeRef[i].dwNameCharCount = 255;
}
printf("}");
}
}
printf("\r\n call DMGetVarTypeExStr with pointers and size for
name storage");
memset(&err, 0, sizeof(err));
bRet = DMGetVarTypeExStr(szProjectName, &vdmVarkey, dmTypeRef,
&err);
if (!bRet)
{
printf("\r\n error DMGetVarTypeExStr[%s],
err=%ld,%ld,%ld,%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMGetVarTypeExStr return OK");
}
if (bRet)
{
for (i = 0; i < 4; i++)
{
printf("\r\n dmTypeRef[%d]:{",i);
printf("dwType=[%ld]", dmTypeRef[i].dwType);
printf(", dwSize=[%ld]", dmTypeRef[i].dwSize);
printf(", lpszTypeName=[%s]", dmTypeRef[i].lpszTypeName);
printf(", dwNameCharCount=[%ld]",
dmTypeRef[i].dwNameCharCount);
printf("}");
}
}
printf("\r\n########## exit Test with DMGetVarTypeExStr
##########\r\n");
3.2.6.22 DMSetValue
Use
The function changes the values of the tags described by lpdmVarKey to the values specified in
lpdmValue.
Changes are made to the tags asynchronously, according to the motto "fire and forget".
Declaration
BOOL DMSetValue (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPVARIANT lpdmValue,
LPDWORD lpdmVarState,
LPCMN_ERROR lpdmError);
Parameters
lpdmVarKey
Pointer to the first DM_VARKEY (Page 1594) structure that identifies the tag values to be
changed.
dwItems
Number of passed structures (corresponds to the number of tag values to be changed).
lpdmValue
Pointer to the first of the new values for the tags to be changed.
lpdmVarState
Pointer to the first memory location where information is stored indicating whether the tag
value could be changed successfully or whether errors have occurred.
The value 0 (OK) means that the transmission/modification has been completed
successfully and that at least one of the specified tags exists. An error with the
DM_VARSTATE_INVALID_KEY status only occurs if none of the specified tags exist.
DMSetValueWait must be used to check if the value has been applied.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tags changed.
FALSE
Error.
Comment
Specification of an access rule for lpdmValue is not necessary, since the data manager can map
each type based on the passed tag key.
Write access is performed in the process for external tags. For WinCC client PCs, the request is
forwarded to the respective server.
Normally, write requests of the applications are executed asynchronously. All write requests
are listed in the queue of the data manager on the server and passed sequentially to the
appropriate channel DLL.
If the channel DLL positively confirms the write request, the new value becomes valid in the
process image of the server responsible for the request. The update is then performed within
the WinCC stations which are interconnected by means of the system bus.
As a result, a tag can temporarily have different values on different stations.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Write tag (Page 1869) "DM02.cpp"
OnTestVariablenSetvalue (Page 1859) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
DMGetValue (Page 1691)
DMGetValueEx (Page 1693)
DMSetValueMessage (Page 1740)
DMSetValueWait (Page 1744)
DMSetValueWaitMessage (Page 1749)
Write tag (Page 1869)
OnTestVariablenSetvalue (Page 1859)
3.2.6.23 DMSetValueExStr
Declaration
BOOL DMSetValueExStr (
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,
LPDWORD lpdmVarState,
LPCMN_ERROR lpdmError);
Description
This function changes the values of the tags described by lpvdmVarKey to obtain the values
specified in lpvdmValue.
Tag modifications are transmitted in asynchronous mode according to the principle "fire and
forget".
In contrast to DMSetValue, the tag list is passed on as pointer to VARIANT with VT_ARRAY |
VT_VARIANT. As a result, no length limit applies to tag names.
Parameters
lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list or single
VARIANT if only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
For a multi-client project in WinCC Version 5.0 or higher, it may be required here to add a
server prefix to each name (refer to "Project types and versions" ).
lpvdmValue
Pointer to the first of the new values for the tags to be changed.
lpdmVarState
Pointer to a memory location which stores the information whether the value of the tag
could be changed successfully or if errors occurred.
The value "0" (OK) means that the transmission/modification has been completed
successfully and that at least one of the specified tags is existing. The
DM_VARSTATE_INVALID_KEY error status is only returned if none of the specified tags exists.
In order to check if the value has been applied by the PLC also, DMSetValueWaitExStr must be
used.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Tags changed.
FALSE
Error
Comment
It is not necessary to specify an access instruction for lpdmValue because the tag keys passed
enable the data manager to allocate the information appropriately.
For external tags, write access to the process is obtained while the job is passed on to the
appropriate server by WinCC client computers.
The write jobs of the application are normally executed in asynchronous mode, i.e. all write
jobs are lined up in the queue which the data manager keeps on the server, and then passed
on to the appropriate channel DLL sequentially.
If the channel DLL confirms the write job affirmatively, the new value becomes valid in the
process image of the server responsible for the job. The update is then performed within the
WinCC stations which are interconnected by means of the system bus.
As a result, a tag can temporarily have different values on different stations.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
You can find samples on the DMGetValueExStr page.
3.2.6.24 DMSetValueMessage
Use
The function changes the value of the tag described by lpdmVarKey to the value specified in
lpdmValue.
Only one tag is changed, in contrast to the DMSetValue function. After successful update of
the tag value, a freely definable alarm text is generated.
Declaration
BOOL DMSetValueMessage (
LPDM_VARKEY lpdmVarKey,
LPVARIANT lpdmValue,
DWORD fFlags,
LPSTR lpszMessage,
LPCMN_ERROR lpdmError);
Parameters
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag to be changed.
A server prefix (see project types and versions) may also specified in lpdmVarKey->szName
for multiclient projects as of WinCC Version 5.0.
lpdmValue
Pointer to the new value of the tag to be changed.
fFlags
fFlags determines how the alarm text is processed:
lpszMessage
Text of the alarm to be transmitted.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag changed.
FALSE
Error.
Comment
You can find more information about changing tag values at the DMSetValue function.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARKEY (Page 1594)
DMSetValue (Page 1734)
DMSetValueWait (Page 1744)
DMSetValueWaitMessage (Page 1749)
3.2.6.25 DMSetValueMessageExStr
Declaration
BOOL DMSetValueMessageExStr (
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,
DWORD fFlags,
LPTSTR lpszMessage,
LPCMN_ERROR lpdmError);
Description
This function changes the value of the tag described by lpvdmVarKey to obtain the value
specified in lpdmValue.
In contrast to the DMSetValueExStr function, only one tag can be changed at a time. If the
tag value has been changed successfully, a alarm text of your choice is transmitted.
Parameters
lpvdmVarKey
Pointer to VARIANT for passing on the tag name or TagID or single VARIANT, if only one tag is
specified that identifies the tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
If you specify an array using VT_ARRAY | VT_VARIANT, only the first element is evaluated.
For a multi-client project in WinCC Version 5.0 or higher, it may be required in this case to
add a server prefix to each name (refer to "Project types and versions" ).
lpvdmValue
Pointer to the new value of the tag to be changed.
fFlags
fFlags specifies how to process the alarm text:
lpszMessage
Text of the alarm to be transmitted.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Tags have been changed
FALSE
Error
Comment
For more information on changing the values of tags refer to the DMSetValueExStr function.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
3.2.6.26 DMSetValueWait
Use
The function changes the values of the tags described by lpdmVarKey to the values specified in
lpdmValue.
In contrast to DMSetValue, DMSetValueWait allows the application to be notified when the
update is successfully completed on the local machine.
Declaration
BOOL DMSetValueWait (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPVARIANT lpdmValue,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpdmVarKey
Pointer to the first DM_VARKEY (Page 1594) structure that identifies the tag values to be
changed.
dwItems
Number of passed structures (corresponds to the number of tag values to be changed).
lpdmValue
Pointer to the first of the new values for the tags to be changed.
dwTimeout
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not
all tags have been written, the callback function is called with appropriate error code.
lpfnCompletition
Pointer to your callback function, which is called either after the update of all requested tags
or after the waiting period.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error
occurs during the writing of a tag, the system writes the error information into the
appropriate structure. Therefore, remember to reserve space for these structures.
Return value
TRUE
Tags changed.
FALSE
The error which occurred can be identified by means of the error structures.
Comment
You can find more information about changing tag values at the DMSetValue function.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestVariablenSetvaluewait (Page 1860) "TESTCDoc.cpp"
See also
DM_VARKEY (Page 1594)
DMGetValueWait (Page 1704)
DMGetValueWaitEx (Page 1706)
DMSetValue (Page 1734)
DMSetValueMessage (Page 1740)
DMSetValueWaitMessage (Page 1749)
DM_COMPLETITION_PROC (Page 1754)
OnTestVariablenSetvaluewait (Page 1860)
3.2.6.27 DMSetValueWaitExStr
Declaration (
BOOL DMSetValueWaitExStr (
LPDWORD pdwTAID,
LPVARIANT lpvdmVarKey,
DWORD dwItems,
LPVARIANT lpvdmValue,
LPDWORD lpdwState,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function changes the values of the tags described by lpvdmVarKey to obtain the values
specified in lpvdmValue.
In contrast to the DMSetValueExStr function, DMSetValueWaitExStr enables your application
to display a notify message on the local computer if the update has been executed.
In contrast to DMSetValueWait, the tag list is passed on as pointer to VARIANT with VT_ARRAY
| VT_VARIANT. As a result, no length limit applies to tag names.
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list or single
VARIANT if only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a
server prefix (refer to "Project types and versions" ).
dwItems
Number of values passed in lpvdmValue and error structures in IpdmError. The number must
be at least as large as the input array in lpvdmVarKey.
If the number is larger than the input array, the excess values are ignored and DM_E_PARAM
is assigned to the affected error structures, as no allocation is possible.
If the number is less than the input array, the error DM_E_PARAM is returned only in the first
error structure and no values are written.
lpvdmValue
Pointer to the first of the new values for the tags to be changed.
lpdwState
Pointer to a memory location which stores the information whether the value of the tag
could be changed successfully or if errors occurred.
The value 0 (OK) means that the transmission/modification has been completed successfully
and that at least one of the specified tags exists. The DM_VARSTATE_INVALID_KEY error
status is only returned if none of the specified tags exists.
dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated
when the waiting time expires, the callback function with corresponding error codes is called.
lpfnCompletition
Pointer to the callback function which is called either after all requested tags have been
updated or after the waiting time has expired.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the first dwItems error structure of the CMN_ERROR type. If a tag writing error
occurs, the system writes the error information into the corresponding structure. Therefore,
you should not forget to reserve space for these structures.
Return value
TRUE
Tags have been changed
FALSE
The error which occurred can be identified by means of the error structures.
Comment
For more information on changing the values of tags refer to the DMSetValueExStr function.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
You can find samples on the DMGetValueExStr page.
3.2.6.28 DMSetValueWaitMessage
Use
The function combines the functions of DMSetValueMessage and DMSetValueWait. Only one
tag can be changed, in contrast to the DMSetValueWait function.
The value of the tag described by lpdmVarKey is changed to the value specified in lpdmValue.
Once the tag is successfully changed, a freely definable alarm text is output and the
application can be be notified that the update has been successfully performed on the local
machine.
Declaration
BOOL DMSetValueWaitMessage (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
LPVARIANT lpdmValue,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
DWORD fFlags,
LPSTR lpszMessage,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure that identifies the tag to be changed.
lpdmValue
Pointer to the new value of the tag to be changed.
dwTimeOut
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not
all tags have been written, the callback function is called with appropriate error code.
lpfnCompletition
Pointer to your callback function, which is called either after the update of all requested tags
or after the waiting period.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
fFlags
fFlags determines how the alarm text is processed:
lpszMessage
Alarm text that is output.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error
occurs during the writing of a tag, the system writes the error information into the
appropriate structure. Therefore, remember to reserve space for these structures.
Return value
TRUE
Tags changed.
FALSE
Error.
Comment
You can find more information about changing tag values at the DMSetValue function.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARKEY (Page 1594)
DMSetValue (Page 1734)
DMSetValueMessage (Page 1740)
DMSetValueWait (Page 1744)
OnTestVariablenSetvaluewait (Page 1860)
DM_COMPLETITION_PROC (Page 1754)
3.2.6.29 DMSetValueWaitMessageExStr
Declaration
BOOL DMSetValueWaitMessageExStr (
LPDWORD pdwTAID,
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
DWORD fFlags,
LPTSTR lpszMessage,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function combines the functionalities of DMSetValueMessageExStr and
DMSetValueWaitExStr.
In contrast to the DMSetValueWaitExStr function, only one tag can be changed at a time.
The value of the tag described by lpvdmVarKey is changed to obtain the value specified in
lpvdmValue. If the tag value has been changed successfully, a alarm text of your choice is
transmitted. The application also has the option to display a notify message on the local
computer if the update has been executed.
In contrast to DMSetValueWaitMessage, the tag list is passed on as pointer to VARIANT. As a
result, no limitation applies to the length of the tag names.
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpvdmVarKey
Pointer to VARIANT for passing on the tag name, TagID or single VARIANT, if only one tag is
specified that identifies the tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a
server prefix (refer to "Project types and versions" ).
lpvdmValue
Pointer to the new value of the tag to be changed.
dwTimeOut
Maximum waiting time of the application in ms. If not all tag values have been updated
when the waiting time expires, the callback function with corresponding error codes is called.
lpfnCompletition
Pointer to the callback function which is called either after all requested tags have been
updated or after the waiting time has expired.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.
fFlags
fFlags specifies how to process the alarm text:
lpszMessage
Text of the alarm to be transmitted.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the first dwItems error structure of the CMN_ERROR type. If a tag writing error
occurs, the system writes the error information into the corresponding structure. Therefore,
remember to reserve space for these structures.
Return value
TRUE
Tags have been changed
FALSE
Error
Comment
For more information on changing the values of tags refer to the DMSetValueExStr function.
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
3.2.6.30 DM_COMPLETITION_PROC
Description
You need to provide a DM_COMPLETITION_PROC type callback function in order for your
application to notified that tag values have been successfully changed.
Declaration
BOOL ( * DM_COMPLETITION_PROC) (
DWORD dwTAID,
LPDWORD lpdmVarState,
DWORD dwItems,
LPVOID lpvUser);
Parameters
dwTAID
Transaction ID that was assigned by the data manager for the function to change the tag
values.
lpdmVarState
Pointer to the first memory location where information is stored indicating whether the tag
values could be changed successfully or whether errors have occurred.
A 0 (OK) means successfully sent/changed and at least one of the specified tag exists. An
error with the DM_VARSTATE_INVALID_KEY status only occurs if none of the specified tags
exist.
dwItems
Number of tag changes, the status of which is passed in lpdmVarState.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
The return values depend on your implementation
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
When a program reports a notify routine, it must empty its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
Required files
dmclient.h
Related functions
See also
DMSetValueWait (Page 1744)
DMSetValueWaitMessage (Page 1749)
3.2.6.31 DMShowVarPropertiesExStr
Declaration
BOOL DMShowVarPropertiesExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPCTSTR lpszVariableName,
DWORD dwVariableID,
LPCMN_ERROR lpdmError);
Description
This function opens the dialog box for editing the properties of tags.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpszVariableName
Pointer to the name of the tag whose properties are displayed.
If lpszVariableName is "NULL" you must specify a valid dwVariableID. If not, the DM_E_PARAM
error is returned.
dwVariableID
ID of the tag. Is not used if a name is specified in lpszVariableName.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel"
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Examples
Script sample Button DMShowVarDatabaseExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
BOOL bRet = FALSE;
CHAR szProjectName[256];
CHAR szVariableName[256];
DWORD dwVariableID;
CMN_ERROR err;
HWND hwndParent;
szProjectName[0] = 0;
szVariableName[0] = 0;
dwVariableID = 0L;
memset(&err, 0, sizeof(err));
hwndParent = NULL;
memset(&err, 0, sizeof(err));
dwVariableID = GetTagDWord("dwVarKeyID_1");
printf("\r\n call DMShowVarPropertiesExStr with ID");
bRet = DMShowVarPropertiesExStr(szProjectName, hwndParent, NULL,
dwVariableID, &err);
if (!bRet)
{
printf("\r\n error DMShowVarPropertiesExStr:
err=%ld,%ld,%ld,%ld,%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMShowVarPropertiesExStr OK!");
}
3.2.6.32 DMShowVarDatabase
Use
This function opens the tag selection dialog for the project specified. Only one tag is selected,
in contrast to the ShowVarDatabaseMulti function.
Declaration
BOOL DMShowVarDatabase (
LPCSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDM_VARKEY lpdmVarKey,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpdmOptions
Pointer to the DM_DLGOPTIONS (Page 1572) structure with specifications on how the dialog
should react. When the pointer is NULL, the standard dialog is selected.
lpdmFilter
Pointer to the DM_VARFILTER (Page 1586) filter structure. When the pointer is NULL , all tags
are displayed.
Only filtering by tag name and tag type is supported. Tag group and tag connection filtering
is not implemented.
lpdmVarKey
Pointer to the DM_VARKEY (Page 1594) structure. If the properties of a tag to be displayed,
lpdmVarKey contains the key to this tag after the dialog closed.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel".
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARKEY (Page 1594)
DM_VARFILTER (Page 1586)
DM_DLGOPTIONS (Page 1572)
DMShowVarDatabaseMulti (Page 1763)
3.2.6.33 DMShowVarDatabaseExStr
Declaration
BOOL DMShowVarDatabaseExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPTSTR* lppszVariableName,
LPDWORD lpdwVarNameCharCount,
LPDWORD lpdwVariableID,
LPCMN_ERROR lpdmError);
Description
This function opens the tag selection dialog for the project specified. In contrast to
ShowVarDatabaseMultiExStr, only one tag can be selected.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpdmOptions
Pointer to the DM_DLGOPTIONS structure containing instructions for the dialog; if NULL =>
standard dialog.
lpdmFilter
Pointer to the DM_VARFILTER filter structure. If NULL, all tags are displayed.
Only tag name and tag type filtering are supported. Tag group and tag connection filtering is
not implemented.
lpszVariableName
Pointer to pointer of the return buffer for the tag name.
If NULL, a valid pointer to lpdwVariableID must be present. Then, only the ID and no name is
returned. "dwVarNameCharCount" is not considered. If both pointers are NULL, DM_E_PARAM
is returned.
If the internal pointer is NULL, the buffer is allocated and returned. The size is returned in
lpdwVarNameCharCount.
lpdwVarNameCharCount
Pointer to a DWORD which stores the size of the return buffer. The size must be selected big
enough to store the tag name with zero termination.
If the buffer is too small, the truncated name is stored and the DM_E_OOM error returned.
lpdwVariableID
Pointer to a DWORD which stores the tag ID.
If NULL, a valid pointer to lpdwVariableName and a valid size in dwVarNameCharCount must
be present. Then, only the tag name will be returned.
Return of the tag ID cannot always be guaranteed, e.g. PackageTag, specific S7 tags etc. In
these cases, 0 is returned.
Under certain conditions, the information can be complemented by a subsequent call of
DMGetVarInfoExStr.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel".
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Script sample Button DMShowVarDatabaseExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
BOOL bRet = FALSE;
CMN_ERROR err;
CHAR szProjectName[256];
HWND hwndParent;
CHAR szVariableName[256];
LPSTR pszVariableName;
DWORD dwVarNamCharCount = 256;
DWORD dwVarID = 0L;
szProjectName[0] = 0;
szVariableName[0] = 0;
hwndParent = NULL;
pszVariableName= szVariableName;
memset(&err, 0, sizeof(err));
3.2.6.34 DMShowVarDatabaseMulti
Use
This function opens the tag selection dialog for the project specified. Several tags can be
selected, in contrast to ShowVarDatabase.
Declaration
BOOL DMShowVarDatabaseMulti (
LPCSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDWORD lpdwItems,
DM_NOTIFY_SELECT_VAR_PROC lpfnVariables,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpdmOptions
Pointer to the DM_DLGOPTIONS (Page 1572) structure with specifications on how the dialog
should react. The standard dialog is used with NULL.
lpdmFilter
Pointer to the DM_VARFILTER (Page 1586) filter structure. All tags are displayed with NULL,.
Only filtering by tag name and tag type is supported. Tag group and tag connection filtering
is not implemented.
lpdwItems
Pointer to a DWORD buffer that receives the number of selected tags.
lpfnVariables
Pointer to your callback function that is called for every selected tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel".
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARFILTER (Page 1586)
DMShowVarDatabase (Page 1758)
DM_DLGOPTIONS (Page 1572)
DM_NOTIFY_SELECT_VAR_PROC (Page 1770)
3.2.6.35 DMShowVarDatabaseMultiExStr
Declaration
BOOL DMShowVarDatabaseMultiExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDWORD lpdwItems,
DM_NOTIFY_SELECT_VAR_PROC_EXSTR lpfnVariables,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function opens the tag selection dialog for the project specified. In contrast to
ShowVarDatabaseExStr, multiple tags can be selected.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
hwndParent
Handle to the window that is used as the parent window for the dialog.
lpdmOptions
Pointer to the DM_DLGOPTIONS structure containing instructions for the dialog; if NULL =>
standard dialog.
lpdmFilter
Pointer to the DM_VARFILTER filter structure. If NULL, all tags are displayed.
Only tag name and tag type filtering are supported. Tag group and tag connection filtering is
not implemented.
lpdwItems
Pointer to a DWORD buffer to store the number of tags selected in total.
lpfnVariables
Pointer to the callback function which is called for each selected tag.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel".
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Script sample Button DMShowVarDatabaseMultiExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
extern BOOL DM_NotifySelectVarProcA(LPCSTR lpszVariableName, DWORD
dwVariableID, LPVOID lpvUser);
HWND hwndParent;
DWORD dwItems;
DWORD dwInxDecr;
szProjectName[0] = 0;
hwndParent = NULL;
memset(&err, 0, sizeof(err));
dwItems = 0;
dwInxDecr = 4; /*for decrement index to save in DM tags from
callback set to lpvUser*/
pdwInxDecr = (DWORD*)lpvUser;
return bRet;
}
3.2.6.36 DM_NOTIFY_SELECT_VAR_PROC
Description
In order to evaluate the tags selected by the DMShowVarDatabaseMulti function, you must
provide a DM_NOTIFY_SELECT_VAR_PROC type callback function.
Declaration
BOOL ( * DM_NOTIFY_SELECT_VAR_PROC) (
LPDM_VARKEY lpdmVarKey,
DWORD dwItem,
LPVOID lpvUser );
Parameters
lpdmVarKey
Pointer to first DM_VARKEY (Page 1594) type structure with the name and ID of a tag.
dwItem
Number of structures passed in lpdmVarKey.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
DM_VARKEY (Page 1594)
DMShowVarDatabaseMulti (Page 1763)
3.2.6.37 GAPICreateNewVariable
Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
Declaration
BOOL GAPICreateNewVariable (
LPMCP_NEWVARIABLE_DATA pData,
LPCMN_ERROR lpdmError);
Parameters
pData
Pointer to the MCP_NEWVARIABLE_DATA (Page 1598) structure with the data of the tag.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag created.
When checked: Tag does not yet exist.
FALSE
Error.
Comment
There are more advanced functions.
GAPICreateNewVariable4
GAPICreateNewVariableEx4
GAPICreateNewVariable5
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
MCP_NEWVARIABLE_DATA (Page 1598)
GAPICreateNewVariable4 (Page 1772)
GAPICreateNewVariable5 (Page 1774)
GAPICreateNewVariableEx4 (Page 1775)
3.2.6.38 GAPICreateNewVariable4
Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
This function differs from GAPICreateNewVariable due to the additional specification of
scaling information.
Declaration
BOOL GAPICreateNewVariable4 (
LPMCP_NEWVARIABLE_DATA_4 pData,
LPCMN_ERROR lpdmError);
Parameters
pData
Pointer to the MCP_NEWVARIABLE_DATA_4 (Page 1600) structure with the data of the tag.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag created.
When checked: Tag does not yet exist.
FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.
Comment
There are more advanced functions.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPICreateNewVariable (Page 1771)
MCP_NEWVARIABLE_DATA_4 (Page 1600)
GAPICreateNewVariable5 (Page 1774)
GAPICreateNewVariableEx4 (Page 1775)
3.2.6.39 GAPICreateNewVariable5
Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
This function differs from GAPICreateNewVariable4 due to the specification of the creator ID
and the start and substitute values that can also be specified for text tags.
Declaration
BOOL GAPICreateNewVariable5 (
DWORD dwCreatorID,
LPMCP_NEWVARIABLE_DATA_5 pData,
LPCMN_ERROR lpdmError);
Parameters
dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.
pData
Pointer to the MCP_NEWVARIABLE_DATA_5 (Page 1602) structure with the data of the tag.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag created.
When checked: Tag does not yet exist.
FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPICreateNewVariable (Page 1771)
GAPICreateNewVariable4 (Page 1772)
MCP_NEWVARIABLE_DATA_5 (Page 1602)
GAPICreateNewVariableEx4 (Page 1775)
MCP_VARIABLE_LIMITS5 (Page 1614)
3.2.6.40 GAPICreateNewVariableEx4
Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
This function differs from GAPICreateNewVariable4 due to the specification of the creator ID.
Declaration
BOOL GAPICreateNewVariableEx4 (
DWORD dwCreatorID,
LPMCP_NEWVARIABLE_DATA_4 pData,
LPCMN_ERROR lpdmError);
Parameters
dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.
pData
Pointer to the MCP_NEWVARIABLE_DATA_4 (Page 1600) structure with the data of the tag.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag created.
When checked: Tag does not yet exist.
FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.
Comment
There is an advanced function.
GAPICreateNewVariable5
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPICreateNewVariable (Page 1771)
GAPICreateNewVariable4 (Page 1772)
MCP_NEWVARIABLE_DATA_4 (Page 1600)
GAPICreateNewVariable5 (Page 1774)
3.2.7.1 GAPIEnumTypeMembers
Use
The function returns the names of the tags belonging to a structured tag.
Declaration
BOOL GAPIEnumTypeMembers (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
lpszTypeName
Name of a type of structured tag whose tags are to be listed.
lpfnCallback
Pointer to your callback function that is called for every tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
List tags in a structured tag.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_ENUM_TYPEMEMBERS_PROC (Page 1779)
GAPIEnumTypeMembersEx (Page 1780)
GAPIEnumTypeMembersEx4 (Page 1785)
3.2.7.2 DM_ENUM_TYPEMEMBERS_PROC
Description
In order to evaluate the names of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_TYPEMEMBERS_PROC) (
LPCSTR lpszMemberName,
LPVOID lpvUser );
Parameters
lpszStructTypeName
Pointer to the name of the tags associated with a structured tag.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• ODK functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPIEnumTypeMembers (Page 1777)
3.2.7.3 GAPIEnumTypeMembersEx
Use
The function returns a description, including all the predefined values of tags belonging to a
structured tag but without scaling data.
If you want to read the scaling data, you need the GAPIEnumTypeMembersEx4 function.
Declaration
BOOL GAPIEnumTypeMembersEx (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EX lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected with the error, DM_E_NOT_CONNECTED.
lpszTypeName
Name of a type of structured tag whose tags are to be listed.
Only local tags can be enumerated on clients.
lpfnCallback
Pointer to your callback function that is called for every tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tags of a structured tag listed.
FALSE
Error.
Comment
There is an advanced function, GAPIEnumTypeMembersEx4..
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPIEnumTypeMembers (Page 1777)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 1783)
GAPIEnumTypeMembersEx4 (Page 1785)
3.2.7.4 GAPIEnumTypeMembersExStr
Declaration
BOOL GAPIEnumTypeMembersExStr (
LPCTSTR lpszProjectFile,
LPCTSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EXSTR lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function returns a description, including all defaults of the tags belonging to a structured
tag; however no scaling data are returned.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
In WinCC version V5.0 SP2 or higher, entering a blank string will cause an internal
DMEnumOpenedProjects to be executed for a currently open project.
In Runtime, only the currently open project may be entered. Other entries are rejected with
error DM_E_NOT_CONNECTED in WinCC V5.0 SP2 or higher.
lpszTypeName
Name of the type of a structured tag whose tags you want to have enumerated.
Only local tag types can be enumerated on multi-clients (V5) or clients (V6).
lpfnCallback
Pointer to the callback function which is called for each tag.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Tags of a structured tag have been enumerated
FALSE
Error
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
3.2.7.5 DM_ENUM_TYPEMEMBERS_PROC_EX
Description
In order to evaluate the descriptions of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC_EX type callback function.
Declaration
BOOL ( * DM_ENUM_TYPEMEMBERS_PROC_EX) (
LPDM_VARKEY lpdmVarKey,
LPMCP_NEWVARIABLE_DATA_EX lpdmVarDataEx,
LPVOID lpvUser );
Parameters
lpdmVarKey
Pointer to the first of the AUTOHOTSPOT type structures with the keys (ID and name) of a tag
lpdmVarDataEx
Pointer to a MCP_NEWVARIABLE_DATA_EX (Page 1604) type structure with the description of
a tag.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
GAPIEnumTypeMembersEx (Page 1780)
MCP_NEWVARIABLE_DATA_EX (Page 1604)
3.2.7.6 GAPIEnumTypeMembersEx4
Use
The function returns a complete description, including all the predefined values of tags
belonging to a structured tag.
Declaration
BOOL GAPIEnumTypeMembersEx4 (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EX4 lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected (DM_E_NOT_CONNECTED).
lpszTypeName
Name of a type of structured tag whose tags are to be listed.
Only local tags can be enumerated on clients.
lpfnCallback
Pointer to your callback function that is called for every tag.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tags of a structured tag listed.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
GAPIEnumTypeMembers (Page 1777)
GAPIEnumTypeMembersEx (Page 1780)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 1786)
3.2.7.7 DM_ENUM_TYPEMEMBERS_PROC_EX4
Description
In order to evaluate the descriptions of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC_EX4 type callback function. It differs from
DM_ENUM_TYPEMEMBERS_PROC_EX due to the additional specification of scaling information.
Declaration
BOOL ( * DM_ENUM_TYPEMEMBERS_PROC_EX4) (
LPDM_VARKEY lpdmVarKey,
LPMCP_NEWVARIABLE_DATA_EX4 lpdmVarDataEx,
LPVOID lpvUser );
Parameters
lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 1594) type structures with the keys (ID and
name) of a tag
lpdmVarDataEx
Pointer to a MCP_NEWVARIABLE_DATA_EX4 (Page 1606) type structure with the description
of a tag.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
See also
GAPIEnumTypeMembersEx4 (Page 1785)
DM_VARKEY (Page 1594)
MCP_NEWVARIABLE_DATA_EX4 (Page 1606)
3.2.7.8 GAPIEnumTypes
Use
This function lists the names and ID numbers of the configured structured tag types.
Declaration
BOOL GAPIEnumTypes (
LPCSTR lpszProjectFile,
DM_ENUM_TYPES_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the
currently open project.
Only the currently open project can be specified in runtime. Any other specification is
rejected with the error, DM_E_NOT_CONNECTED.
lpfnCallback
Pointer to your callback function, which receives the data of the tag types.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Types of structured tags listed.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Enumerate all structured types (Page 1832) "DM01.cpp"
See also
DM_ENUM_TYPES_PROC (Page 1789)
Enumerate all structured types (Page 1832)
3.2.7.9 DM_ENUM_TYPES_PROC
Description
In order to evaluate the tag types listed by the system, you must provide a
DM_ENUM_TYPES_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_TYPES_PROC) (
LPCSTR lpszTypeName,
DWORD dwTypeID,
DWORD dwCreatorID,
LPVOID lpvUser );
Parameters
lpszTypeName
Pointer on the name of the tag type.
dwTypeID
dwTypeID corresponds to the ID as assigned by GAPICreateType for the tag type.
dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
Examples
Enumerate all structured types (Page 1832) "DM01.cpp"
See also
GAPIEnumTypes (Page 1788)
Enumerate all structured types (Page 1832)
3.2.8.1 DMEnumConnectionData
Use
The function determines the information about a configured logical connection.
Declaration
BOOL DMEnumConnectionData (
LPCSTR lpszProjectFile,
LPDM_CONNKEY lpdmConnKey,
DWORD dwItems,
DM_ENUM_CONNECTION_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
lpdmConnKey
Pointer to the first DM_CONNKEY (Page 1568) type structure. These structures are used to
specify the logical connections, the data of which are to enumerated.
dwItems
The number of logical connections, the data of which is to listed.
A value of 0 triggers the listing of all connections.
lpfnCallback
Pointer to your callback function, which receives the data of the logical connection.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data listed.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
Enumerate all connections (Page 1834) "DM01.cpp"
OnTestEnumConnectionDataAll (Page 1839) "TESTCDoc.cpp"
See also
DM_CONNKEY (Page 1568)
DM_ENUM_CONNECTION_PROC (Page 1794)
Enumerate all connections (Page 1834)
OnTestEnumConnectionDataAll (Page 1839)
3.2.8.2 DMEnumConnectionDataExStr
Declaration
BOOL DMEnumConnectionDataExStr (
LPCTSTR lpszProjectFile,
DM_ENUM_CONNECTION_PROC_EXSTR lpfnCallback,
LPVOID lpvUser,
LPDWORD lpdwConnectionCount,
LPCMN_ERROR lpdmError);
Description
This function is used to determine all configured logical connections.
Parameters
lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
lpfnCallback
Pointer to your callback function which receives the data of the logical connection.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdwConnectionCount
Pointer to a "DWORD", in which the number of existing connections is returned.
Thus, "lpfnCallback = NULL" first determines how much memory is required for the
connections.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Data have been enumerated
FALSE
Error
Error messages
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
3.2.8.3 DM_ENUM_CONNECTION_PROC
Description
In order to evaluate information about a logical connection listed by the system, you must
provide a DM_ENUM_CONNECTION_PROC type callback function.
Declaration
BOOL ( * DM_ENUM_CONNECTION_PROC) (
LPDM_CONNECTION_DATA lpdmConData,
LPVOID lpvUser);
Parameters
lpdmConData
Pointer to a DM_CONNECTION_DATA (Page 1567) type structure in which the data of a logical
connection are stored.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
dmclient.h
Related functions
Examples
Enumerate all connections (Page 1834) "DM01.cpp"
See also
DM_CONNECTION_DATA (Page 1567)
DMEnumConnectionData (Page 1791)
Enumerate all connections (Page 1834)
3.2.9.1 DMGetOSVersion
Use
Determines the operating system used on the PC.
Declaration
DWORD DMGetOSVersion (
VOID);
Parameters
None.
Return value
The return value indicates the operating system:
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.9.2 DMGetSystemLocale
Use
Gets the code of the currently used configuration language.
Declaration
BOOL DMGetSystemLocale (
LPDWORD lpdwLocaleID,
LPCMN_ERROR lpdmError);
Parameters
lpdwLocaleID
Pointer to the code of the currently configured language.
Possible return values are the language codes for:
German 0x0407
English 0x0409
French 0x040C
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Currently used configuration language determined.
FALSE
Error
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestSystemLocale (Page 1845) "TESTCDoc.cpp"
See also
OnTestSystemLocale (Page 1845)
3.2.9.3 DMSetLanguage
Use
Switches the configuration language.
Declaration
BOOL DMSetLanguage (
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );
Parameters
dwLocaleID
Pointer to the code of the language to be set. Possible values are the language codes for:
German 0x0407
English 0x0409
French 0x040C
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Language switched.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.9.4 DMShowLanguageDialog
Use
The function opens a dialog box for selecting the language.
Declaration
BOOL DMShowLanguageDialog (
HWND hwndParent,
DWORD dwFlags,
DWORD dwSetLocaleIDs[],
UINT uSetIDArraySize,
LPDWORD lpdwGetLocaleID,
LPCMN_ERROR lpdmError);
Parameters
hwndParent
Handle to the window that is used as the parent window for the dialog.
dwFlags
dwFlags indicates the languages that appear in the dialog and can be selected:
DM_LANGDLG_REMOVE Set All languages that can be registered with dwSetLocaleIDs are dis‐
played, except for the languages in the EnumSystemLocales
(LCID_SUPPORTED) array.
Not set All languages in the dwSetLocaleIDs array are displayed.
DM_LANGDLG_ONLY_PRIMARY Set Only the main languages (PRIMARY_LANGUAGE) are displayed.
Not set Sublanguages are also displayed.
DM_LANGDLG_NO_NOTIFY Applications are not notified when the dialog is closed with "OK"
dwSetLocaleIDs
Array with the IDs of the languages to be displayed in the dialog.
uSetIDArraySize
Size of the dwSetLocaleIDs array.
lpdwGetLocaleID
Pointer to a DWORD, in which the selected language ID should be stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Close the dialog with "OK".
FALSE
Error or close dialog with "Cancel".
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
3.2.10.1 DMBeginStartVarUpdate
Use
Trigger an update request. A transaction ID for identifying transaction is assigned with this
function.
Declaration
BOOL DMBeginStartVarUpdate (
LPDWORD pdwTAID
LPCMN_ERROR lpdmError )
Parameters
pdwTAID
Pointer to a tag that contains the transaction ID assigned by the data manager after a
successful call of the function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Transaction ID assigned.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestVariablenBeginstartvarupdate (Page 1846) "TESTCDoc.cpp"
See also
OnTestVariablenBeginstartvarupdate (Page 1846)
DMEndStartVarUpdate (Page 1803)
DMResumeVarUpdate (Page 1804)
DMStartVarUpdate (Page 1806)
DMStartVarUpdateEx (Page 1809)
DMStopVarUpdate (Page 1821)
DMSuspendVarUpdate (Page 1823)
3.2.10.2 DMEndStartVarUpdate
Use
After the function is successfully called, data manager updates the tags and forwards the new
values to your application as required.
Declaration
BOOL DMEndStartVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError );
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Update started.
FALSE
Error.
Error messages
Required files
dmclient.h
Related functions
Examples
OnTestVariablenEndstartvarupdate (Page 1847) "TESTCDoc.cpp"
See also
OnTestVariablenEndstartvarupdate (Page 1847)
DMBeginStartVarUpdate (Page 1801)
DMStartVarUpdate (Page 1806)
3.2.10.3 DMResumeVarUpdate
Use
Starts the updating of all tags defined by the transaction, when the transaction reaches the value
0 after calling the reference counter.
The function is the counterpart to DMSuspendVarUpdate and should always be called
together with it in pairs.
Declaration
BOOL DMResumeVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Continue update.
FALSE
Error.
Comment
Transactions have a reference counter that is incremented each time the DMSuspendVarUpdate
function is called. If the update of the tags should be continued, DMResumeVarUpdate must be
called repeatedly until the reference counter returns to the 0 position.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestVariablenResumevarupdate (Page 1858) "TESTCDoc.cpp"
See also
DMBeginStartVarUpdate (Page 1801)
DMSuspendVarUpdate (Page 1823)
OnTestVariablenResumevarupdate (Page 1858)
3.2.10.4 DMStartVarUpdate
Use
This function is used to specify the tags to be updated by the data manager. The data manager
passes the new tag values to your application in the callback function when an update is
performed.
DMStartVarUpdateEx is a more advanced function, which additionally returns the quality
code in the DM_NOTIFY_VARIABLEEX_PROC callback in the DM_VAR_UPDATE_STRUCTEX
structure.
Declaration
BOOL DMStartVarUpdate (
DWORD dwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DWORD dwCycle,
DM_NOTIFY_VARIABLE_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 1594) type structures, through which the tags to
be updated are specified.
dwItems
Number of tags to be updated in the passed DM_VARKEY structures.
dwCycle
The update cycle defined in dwCycle applies to all tags specified by lpdmVarKey. The upgrade
cycle is defined by the index of the entries in the list of update cycles.
lpfnVariable
Pointer to the DM_NOTIFY_VARIABLE_PROC callback function for data transfer by the data
manager.
With lpfnVariable == NULL, the update in the process image of the data manager is
performed at least in the required cycle, to the extent physically possible based on the
current system load, computer performance, coupling medium etc. The determination of
the current value needs to be performed independently by the application by calling the
DMGetValue function.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the notification may already be delivered before the function call returns.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Update tags specified.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DMEndStartVarUpdate (Page 1803)
DM_VARKEY (Page 1594)
DMBeginStartVarUpdate (Page 1801)
DM_NOTIFY_VARIABLE_PROC (Page 1808)
3.2.10.5 DM_NOTIFY_VARIABLE_PROC
Description
In order to evaluate the data determined by the system, you must provide a
DM_NOTIFY_VARIABLE_PROC type callback function.
Declaration
BOOL ( * DM_NOTIFY_VARIABLE_PROC) (
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
DWORD dwItems,
LPVOID lpvUser);
Parameters
dwTAID
Transaction ID that was assigned by the data manager for the calling function.
lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCT (Page 1581) type structure that contains the
values of the tags requested.
dwItems
Number of structures passed in lpdmvus (corresponding to the number of returned tag
values).
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
The return values depend on your implementation
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
Required files
dmclient.h
Related functions
See also
DMStartVarUpdate (Page 1806)
DM_VAR_UPDATE_STRUCT (Page 1581)
DMGetValueWait (Page 1704)
3.2.10.6 DMStartVarUpdateEx
Use
This function is used to specify the tags to be updated by the data manager. Within the callback
function, the data manager passes on the new tag values to the application when an update is
executed.
In contrast to DMStartVarUpdate, the quality code is also provided
in the DM_VAR_UPDATE_STRUCTEX structure, which is returned in the
DM_NOTIFY_VARIABLEEX_PROC callback.
Declaration
BOOL DMStartVarUpdateEx (
DWORD dwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DWORD dwCycle,
DM_NOTIFY_VARIABLEEX_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 1594) type structures, through which the tags to
be updated are specified.
dwItems
Number of tags to be updated in the passed DM_VARKEY structures.
dwCycle
The update cycle defined here applies to all tags specified by lpdmVarKey . The upgrade cycle
is defined by the index of the entries in the list of update cycles.
lpfnVariable
Pointer to the DM_NOTIFY_VARIABLEEX_PROC callback function for data transfer by the data
manager.
With lpfnVariable == NULL, the update in the process image of the data manager is
performed at least in the required cycle, to the extent physically possible based on the
current system load, computer performance, coupling medium etc. The determination of
the current value needs to be performed independently by the application by calling the
DMGetValue function.
When a program reports a notify routine, it must empty its message queue at regular
intervals. Unread messages could block WinCC notifications or finally block WinCC altogether.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Update tags specified.
FALSE
Error.
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
See also
DM_VARKEY (Page 1594)
DMBeginStartVarUpdate (Page 1801)
DM_NOTIFY_VARIABLEEX_PROC (Page 1819)
3.2.10.7 DMStartVarUpdateExStr
Declaration
BOOL DMStartVarUpdateExStr (
DWORD dwTAID,
DWORD dwFlags,
LPVARIANT lpvdmVarKey,
LPVARIANT lpvCookie,
DWORD dwCycle,
DM_NOTIFY_VARIABLE_PROC_EXSTR lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);
Description
This function is used to specify the tags to be updated by the data manager. Within the callback
function, the data manager passes on the new tag values to the application when an update is
executed.
Parameters
dwTAID
dwTAID contains the transaction ID allocated when the DMBeginStartVarUpdate function was
called.
dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of
the DM_VAR_UPDATE_STRUCT_EXSTR structure of DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.
lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list that identifies the
tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as allocated
ASCII string in order, for example, to pass on constant names from the script. VT_LPSTR is
then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a
server prefix (refer to "Project types and versions" ).
lpvCookie
Pointer to a VARIANT for an additional list of user-dependent data for each tag.
This is intended as substitute for lpvUserData of the previous DM_VARKEY and is also
returned in the DM_VAR_UPDATE_STRUCT_EXSTR structure for each tag.
dwCycle
The update cycle defined here is applied to all tags specified by means of lpvdmVarKey. The
upgrade cycle is defined by the index of the entries in the list of update cycles.
lpfnVariable
Pointer to the DM_NOTIFY_VARIABLEEX_PROC callback function for data transfer through the
data manager.
If "lpfnVariable" = "NULL", the update in the process image of the data manager is performed
at least in the required cycle, to the extent that this is physically possible based on the
current system load, computer performance, coupling medium etc.; however, each value
must be determined individually by calling the DMGetValue function through the application.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.
lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. When
an error occurs, the system writes error information into this structure.
Return value
TRUE
Update tags have been specified
FALSE
Error
Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll
Related functions
Examples
Script sample "Button DMStartVarUpdateExStr":
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("OleAut32.dll")
//#include "OleAuto.h"
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound,
unsigned int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR*
rgIndices, void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
#pragma code()
VARIANT vVarKey;
VARIANT* pvElem;
SAFEARRAY* parrayKeys;
HRESULT hr;
CMN_ERROR err;
BOOL bRet;
long lInx;
DWORD dwTAID;
DWORD dwFlags;
DWORD dwCycle;
memset(&err, 0, sizeof(err));
bRet = FALSE;
parrayKeys = NULL;
lInx = 0L;
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
//dwCycle = 3; /* 1sec*/
dwCycle = 0; /* on change*/
dwTAID = GetTagDWord("dwUpdTAID");
if (dwTAID)
{
printf("\r\nStartVarUpdate always running. Stop it before start
again!");
printf("\r\n########## exit Test with DMStartVarUpdateExStr
(nothing done) ##########\r\n");
return;
}
VariantInit(&vVarKey);
parrayKeys = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vVarKey.vt = VT_ARRAY | VT_VARIANT;
vVarKey.u.parray = parrayKeys;
SafeArrayLock(parrayKeys);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_1";
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_2";
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_3";
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_4";
SafeArrayUnlock(parrayKeys);
memset(&err, 0, sizeof(err));
bRet = DMStartVarUpdateExStr(dwTAID, dwFlags, &vVarKey, dwCycle,
memset(&err, 0, sizeof(err));
bRet = DMEndStartVarUpdate(dwTAID, &err);
if (FALSE == bRet)
{
printf("\r\n error DMEndStartVarUpdate (dwTAID=%ld):
err=%ld,%ld,%ld,%ld,%ld,[%s]",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMEndStartVarUpdate (dwTAID=%ld) OK.",
dwTAID);
}
}
else
{
printf("\r\n dwTAID == 0L ???");
}
BOOL DM_NotifyVariableProcExStr_VarUpdate(
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT_EXSTRA lpdmvus,
DWORD dwItems,
LPVOID lpvUser)
{
BOOL bRet = FALSE;
int i = 0;
HRESULT hr = 0L;
printf(", dwNameCharCount=[%ld]",
lpdmvus[i].dmTypeRef.dwNameCharCount);
}
else
{
printf(", lpszTypeName=[NULL]");
}
printf("}");
}
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
DWORD dwTAID;
CMN_ERROR err;
BOOL bRet;
dwTAID = GetTagDWord("dwUpdTAID");
memset(&err, 0, sizeof(err));
bRet = FALSE;
if (dwTAID)
{
bRet = DMStopVarUpdate(dwTAID, &err);
if (FALSE == bRet)
{
printf("\r\n!!! error DMStopVarUpdate (dwTAID=%ld):
err=%ld,%ld,%ld,%ld,%ld,[%s] !!!\r\n",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
memset(&err, 0, sizeof(err));
bRet = DMStopAllUpdates(&err);
if (FALSE == bRet)
{
printf("\r\n!!! error DMStopAllUpdates (dwTAID=%ld):
err=%ld,%ld,%ld,%ld,%ld,[%s] !!!\r\n",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5,
err.szErrorText);
}
else
{
printf("\r\n DMStopAllUpdates OK.");
}
}
else
{
printf("\r\n DMStopVarUpdate (dwTAID=%ld) OK.", dwTAID);
}
}
dwTAID = 0L;
SetTagDWord("dwUpdTAID",dwTAID);
}
3.2.10.8 DM_NOTIFY_VARIABLEEX_PROC
Description
In order to evaluate the data determined by the system, you must provide a
DM_NOTIFY_VARIABLEEX_PROC type callback function.
Declaration
BOOL ( * DM_NOTIFY_VARIABLEEX_PROC) (
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCTEX lpdmvus,
DWORD dwItems,
LPVOID lpvUser);
Parameters
dwTAID
Transaction ID that was assigned by the data manager for the calling function.
lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCTEX (Page 1583) type structure that contains the
values of the tags requested.
dwItems
Number of structures passed in lpdmvus (corresponding to the number of returned tag
values).
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
The return values depend on your implementation
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
Required files
dmclient.h
Related functions
See also
DMStartVarUpdateEx (Page 1809)
DM_VAR_UPDATE_STRUCTEX (Page 1583)
DMGetValueWaitEx (Page 1706)
3.2.10.9 DMStopAllUpdates
Use
Stops all tag updates requested by the application. This function should be preferably called after
closing the corresponding module.
Declaration
BOOL DMStopAllUpdates (
LPCMN_ERROR lpdmError);
Parameters
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Updating of tags stopped.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Examples
OnTestVariablenStopallupdates (Page 1861) "TESTCDoc.cpp"
See also
OnTestVariablenStopallupdates (Page 1861)
3.2.10.10 DMStopVarUpdate
Use
Stops the updating of tags for a specific transaction.
Declaration
BOOL DMStopVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Updating of tags stopped.
FALSE
Error.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestVariablenStopvarupdate (Page 1861) "TESTCDoc.cpp"
See also
OnTestVariablenStopvarupdate (Page 1861)
DMBeginStartVarUpdate (Page 1801)
3.2.10.11 DMSuspendVarUpdate
Use
Interrupts the updating of all tags defined by the transaction.
Tags continue to be updated within the process image of the data manager. However, the
values are no longer transferred to the application.
Declaration
BOOL DMSuspendVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);
Parameters
dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Updating suspended.
FALSE
Error.
Comment
Transactions have a reference counter, therefore the DMSuspendVarUpdate function can be
called multiple times for a transaction. If the transaction is already in the "SUSPENDED" state,
only the reference counter is incremented.
To continue updating, DMResumeVarUpdate must be called repeatedly until the reference
counter returns to the 0 position.
Error messages
Required files
dmclient.h
dmclient.lib
dmclient.dll
Related functions
Examples
OnTestVariablenSuspendvarupdate (Page 1862) "TESTCDoc.cpp"
See also
DMResumeVarUpdate (Page 1804)
DMBeginStartVarUpdate (Page 1801)
OnTestVariablenSuspendvarupdate (Page 1862)
3.2.11 Examples
3.2.11.1 Connection to DM
Example
// =====================================================================
// =====================================================================
// Desc. : Modul with examples for Data-Manager
// *********************************************************************
#include "stdafx.h" // if MFC classes
// #include "odkapi.h" // if console application
#include <time.h>
TCHAR g_szProjectFile[255] = {0};
TCHAR g_szDSNName[255] = {0};
#include "DM01.h"
//{{ODK_EXAMPLE}Connection to DM (MCP)}
//{{FUNCTION}DMGetConnectionState (MCP)}
//{{FUNCTION}DMConnect (MCP)}
//{{FUNCTION}DM_NOTIFY_PROC (MCP)}
//{{FUNCTION}DMDisConnect (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMConnect(void) ODK DM CS
// =====================================================================
BOOL MyDMConnect(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szAppName[255];
VOID* pvUser = AfxGetApp();
_tcsncpy_s(szAppName, _countof(szAppName), _T("MyODKApp_23"), _TRUNCATE);
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMGetConnectionState(&Error);
if(FALSE == ret) // not connected
{
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMConnect(szAppName, MyDMNotifyCallback, pvUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMConnect"));
}
ODKTrace(szText);
}
// IMPLEMENTATION
// =====================================================================
// Function: MyDMGetConnectionState(void) ODK DM CS
// =====================================================================
BOOL MyDMGetConnectionState(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szAppName[255];
VOID* pvUser = AfxGetApp();
_tcsncpy_s(szAppName, _countof(szAppName), _T("MyODKApp_23"), _TRUNCATE);
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMGetConnectionState(&Error);
if(FALSE == ret) // not connected
{
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMConnect(szAppName, MyDMNotifyCallback, pvUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMConnect"));
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else // already connected
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMGetConnectionState: OK"));
ODKTrace(szText);
}
return(ret);
}
// =====================================================================
// Function: MyDMDisConnect(void) ODK DM CS
// =====================================================================
BOOL MyDMDisConnect(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
memset(&Error, 0, sizeof(CMN_ERROR));
ret = DMDisConnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMDisconnect"));
}
ODKTrace(szText);
return(ret);
}
// =====================================================================
// Function: MyDMNotifyCallback
// =====================================================================
BOOL MyDMNotifyCallback(DWORD dwNotifyClass, DWORD dwNotifyCode, LPBYTE lpbyData,
DWORD dwItems, LPVOID lpvUser)
{
lpvUser;
lpbyData;
TCHAR szText[255];
_sntprintf_s(szText ,_countof(szText), _TRUNCATE, _T("**DMNotifyCallback**"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" NotifyClass =
0x%08X"),dwNotifyClass);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" NotifyCode = 0x%08X"),
dwNotifyCode);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" Items = %d"), dwItems);
ODKTrace(szText);
//printf("%s\r\n",szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("********************"));
ODKTrace(szText);
return(TRUE);
}
//{{ODK_EXAMPLE}(END)}
See also
DMConnect (Page 1630)
DMDisconnect (Page 1636)
DMGetConnectionState (Page 1648)
Example
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumVarData4 (Page 1679)
DM_ENUM_VARIABLE_PROC4 (Page 1682)
Example
BOOL MyDMEnumOpenedProjects(void)
{
CMN_ERROR Error;
BOOL ret= FALSE;
DWORD dwItems;
TCHAR szText[255];
VOID* pvUser = AfxGetApp();
memset(&Error, 0, sizeof(CMN_ERROR));
ret = MyDMConnect();
if(TRUE == ret)
{
ret = DMEnumOpenedProjects(&dwItems, MyDMEnumOpenProjectsCallback, pvUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
DMEnumOpenedProjects: E1= 0x%08lx ; E2= 0x%08lx ; %s"), %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumOpenedProjects"));
}
ODKTrace(szText);
}
return(ret);
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumOpenedProjects (Page 1656)
DM_ENUM_OPENED_PROJECTS_PROC (Page 1657)
Example
void MyGAPIEnumTypes()
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szProjectFile[255];
VOID* pvUser = NULL;
ret = FALSE;
memset(&Error,0,sizeof(CMN_ERROR));
ret = MyDMGetConnectionState(); //check the connection state to DM
if(FALSE != ret)
{
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
_tcsncpy_s(szProjectFile, _countof(szProjectFile), /*PROJ_PATH*/g_szProjectFile,
_TRUNCATE);
memset(&Error,0,sizeof(CMN_ERROR));
ret = GAPIEnumTypes(szProjectFile,
MyDMEnumTypeCallback,
pvUser,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMEnumTypes: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
See also
GAPIEnumTypes (Page 1788)
DM_ENUM_TYPES_PROC (Page 1789)
Example
void MyDMEnumConnectionData()
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
TCHAR szText[255];
DWORD dwItems = 0;
TCHAR szProjectFile[255];
DM_CONNKEY ConnKey;
memset(&ConnKey,0,sizeof(ConnKey));
memset(&Error,0,sizeof(Error));
ret = MyDMGetConnectionState();
if(FALSE != ret)
{
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
_tcsncpy_s(szProjectFile, _countof(szProjectFile), /*PROJ_PATH*/g_szProjectFile,
_TRUNCATE);
ret = DMEnumConnectionData(szProjectFile,
&ConnKey,
dwItems,
MyDMEnumConnectionCallback,
NULL,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
DMEnumConnectionData: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumConnectionData"));
}
ODKTrace(szText);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumConnectionData (Page 1791)
DM_ENUM_CONNECTION_PROC (Page 1794)
Example
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetProjectInformation (Page 1660)
3.2.11.7 OnTestDeactivateRuntimeProject
Example
//{{ODK_EXAMPLE}OnTestDeactivateRuntimeProject (MCP)}
//{{FUNCTION}DMDeactivateRTProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestDeactivateRuntimeProject()
{
CCmnError cmnError;
if(!::DMDeactivateRTProject(cmnError))
{
cmnError.Show(__T("DMDeactivateRTProject failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
3.2.11.8 OnTestEnumGroupsAll
Example
//{{ODK_EXAMPLE}OnTestEnumGroupsAll (MCP)}
//{{FUNCTION}DMEnumVarGrpData (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumGroupsAll()
{
CCmnError cmnError;
if(!::DMEnumVarGrpData((LPSTR)(LPCTSTR) m_strProject, NULL, 0, EnumVarGrpProc, this,
cmnError))
{
cmnError.Show(__T("DMEnumVarGrpData failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumVarGrpData (Page 1683)
3.2.11.9 OnTestEnumVariables
Example
//{{ODK_EXAMPLE}OnTestEnumVariables (MCP)}
//{{FUNCTION}DMEnumVariables (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumVariables()
{
DM_VARFILTER dmVarFilter;
memset( &dmVarFilter, 0, sizeof(DM_VARFILTER) );
//--------------------------------------------------
// Initialisierung des Filters //
//--------------------------------------------------
// //
dmVarFilter.dwFlags = DM_VARFILTER_TYPE;
dmVarFilter.dwNumTypes = 3;
DWORD dwFilterTypes[3];
dwFilterTypes[0] = DM_VARTYPE_BIT;
dwFilterTypes[1] = DM_VARTYPE_DWORD;
dwFilterTypes[2] = DM_VARTYPE_DOUBLE;
dmVarFilter.pdwTypes = dwFilterTypes;
dmVarFilter.lpszName = __T("VAR_1_BIT");
dmVarFilter.lpszGroup = __T("VARGROUP_1");
dmVarFilter.lpszConn = __T("TF_CONN_1");
// //
//--------------------------------------------------
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMEnumVariables((LPSTR)(LPCTSTR) m_strProject, NULL/*&dmVarFilter*/,
EnumVariablesProc, this, &Error))
{
Error.Show(__T("DMEnumVariables failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumVariables (Page 1688)
3.2.11.10 OnTestEnumConnectionDataAll
Example
//{{ODK_EXAMPLE}OnTestEnumConnectionDataAll (MCP)}
//{{FUNCTION}DMEnumConnectionData (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumConnectionDataAll()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !::DMEnumConnectionData( m_strProject, NULL, 0, EnumConnectionDataProc, this,
&Error))
{
Error.Show(__T("DMEnumConnectionData failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumConnectionData (Page 1791)
3.2.11.11 OnTestMachines
Example
//{{ODK_EXAMPLE}OnTestMachines (MCP)}
//{{FUNCTION}DMGetMachineTable (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestMachines()
{
CMN_ERROR Error;
memset(&Error,0,sizeof(CMN_ERROR));
DM_MACHINE_TABLE dmMachineTable;
memset(&dmMachineTable, 0, sizeof(dmMachineTable));
if(!DMGetMachineTable(m_strProject, &dmMachineTable, &Error))
{
// Error.Show(__TEXT("DMGetMachineTable failed\n"));
// AfxMessageBox( strError );
}
else
{
for( int i = 0; i < dmmachinetable.nNumMachines; i++ )
{
CString strData;
strData.Format( _T( "Computer : %s, Type : %s, Site : %s" ),
dmMachineTable.tm[i].szMachineName,
dmMachineTable.tm[i].fServer ? _T( "Server" ) : _T( "Client or ES" ),
dmMachineTable.tm[i].fLocal ? _T( "local" ) : _T( "remote" ));
PutStr( strData);
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetMachineTable (Page 1652)
3.2.11.12 OnTestProjectInfo
Example
//{{ODK_EXAMPLE}OnTestProjectInfo (MCP)}
//{{FUNCTION}DMGetProjectInformation (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestProjectInfo()
{
CCmnError cmnError;
DM_PROJECT_INFO ProjectInfo;
memset(&ProjectInfo, 0, sizeof(DM_PROJECT_INFO));
if(!DMGetProjectInformation(m_strProject, &ProjectInfo, cmnError))
{
cmnError.Show(__TEXT("DMGetProjectInformation failed\n"));
}
else
{
CString strData;
strData.Format(_T("Projekt : %s, Data Source : %s, DataLocale : %08X"),
ProjectInfo.szProjectFile,
ProjectInfo.szDSNName,
ProjectInfo.dwDataLocale );
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetProjectInformation (Page 1660)
3.2.11.13 OnTestProjectPaths
Example
//{{ODK_EXAMPLE}OnTestProjectPaths (MCP)}
//{{FUNCTION}DMGetProjectDirectory (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestProjectPaths()
{
DM_DIRECTORY_INFO dmDirInfo;
CCmnError Error;
memset(&dmDirInfo, 0, sizeof(DM_DIRECTORY_INFO));
memset(&Error,0,sizeof(CCmnError));
if(!DMGetProjectDirectory(m_strAppName, m_strProject,
&dmDirInfo, &Error))
{
Error.Show(__TEXT("DMGetProjectDirectory failed\n"));
}
else
{
CString strData;
strData.Format(_T("szProjectDir = %s"), dmDirInfo.szProjectDir);
PutStr(strData);
strData.Format(_T("szProjectAppDir = %s"), dmDirInfo.szProjectAppDir);
PutStr(strData);
strData.Format(_T("szProjectGlobalLibDir = %s"), dmDirInfo.szGlobalLibDir);
PutStr(strData);
strData.Format(_T("szProjectLibDir = %s"), dmDirInfo.szProjectLibDir);
PutStr(strData);
strData.Format(_T("szLokalProjectAppDir = %s"), dmDirInfo.szLokalProjectAppDir);
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetProjectDirectory (Page 1659)
3.2.11.14 OnTestOpenProject
Example
//{{ODK_EXAMPLE}OnTestOpenProject (MCP)}
//{{FUNCTION}DMOpenProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestOpenProject()
{
#define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
TCHAR szProject[_MAX_PATH + 1];
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
CTestCliView* pView = GetFirstView();
memset(szProject,0, sizeof(szProject)); // Delete projectname to call dialog
// Or set fixed projectname
strcpy( szProject, _T(PROJ_PATH) );
if(!DMOpenProject(pView->GetSafeHwnd(),
szProject, NELEM(szProject), &Error))
{
Error.Show(__TEXT("DMOpenProject failed.\n"));
}
else
{
AfxMessageBox(szProject);
m_strProject = szProject;
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMOpenProjectPlus (Page 1664)
3.2.11.15 OnTestOpenProjects
Example
//{{ODK_EXAMPLE}OnTestOpenProjects (MCP)}
//{{FUNCTION}DMEnumOpenedProjects (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestOpenProjects()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMEnumOpenedProjects(NULL, OpenProjectsProc, this, &Error))
{
Error.Show(__TEXT("DMEnumOpenedProjects failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumOpenedProjects (Page 1656)
3.2.11.16 OnTestRuntimeProject
Example
//{{ODK_EXAMPLE}OnTestRuntimeProject (MCP)}
//{{FUNCTION}DMGetRuntimeProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestRuntimeProject()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
TCHAR szBuffer[_MAX_PATH + 1];
if(!DMGetRuntimeProject(szBuffer, NELEM(szBuffer), &Error))
{
Error.Show(__TEXT("DMGetRuntimeProject failed\n"));
}
else
{
PutStr(szBuffer);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetRuntimeProject (Page 1662)
3.2.11.17 OnTestSystemLocale
Example
//{{ODK_EXAMPLE}OnTestSystemLocale (MCP)}
//{{FUNCTION}DMGetSystemLocale (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestSystemLocale()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
DWORD dwLocaleID = 0;
if(!DMGetSystemLocale(&dwLocaleID, &Error))
{
Error.Show(__TEXT("DMGetSystemLocale failed\n"));
}
else
{
CString strData;
strData.Format(_T("Systemlocale : %08X"), dwLocaleID);
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetSystemLocale (Page 1797)
3.2.11.18 OnTestUpdateCycles
Example
//{{ODK_EXAMPLE}OnTestUpdateCycles (MCP)}
//{{FUNCTION}DMEnumUpdateCycles (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestUpdateCycles()
{
DWORD dwNumCalls = 0;
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMEnumUpdateCycles(m_strProject, &dwNumCalls,
EnumCyclesProc, this, &Error))
{
Error.Show(__TEXT("DMEnumUpdateCycles failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEnumUpdateCycles (Page 1641)
3.2.11.19 OnTestVariablenBeginstartvarupdate
Example
//{{ODK_EXAMPLE}OnTestVariblenBeginstartvarupdate (MCP)}
//{{FUNCTION}DMBeginStartVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenBeginstartvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMBeginStartVarUpdate(&m_dwTAID, &Error))
{
Error.Show(_T("DMBeginStartVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMBeginStartVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMBeginStartVarUpdate (Page 1801)
3.2.11.20 OnTestVariablenEndstartvarupdate
Example
//{{ODK_EXAMPLE}OnTestVariablenEndstartvarupdate (MCP)}
//{{FUNCTION}DMEndStartVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenEndstartvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMEndStartVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMEndStartVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMEndStartVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMEndStartVarUpdate (Page 1803)
3.2.11.21 OnTestVariablenGetvalue
Example
//{{ODK_EXAMPLE}OnTestVariablenGetvalue (MCP)}
//{{FUNCTION}DMGetValue (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvalue()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error, 0, sizeof(CCmnError));
// clear the given VARIANT's in every array element, because a VT_BSTR's can be
present
// do not only delete the array later without clearing the Variants here because
of memory leak's
VariantClear(&(lpdmvus2->dmValue));
}
}
delete []lpdmVarKey;
delete []lpdmvus;
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetValue (Page 1691)
3.2.11.22 OnTestVariablenGetvaluewait
Example
//{{ODK_EXAMPLE}OnTestVariablenGetvaluewait (MCP)}
//{{FUNCTION}DMGetValueWait (MCP)}
//{{FUNCTION}(END)}
//-----< Notification-Callback for GetValueWait >-----------------------------
BOOL GetValueWaitNotify(DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
DWORD dwItems,
LPVOID lpvUser)
{
dwTAID;
CTestCliDoc* pDoc = (CTestCliDoc*)lpvUser;
for(DWORD i=0; i <dwitems; i++)
{
LPDM_VAR_UPDATE_STRUCT lpdmvus2 = &lpdmvus[i];
CString strData;
switch(lpdmvus2->dmTypeRef.dwType)
{
case DM_VARTYPE_BIT:
if (lpdmvus2->dmValue.boolVal)
{
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = TRUE,
State=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dwState);
}
else
{
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = FALSE,
State=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dwState);
}
break;
case DM_VARTYPE_BYTE:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %u, State=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_SBYTE:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %d, State=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_WORD:
lpdmvus2->dmVarKey.szName,
pArray[0],
pArray[1],
pArray[2],
pArray[3]);
SafeArrayUnaccessData(lpdmvus2->dmValue.parray);
}
else
{
strData.Format(_T("SafeArrayAccessData failed\n"));
}
break;
}
default:
strData.Format(_T("GetValueWait: Unknonw data type !"));
}
pDoc->PutStr(strData);
}
return(TRUE);
}
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMGetValueWait(&dwTAID,
lpdmVarKey,
nNum,
TRUE,
dwTimeOut,
GetValueWaitNotify,
this,
&Error))
{
Error.Show(_T("DMGetValueWait (TRUE) failed\n"));
}
delete []lpdmVarKey;
delete []lpdmvus;
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetValueWait (Page 1704)
3.2.11.23 OnTestVariablenGetVarInfo
Example
//{{ODK_EXAMPLE}OnTestVariblenGetVarInfo (MCP)}
//{{FUNCTION}DMGetVarInfo (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetVarInfo()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarInfo(m_strProject, lpdmVarKey, nNum, &Error))
{
Error.Show(_T("DMGetVarInfo failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarInfo: Variablenname: %s, VarID:%lu."),
lpdmVarKey[i].szName,
lpdmVarKey[i].dwID);
PutStr(strData);
}
}
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetVarInfo (Page 1710)
3.2.11.24 OnTestVariablenGetvarlimits
Example
//{{ODK_EXAMPLE}OnTestVariblenGetvarlimits (MCP)}
//{{FUNCTION}DMGetVarLimits (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvarlimits()
{
int nNum = GetVarCount();
LPDM_VARLIMIT lpdmVarLimit = new DM_VARLIMIT[nNum];
memset(lpdmVarLimit, 0, sizeof(DM_VARLIMIT) * nNum);
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarLimits(m_strProject, lpdmVarKey, nNum,
lpdmVarLimit, &Error))
{
Error.Show(__T("DMGetVarLimits failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarLimits: Var:%s, MaxRange:%lf, MinRange:%lf,
MinLimit:%lf, MaxLimit:%lf."),
lpdmVarKey[i].szName,
lpdmVarLimit[i].dmMaxRange.dblVal,
lpdmVarLimit[i].dmMinRange.dblVal,
lpdmVarLimit[i].dmMaxLimit.dblVal,
lpdmVarLimit[i].dmMinLimit.dblVal);
PutStr(strData);
}
}
delete []lpdmVarLimit;
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetVarLimits (Page 1721)
3.2.11.25 OnTestVariablenGetvartype
Example
//{{ODK_EXAMPLE}OnTestVariblenGetvartype (MCP)}
//{{FUNCTION}DMGetVarType (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvartype()
{
int nNum = GetVarCount();
LPDM_TYPEREF lpdmTypeRef = new DM_TYPEREF[nNum];
memset(lpdmTypeRef, 0, sizeof(DM_TYPEREF) * nNum);
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarType(m_strProject, lpdmVarKey, nNum,
lpdmTypeRef, &Error))
{
Error.Show(_T("DMGetVarType failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarType: Var:%s, Size:%lu, Name:%s."),
lpdmVarKey[i].szName,
lpdmVarKey[i].dwID);
PutStr(strData);
}
}
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetVarType (Page 1728)
3.2.11.26 OnTestVariablenResumevarupdate
Example
//{{ODK_EXAMPLE}OnTestVariblenResumevarupdate (MCP)}
//{{FUNCTION}DMResumeVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenResumevarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMResumeVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMResumeVarUpdate failed.\n"));
}
else
{
CString strData;
strData.Format(_T("DMResumeVarUpdate ok."));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMResumeVarUpdate (Page 1804)
3.2.11.27 OnTestVariablenSetvalue
Example
//{{ODK_EXAMPLE}OnTestVariablenSetvalue (MCP)}
//{{FUNCTION}DMSetValue (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSetvalue()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDWORD lpdmVarState = new DWORD[nNum];
INT i;
CString strData;
CCmnError cmnError;
for (i = 0; i < 1; i++)</p>
{
DWORD dwStart = GetTickCount();
DWORD dwEnd;
if (! DMSetValue(lpdmVarKey, nNum, m_varValues, lpdmVarState, cmnError))
{
break;
}
dwEnd = GetTickCount();
strData.Format("DMSetValue OK, Dauer %d ms", dwEnd - dwStart);
PutStr(strData);
}
delete []lpdmVarKey;
delete []lpdmVarState;
}
//{{ODK_EXAMPLE}(END)}
See also
DMSetValue (Page 1734)
3.2.11.28 OnTestVariablenSetvaluewait
Example
//{{ODK_EXAMPLE}OnTestVariablenSetvaluewait (MCP)}
//{{FUNCTION}DMSetValueWait (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSetvaluewait()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDWORD lpdmVarState = new DWORD[nNum];
DWORD dwTimeOut = 1000L;
CCmnError cmnError;
if(!::DMSetValueWait(&m_dwTAID, lpdmVarKey,nNum, m_varValues,dwTimeOut,
CompletionProc, this, cmnError))
{
cmnError.Show(_T("DMSetValueWait failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMSetValueWait ok."));
}
delete []lpdmVarKey;
delete []lpdmVarState;
}
//{{ODK_EXAMPLE}(END)}
See also
DMSetValueWaitMessage (Page 1749)
DMSetValueWait (Page 1744)
3.2.11.29 OnTestVariablenStopallupdates
Example
//{{ODK_EXAMPLE}OnTestVariablenStopallupdates (MCP)}
//{{FUNCTION}DMStopAllUpdates (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenStopallupdates()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMStopAllUpdates(&Error))
{
Error.Show(_T("DMStopAllUpdates failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMStopAllUpdates ok."));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMStopAllUpdates (Page 1820)
3.2.11.30 OnTestVariablenStopvarupdate
Example
//{{ODK_EXAMPLE}OnTestVariablenStopvarupdate (MCP)}
//{{FUNCTION}DMStopVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenStopvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMStopVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMStopVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMStopVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMStopVarUpdate (Page 1821)
3.2.11.31 OnTestVariablenSuspendvarupdate
Example
//{{ODK_EXAMPLE}OnTestVariablenSuspendvarupdate (MCP)}
//{{FUNCTION}DMSuspendVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSuspendvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMSuspendVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMSuspendVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMSuspendVarUpdate ok."));
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMSuspendVarUpdate (Page 1823)
3.2.11.32 OnTestWinCCShutdown
Example
//{{ODK_EXAMPLE}OnTestWinCCShutdown (MCP)}
//{{FUNCTION}DMExitWinCC (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestWinCCShutdown()
{
DMExitWinCC();
}
//{{ODK_EXAMPLE}(END)}
See also
DMExitWinCC (Page 1644)
Example
See also
DMOpenProjectPlus (Page 1664)
Example
// =====================================================================
// =====================================================================
// short : Modul with examples to DataManager-API
// RUNTIME
// SC: PO = Projekt opened PG= Projekt closed
// *********************************************************************
#include "stdafx.h" // if MFC classes
//#include "odkapi.h" // if console application
#include <time.h>
#include "dm02.h"
// =====================================================================
// 2.1 Interface IMPORT
// =====================================================================
//extern void ODKTrace(LPCTSTR);
extern BOOL MyDMConnect (void); // Connect
extern BOOL MyDMGetConnectionState(void);
// =====================================================================
// 2.2 Interface EXPORT
// =====================================================================
// =====================================================================
// 2.3 Interface LOCAL
// =====================================================================
// =====================================================================
// 3. Definitions
// =====================================================================
DM_VAR_UPDATE_STRUCT VarUp[nNum];
memset(&VarUp, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
// the included VARIANT's in the DM_VAR_UPDATE_STRUCT's then initialized to VT_EMPTY
with the memset,
// don't do this later again, because VT_BSTR's can be present after DMGetValue(...)!
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.bVal);
break;
}
case DM_VARTYPE_SBYTE: //vt = 2 VT_I2 = 2
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.iVal);
break;
}
case DM_VARTYPE_WORD: //vt = 3 VT_I4 = 3
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.lVal);
break;
}
case DM_VARTYPE_SWORD: //vt = 2 VT_I2 = 2
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.iVal);
break;
}
case DM_VARTYPE_DWORD: //vt = 5 VT_R8 = 5
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.dblVal);
break;
}
case DM_VARTYPE_SDWORD: //vt = 3 VT_I4 = 3
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.lVal);
break;
}
case DM_VARTYPE_FLOAT: //vt = 4 VT_R4 = 4
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%f",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.fltVal);
break;
}
case DM_VARTYPE_DOUBLE: //vt = 5 VT_R8 = 5
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%f",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.dblVal);
break;
}
case DM_VARTYPE_TEXT_8: //vt = 8 VT_BSTR = 8
{
ret = WideCharToMultiByte( CP_ACP,
(DWORD)0,VarUp[iOut].dmValue.bstrVal,
-1,(LPSTR)&BstrValue[0],128,NULL,NULL);
sprintf(szText, "Index=%d Name=%s ID=%d StrValue=%s",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,BstrValue);
break;
}
case DM_VARTYPE_TEXT_16: // vt = 8 VT_BSTR = 8
{
ret = WideCharToMultiByte( CP_ACP,
(DWORD)0,VarUp[iOut].dmValue.bstrVal,
-1,(LPSTR)&BstrValue[0],128,NULL,NULL);
sprintf(szText, "Index=%d Name=%s ID=%d StrValue=%s",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,BstrValue);
break;
}
default:
break;
}// end switch case
ODKTrace(szText);
//printf("%s\r\n",szText);
VariantClear( &VarUp[iOut].dmValue );
}//end for
}
else
{
sprintf(szText, "Error in DMGetValue: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
else
{
sprintf(szText, "Error in DMGetRuntimeProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
else
{
sprintf(szText, "Error in MyDMGetConnectionState: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
//{{ODK_EXAMPLE}(END)}
See also
DMGetRuntimeProject (Page 1662)
DMGetValue (Page 1691)
Example
See also
DMGetRuntimeProject (Page 1662)
DMSetValue (Page 1734)
3.3.1 Basics
Overview
Overview
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
Configuration
Runtime
3.3.1.4 Constants
Addressing mode
PDLRTInquireFreeArea
Update cycles
Name Index
"On change" 0
"250 ms" 1
"500 ms" 2
"1 s" 3
"2 s" 4
"5 s" 5
"10 s" 6
"1 min" 7
"5 min" 8
"10 min" 9
"1 h" 10
"User cycle 1" 11
"User cycle 2" 12
"User cycle 3" 13
"User cycle 4" 14
"User cycle 5" 15
"Window cycle" 235
"Screen cycle" 255
Overview
Note
For many API functions of the Graphics Designer, you must initialize the lpszPropName
parameter. The English name of an object property must be specified for this.
Properties of type VT_USERDEFINED must not be processed with the Get/Set Property functions.
VT_DISPATCH and other references must not be used; only the standard types and at most one
VT_VARIANT for an array property of simple types may be used.
OLE Automation Data type Property name Attribute name Object association
name
"ActualPointLeft" VT_I4 Current Value X Current Value X Polygon
"ActualPointTop" VT_I4 Current Value Y Current Value Y Polygon
"AdaptBorder" VT_BOOL Adapt Border Adapt Border Button, static text, I/O
field, text list, check box,
radio box
"AdaptPicture" VT_BOOL Adapt Picture Adapt Picture Screen window
"AdaptSize" VT_BOOL Adapt Size Adapt Size Screen window
"AlarmHigh" VT_R8 Limit AH Limit AH Bar
"AlarmLow" VT_R8 Limit AL Limit AL Bar
"Alignment" VT_BOOL Alignment Alignment Bar
"AlignmentLeft" VT_I4 X Alignment X Alignment Button, static text, I/O
field, group display, text
list, check box, radio box
"FillColor" VT_I4 Fill Pattern Color Fill Pattern Color Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object, text
list, check box, radio box,
round button, slider ob‐
ject
"Filling" VT_BOOL Dynamic Filling Dynamic Filling Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, graphic
object, check box, radio
box, round button
"FillingIndex" VT_I4 Fill Level Fill Level Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, graphic
object, check box, radio
box, round button, slider
object
"FillStyle" VT_UI4 Fill Pattern Fill Pattern Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object, text
list, check box, radio box,
round button, slider ob‐
ject
"FillStyle2" VT_UI4 Bar Pattern Bar Pattern Bar
"FlashBackColor" VT_BOOL Flashing Back‐ Flashing Back‐ Button, ellipse, ellipse
ground Active ground Active segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object, text
list, check box, radio box,
round button, slider ob‐
ject
"FlashBorderColor" VT_BOOL Flashing Line Ac‐ Flashing Line Ac‐ Button, ellipse, elliptical
tive tive arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, I/O
field, bar, graphic object,
text list, check box, radio
box, round button, slider
object
"FlashFlashPicture" VT_BOOL Flashing Flash Flashing Flash Pic‐ Status display
Picture Active ture Active
"FlashForeColor" VT_BOOL Flashing Text Ac‐ Flashing Text Ac‐ Button, static text, I/O
tive tive field, text list, check box,
radio box
"FlashPicReferenced" VT_BOOL Flash Picture Ref‐ Flash Picture Refer‐ Status display
erenced enced
"FlashPicTransColor" VT_I4 Basic Picture Basic Picture Trans‐ Status display
Transparent Col‐ parent Color
or
"FlashPicture" VT_BSTR Flash Picture Flash Picture Status display
"FlashPicUseTransCol‐ Flash Picture Flash Picture Trans‐ Status display
or" Transparent Col‐ parent Color On
or On
"FlashRate" VT_I4 Flash Frequency Flash Frequency Group display
"FlashRateBackColor" VT_I4 Background Background Flash Button, ellipse, ellipse
Flash Frequency Frequency segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object, text
list, check box, radio box,
round button, slider ob‐
ject
"FlashRateBorderColor" VT_I4 Line Flash Fre‐ Background Flash Button, ellipse, elliptical
quency Frequency arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, I/O
field, bar, graphic object,
text list, check box, radio
box, round button, slider
object
"FlashRateFlashPic" VT_I4 Flash Picture Flash Picture Flash Status display
Flash Frequency Frequency
"FlashRateForeColor" VT_I4 Text Flash Fre‐ Text Flash Frequen‐ Button, static text, I/O
quency cy field, text list, check box,
radio box
"Font" VT_USER‐ Font Font DAClockCtrl, PButtonCtrl,
DEFINED SliderCtrl
"FontBold" VT_BOOL Bold Bold Button, static text, I/O
field, bar, group display,
text list, check box, radio
box
"FontBold" VT_BOOL FontBold FontBold PButtonCtrl
"FontItalic" VT_BOOL Italic Italic Button, static text, I/O
field, group display, text
list, check box, radio box
"FontItalic" VT_BOOL FontItalic FontItalic PButtonCtrl
"FontName" VT_BSTR Font Font Button, static text, I/O
field, group display, text
list, check box, radio box
"FontName" VT_BSTR FontName FontName PButtonCtrl
Overview
Note
For many API functions of the Graphics Designer, you must initialize the lpszPropName
parameter. The English name of an object property must be specified for this.
Properties of type VT_USERDEFINED must not be processed with the Get/Set Property functions.
VT_DISPATCH and other references must not be used; only the standard types and at most one
VT_VARIANT for an array property of simple types may be used.
OLE Automation Data type Property name Attribute name Object association
name
"LanguageSwitch" VT_BOOL Language Switch Language Text list
switching
"Layer" VT_I4 Layer Layer Button, ellipse, elliptical arc,
ellipse segment, circle, circu‐
lar arc, circle segment, line,
polygon, polyline, rectangle,
rounded rectangle, static
text, 3-D bar, print job/script
diagnostics, screen window,
I/O field, bar, graphic object,
group display, text list, status
display, check box, radio box,
round button, slider object,
WinCC Gauge Control, WinCC
Alarm Control (before WinCC
V7), PButtonCtrl, SliderCtrl,
WTVctrlCtrl,
"Layer00Checked" VT_BOOL Monitoring 0 Monitoring 0 3D bar
"Layer01Checked" VT_BOOL Monitoring 1 Monitoring 1 3D bar
"Layer02Checked" VT_BOOL Monitoring 2 Monitoring 2 3D bar
"Layer03Checked" VT_BOOL Monitoring 3 Monitoring 3 3D bar
"Layer04Checked" VT_BOOL Monitoring 4 Monitoring 4 3D bar
"Layer05Checked" VT_BOOL Monitoring 5 Monitoring 5 3D bar
"Layer06Checked" VT_BOOL Monitoring 6 Monitoring 6 3D bar
"Layer07Checked" VT_BOOL Monitoring 7 Monitoring 7 3D bar
"Layer08Checked" VT_BOOL Monitoring 8 Monitoring 8 3D bar
"Layer09Checked" VT_BOOL Monitoring 9 Monitoring 9 3D bar
"Layer10Checked" VT_BOOL Monitoring 10 Monitoring 10 3D bar
"Layer00Color" VT_I4 Bar Color 0 Bar Color 0 3D bar
"Layer01Color" VT_I4 Bar Color 1 Bar Color 1 3D bar
"Layer02Color" VT_I4 Bar Color 2 Bar Color 2 3D bar
"Layer03Color" VT_I4 Bar Color 3 Bar Color 3 3D bar
"ObjectName" VT_BSTR Object Name Object name Button, ellipse, elliptical arc,
ellipse segment, circle, circu‐
lar arc, circle segment, line,
polygon, polyline, rectangle,
rounded rectangle, static
text, 3-D bar, print job/script
diagnostics, I/O field, bar,
graphic object, group display,
text list, status display, check
box, radio box, round button,
slider object, DAClockCtrl,
WinCC Gauge Control, WinCC
Alarm Control (before WinCC
V7), PButtonCtrl, SliderCtrl,
WTVctrlCtrl,
"OffsetLeft" VT_I4 Picture Offset X Picture Offset X Screen window
"OffsetTop" VT_I4 Picture Offset Y Picture Offset Y Screen window
"OnTop" VT_BOOL Foreground Foreground Print job/Script diagnostics,
screen window
"Operation" VT_BOOL Operator-Con‐ Operator-Con‐ Button, ellipse, elliptical arc,
trol Enable trol Enable ellipse segment, circle, circu‐
lar arc, circle segment, line,
polygon, polyline, rectangle,
rounded rectangle, static
text, 3-D bar, I/O field, bar,
graphic object, group display,
text list, status display, check
box, radio box, round button,
slider object, DAClockCtrl,
WinCC Gauge Control, WinCC
Alarm Control (before WinCC
V7), PButtonCtrl, SliderCtrl,
WTVctrlCtrl,
"OperationMes‐ VT_BOOL Operator Input Operator Input I/O field, text list, check box,
sage" Message Message radio box, slider object
"OperationReport" VT_BOOL Operator Ac‐ Operator Ac‐ I/O field, text list, slider object
tions Report tions Report
"Orientation" VT_BOOL Text Orientation Text Orientation Static text, I/O field, text list,
check box, radio box
"OuterBevelOffset" VT_I4 OuterBevelOffset OuterBevelOffset SliderCtrl
"OuterBevelStyle" VT_I4 OuterBevelStyle OuterBevelStyle SliderCtrl
"OuterBevelWidth" VT_I4 OuterBevelWidth OuterBevelWidth SliderCtrl
"Outline" VT_BOOL Outline Outline PButtonCtrl
"OutputFormat" VT_BSTR Output Format Output Format I/O field
"OutputValue" VT_R8 Output Value Output Value I/O field, text list
"ToolTipText" VT_BSTR Tooltip Text Tooltip Text Button, ellipse, elliptical arc,
ellipse segment, circle, circu‐
lar arc, circle segment, line,
polygon, polyline, rectangle,
rounded rectangle, static
text, 3-D bar, I/O field, bar,
graphic object, group display,
text list, status display, check
box, radio box, round button,
slider object, DAClockCtrl,
WinCC Gauge Control, WinCC
Alarm Control (before WinCC
V7), PButtonCtrl, SliderCtrl,
WTVctrlCtrl,
"Top" VT_I4 Y position Y position Button, ellipse, elliptical arc,
ellipse segment, circle, circu‐
lar arc, circle segment, line,
polygon, polyline, rectangle,
rounded rectangle, static
text, 3-D bar, print job/script
diagnostics, screen window,
I/O field, bar, graphic object,
group display, text list, status
display, check box, radio box,
round button, slider object,
DAClockCtrl, WinCC Gauge
Control, WinCC Alarm Control
(before WinCC V7), PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl,
"Trend" VT_BOOL Trend Trend Bar
"TrendColor" VT_I4 Trend Color Trend Color Bar
"TypeAlarmHigh" VT_BOOL Type AH Type AH Bar
"TypeAlarmLow" VT_BOOL Type AL Type AL Bar
"TypeLimitHigh4" VT_BOOL Type RH4 Type RH4 Bar
"TypeLimitHigh5" VT_BOOL Type RH5 Type RH5 Bar
"TypeLimitLow4" VT_BOOL Type RL4 Type RL4 Bar
"TypeLimitLow5" VT_BOOL Type RL5 Type RL5 Bar
"TypeTolerance‐ VT_BOOL Type TH Type TH Bar
High"
"TypeTolerance‐ VT_BOOL Type TL Type TL Bar
Low"
"TypeWarningHigh" VT_BOOL Type WH Type WH Bar
"TypeWarningLow" VT_UI4 Type WL Type WL Bar
"UnitColor" VT_USER‐ UnitColor UnitColor WinCC Gauge Control,
DEFINED
"UnitFont" VT_BSTR UnitFont UnitFont WinCC Gauge Control,
"UnitText" VT_BSTR UnitText UnitText WinCC Gauge Control,
"UnitOffset" VT_R8 UnitOffset UnitOffset WinCC Gauge Control,
"UnselBGColor" VT_I4 List Background List Background Text list
Color Color
"UnselTextColor" VT_I4 List Font Color List Font Color Text list
"UpdateCycle" VT_I4 Update Cycle Update Cycle Screen window
"UseRefreshTimer" VT_BOOL UseRefreshTimer UseRefreshTimer WTVctrlCtrl
"UserValue1" VT_UI4 User Value 1 User Value 1 Group display
"UserValue2" VT_UI4 User Value 2 User Value 2 Group display
"UserValue3" VT_UI4 User Value 3 User Value 3 Group display
"UserValue4" VT_UI4 User Value 4 User Value 4 Group display
"Value" VT_R4 Value Value WinCC Gauge Control,
"ValueMax" VT_R4 ValueMax ValueMax WinCC Gauge Control,
"ValueMin" VT_R4 ValueMin ValueMin WinCC Gauge Control,
"VideoEnabled" VT_BOOL VideoEnabled VideoEnabled WTVctrlCtrl
"VideoSource" VT_I2 VideoSource VideoSource WTVctrlCtrl
"Visible" VT_BOOL Display Display All objects (incl. screen)
"Warning" VT_R4 Warning Warning WinCC Gauge Control,
"WarningColor" VT_UI4 WarningColor WarningColor WinCC Gauge Control,
"WarningHigh" VT_R8 Limit WH Limit WH Bar
"WarningLow" VT_R8 Limit WL Limit WL Bar
"Width" VT_I4 Width Width All objects except: Application
window, screen window
"WindowBorder" VT_BOOL Border Border Application window, screen
window, print job/script diag‐
nostics
"WindowsStyle" VT_BOOL Windows Style Windows Style Button, Slider object
"WindowType" VT_I2 WindowType WindowType WinCC Alarm Control (before
WinCC V7),
"WinTVInforma‐ VT_BSTR WinTVInforma‐ WTVctrlCtrl
tion" tion
"WithAxes" VT_BOOL WithAxes WithAxes SliderCtrl
"WithLabels" VT_BOOL WithLabels WithLabels SliderCtrl
"ZeroPoint" VT_UI4 Zero Point Zero Point 3-D bar, bar
"ZeroPointValue" VT_R8 Zero Point Value Zero Point Value 3-D bar, bar
Zoom VT_I4 Scaling Factor Scaling Factor Screen window
Overview
API was developed for uses in separate applications. However, problems may arise – including
possible deadlocks – when API calls are made to OCXs that are integrated into graphics screens.
If use of an OCX in a graphics screen is absolutely necessary, always check to see if the task
could be also be handled with IndustrialX. This option is designed for purposes like this.
If it is determined that API must be used for the task, note the following:
The Runtime API functions of alarm logging and tag logging are especially affected by this.
One reason is that API requests data from WinCC programs during runtime via Window
Message and awaits the reply. If the OCX runs in the context of just such a WinCC program, it
cannot process the request because it hangs in the API call.
Solution:
When this happens, it is often sufficient to place the API call in a different thread.
However, this solution should only be used when a problem actually exists. For example,
some other calls experience problems when they are not run in the main thread.
3.3.2 Structures
3.3.2.1 LINKINFO
Declaration
typedef struct {
LINKTYPE LinkType;
DWORD dwCycle;
TCHAR szLinkName[256];
}
LINKINFO;
Members
LinkType
Values for enum LinkType defined in the "trigger.h" file should be used for the LINKTYPE type.
Note
For subsequent extensions of the enum LinkType definition in trigger.h, new constants must
always be added at the end, otherwise the above listed values will be changed. Therefore, you
should always use the definition for enumerations and not the value.
dwCycle
Cycle time for updating. dwCycle identifies the order within the list of update cycles.
szLinkName
Name of the tag connection
Required files
pdlrtapi.h
trigger.h
API functions
PDLRTGetLink (Page 1932) Query link between object property and tag
PDLRTSetLink (Page 1934) Define link between object property and tag
See also
PDLRTGetLink (Page 1932)
PDLRTSetLink (Page 1934)
3.3.2.2 MULTILINK
Declaration
typedef struct {
DWORD wArraySize;
LPMULTILINKINFO pLinkArray;
}
MULTILINK;
Members
wArraySize
Number of links (number of structures of the MULTILINKINFO type).
pLinkArray
Pointer to the first wArraySize structure of the MULTILINKINFO (Page 1898) type with
information about the link between an object property and a tag.
Required files
pdlrtapi.h
API functions
PDLRTSetMultiLink (Page 1936) Define link between object property and tag (multiple tags)
See also
PDLRTSetMultiLink (Page 1936)
MULTILINKINFO (Page 1898)
3.3.2.3 MULTILINKINFO
Declaration
typedef struct {
char* pszObjectName,
char* pszPropertyName,
LINKTYPE LinkType;
DWORD dwCycle;
char* pszLinkName;
}
MULTILINKINFO;
Members
IpszObjectName
Pointer to the name of the object.
IpszPropertyName
Pointer to the name of the object property to be linked.
LinkType
Identifies the type of connection.
dwCycle
Cycle time for updating. dwCycle identifies the order within the list of update cycles.
pszLinkName
Pointer to name of the connection
Comments
The MULTILINKINFO structure is part of the MULTILINK (Page 1897) structure.
Required files
pdlrtapi.h
See also
MULTILINK (Page 1897)
3.3.2.4 FOCUSINFO
Description
The screen object that has the runtime cursor is stored in the structure.
Declaration
typedef struct {
WCHAR szPicture[256];
WCHAR szObject[256];
}
FOCUSINFO;
Members
szPicture
Screen name
szObject
Object name
API functions
See also
PDLRTGetFocus (Page 1916)
3.3.3.1 PDLRTClosePicture
Use
Closes a screen in runtime mode.
Declaration
BOOL PDLRTClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszWName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The parameter is reserved for future development and must be preset to 0.
lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.
lpszWName
Name of the window object to be closed.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Screen closed.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.2 PDLRTDisableClosePicture
Use
Blocks a screen from being closed in runtime mode. The function can be called multiple times.
The screen can only be closed again when the same number of calls to the
PDLRTEnableClosePicture function have been made.
Declaration
BOOL PDLRTDisableClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The parameter is reserved for future development and must be preset to 0.
lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR.structure. If an error
occurs, the system writes error information into this structure.
Return value
TRUE
Function successfully completed.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.3 PDLRTEnableClosePicture
Use
Enables a screen to be closed in runtime mode.
The screen can only be closed, however, when the PDLRTEnableClosePicture function has
been called the same number of times as the PDLRTDisableClosePicture function.
Any PDLRTClosePicture made prior to this is noted and then performed later after the last
PDLRTEnableClosePicture.
Declaration
BOOL PDLRTEnableClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The parameter is reserved for future development and must be preset to 0.
lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Function successfully completed.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.4 PDLRTGotoPicture
Use
Loads the specified screen.
Declaration
BOOL PDLRTGotoPicture (
PDLRTGotoPict nextPict,
PCMN_ERROR pError );
Parameters
nextPict
The function of this method is controlled with this parameter. The following values are
possible:
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Screen loaded.
FALSE
Error.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRTPictureNavigation (Page 1910)
Overview of the functions (Page 1871)
3.3.3.5 PDLRTInquireFreeArea
Use
Determines whether a given rectangle can be placed on the screen without covering a
''protected area''. "Protected areas", for example, are other screens that are in the foreground.
Declaration
BOOL PDLRTInquireFreeArea(
LPRECT lpScreenRect,
DWORD dwModus,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
IpScreenRect
Pointer to a Windows-specific RECT type structure.
dwModus
Inquire mode: Several inquiry options are provided that can be ORed as desired:
PDLRT_IQ_ONLY (value: 0x01) Upon demand only with the result "matches / does not
match"
PDLRT_IQ_MODY_POSX (value: 0x02) If the given rectangle cannot be placed, the X position
of the rectangle can be modified so that it can be
placed.
PDLRT_IQ_MODY_POSY (value: 0x04) If the given rectangle cannot be placed, the Y position
of the rectangle can be modified so that it can be
placed.
PDLRT_IQ_MODY_HEIGHT (value: 0x08) If the given rectangle cannot be placed, the height of
the rectangle can be modified so that it can be placed.
PDLRT_IQ_MODY_WIDTH (value: 0x10) If the given rectangle cannot be placed, the width of
the rectangle can be modified so that it can be placed.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Window area is free.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.6 PDLRTOpenPicture
Use
The function performs a start screen change in the runtime.
Declaration
BOOL PDLRTOpenPicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszWName,
LPCSTR lpszPictureFileName,
DWORD dwWinStyle,
LONG lxPos,
LONG lyPos,
LONG lWitdh,
LONG lHeight,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.
lpszWName
This parameter must be currently supplied with the screen name.
lpszPictureFileName
This parameter must be currently supplied with the screen name.
dwWinStyle
The parameter is reserved for future development and must be preset to 0.
lxPos
The parameter is reserved for future development and must be preset to 0.
lyPos
The parameter is reserved for future development and must be preset to 0.
lWidth
The parameter is reserved for future development and must be preset to 0.
lHeigth
The parameter is reserved for future development and must be preset to 0.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Start screen change performed.
FALSE
Error.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.7 PDLRTPictureNavigation
Use
Switches the screen navigation on and off. When switched off, no more screens are added to the
stack with a screen change; the old state is frozen.
Declaration
BOOL PDLRTPictureNavigation (
PDLRT_PNFLAGS flags,
PCMN_ERROR pError );
Parameters
flags
The function is controlled with this parameter. The following values are possible:
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Function successfully completed.
FALSE
Error.
Cause: Screen navigation was already switched on or off.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRTGotoPicture (Page 1904)
Overview of the functions (Page 1871)
3.3.3.8 PDLRTShowApp
Use
This function brings a runtime window that may be in the background to the foreground of the
desktop.
Declaration
BOOL PDLRTShowApp (
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Runtime window in foreground.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.3.9 PDLRT_CALLBACK
Description
If your application is to be informed asynchronously about the execution of API functions in
runtime, you must provide callback functions of the PDLRT_CALLBACK type.
This function is used by all of the PDLRT functions as a callback function.
Declaration
void ( * PDLRT_CALLBACK ) (
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
pvUser
Pointer to application-specific data. This pointer is made available as a parameter of the API
function and returned again here unchanged.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
This callback has no return value.
Comments
If the API function is called without callback, i.e. with pfn = NULL, the call is synchronous. The
calling application is set as waiting until PDLRT reports failure or success. This type of call should
be preferentially used for mutually dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
Without synchronization, there is also the risk that the asynchronous function will continue
to write data via that data pointer that is no longer valid, when the calling process has
already finished or left the range of validity, which will lead to exception handling.
It makes sense to use a separate callback for each API function.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
In rare cases, the callback may already be delivered before the function call has returned.
Required files
pdlrtapi.h
See also
PDLRTClosePicture (Page 1899)
PDLRTDisableClosePicture (Page 1901)
PDLRTEnableClosePicture (Page 1903)
PDLRTInquireFreeArea (Page 1906)
PDLRTOpenPicture (Page 1907)
PDLRTShowApp (Page 1911)
PDLRTSetLink (Page 1934)
PDLRTSetMultiLink (Page 1936)
3.3.4.1 PDLRTGetCursorKeys
Use
This function queries the keys for cursor control that have been set with PDLRTSetCursorKeys.
Declaration
BOOL PDLRTGetCursorKeys (
long* pKeyUp,
long* pKeyDown,
long* pKeyLeft,
long* pKeyRight,
long* pKeyState,
long* pTabMode,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
KeyUp
This pointer provides the virtual key code (VK_...) of the key that moves the cursor down.
pKeyDown
This pointer provides the virtual key code (VK_...) of the key that moves the cursor up.
pKeyLeft
This pointer provides the virtual key code (VK_...) of the key that moves the cursor to the left.
pKeyRight
This pointer provides the virtual key code (VK_...) of the key that moves the cursor to the
right.
pKeyState
This pointer provides the keyboard status:
pTabMode
This pointer provides the TabMode, the object that gets the focus with the next activation of
a cursor control key:
O: xxScreenxx
1: xxScreenxx
10: xxScreenxx
xxScreenxx
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Cursor control keys determined.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRTSetCursorKeys (Page 1918)
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.4.2 PDLRTGetFocus
Use
The function returns the screen and the object name of the object that has the input focus.
Declaration
BOOL PDLRTGetFocus(
ADRMODE adrMode,
LPFOCUSINFO pFocusInfo,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
pFocusInfo
Pointer to the FOCUSINFO (Page 1899) structure in which the results are stored.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Input focus determined.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
FOCUSINFO (Page 1899)
PDLRTSetFocus (Page 1920)
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.4.3 PDLRTSetCursorKeys
Use
This function keys sets for the keys for cursor control.
Declaration
BOOL PDLRTSetCursorKeys (
long KeyUp,
long KeyDown,
long KeyLeft,
long KeyRight,
long KeyState,
long TabMode,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
KeyUp
Virtual key code (VK_...) of the key that moves the cursor down.
KeyDown
Virtual key code (VK_...) of the key that moves the cursor up.
KeyLeft
Virtual key code (VK_...) of the key that moves the cursor to the left.
KeyRight
Virtual key code (VK_...) of the key that moves the cursor to the right.
KeyState
KeyState provides the keyboard status:
TabMode
TabMode specifies the object that gets the focus with the next activation of a cursor control
key:
0: xxScreenxx
1: xxScreenxx
10: xxScreenxx
xxScreenxx
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Cursor control keys defined.
FALSE
Error.
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRTGetCursorKeys (Page 1914)
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.4.4 PDLRTSetFocus
Use
The function is used to set the input focus. The object is determined by lpszPictureName and
lpszObjectName.
Declaration
BOOL PDLRTSetFocus (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
IpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.
lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Input focus set
FALSE
Error
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRTGetFocus (Page 1916)
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.5.1 PDLRTGetDefPropEx
Use
Request a default property value. If the requested data type does not match the data type of the
property, the value is changed during the transfer into the pvProp user buffer in accordance with
the requested format, if this is possible.
Declaration
BOOL PDLRTGetDefPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.
lpszObjectName
Pointer to the configured object name according to addressing mode defined by via
adrMode .
lpszPropName
Pointer on the configured name of the object property.
vt
Data type of a value passed under pvProp. The allowed types are defined in the
include oaidl.h" and "wtypes.h" files of the compiler. You can use the WinCC include file,
APLIB\Defines.h , for scripts.
pvProp
Pointer to a tag in which the property value is stored. The data type of the value is
determined by vt:
vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*
VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer
For types with a buffer (for example, BSTR), the buffer is allocated by the function and must
be released again by the calling application.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
dwFlags
The parameter is reserved for future development and must be preset to 0.
pData
The parameter is reserved for future development and must be preset to NULL.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Default values of the object property determined.
FALSE
Error.
Comments
To release allocated memory areas, use the VT_BSTR Windows API function for
SysFreeString(...) and the VT_LPSTR Windows API function for VT_LPWSTR , LocalFree(...).
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
Overview of the functions (Page 1871)
3.3.5.2 PDLRTGetPropEx
Use
Request a current property value. The source is determined by lpszPictureName,
lpszObjectName and lpszPropName.
If the requested data type does not match the data type of the property, the value is changed
during the transfer into the pvProp user buffer in accordance with the requested format, if
this is possible.
Declaration
BOOL PDLRTGetPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.
lpszObjectName
Pointer to the configured name of the object according to addressing mode defined by
adrMode.
lpszPropName
Pointer on the configured name of the object property.
vt
Data type of a value passed under pvProp. The allowed types are defined in the
include oaidl.h" and "wtypes.h" files of the compiler. You can use the WinCC include file,
APLIB\Defines.h , for scripts.
pvProp
Pointer to a tag in which the property value is stored. The data type of the value is
determined by vt:
vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*
VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer
For types with a buffer (for example, BSTR), the buffer is allocated by the function and must
be released again by the calling application.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
dwFlags
The parameter is reserved for future development and must be preset to 0.
pData
The parameter is reserved for future development and must be preset to NULL.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Object properties determined.
FALSE
Error.
Comments
To release allocated memory areas, use the, use the SysFreeString(...) Windows API function for
VT_BSTR and the LocalFree(...) Windows API function for VT_LPSTR, VT_LPWSTR .
No VT_DISPATCH or other reference may be used; only the normal types and a VT_VARIANT
at the most for an array property of a simple type.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
See also
PDLRT_CALLBACK (Page 1912)
PDLRTSetPropEx (Page 1928)
Overview of the functions (Page 1871)
3.3.5.3 PDLRTSetPropEx
Use
Set a property. The target is determined by lpszPictureName, lpszObjectName and
lpszPropName. When the passed data type does not match the data type of the property, the
value is changed during the transfer to the property, if this is possible.
Only those properties that can also be made dynamic can be set.
Declaration
BOOL PDLRTSetPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.
lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.
lpszPropName
Pointer on the configured name of the object property.
vt
Data type of a value passed under pvProp. The allowed types are defined in the
include oaidl.h" and "wtypes.h" files of the compiler. You can use the WinCC include file,
APLIB\Defines.h , for scripts.
pvProp
Pointer to a buffer in which the property value is stored. The data type of the value is
determined by vt:
vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*
VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.
dwFlags
The parameter is reserved for future development and must be preset to 0.
pData
The parameter is reserved for future development and must be preset to ZERO.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Object properties set.
FALSE
Error.
Comments
No VT_DISPATCH or other reference may be used; only the normal types and a VT_VARIANT at
the most for an array property of a simple type.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
Example
#pragma code("pdlrtapi.dll")
#include "apdefap.h"
#define CP_ACP 0
#define MB_PRECOMPOSED 1
bRet = DMGetRuntimeProject
(&szProjectFile[0],sizeof(szProjectFile),&error);
printf("DMGetRuntimeProject: %s\r\n", szProjectFile);
bRet = PDLRTOpenPicture(0,"Start.PDL",NULL,NULL,0,0,0,0,0,NULL,NULL,
&error);
printf("PDLRTOpenPicture: %s,%ld, %s\r\n", bRet?"TRUE":"FALSE",
error.dwError1,error.szErrorText);
SysFreeString( bstrval );
printf("SysFreeString done\r\n");
}
See also
PDLRT_CALLBACK (Page 1912)
PDLRTGetPropEx (Page 1925)
Overview of the functions (Page 1871)
3.3.6.1 PDLRTGetLink
Use
Query a link from a property. If the property has an indirect tag connection, this is returned. If
the current active direct connection is desired for an indirect tag connection, this can be
requested by specifying
LinkType = BUBRT_LT_VARIABLE_DIRECT in the LINKINFO structure.
Declaration
BOOL PDLRTGetLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
LPLINKINFO pLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.
lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.
lpszPropName
Pointer on the name of the object property.
pLink
Pointer to the LINKINFO (Page 1895) structure in which the link information is stored.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Link determined.
FALSE
Error.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
PDLRTSetLink (Page 1934) Define link between object property and tag
PDLRT_CALLBACK (Page 1912) Callback function
See also
PDLRTSetLink (Page 1934)
PDLRT_CALLBACK (Page 1912)
LINKINFO (Page 1895)
Overview of the functions (Page 1871)
3.3.6.2 PDLRTSetLink
Use
Set a link between a property and a tag.
Declaration
BOOL PDLRTSetLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
LPLINKINFO pLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.
lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.
lpszPropName
Pointer on the name of the object property.
pLink
Pointer to the LINKINFO (Page 1895) structure in which the link information is stored.
Only BUBRT_LT_VARIABLE_DIRECT and BUBRT_LT_VARIABLE_INDIRECT can be used in
LinkType, since only a link with tags is allowed here.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Link set
FALSE
Error
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
PDLRTGetLink (Page 1932) Determine link between object property and tag
PDLRTSetMultiLink (Page 1936) Define link between object property and tag (multiple tags)
PDLRT_CALLBACK (Page 1912) Callback function
See also
PDLRTGetLink (Page 1932)
PDLRTSetMultiLink (Page 1936)
PDLRT_CALLBACK (Page 1912)
LINKINFO (Page 1895)
Overview of the functions (Page 1871)
3.3.6.3 PDLRTSetMultiLink
Use
Set multiple links between a property and a tag.
Declaration
BOOL PDLRTSetMultiLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPMULTILINK pMultiLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );
Parameters
adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.
lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.
pMultiLink
Pointer to the MULTILINK (Page 1897) structure in which a field with link information is
stored.
pfn
Pointer to your callback function. This is called to notify you about the success or failure of
the request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.
pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function but provided again in the callback function.
Return value
TRUE
The TRUE return value is only returned if all links were successfully set. Even if only one link
could not be set, FALSE is returned.
FALSE
Error.
Error messages
Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related functions
PDLRTSetLink (Page 1934) Define link between object property and tag
PDLRT_CALLBACK (Page 1912) Callback function
See also
PDLRTSetLink (Page 1934)
PDLRT_CALLBACK (Page 1912)
MULTILINK (Page 1897)
Overview of the functions (Page 1871)
3.4.1 Basics
Overview
Overview
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
Errors
Errors that may occur when performing an action
Alarms
Alarms of the action interpreter
Notify codes
3.4.1.4 Constants
Function/Action IDs
Limit values
Header types
CMHF_AP_ALL CMHF_APDEFAP |
CMHF_AP_PBIB |
CMHF_AP_GLOB |
CMHF_AP_ICF
CMHF_AP_USER 0x00000010 Header of a user function
Trigger types
Cycle types
AP_TRIG_CYCLE 1 Cyclic
AP_TRIG_NCYCLE 2 Acyclic
Cycle times
3.4.2 Structures
3.4.2.1 AP_ACT_KEY
Declaration
typedef struct {
DWORD dwKeyType;
DWORD dwID;
CHAR szActionName[AP_MAX_ACTION_NAME + 1];
DWORD dwCycle;
VARIANT *pVariant;
DWORD dwVariantItem;
DWORD dwerror;
LPVOID lpvUser;
} AP_ACT_KEY ;
Members
dwKeyType
The key type determines whether the action is addressed by a name (szActionName) or by an
ID (dwID).
Project and standard functions which already exist in in the WinCC project are identified by
the name. User-defined functions that are first logged on with the APTransAct function are
identified by the ID.
dwID
In connection with dwKeyType = AP_ID_TYPE the action is started with dwID.
The ID of the action is assigned on calling the APTransAct function. On calling the APTransAct
function, dwID must be defaulted with 0.
szActionName
In connection with dwKeyType = AP_NAME_TYPE the action is started by szActionName.
Can be used when starting an action with APStart.
dwCycle
Cyclic starting of the action when addressing is by name. The upgrade cycle is defined by the
index of the entries in the list of update cycles.
pVariant
Pointer to field of VARIANT data type which describes the parameters of the action. The
following data types are supported as VARTYPES:
The parameter descriptions of the actions and the return result are only possible in the form
of the VARIANT data type.
Transfer as a reference is not permitted.
dwVariantItem
Number of VARIANT data types which the action receives as parameters.
dwerror
Error number which can occur in the APTransAct.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
Description
The AP_ACT_KEY structure clearly identifies the action. This key is assigned as an ID with the API
call APTransAct. The action is started with this key.
Required files
ap_def.h
API functions
See also
APActive (Page 1965)
APInactive (Page 1969)
APStart (Page 1971)
APTransact (Page 1974)
3.4.2.2 AP_ACT_RESULT_STRUCT
Declaration
typedef struct {
VARIANT *ap_result;
AP_ACT_KEY apActKey;
CMN_ERROR error;
DWORD dwreserved;
} AP_ACT_RESULT_STRUCT ;
Members
*ap_result
Return result of the action in the form of a VARIANT data type.
apActKey
Key of the action for identification. The AP_ACT_KEY corresponds to the key with which the
action was started.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
dwreserved
The parameter is reserved for future development and must be preset to 0.
Required files
ap_def.h
API functions
See also
APFreeResultStruct (Page 1968)
APStart (Page 1971)
3.4.2.3 CREATE_USER_HEADER_FILE
Declaration
typedef struct {
char* pszStartDir;
char* pszHeaderFileName;
BOOL bShowDlg;
char* pszWindowText;
} CREATE_USER_HEADER_FILE ;
Members
pszStartDir
Pointer to the start directory at which the search for user functions begins with terminating "\"
pszHeaderFileName
Pointer to the name of the header file
bShowDlg
Show dialog with progress display
pszWindowText
Pointer to the dialog label.Default:BROWSER
Required files
capigsc.h
API functions
See also
GSCGenCompileUserFunctions (Page 1962)
3.4.2.4 GENERATE_COMPILE
Declaration
typedef struct {
char* pszProjectName;
LPACTION pAction;
} GENERATE_COMPILE ;
Members
pszProjectName
Pointer to the project name
pAction
Pointer to valid action stream with source code
Required files
capigsc.h
Related functions
See also
GSCGenCompile (Page 1961)
3.4.2.5 GET_ACTION_STREAM
Declaration
typedef struct {
char* pszPathName;
DWORD dwType;
} GET_ACTION_STREAM, *LPGET_ACTION_STREAM ;
Members
pszPathName
Full filename of the function or action
dwType
Permissible types:
Required files
capigsc.h
API functions
See also
GSCGenGetActionStream (Page 1964)
3.4.3.1 APConnect
Description
The function logs on in an application in the action control. If a callback function is specified in
fpAppBack, the function is performed asynchronously, in fpAppBack == NULL action is carried
out synchronously.
Declaration
BOOL APConnect (
LPCSTR lpszAppName,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
lpszAppName
Name of the application with which the application logged onto DMConnect. A DMConnect
is therefore necessary first. APConnect is only performed synchronously.
If functions of the script programming are called in actions, the "AktSteu" value (note exact
way of writing) must be specified for lpszAppName because the WinCC task has performed
the DMConnect with this name.
fpAppBack
Your callback function which receives messages. The message that the action control has
ended is reported by this function for example.
If a program logs on a Notify routine, it must empty a message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
If lpvUser is not used, it must be assigned with NULL.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Application logged on
FALSE
Error
Error messages
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
Examples
Establish connection to script programming (Page 1976) "AP01.cpp"
See also
DMConnect (Page 1630)
APTransact (Page 1974)
AP_RT_PROC (Page 1953)
APDisconnect (Page 1950)
Establish connection to script programming (Page 1976)
Overview of the functions (Page 1938)
3.4.3.2 APDisconnect
Description
The function logs off an application in the action control.
Declaration
BOOL APDisconnect (
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
fpAppBack
Your callback function which receives messages. The job is performed asynchronously when
using a callback function. With fpAppBack == NULL it takes place synchronously.
If a program logs on a Notify routine, it must empty a message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Application logged off
FALSE
Error
Comment
Note
The call must not be used in the destructor of an application (EXE, DLL, OCX, etc.). This may lead
to jamming of the call and thus the program due to Microsoft-specific mechanisms.
Error messages
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
Examples
Establish connection to script programming (Page 1976) "AP01.cpp"
See also
APTransact (Page 1974)
APConnect (Page 1948)
AP_RT_PROC (Page 1953)
Establish connection to script programming (Page 1976)
Overview of the functions (Page 1938)
3.4.3.3 APSetLanguage
Description
The language in which the error texts are to be output is set with this function.
Declaration
BOOL APSetLanguage (
const DWORD dwLanguageID )
Parameters
dwLanguageID
ID of the language according to the Windows language setting. The error texts are returned
according to the new set language. A default language is used if the language is not
supported.
Return value
TRUE
Language of the error texts changed
FALSE
Error
Required files
ap_def.h
apcli_S.lib
apclient.dll
See also
Overview of the functions (Page 1938)
3.4.3.4 AP_RT_PROC
Description
If your application is to be informed asynchronously about the execution of API functions in
runtime, you must provide callback functions of the AP_RT_PROC type.
This function is used by all functions of the action programming as a callback function.
Declaration
BOOL ( * AP_RT_PROC) (
DWORD dwAP_Notify,
WORD dwAP_NotifyCode,
DWORD dwError,
LPVOID lpvData,
DWORD dwItems,
DWORD dwOrderId,
LPVOID lpvUser );
Parameters
dwAP_Notify
Describes the type of callback function. Possible values are AP_NOTIFY_ERROR and
AP_NOTIFY_DATA.
dwAP_NotifyCode
If dwAP_Notify == AP_NOTIFY_ERROR, lpvData points to a structure of the CMN_ERROR type
with the error description and dwAP_NotifyCode is NULL.
If dwAP_Notify == AP_NOTIFY_DATA, then dwAP_NotifyCode contains a more exact
specification of the callback function:
dwError
Error number
lpvData
Pointer to provided data. The data structure depends on dwAP_Notify and dwAP_NotifyCode.
dwItems
Number of entries in lpvData.
dwOrderId
Job number which was assigned when calling the API function.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
Return value
TRUE
Function successful
FALSE
Error
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
In rare cases, the callback may already be delivered before the function call has returned.
Required files
ap_def.h
Related functions
Examples
Establish connection to script programming (Page 1976) "AP01.cpp"
See also
APConnect (Page 1948)
APDisconnect (Page 1950)
APActive (Page 1965)
APEndAct (Page 1967)
APInactive (Page 1969)
APStart (Page 1971)
APTransact (Page 1974)
Establish connection to script programming (Page 1976)
Overview of the functions (Page 1938)
3.4.4.1 APCompile
Description
A source code saved in lpvScode is compiled and saved as a P-code in lpvPcode. The application
must provide the memory for the P-code.
Declaration
BOOL APCompile (
LPCSTR szProjectName,
PDWORD pdwOrderId,
LPCSTR lpvScode,
const DWORD dwScodeSize,
LPVOID *lpvPcode,
PDWORD dwPcodeSize,
const HWND hwndLog,
const DWORD dwDebugFlag,
PDWORD nErrors,
PDWORD nWarnings,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.
pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.
lpvScode
Pointer to the source code to be compiled.
dwScodeSize
Size of the source code in bytes.
lpvPcode
Address of a pointer which contains the P-code in successful compiling. The memory
is created by the APCompile function and must be freed by the caller again with the
APFreePCode function.
dwPcodeSize
Contains the size of the P-code in bytes after compiling.
hwndLog
Window handle with which the error messages can be output. The window handle may also
be NULL. When using a window for the output, a message is sent by the Windows function
WM_COPYDATA.
dwDebugFlag
This flag determines whether the P-code should also supply debug information (bit1 = 1 ) or
whether no debug information is to be supplied (bit1 = 0 ). "0" should normally be selected
based on the performance.
Bit2 = 1: Use server settings for Includes
Bit2 = 0: Use local settings for Includes
nErrors
Number of errors occurred. No P-code is returned for nErrors > 0.
nWarnings
Number of warnings occurred. The P-code is also generated for nWarnings > 0.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the Callback-Funktion.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Source code compiled successfully
FALSE
Error
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
APCompileEx (Page 1958)
Overview of the functions (Page 1938)
3.4.4.2 APCompileEx
Description
Unlike the APCompile function, the source code to be compiled is divided into subsections.
In the source code void function {instructions} is divided into
Declaration
BOOL APCompileEx (
LPCSTR szProjectName,
PDWORD pdwOrderId,
LPCSTR lpvScodeProlog,
const DWORD dwScodePrologSize,
LPCSTR lpvScodeBase,
const DWORD dwScodeBaseSize,
LPCSTR lpvScodeEpilog,
const DWORD dwScodeEpilogSize,
LPVOID *lpvPcode,
PDWORD dwPcodeSize,
const HWND hwndLog,
const DWORD dwDebugFlag,
PDWORD nErrors,
PDWORD nWarnings,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.
pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.
szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.
pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.
lpvScodeProlog
Pointer to the prolog of the source code to be compiled.
dwScodePrologSize
Size of the prolog in bytes.
lpvScodeBase
Pointer to the base of the source code to be compiled.
dwScodeBaseSize
Size of the base in bytes.
lpvScodeEpilog
Pointer to the epilog of the source code to be compiled.
dwScodeEpilogSize
Size of the epilog in bytes.
lpvPcode
Address of a pointer which contains the P-code in successful compiling. The memory
is created by the APCompile function and must be freed by the caller again with the
APFreePCode function.
dwPcodeSize
Contains the size of the P-code in bytes after compiling.
hwndLog
Window handle with which the error messages can be output. The window handle may also
be NULL. When using a window for the output, a message is sent by the Windows function
WM_COPYDATA.
dwDebugFlag
This flag determines whether the P-code should also supply debug information (bit1 = 1 ) or
whether no debug information is to be supplied (bit1 = 0 ). "0" should normally be selected
based on the performance.
Bit2 = 1: Use server settings for Includes
Bit2 = 0: Use local settings for Includes
nErrors
Number of errors occurred. No P-code is returned for nErrors > 0.
nWarnings
Number of warnings occurred. The P-code is also generated for nWarnings > 0.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the Callback-Funktion.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Source code compiled successfully
FALSE
Error
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
APCompile (Page 1956)
Overview of the functions (Page 1938)
3.4.4.3 GSCGenCompile
Description
The function compiles an action.
Declaration
LPACTION GSCGenCompile(
LPGENERATE_COMPILE lpGenCompile,
HWND hWndParent,
unsigned long* plErrors,
unsigned long* plWarnings,
AllocAppMem lpfnAllocAppMem,
LPCMN_ERROR lpdmError)
Parameters
lpGenCompile
Pointer to the GENERATE_COMPILE (Page 1947) structure.
hWndParent
Handle to the window in which the status outputs are to be made.
plErrors
Pointer to variable for return of number of errors
plWarnings
Pointer to variable for return of number of warnings
lpfnAllocAppMem
Pointer to a function with which memory is to be allocated in the calling application
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
Pointer to the compiled action stream. A new action stream is generated even if the compilation
is faulty. The success of the call must be checked based on the number of errors and warnings.
Comment
The compiled action is not available until the next time the runtime starts.
Required files
capigsc.h
gscgr_s.lib
gscgen.dll
See also
GENERATE_COMPILE (Page 1947)
Overview of the functions (Page 1938)
3.4.4.4 GSCGenCompileUserFunctions
Description
The function recompiles all special user functions.
Declaration
BOOL GSCGenCompileUserFunctions (
LPCREATE_USER_HEADER_FILE pGenCUHF,
HWND hWndParent,
LPCMN_ERROR lpdmError)
Parameters
pGenCUHF
Pointer to the CREATE_USER_HEADER_FILE (Page 1946) structure.
hWndParent
Handle to the window in which the status outputs are to be made.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
User functions compiled
FALSE
Error
Comment
For internal reasons this function always returns FALSE without an error message although the
functions are generated.
The compiled user functions are not available until the next time the runtime is started.
Required files
capigsc.h
gscgr_s.lib
gscgen.dll
See also
CREATE_USER_HEADER_FILE (Page 1946)
Overview of the functions (Page 1938)
3.4.5.1 GSCGenGetActionStream
Description
The function determines the action stream for a project function, a standard function or an
action.
Declaration
LPACTION GSCGenGetActionStream(
LPGET_ACTION_STREAM pGenGAS,
AllocAppMem lpfnAllocAppMem,
LPCMN_ERROR lpdmError)
Parameters
pGenGAS
Pointer to structure of the GET_ACTION_STREAM (Page 1947) type with which the function or
action is specified.
lpfnAllocAppMem
Pointer to a function with which memory is to be allocated in the calling application
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
Pointer to the action stream.
Required files
capigsc.h
gscgr_s.lib
gscgen.dll
See also
GET_ACTION_STREAM (Page 1947)
Overview of the functions (Page 1938)
3.4.6.1 APActive
Description
Actions which were deactivated with APInactive can only be reactivated with this function, i.e.
the appropriate triggers are monitored again or can be restarted with APStart.
Declaration
BOOL APActive (
PAP_ACT_KEY lpapActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
lpapActKey
Pointer to a data structure with the following structure:
$3B$&7B.(<
$3B$&7B.(<
$3B$&7B.(<Q
$FWLRQVWUHDP
$FWLRQVWUHDP
$FWLRQVWUHDPQ
dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 1943).
fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Action activated
FALSE
Error.
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
AP_RT_PROC (Page 1953)
AP_ACT_KEY (Page 1943)
APInactive (Page 1969)
APTransact (Page 1974)
Overview of the functions (Page 1938)
3.4.6.2 APEndAct
Description
The action logged on for processing is logged off in the action control.
Declaration
BOOL APEndAct (
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
const PDWORD pdwOrderEnd,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
pdwOrderEnd
Job number of the transaction which is to be ended.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Action logged off
FALSE
Error.
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
AP_RT_PROC (Page 1953)
APTransact (Page 1974)
Overview of the functions (Page 1938)
3.4.6.3 APFreeResultStruct
Description
In synchronous calling of the APStart function the action results are allocated in the form of an
array of structures of the AP_ACT_RESULT_STRUCT type. The memory allocated by APStart must
be freed again with the APFreeResultStruct function.
Declaration
BOOL APFreeResultStruct (
PAP_ACT_RESULT_STRUCT *lpapars,
const DWORD dwItems )
Parameters
lpvPcode
Pointer to the first dwItems structures of theAP_ACT_RESULT_STRUCT (Page 1945) type.
dwItems
Number of structures AP_ACT_RESULT_STRUCT.
Return value
TRUE
Free memory.
FALSE
Error.
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
APStart (Page 1971)
AP_ACT_RESULT_STRUCT (Page 1945)
Overview of the functions (Page 1938)
3.4.6.4 APInactive
Description
Actions which have been logged on with APTransAct can be deactivated with APInactive. The
appropriate triggers are no longer monitored and the actions cannot be started with APStart.
The actions can be reactivated with APActive.
Declaration
BOOL APInactive (
PAP_ACT_KEY lpActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )
Parameters
lpapActKey
Pointer to a data structure with the following structure:
$3B$&7B.(<
$3B$&7B.(<
$3B$&7B.(<Q
$FWLRQVWUHDP
$FWLRQVWUHDP
$FWLRQVWUHDPQ
dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 1943).
fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Action deactivated
FALSE
Error.
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
AP_RT_PROC (Page 1953)
APActive (Page 1965)
AP_ACT_KEY (Page 1943)
APTransact (Page 1974)
Overview of the functions (Page 1938)
3.4.6.5 APStart
Description
The actions are started for processing. Simultaneous processing of several actions is possible.
The actions are described in the AP_ACT_KEY structure.
Declaration
BOOL APStart (
AP_ACT_KEY lpapActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
AP_RT_PROC fpAppResult,
PDWORD pdwOrderId,
PAP_ACT_RESULT_STRUCT *lpapars,
LPCVOID lpUser,
PCMN_ERROR pError )
Parameters
lpapActKey
Pointer to a data structure with the following structure:
$3B$&7B.(<
$3B$&7B.(<
$3B$&7B.(<Q
$FWLRQVWUHDP
$FWLRQVWUHDP
$FWLRQVWUHDPQ
dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 1943).
fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
fAppResult
Your callback function for cyclic action results. The structures of the AP_ACT_RESULT_STRUCT
(Page 1945) type are supplied in the callback function. In synchronous call lpapars is assigned
with the result.
pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the
callback function.
lpapars
Pointer to the action result in synchronous call. An array of structures of the
AP_ACT_RESULT_STRUCT (Page 1945) type is returned according to the number of started
actions. The memory allocated by the function must be freed again with APFreeResultStruct.
In asynchronous use islpapars = NULL
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Action started
FALSE
Error.
Comment
With APStart only actions which were not previously deactivated with APInactive can be started.
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
See also
AP_RT_PROC (Page 1953)
APFreeResultStruct (Page 1968)
AP_ACT_KEY (Page 1943)
AP_ACT_RESULT_STRUCT (Page 1945)
Overview of the functions (Page 1938)
3.4.6.6 APTransact
Application
Declaration
Parameter
xxx
xxx
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.
Return value
TRUE
.
FALSE
Error
Comment
Required files
ap_def.h
apcli_S.lib
apclient.dll
Related functions
Examples
Auto-Hotspot "DM01.cpp"
See also
APConnect (Page 1948)
APDisconnect (Page 1950)
AP_RT_PROC (Page 1953)
APActive (Page 1965)
APEndAct (Page 1967)
APInactive (Page 1969)
AP_ACT_KEY (Page 1943)
Overview of the functions (Page 1938)
3.4.7 Examples
Overview
// =====================================================================
// Filename:.......... ap01.c
// =====================================================================
// : Modul with examples of AP_API
// *********************************************************************
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
// *********************************************************************
#include "stdafx.h"
#include "ap01.h" // if console application
void MyApConnect(void)
{
TCHAR szText[255];
CMN_ERROR Error;
BOOL ret= FALSE;
DWORD dwOrderID = 0;
TCHAR szApp[255];
VOID* pUser = NULL;
_tcsncpy_s(szApp, _countof(szApp), _T("MyODKApp_23"), _TRUNCATE); // must be the same
AppName as by DMConnect
memset(&Error, 0, sizeof(CMN_ERROR));
ret = APConnect(szApp, MyAPRTCallback, &dwOrderID, pUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in APConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
See also
APConnect (Page 1948)
APDisconnect (Page 1950)
AP_RT_PROC (Page 1953)
3.5.1 Basics
Overview
Overview
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
3.5.1.4 Constants
MAX_LOGIN 25
MAX_PASS 25
MAX_LEVEL 70
3.5.2 Structures
3.5.2.1 PWGEN_GROUPINFO
Declaration
typedef struct {
TCHAR name[MAX_LOGIN];
int expiration_time;
}
PWGEN_GROUPINFO;
Members
name
Name of the user group
expiration_time
automatic logout time in minutes
Required files
usegenap.h
API functions
See also
PWGEN_ENUM_GROUPS_CALLBACK (Page 2000)
3.5.2.2 PWGEN_LEVELINFO
Declaration
typedef struct {
int levelNumber;
DWORD dwTextID;
}
PWGEN_LEVELINFO;
Members
levelNumber
Number of the authorization
dwTextID
ID which identifies the description of authorization.
Required files
usegenap.h
API functions
See also
PWGEN_ENUM_LEVELS_CALLBACK (Page 2006)
3.5.2.3 PWGEN_USERINFO
Declaration
typedef struct {
TCHAR login[MAX_LOGIN];
TCHAR group[MAX_LOGIN];
int expiration_time;
}
PWGEN_USERINFO;
Members
login
Logon name of the user
group
Name of the group to which the user belongs
expiration_time
automatic logout time in minutes
Required files
usegenap.h
API functions
See also
PWGEN_ENUM_USERS_CALLBACK (Page 1995)
3.5.3.1 PWGENConnect
Description
The function connects to the database of the currently open project.
Declaration
BOOL PWGENConnect (
LPCTSTR DSNName,
LPCMN_ERROR err)
Parameters
DSNName
DataSource name of the project. The DSNName parameter is not evaluated. An empty string
can be passed but not ZERO. The database of the currently open project is always used.
err
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established
FALSE
Error
Comment
Each application can perform only one Connect. With a repeated Connect, the
PWGEN_API_IS_CONNECTED error message is returned.
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGENDisconnect (Page 1985)
Overview of the functions (Page 1978)
3.5.3.2 PWGENDisconnect
Description
The connection to the database of the currently open project is terminated.
Declaration
BOOL PWGENDisconnect (
LPCMN_ERROR err)
Parameters
err
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection terminated
FALSE
Error
Comment
A PWGENDisconnect before the application is closed, otherwise the internally used
UserAdminASO interfaces will no longer be enabled.
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this may cause the call to freeze and thereby crash the program.
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGENConnect (Page 1983)
Overview of the functions (Page 1978)
3.5.4.1 PWGENAddUser
Description
The function creates a new user, including an empty user authorization matrix. You can use the
PWGENAddUserEx function to transfer the authorizations of the group to the users to be created.
Declaration
BOOL PWGENAddUser (
LPCTSTR username,
LPCTSTR password,
LPCTSTR group,
int expiration_time,
LPCMN_ERROR error )
Parameters
username
Login name of the user
password
Password of the user
group
Group to which the user should be added
expiration_time
Automatic logout time in minutes. If the selected expiration_time is outside the permitted
range, it is set to 0.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Users created
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGENAddUserEx (Page 1988)
Overview of the functions (Page 1978)
3.5.4.2 PWGENAddUserEx
Description
The function creates a new user. Depending on the copy_group_protection parameter, you can
transfer the authorizations of the group to the users to be created.
Declaration
BOOL PWGENAddUserEx (
LPCTSTR username,
LPCTSTR password,
LPCTSTR group,
int expiration_time,
BOOL copy_group_permissions,
LPCMN_ERROR error )
Parameters
username
Login name of the user
password
Password of the user
group
Group to which the user should be added
expiration_time
Automatic logout time in minutes. If the selected expiration_time is outside the permitted
range, it is set to 0.
copy_group_permissions
If copy_group_permission = TRUE, the user authorizations of the group to the newly created
user will be transferred.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Users created
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGENAddUser (Page 1986)
Overview of the functions (Page 1978)
3.5.4.3 PWGENChangePassword
Description
This function can be used to change the password of the user specified by the user name.
Declaration
BOOL PWGENChangePassword (
LPCTSTR username,
LPCTSTR oldpassword,
LPCTSTR newpassword,
LPCMN_ERROR error )
Parameters
username
Login name of the user
oldpassword
Old password of the user
newpassword
New password of the user
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Password changed
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.4.4 PWGENCheckUser
Description
This checks whether the specified user exists in the current WinCC project and whether the given
password is correct.
Declaration
BOOL PWGENCheckUser (
LPCTSTR username,
LPCTSTR password,
LPCMN_ERROR error )
Parameters
username
Name of the user.
password
The password that belongs to the specified user.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
User exists and the password is correct.
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.4.5 PWGENDeleteUser
Description
The specified user or user group is deleted, including the authorization data.
Declaration
BOOL PWGENDeleteUser (
LPCTSTR username,
BOOL is_user,
LPCMN_ERROR error )
Parameters
username
Number of the user to be
deleted.
is_user
The is_user parameter is used to distinguish whether a user or a user group is to be deleted.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
User or user groups deleted
FALSE
Error
Comment
If you attempt to delete the administrator, the function returns the PWGEN_API_EXIST_USER
error.
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.4.6 PWGENEnumUsers
Description
The function reads the configured users, calls the callback function for each user and returns the
number of users in dwCount.
Declaration
BOOL PWGENEnumUsers (
LPDWORD dwCount,
PWGEN_ENUM_USERS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )
Parameters
dwCount
Pointer to the location where the number of users should be stored.
cfn
Your callback function that receives the information. If cfn == NULL, only users are counted.
userdata
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Users listed
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGEN_ENUM_USERS_CALLBACK (Page 1995)
Overview of the functions (Page 1978)
3.5.4.7 PWGEN_ENUM_USERS_CALLBACK
Description
In order to evaluate the user information listed by the system, you must provide a
PWGEN_ENUM_USERS_CALLBACK type callback function.
Declaration
BOOL ( * PWGEN_ENUM_USERS_CALLBACK) (
LPWGEN_USERINFO lpUserInfo,
PVOID lpUser);
Parameters
lpUserInfo
Pointer to a PWGEN_USERINFO (Page 1983) type structure with the data of a user.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
Users listed
FALSE
Error
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
usegenap.h
Related functions
See also
PWGENEnumUsers (Page 1994)
PWGEN_USERINFO (Page 1983)
Overview of the functions (Page 1978)
3.5.5.1 PWGENAddGroup
Description
The function creates a new user group, including an empty user authorization matrix.
Declaration
BOOL PWGENAddGroup (
LPCTSTR username,
int expiration_time,
LPCMN_ERROR error )
Parameters
username
Name of the group to be created
expiration_time
Automatic logout time. If the selected expiration_time is outside the permitted range, it is set
to 0.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
User group created
FALSE
User group already exists
Comment
Use the PWGENDeleteUser function to delete an existing user group.
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGENDeleteUser (Page 1992)
Overview of the functions (Page 1978)
3.5.5.2 PWGENEnumGroups
Description
The function reads the configured user groups, calls the callback function for each group and
returns the number of groups in dwCount.
Declaration
BOOL PWGENEnumGroups (
LPDWORD dwCount,
PWGEN_ENUM_GROUPS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )
Parameters
dwCount
Pointer to the location where the number of user groups should be stored.
cfn
Your callback function that receives the information. If cfn == NULL, only user groups are
counted.
userdata
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
User groups listed
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGEN_ENUM_GROUPS_CALLBACK (Page 2000)
Overview of the functions (Page 1978)
3.5.5.3 PWGEN_ENUM_GROUPS_CALLBACK
Description
In order to evaluate the information of user groups listed by the system, you must provide a
PWGEN_ENUM_GROUPS_CALLBACK type callback function.
Declaration
BOOL ( * PWGEN_ENUM_GROUPS_CALLBACK) (
LPWGEN_GROUPINFO lpGroupInfo,
PVOID lpUser);
Parameters
lpUserInfo
Pointer to a PWGEN_GROUPINFO (Page 1981) type structure with the data of a user group.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
User groups listed
FALSE
Error
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
usegenap.h
Related functions
See also
PWGENEnumGroups (Page 1998)
PWGEN_GROUPINFO (Page 1981)
Overview of the functions (Page 1978)
3.5.6.1 PWGENAddPermLevel
Description
Creates a new authorization for all users.
Declaration
BOOL PWGENAddPermLevel (
DWORD txtID,
int number,
LPCMN_ERROR error )
Parameters
txtID
Text ID of the text for the authorization.
number
Number of the authorization to be created
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Authorization level created
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.6.2 PWGENCheckPermission
Description
The function checks whether the user has the operator authorizations for the specified
authorization level.
Declaration
BOOL PWGENCheckPermission(
LPCTSTR username,
DWORD permlevel,
LPCMN_ERROR error)
Parameters
username
Name of the user
permlevel
Number of the authorization to be checked
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The operator authorization for the authorization level of the user is available.
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.6.3 PWGENDeletePermLevel
Description
Deletes the authorization level specified by levelNumber from the user authorization matrix.
Declaration
BOOL PWGENDeletePermLevel (
int levelNumber,
LPCMN_ERROR error )
Parameters
levelNumber
Number of the authorization to be deleted
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Authorization level deleted
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.6.4 PWGENEnumPermLevels
Description
The function reads the configured authorization levels, calls the callback function for each level
and returns the number of authorization levels in dwCount.
Declaration
BOOL PWGENEnumPermLevels (
LPDWORD dwCount,
PWGEN_ENUM_LEVELS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )
Parameters
dwCount
Pointer to the location where the number of authorization levels should be stored.
cfn
Your callback function that receives the information. If cfn == NULL, only authorizations are
counted.
userdata
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Authorization levels listed
FALSE
Error
Error messages
Required files
usegenap.h
usegen.lib
usegen.dll
Related functions
See also
PWGEN_ENUM_LEVELS_CALLBACK (Page 2006)
Overview of the functions (Page 1978)
3.5.6.5 PWGEN_ENUM_LEVELS_CALLBACK
Description
In order to evaluate the authorization levels listed by the system, you must provide a
PWGEN_ENUM_LEVELS_CALLBACK type callback function.
Declaration
BOOL ( * PWGEN_ENUM_LEVELS_CALLBACK) (
LPWGEN_LEVELINFO lpLevelInfo,
PVOID lpUser);
Parameters
lpLevelInfo
Pointer to a PWGEN_LEVELINFO (Page 1982) type structure with the data of the authorization
level.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
Authorization levels listed
FALSE
Error
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
usegenap.h
Related functions
See also
PWGENEnumPermLevels (Page 2005)
PWGEN_LEVELINFO (Page 1982)
Overview of the functions (Page 1978)
3.5.6.6 PWGENReadUserPerm
Description
You can use this function to determine the area for which a user has operator authorizations on
a certain authorization level.
Declaration
BOOL PWGENReadUserPerm(
LPCTSTR username,
BOOL is_user,
int levelnumber,
LPBYTE freigabe,
LPDWORD areaperms )
Parameters
username
Name of the user or user group
is_user
is_user indicates whether username refers to a user or a user group.
TRUE User
FALSE User group
levelnumber
Number of the authorization to be read
freigabe
If freigabe = 1, the user has operator authorization for all areas on this authorization level.
areaperms
The areas are characterized with the 32 bits of areaperm. If a user has authorization for an
area, the corresponding bit is set. The least significant bit corresponds to to the first area.
Return value
TRUE
Operator authorizations determined
FALSE
Error
Required files
usegenap.h
usegen.lib
usegen.dll
See also
Overview of the functions (Page 1978)
3.5.6.7 PWRTCheckPermission
Description
Checks whether the logged-on user has operator authorization for the given authorization.
Declaration
BOOL PWRTCheckPermission (
DWORD permlevel,
DWORD suppress_messagebox )
Parameters
permlevel
Number of the authorization level to be checked
suppress_messagebox
No dialog is displayed with suppress_messagebox != 0.
Return value
TRUE
Authorization granted
FALSE
Authorization not granted
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Examples
PWRT check permission (Page 2024) "PWRTBunch.cpp"
See also
PWRT check permission (Page 2024)
Overview of the functions (Page 1978)
3.5.6.8 PWRTCheckPermissionOnPicture
Description
Checks whether the logged-on user has operator authorization for the given authorization.
Declaration
BOOL PWRTCheckPermissionOnPicture (
DWORD permlevel,
LPCTSTR picture_name,
DWORD suppress_messagebox,
LPCMN_ERROR lperr )
Parameters
permlevel
Number of the authorization to be checked.
picture_name
Name of the screen that contains the object to be tested.
suppress_messagebox
No dialog is displayed with suppress_messagebox != 0.
lperr
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Authorization granted
FALSE
Authorization not granted
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Examples
Checks admission of a certain level for a screen (Page 2025) "PWRTBunch.cpp"
See also
Checks admission of a certain level for a screen (Page 2025)
Overview of the functions (Page 1978)
3.5.6.9 PWRTPermissionLevelDialog
Description
You should open the dialog for selecting authorizations using the
PWRTPermisssionLevelDialogEx function, because then a redraw is performed when you move
the dialog window.
Declaration
LONG PWRTPermissionLevelDialog (
)
Parameters
None
Related functions
Examples
Authorization level query through a dialog with specifying a possible error (Page 2027)
"PWRTBunch.cpp"
See also
Authorization level query through a dialog with specifying a possible error (Page 2027)
PWRTPermissionLevelDialogEx (Page 2012)
PWRTPermissionToString (Page 2013)
Overview of the functions (Page 1978)
3.5.6.10 PWRTPermissionLevelDialogEx
Description
Protecting the usability of objects made in WinCC through dialogue to select a rating.
PWRTPermissionLevelDialogEx displays a corresponding dialog that offers the available
authorizations for selection.
Declaration
LONG PWRTPermissionLevelDialogEx (
HWND hParentWnd,
CMN_ERROR *lpErr)
Parameters
hParentWnd
Handle to the parent of the dialog box.
lpErr
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
0-999 Authorization level
-1: Dialog closed with Cancel.
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Example
Authorization level query through a dialog with specifying a possible error (Page 2027)
"PWRTBunch.cpp"
See also
PWRTPermissionLevelDialog (Page 2011)
Authorization level query through a dialog with specifying a possible error (Page 2027)
Overview of the functions (Page 1978)
3.5.6.11 PWRTPermissionToString
Description
Determines the description associated with an authorization level.
Declaration
BOOL PWRTPermissionToString (
LONG perm,
LPTSTR string,
int bufsize)
Parameters
perm
Authorization level whose description is to be determined.
string
Pointer to the buffer for recording the description.
bufsize
Size of the buffer
Return value
TRUE
Description successfully transferred.
FALSE
Description could not be determined.
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
Gets a string associated with the permission number (Page 2026). "PWRTBunch.cpp"
See also
PWRTPermissionLevelDialog (Page 2011)
Gets a string associated with the permission number (Page 2026)
Overview of the functions (Page 1978)
3.5.7.1 PWRTGetCurrentUser
Description
Determines the user name of the current logged-on user.
Declaration
BOOL PWRTGetCurrentUser (
LPTSTR dest,
int bufsize )
Parameters
dest
Data buffer for receiving the user name
bufsize
Size of the data buffer in bytes
Return value
TRUE
User name successfully transferred
FALSE
No user is logged on
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Examples
Return the name of the current user (Page 2028) "PWRTBunch.cpp"
See also
Return the name of the current user (Page 2028)
Overview of the functions (Page 1978)
3.5.7.2 PWRTGetLoginPriority
Description
Logon check without dialog.
Declaration
LONG PWRTGetLoginPriority (
)
Parameters
None
Return value
Priority level:
LOGIN_STANDARD (value: 0)
LOGIN_CARD (value: 1)
LOGIN_KEYSWITCH (value: 2)
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Examples
Queries the current logon priority (Page 2029) "PWRTBunch.cpp"
See also
Queries the current logon priority (Page 2029)
Overview of the functions (Page 1978)
3.5.7.3 PWRTIsLoggedInByCard
Description
Determines whether the user is logged on via smart card.
Declaration
BOOL PWRTIsLoggedInByCard (
)
Parameters
None
Return value
TRUE
User logged on with smart card
FALSE
Users not logged on with smart card or not logged on
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Examples
Checks if the user has been logged on by card (Page 2029) "PWRTBunch.cpp"
See also
Checks if the user has been logged on by card (Page 2029)
Overview of the functions (Page 1978)
3.5.7.4 PWRTLogin
Description
Displays the logon dialog and loads the user data into the shared memory when logon is
successful.
Declaration
BOOL PWRTLogin (
TCHAR monitor )
Parameters
monitor
Monitor on which the dialog is shown. The value is not numeric; it is specified in TCHAR
format, i.e. '1' for Monitor 1.
Return value
TRUE
Dialog open. The function does not wait for the dialog to close.
FALSE
Dialog not open
Comment
In addition to manually entering the logon data, you can also log on with a smart card. The card
reader is connected directly to the OS. If no valid card is connected when the function is
executed, the logon dialog automatically disappears.
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
PWRT login - dialog provided by WinCC itself (Page 2031) "PWRTBunch.cpp"
See also
PWRTSilentLogin (Page 2021)
PWRT login - dialog provided by WinCC itself (Page 2031)
PWRTSilentLoginEx (Page 2022)
Overview of the functions (Page 1978)
3.5.7.5 PWRTLogout
Description
The function causes a flag to be set at logoff in the shared memory.
Declaration
BOOL PWRTLogout (
)
Parameters
None
Return value
TRUE
Logoff successfully passed to PassDBRT.
FALSE
Logoff rejected (for example, PassDBRT not available, ServiceMode, etc.).
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
PWRT logoff (Page 2032) "PWRTBunch.cpp"
See also
PWRT logoff (Page 2032)
PWRTLogoutEx (Page 2020)
Overview of the functions (Page 1978)
3.5.7.6 PWRTLogoutEx
Description
The function causes a flag to be set at logoff in the shared memory, unless the specified priority
level is too low.
Declaration
BOOL PWRTLogoutEx (
int nLevel
)
Parameters
nLevel
Priority level of the user.
Return value
TRUE
Logoff successfully passed to PassDBRT.
FALSE
Logoff rejected (for example, PassDBRT not available, ServiceMode, etc.).
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
Silent logoff with priority level (Page 2033) "PWRTBunch.cpp"
See also
Silent logoff with priority level (Page 2033)
PWRTLogout (Page 2019)
Overview of the functions (Page 1978)
3.5.7.7 PWRTSilentLogin
Description
In contrast to PWRTLogin, logon is not performed in a dialog. The data for the user, user name
and password are passed directly to the function.
Declaration
BOOL PWRTSilentLogin (
LPCTSTR login,
LPCTSTR password )
Parameters
login
Name of the user.
password
Password of the user
Return value
TRUE
Login successful
FALSE
Login rejected
Comment
If no valid smart card is connected when the function is executed, the login is rejected.
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
Logon without using a dialog (Page 2034) "PWRTBunch.cpp"
See also
PWRTLogin (Page 2017)
PWRTSilentLoginEx (Page 2022)
Logon without using a dialog (Page 2034)
Overview of the functions (Page 1978)
3.5.7.8 PWRTSilentLoginEx
Description
In contrast to PWRTLogin, logon is not performed in a dialog. The data for the user (user name,
password and priority level) are passed directly to the function.
Declaration
BOOL PWRTSilentLoginEx (
LPCTSTR login,
LPCTSTR password,
int nLevel)
Parameters
login
Name of the user.
password
Password of the user
nLevel
Priority level of the user
Return value
TRUE
Login successful
FALSE
Login rejected
Comment
If no valid smart card is connected when the function is executed, the login is rejected.
Required files
pwrt_api.h
pass_s.lib
useadmin.dll
Related functions
Examples
Silent logon with priority level (Page 2035) "PWRTBunch.cpp"
See also
PWRTSilentLogin (Page 2021)
Silent logon with priority level (Page 2035)
PWRTLogin (Page 2017)
Overview of the functions (Page 1978)
3.5.8 Examples
Example
//{{ODK_EXAMPLE}(END)}
See also
PWRTCheckPermission (Page 2009)
Example
See also
PWRTCheckPermissionOnPicture (Page 2010)
Overview
See also
PWRTPermissionToString (Page 2013)
3.5.8.4 Authorization level query through a dialog with specifying a possible error
Example
See also
PWRTPermissionLevelDialog (Page 2011)
PWRTPermissionLevelDialogEx (Page 2012)
Example
See also
PWRTGetCurrentUser (Page 2014)
Example
See also
PWRTGetLoginPriority (Page 2015)
Overview
See also
PWRTIsLoggedInByCard (Page 2016)
Example
See also
PWRTLogin (Page 2017)
Example
See also
PWRTLogout (Page 2019)
Example
See also
PWRTLogoutEx (Page 2020)
Example
See also
PWRTSilentLogin (Page 2021)
Example
See also
PWRTSilentLoginEx (Page 2022)
3.6.1 Basics
Declaration
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
Text Library RT
LANG_ARABIC 0x0401
LANG_AFRIKAANS 0x0436
LANG_ALBANIAN 0x041C
LANG_BASQUE 0x042D
LANG_BULGARIAN 0x0402
LANG_BELARUSIAN 0x0423
LANG_CATALAN 0x0403
LANG_CHINESE 0x0804
LANG_CROATIAN 0x041A
LANG_CZECH 0x0405
LANG_DANISH 0x0406
LANG_DUTCH 0x0413
LANG_ENGLISH 0x0409
LANG_ESTONIAN 0x0425
LANG_FAEROESE 0x0438
LANG_FARSI 0x0429
LANG_FINNISH 0x040B
LANG_FRENCH 0x040C
LANG_GERMAN 0x0407
LANG_GREEK 0x0408
LANG_HEBREW 0x040D
LANG_HUNGARIAN 0x040E
LANG_ICELANDIC 0x040F
LANG_INDONESIAN 0x0421
LANG_ITALIAN 0x0410
LANG_JAPANESE 0x0411
LANG_KOREAN 0x0412
LANG_LATVIAN 0x0426
LANG_LITHUANIAN 0x0427
LANG_NORWEGIAN 0x0414
LANG_POLISH 0x0415
LANG_PORTUGUESE 0x0416
LANG_ROMANIAN 0x0418
LANG_RUSSIAN 0x0419
LANG_SLOVAK 0x041B
LANG_SLOVENIAN 0x0424
LANG_SPANISH 0x040A
LANG_SWEDISH 0x041D
LANG_THAI 0x041E
LANG_TURKISH 0x041F
LANG_UKRAINIAN 0x0422
Here, the upper 4 bytes (0x04..) designate the language as SUBLANG_DEFAULT language
3.6.2.1 TXTCloseProject
Description
Closes the project database upon successful execution.
Declaration
BOOL TXTCloseProject (
LPCTSTR lpszProjectFile,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Text library closed.
FALSE
Error
Comment
The TXTOpenProject function increments an internal reference counter with each call. This
counter is decremented with call of TXTCloseProject. The text library is closed only when the
reference counter returns to 0.
Therefore, the same number of TXTCloseProject must always be called, otherwise an
exception error will occur when the application closes.
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the program.
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
Related functions
Examples
Get infotext (Page 2063) "TX01.cpp"
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXTOpenProject (Page 2042)
Get infotext (Page 2063)
3.6.2.2 TXTGetMaxTextID
Description
Records the highest text ID that is kept in the DLL.
Declaration
BOOL TXTGetMaxTextID (
LPLONG lplMaxTextID,
LPCMN_ERROR lpdmError );
Parameters
lplMaxTextID
Pointer to the buffer in which the text ID should be stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Maximum text ID determined
FALSE
Error
Required files
text_cs.h
text_cs.lib
text_cs.dll
See also
Overview of the functions (Page 2036)
3.6.2.3 TXTOpenProject
Description
Opens the database upon successful execution.
Declaration
BOOL TXTOpenProject (
LPCTSTR lpszProjectFile,
LPCTSTR lpszDSNName,
BOOL fExclusive,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
lpszDSNName
Pointer on the name of the data source.
fExclusive
If TRUE, TEXTBIB.EXE cannot be started, because another program is accessing the text
library, for example. If TEXTBIB.EXE has already started, the call is rejected.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Database open
FALSE
Error
Comment
If no text library tables are available, they are generated new.
Each time the function called a reference counter is incremented. The same number as
TXTCloseProject must be present to close. Otherwise, an exception error can occur when the
application closes.
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
Related functions
Examples
Get infotext (Page 2063) "TX01.cpp"
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXTCloseProject (Page 2039)
Get infotext (Page 2063)
Enumerate infotexts (Page 2065)
Overview of the functions (Page 2036)
3.6.2.4 TXTRTConnect
Description
Establishes a connection to the text server. This function accelerates the execution of TXTRT
functions. The connection to the text server is then not made for each call and closed again at
the end.
Declaration
BOOL TXTRTConnect ( );
Parameters
None
Return value
TRUE
Connects to the text server established
FALSE
Error
Comment
Before closing the application, the connection must always be closed with TXTRTDisconnect to
avoid subsequent malfunction in the system.
Required files
text_rt.h
text_rt.lib
text_rt.dll
Related functions
See also
TXTRTDisconnect (Page 2044)
Overview of the functions (Page 2036)
3.6.2.5 TXTRTDisconnect
Description
Closes a connection to the text server that was made with TXTRTConnect.
Declaration
BOOL TXTRTDisconnect ( );
Parameters
None
Return value
TRUE
Connects to the text server established
Comment
This function stops the acceleration provided by the TXTRT functions and always returns TRUE.
Subsequently called TXTRT functions then establish a new connection to the text server for
each call and then close it.
If TXTRTConnect is used and no TXTRTDisconnect is executed before closing the application,
a malfunction may subsequently occur in the system.
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the program.
Required files
text_rt.h
text_rt.lib
text_rt.dll
Related functions
See also
TXTRTConnect (Page 2043)
Overview of the functions (Page 2036)
3.6.3.1 TXTEnumInfoText
Description
Lists all infotext that meets the filter criterion in lpszFilter.
Declaration
BOOL TXTEnumInfoText (
LPCTSTR lpszProjectFile,
DWORD dwLocale,
LPDWORD lpdwItems,
LPCTSTR lpszFilter,
TXT_ENUM_INFOTEXTS_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
dwLocale
Language code of the language, the infotext of which should be enumerated.
lpdwItems
Pointer to a double word of the application, which contains the number of enumerated
infotexts after the call.
lpszFilter
Pointer to the condition of an SQL statement for the LIKE operator.
lpfnEnum
Your callback function that receives the infotext.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Infotext listed
FALSE
Error
Comment
If lpszFilter == NULL or an empty string is passed, all infotexts of the language are enumerated.
Empty, unassigned info texts can also be enumerated and included using lpdwItems.
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
Related functions
Examples
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXT_ENUM_INFOTEXTS_PROC (Page 2048)
Enumerate infotexts (Page 2065)
Overview of the functions (Page 2036)
3.6.3.2 TXT_ENUM_INFOTEXTS_PROC
Description
In order to evaluate the listed tool tips, you must provide a TXT_ENUM_INFOTEXTS_PROC type
callback function.
Declaration
BOOL ( * TXT_ENUM_INFOTEXTS_PROC) (
DWORD dwTextID,
LPCTSTR lpszInfoText,
LPVOID lpvUser );
Parameters
dwTextID
ID of the text to which lpszInfotext refers.
lpszInfoText
Pointer to the tool tip that was transferred by the calling function.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued
FALSE
The enumeration is cancelled
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
text_cs.h
text_cs.lib
text_cs.dll
Related functions
Examples
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXTEnumInfoText (Page 2046)
Enumerate infotexts (Page 2065)
Overview of the functions (Page 2036)
3.6.3.3 TXTUpdateRuntime
Description
The text from the text library are reloaded in runtime.
Declaration
BOOL TXTUpdateRuntime (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
hwndParent
Handle to the parent window
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Infotext updated
Comment
No update is performed for text reference tags. The function always returns TRUE.
Required files
text_cs.h
text_cs.lib
text_cs.dll
See also
Overview of the functions (Page 2036)
3.6.3.4 TXTRTGetInfoText
Description
Upon successful execution, this function fills the buffer passed to lpszBuffer with the text
described by dwTextID. If the passed buffer is smaller than the text length (buffer length in
characters in pdwSize), the text is accordingly truncated. The return value is still TRUE. If NULL
is passed in lpszBuffer, the function determines the required buffer size and stores it in pdwSize.
Declaration
BOOL TXTRTGetInfoText (
DWORD dwTextID,
LPTSTR lpszBuffer,
LPDWORD pdwSize,
LPCMN_ERROR lpdmError );
Parameters
dwTextID
ID of the text to be read
lpszBuffer
Pointer to a buffer in which the infotext should be stored.
pdwSize
Pointer to the DWORD, which contains the buffer size
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Infotext determined
FALSE
Error
Comment
Error messages
Required files
text_rt.h
text_rt.lib
text_rt.dll
Related functions
Examples
Get infotext (Page 2063) "TX01.cpp"
See also
Get infotext (Page 2063)
Overview of the functions (Page 2036)
3.6.3.5 TXTRTGetInfoTextMC
Description
Fetches a text, for example, a tooltip from the specified text server or from the C text list. Upon
successful execution, this function fills the buffer passed to lpszBuffer with the text described by
dwTextID. If the passed buffer is smaller than the text length (buffer length in characters in
pdwSize), the text is accordingly truncated. The return value is still TRUE. If NULL is passed in
lpszBuffer, the function determines the required buffer size and stores it in pdwSize.
Declaration
BOOL TXTRTGetInfoTextMC (
DWORD dwTextID,
LPTSTR lpszBuffer,
LPDWORD pdwSize,
LPTSTR lpszServer,
LPCMN_ERROR lpdmError );
Parameters
dwTextID
ID of the text to be read
lpszBuffer
Pointer to a buffer in which the infotext should be stored.
pdwSize
Pointer to the DWORD, which contains the buffer size
lpszServer
Pointer to the symbolic name of the text server (without server delimiter :: )
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Infotext determined
FALSE
Error
Comment
This function only works with multiclient projects
Error messages
Required files
text_rt.h
text_rt.lib
text_rt.dll
Related functions
See also
Overview of the functions (Page 2036)
3.6.4.1 TXTEnumLanguages
Description
Calls the passed callback function for all configured languages.
Declaration
BOOL TXTEnumLanguages (
LPCTSTR lpszProjectFile,
LPDWORD lpdwItems,
TXT_ENUM_LANGUAGES_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
lpdwItems
Pointer to a double word of the application, which contains the number of enumerated
languages after the call.
lpfnEnum
Your callback function that receives the configured languages.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Configured languages listed
FALSE
Error
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
Related functions
Examples
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXT_ENUM_LANGUAGES_PROC (Page 2055)
Enumerate infotexts (Page 2065)
Overview of the functions (Page 2036)
3.6.4.2 TXT_ENUM_LANGUAGES_PROC
Description
In order to evaluate the listed languages, you must provide a TXT_ENUM_LANGUAGES_PROC
type callback function.
Declaration
BOOL ( * TXT_ENUM_LANGUAGES_PROC) (
DWORD dwLocaleID,
LPCTSTR lpszName,
LPVOID lpvUser );
Parameters
dwLocaleID
Language code
lpszName
Pointer to the name of the language.
lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
text_cs.h
Related functions
Examples
Enumerate infotexts (Page 2065) "TX01.cpp"
See also
TXTEnumLanguages (Page 2054)
Enumerate infotexts (Page 2065)
Overview of the functions (Page 2036)
3.6.4.3 TXTGetFont
Description
Upon successful execution, fills the LOGFONT structure passed in lplf with the font set for the
desired language.
Declaration
BOOL TXTGetFont (
LPCTSTR lpszProjectFile,
DWORD dwLocale,
LPLOGFONT lplf,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
dwLocale
Language code of the language, the font of which should be fetched
lplf
Pointer to a Windows-specific LOGFONT type structure with information about a character set.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Character set determined
FALSE
Error
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
See also
Overview of the functions (Page 2036)
3.6.4.4 TXTShowLanguagesDialog
Description
Opens a dialog with the available languages. If the dialog is closed with "OK", the selected
language is stored in lpdwLocale. In addition, the corresponding font is passed in the LOGFONT
structure.
Declaration
BOOL TXTShowLanguagesDialog (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDWORD lpdwLocale,
LPLOGFONT lplf,
LPCMN_ERROR lpdmError );
Parameters
lpszProjectFile
Pointer to the name of the project file including path and extension.
hwndParent
Handle to the parent window of the dialog box. The parameter is set to NULL by default.
dwLocale
Pointer to the code of the language to be installed.
lplf
Pointer to a Windows-specific LOGFONT type structure with information about a character set.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Language selected
FALSE
Error or close dialog with "Cancel"
Comment
In order to offer the installed languages in the dialog box, the languages in the database are
enumerated by the function. If an error occurs, the TXT_CALLBACK error message is stored in the
error structure.
Error messages
Required files
text_cs.h
text_cs.lib
text_cs.dll
See also
Overview of the functions (Page 2036)
3.6.4.5 TXTRTGetLanguageID
Description
Upon successful executions, fills the buffer passed in lpchLanguageID with the primary language
ID loaded in the memory mapped file.
Declaration
BOOL TXTRTGetLanguageID (
LPBYTE lpchLanguageID,
LPCMN_ERROR lpdmError );
Parameters
lpchLanguageID
Pointer to a buffer, in which the primary language ID should be stored.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Activated language determined
FALSE
Error
Error messages
Required files
text_rt.h
text_rt.lib
text_rt.dll
See also
Overview of the functions (Page 2036)
3.6.4.6 TXTRTSetLanguage
Description
Sets the language for error messages. If the language is not available, the default language
(German) is set and FALSE is returned.
This function is no longer supported and always returns the value, TRUE.
Declaration
BOOL TXTRTSetLanguage (
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );
Parameters
dwLocaleID
Language code of the language to be set.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Language of error messages switched
Required files
text_rt.h
text_rt.lib
text_rt.dll
See also
Overview of the functions (Page 2036)
3.6.5 Examples
Example
ODKTrace(szText);
}
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
TXTCloseProject (Page 2039)
TXTOpenProject (Page 2042)
TXTRTGetInfoText (Page 2050)
Example
void MyTxtEnums(void)
{
TCHAR szText[255];
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwLocale = 0x0407; // german
DWORD dwItems = 0;
DWORD dwUser = 0;
TCHAR szFilter[]="S%"; // all texts with 'S'
//DWORD dwSize =254;
ret = MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile and
g_szDSNName
if(TRUE == ret)
{
memset(&Error, 0, sizeof(CMN_ERROR));
See also
TXTCloseProject (Page 2039)
TXTOpenProject (Page 2042)
TXTEnumInfoText (Page 2046)
TXT_ENUM_INFOTEXTS_PROC (Page 2048)
TXT_ENUM_LANGUAGES_PROC (Page 2055)
TXTEnumLanguages (Page 2054)
3.7.1 Basics
Overview
RPJProjectLock (Page 2085) Lock access to the print job list in the project
RPJProjectUnlockAll (Page 2088) Remove all print job list locks in the project
RPJProjectUnlock (Page 2087) Remove a print job list lock in the project
RPJPropertyClear (Page 2112) Delete handle of a print job property
RPJSetProperty (Page 2113) Specify print job properties
3.7.1.2 Constants
• PrintMarginRight
• PrintMarginTop
• PrintMarginBottom
Styles
• BorderStyle
• BorderWidth
• FillStyle
Colors
• BorderBackColor
• BorderColor
• BackColor
• FillColor
• ForeColor
Characters
• FontName
• FontSize
• FontBold
• FontItalic
• FontUnderline
• Text
• AlignmentLeft
• AlignmentTop
• WordWrap
Miscellaneous
• FirstPage
• LastPage
• MetaFileName
• LayoutFileName
• Format
• List
• Tag
• DataType
• OutFormat
• Calculation
• PageBreak
AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you to end the printout of
the report at a particular page.
JobName The name of the print job must be unique within a
project and conform to the Windows conventions.
LayoutName You can assign the print job a layout using the
layout name.
PrinterName 1 Here, you specify the printer to which the printout
is initially sent.
PrinterName 2 Here, you specify the printer to be used if the first
printer is not available.
PrinterName 3 Here, you specify the printer to be used if the first
two printers are not available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you to start the printout
of the report at a particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
Error messages of CS
ERR_NOERROR 0 No error
ERR_ILLEGALPROJECT 1 Invalid project name/project path
ERR_NOMEMORY 2 Memory error
ERR_UNKNOWNERROR 3 Unknown error
ERR_THREADNOTINITIALIZED 4 The utilized thread is not initialized.
ERR_OLEEXCEPTION 5 Error in conjunction with the MFC and OLE
ERR_NOOLESERVERAVAIL 6 No OLE-Server available
Error messages of RT
ERR_NOERROR 0 No error
ERR_ILLEGALPROJECT 1 Invalid project name/project path
ERR_NOMEMORY 2 Memory error
ERR_UNKNOWNERROR 3 Unknown error
ERR_NULLHANDLE 4 Handle could not be created.
ERR_ILLEGALPOINTER 5 Pointer is incorrect or invalid
ERR_ILLEGALJOBINDEX 6 Print job index is incorrect
ERR_UNKNOWNPROPERTY 7 Print job property is unknown
ERR_UNKNOWNMETHOD 8 Print job method is unknown
Note
The property names along with a basic description can also be obtained via the context-sensitive
help. To access this, right-click inside the properties box for the relevant object in the Report
Designer.
"BorderWidth" VT_I4
"BorderBackColor" VT_I4
"BorderColor" VT_I4
"Left" VT_I4
"Top" VT_I4
"FillStyle" VT_I4
"BackColor" VT_I4
"FillColor" VT_I4
"DataLink" VT_BSTR
"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"Columns" VT_BSTR
"ForeColor" VT_I4
"List" VT_I4
"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4
"ForeColor" VT_I4
"DynHeight" VT_I4
"Radius" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4
"RadiusWidth" VT_I4
"RadiusHeight" VT_I4
"Radius" VT_I4
"RadiusWidth" VT_I4
"RadiusHeight" VT_I4
"Polyline" VT_BSTR
"PointCount" VT_I4
"Index" VT_I4
"ActualPointLeft" VT_I4
"ActualPointTop" VT_I4
"Radius" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4
"RadiusWidth" VT_I4
"RadiusHeight" VT_I4
"Polyline" VT_BSTR
"PointCount" VT_I4
"Index" VT_I4
"ActualPointLeft" VT_I4
"ActualPointTop" VT_I4
"RoundCornerWidth" VT_I4
"RoundCornerHeight" VT_I4
"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"Text" VT_BSTR
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4
"ForeColor" VT_I4
"LayoutFileName" VT_BSTR
"PrintMarginLeft" VT_I4
"PrintMarginRight" VT_I4
"PrintMarginTop" VT_I4
"PrintMarginBottom" VT_I4
"PaperSize" VT_BSTR
"FirstPage" VT_I4
"LastPage" VT_I4
"Orientation" VT_I4
"Printer1" VT_BSTR
"Printer2" VT_BSTR
"Printer3" VT_BSTR
"BackColor" VT_I4
"BorderColor" VT_I4
"FillColor" VT_I4
"DynMarginLeft" VT_I4
"DynMarginRight" VT_I4
"DynMarginTop" VT_I4
"DynMarginBottom" VT_I4
"Context" VT_BSTR
"MetaFileName" VT_BSTR
"Tag" VT_BSTR
"FontSize" VT_I4
"FontName" VT_BSTR
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4
"ForeColor" VT_I4
"OutFormat" VT_BSTR
"DataType" VT_I4
"Calculation" VT_VARIANT
3.7.1.5 General procedure for processing print job properties (Report Designer)
Deleting a handle
A print job property handle is deleted. Delete each handle created with RPJCreatePropertyHandle
when it is no longer needed.
Function: RPJDeletePropertyHandle.
General
To process the properties of a print job, a print job handle must be provided. This handle is
used to identify a memory area through which the print job properties can be addressed.
Deleting a handle
A print job property handle is deleted. Each handle created with RPJCreatePropertyHandle
should be deleted when it is no longer needed.
Function: RPJDeletePropertyHandle.
Example
void PrintJob(void)
{
CMN_ERROR err; //error structure
BOOL ret;
HPROPERTIES hProp;
char jobname[200];
char method[200];
LPCSTR szProjectName = "c:\\rest\\test.mcp"; //name of project
strcpy(method, "PREVIEW");
strcpy(jobname, "Backdokumentation Control Center");
ret = RPJAttach(&err);
if (TRUE == ret)
{
hProp = RPJCreatePropertyHandle(szProjectName. &err);
if (NULL == hProp)
{
ErrMsg("Error RPJCreatePropertyHandle", &err);
}
else
{
ret = RPJGetJobProps(hProp, jobname, &err);
if (FALSE == ret)
{
ErrMsg("Error RPJGetJobProbs", &err);
}
else
{
ret = RPJCallJobMethod(hProp, method, &err);
if (FALSE == ret)
{
ErrMsg("Error executing RPJCallJobMethod", &err);
}
else
{
Msg("Print job started.");
}
}
RPJDeletePropertyHandle(hProp, &err);
}
RPJDetach(&err);
}
else
{
Msg("No connection to report designer DLL");
}
}
3.7.2.1 RPJAttach
Description
This function is used to established and initialized a connection to RPJAPI.DLL.
Declaration
BOOL RPJAttach (
CMN_ERROR* pcmnerror );
Parameters
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJDetach (Page 2080)
Overview of the functions (Page 2067)
3.7.2.2 RPJDetach
Description
This function is used to close an established connection to RPJAPI.DLL.
Declaration
BOOL RPJDetach (
CMN_ERROR* pcmnerror );
Parameters
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection is closed again.
FALSE
Error
Comment
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this may cause the call to freeze and the program to crash.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJAttach (Page 2079)
Overview of the functions (Page 2067)
3.7.2.3 RPJMemFree
Description
This function is used to close an established connection to RPJAPI.DLL and release the allocated
memory.
Declaration
BOOL RPJMemFree (
const PVOID pvMemBlock,
CMN_ERROR* pcmnerror );
Parameters
pvMemBlock
Pointer to a released memory area that was previously allocated by a RPJ function.
If pvMemBlock = NULL, nothing happens.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The memory was released.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
See also
Overview of the functions (Page 2067)
3.7.3.1 RPJGetNumProjectProperties
Description
The function determines the number of properties for the project.
Declaration
BOOL RPJGetNumProjectProperties (
LPCSTR pszReserved,
DWORD* pdwNumProperties
CMN_ERROR* pcmnerror );
Parameters
pszReserved
The parameter is reserved for future development.
pdwNumProperties
Pointer to a DWORD tag, in which the number of properties is returned.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The number of properties was determined.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
See also
Overview of the functions (Page 2067)
3.7.3.2 RPJGetProjectPropertyAt
Description
The function determines the name and type of a property based on the index in the project.
Declaration
BOOL RPJGetProjectPropertyAt (
LPCSTR pszReserved,
DWORD dwPropIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
DWORD* pdwPrpType,
CMN_ERROR* pcmnerror );
Parameters
pszReserved
The parameter is reserved for future expansions.
dwPropIndex
Index of the property in the project, from which the information is to be returned.
pszBuffer
Pointer to a buffer in which the name of the property should be returned. The size of the
buffer is specified with dwCharMax.
dwCharMax
Maximum size of the buffer specified with pszBuffer.
pdwPropType
Pointer to a DWORD tag, in which the type of the property in the project is returned.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The name and type of property in the project was determined.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
See also
Overview of the functions (Page 2067)
3.7.3.3 RPJGetProjectProperty
Description
The function determines the value of a property. The project name and the property name must
be passed.
Declaration
BOOL RPJGetProjectProperty (
LPCSTR pszProjectName,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwBufferSize,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project, consisting of the path, project name, and extension.
pszPropName
Name of the property in the project.
pvPropValue
Pointer to a buffer in which the value of the property should be returned. The size of the
buffer in pvPropValue is specified with dwBufferSize.
vtPropType
Type in which the value of the property in the pvPropValue buffer is expected.
dwBufferSize
Size of the buffer in pvPropValue to which the value of the property should be returned. The
size may only be specified in BYTE and not in CHAR.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The value of property was determined.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
See also
Overview of the functions (Page 2067)
3.7.3.4 RPJProjectLock
Description
Access to the print job list in the project is locked to others. The name of the locking party must be
specified in pszLockerNameNew. If an access conflict occurs, the name of the locking party is
returned via ppszLockerNameCur.
Declaration
BOOL RPJProjectLock (
LPCSTR pszProjectName,
BOOL fWriteLock,
BOOL fDoNotWait,
LPCSTR pszLockerNameNew,
LPSTR* ppszLockerNameCur,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project, consisting of the path, project name, and extension.
fWriteLock
Specifies the type of locking.
fDoNotWait
pszLockerNameNew
Contains the name of the locking party. If an access conflict occurs, the name is returned via
ppszLockerNameCur.
ppszLockerNameCur
If an access conflict occurs, the name of the current locking party is returned in
ppszLockerNameCur.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job list is locked.
FALSE
An access conflict has occurred. The print job list of the project is already locked. The name of
the locking party is returned via ppszLockerNameCur.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJProjectUnlock (Page 2087)
RPJProjectUnlockAll (Page 2088)
Overview of the functions (Page 2067)
3.7.3.5 RPJProjectUnlock
Description
The lock of a print job list is removed.
Declaration
BOOL RPJProjectUnlock (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The lock of the print job list was removed.
FALSE
An access conflict has occurred.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJProjectLock (Page 2085)
RPJProjectUnlockAll (Page 2088)
Overview of the functions (Page 2067)
3.7.3.6 RPJProjectUnlockAll
Description
All locks of a print job list are removed.
Declaration
BOOL RPJProjectUnlockAll (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
All locks of the print job list were removed.
FALSE
An access conflict has occurred.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJProjectLock (Page 2085)
RPJProjectUnlock (Page 2087)
Overview of the functions (Page 2067)
3.7.4.1 RPJCreateJob
Description
Creates a new print job.
Declaration
BOOL RPJCreateJob (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pszJobName
Pointer to the name of the print job to be created.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job created.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJDeleteJob (Page 2090)
Overview of the functions (Page 2067)
3.7.4.2 RPJDeleteJob
Description
A print job specified by pszJobName is deleted.
Declaration
BOOL RPJDeleteJob (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pszJobName
Pointer to the name of the print job to be deleted.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job deleted.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJCreateJob (Page 2089)
Overview of the functions (Page 2067)
3.7.4.3 RPJCreatePropertyHandle
Description
To edit the properties of a print job, you first have configure a handle on the job using this
function. You get the handle in the return value.
Declaration
HPROPERTIES RPJCreatePropertyHandle (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
Handle on the print job property.
If an error occurs, the return value is ZERO.
Comment
The handle provided here is required by the RPJGetJobProps, RPJGetProperty and RPJSetProperty
functions, for example.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
Examples
Show print job preview (Page 2131) "RD02.cpp"
Modify print job properties (Page 2126) "RD02.cpp"
Get print job names (Page 2120) "RD02.cpp"
Get print job method name (Page 2117) "RD02.cpp"
Get print job properties (Page 2123) "RD02.cpp"
See also
Get print job method name (Page 2117)
Get print job names (Page 2120)
Get print job properties (Page 2123)
Modify print job properties (Page 2126)
Show print job preview (Page 2131)
RPJDeletePropertyHandle (Page 2093)
RPJGetProperty (Page 2109)
RPJGetJobProps (Page 2107)
RPJSetProperty (Page 2113)
RPJPropertyClear (Page 2112)
Overview of the functions (Page 2067)
3.7.4.4 RPJDeletePropertyHandle
Description
Each handle created with RPJCreatePropertyHandle, is deleted with this function when it is no
longer needed.
Declaration
BOOL RPJDeletePropertyHandle (
HPROPERTIES hproperties,
CMN_ERROR* pcmnerror );
Parameters
hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Handle deleted
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
Examples
Show print job preview (Page 2131) "RD02.cpp"
Modify print job properties (Page 2126) "RD02.cpp"
Get print job names (Page 2120) "RD02.cpp"
Get print job method name (Page 2117) "RD02.cpp"
Get print job properties (Page 2123) "RD02.cpp"
See also
RPJCreatePropertyHandle (Page 2092)
Get print job method name (Page 2117)
Get print job names (Page 2120)
Get print job properties (Page 2123)
Modify print job properties (Page 2126)
3.7.4.5 RPJGetJobNameAt
Description
Determines the name of a print job specified by dwJobIndex.
Declaration
BOOL RPJGetJobNameAt (
LPCSTR pszProjectName,
DWORD dwJobIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
CMN_ERROR* pcmnerror );
Parameters
PszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
dwJobIndex
Index of the print job, the name of which should be determined.
pszBuffer
Pointer to a receive buffer in which the name of the print job should be returned.
dwCharMax
Size of the receive buffer in number of characters including the zero termination. This value
must be greater than 1.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Name of the print job determined.
FALSE
Error
Comment
An index error indicated by RPJGetJobNameAt may be due to the fact that the number of jobs
changed after the RPJGetNumJobs was called.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job names (Page 2120) "RD02.cpp"
See also
Get print job names (Page 2120)
Overview of the functions (Page 2067)
3.7.4.6 RPJGetNumJobs
Description
Determines the number of currently pending print jobs. After the function is called, the number
may change due to deletion or addition of print jobs.
Declaration
BOOL RPJGetNumJobs (
LPCSTR pszProjectName,
DWORD* pdwNumJobs,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pdwNumJobs
Pointer to the location where the number of print jobs should be stored.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number of print jobs determined.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job names (Page 2120) "RD02.cpp"
See also
Get print job names (Page 2120)
Overview of the functions (Page 2067)
3.7.4.7 RPJJobLock
Description
Access to the specified print job is locked to others. The name of the locking party must be
specified in pszLockerNameNew. If an access conflict occurs, the name of the locking party is
returned via ppszLockerNameCur.
Declaration
BOOL RPJJobLock (
LPCSTR pszProjectName,
LPCSTR pszJobName,
BOOL fWriteLock,
BOOL fDoNotWait,
LPCSTR pszLockerNameNew,
LPSTR* ppszLockerNameCur,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project, consisting of the path, project name, and extension.
pszJobName
Pointer to the name of the print job to be locked.
fWriteLock
Specifies the type of locking.
fDoNotWait
pszLockerNameNew
Contains the name of the locking party. If an access conflict occurs, the name is returned via
ppszLockerNameCur.
ppszLockerNameCur
If an access conflict occurs, the name of the current locking party is returned in
ppszLockerNameCur.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job is locked.
FALSE
An access conflict has occurred. The print job list of the project is already locked. The name of
the locking party is returned via ppszLockerNameCur.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJJobUnlockAll (Page 2100)
RPJJobUnlock (Page 2099)
Overview of the functions (Page 2067)
3.7.4.8 RPJJobUnlock
Description
The lock of a print job is removed.
Declaration
BOOL RPJJobUnlock (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pszJobName
Pointer to the name of the print job.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The lock of the print job was removed.
FALSE
An access conflict has occurred.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJJobUnlockAll (Page 2100)
RPJJobLock (Page 2097)
Overview of the functions (Page 2067)
3.7.4.9 RPJJobUnlockAll
Description
All locks of a print job are removed.
Declaration
BOOL RPJJobUnlockAll (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );
Parameters
pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.
pszJobName
Pointer to the name of the print job.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
All locks of the specified print job are removed.
FALSE
An access conflict has occurred
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJJobUnlock (Page 2099)
RPJJobLock (Page 2097)
Overview of the functions (Page 2067)
3.7.5.1 RPJCallJobMethod
Description
This function allows you to specify a specific job method. Currently, there are two methods:
PrintJob and PreviewJob.
Declaration
RPJCallJobMethod (
HPROPERTIES hproperties,
LPCSTR pszMethodName
CMN_ERROR* pcmnerror );
Parameters
hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.
pszMethodName
Pointer to the name of the job method to be used.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job method specified
FALSE
Error
Comment
In order to specify a print job method with RPJCallJobMethod, you first need to execute the
RPJGetJobProps function.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Show print job preview (Page 2131) "RD02.cpp"
See also
Show print job preview (Page 2131)
Overview of the functions (Page 2067)
3.7.5.2 RPJGetJobMethodAt
Description
The function determines the name of the printing method specified in dwMethodIndex.
Declaration
BOOL RPJGetJobMethodAt (
DWORD dwMethodIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
CMN_ERROR* pcmnerror );
Parameters
dwMethodIndex
Index of the printing method whose name is determined.
pszBuffer
Pointer to a buffer in which the name of the printing method should be returned.
dwCharMax
Size of the buffer for receiving the name in number of characters including the zero
termination. This value must be greater than 1.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Name of the print job method determined
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job method name (Page 2117) "RD02.cpp"
See also
Get print job method name (Page 2117)
Overview of the functions (Page 2067)
3.7.5.3 RPJGetNumJobMethods
Description
The function determines how many print job methods are currently available.
Declaration
BOOL RPJGetNumJobMethods (
DWORD* pdwNumMethods,
CMN_ERROR* pcmnerror );
Parameters
pdwNumMethods
Pointer to the location where the number of print job methods should be stored.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number of print job methods determined
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job method name (Page 2117) "RD02.cpp"
See also
Get print job method name (Page 2117)
Overview of the functions (Page 2067)
3.7.6.1 RPJGetJobPropertyAt
Description
Determines the name and type of job property specified in dwPropindex.
Declaration
BOOL RPJGetJobPropertyAt (
DWORD dwPropIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
DWORD* pdwPropType,
CMN_ERROR* pcmnerror );
Parameters
dwPropIndex
Index of the print job property, the name of which should be determined.
pszBuffer
Pointer to a buffer that receives the name of the job property.
dwCharMax
Size of the receive buffer in number of characters including the zero termination. This value
must be greater than 1.
pdwPropType
Pointer to the location where the type of job property should be stored.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Name of the print job property determined
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job properties (Page 2123) "RD02.cpp"
See also
Get print job properties (Page 2123)
Overview of the functions (Page 2067)
3.7.6.2 RPJGetJobProps
Description
The function determines the properties of a print job and stores it in the internal hProps buffer.
Declaration
BOOL RPJGetJobProps (
HPROPERTIES hproperties,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );
Parameters
hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.
pszJobName
Pointer to the name of the print job.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Comment
This function is a prerequisite for functions such as RPJGetProperty and RPJSetProperty.
Return value
TRUE
Print job properties determined
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
Examples
Show print job preview (Page 2131) "RD02.cpp"
Modify print job properties (Page 2126) "RD02.cpp"
See also
RPJGetProperty (Page 2109)
RPJSetProperty (Page 2113)
Modify print job properties (Page 2126)
Show print job preview (Page 2131)
RPJCreatePropertyHandle (Page 2092)
Overview of the functions (Page 2067)
3.7.6.3 RPJGetNumJobProperties
Description
Determines the number of available print job properties.
Declaration
BOOL RPJGetNumJobProperties (
DWORD* pdwNumProperties,
CMN_ERROR* pcmnerror );
Parameters
pdwNumProperties
Pointer to the location where the number of print job properties should be stored.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number of print job properties determined
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Examples
Get print job properties (Page 2123) "RD02.cpp"
See also
Get print job properties (Page 2123)
Overview of the functions (Page 2067)
3.7.6.4 RPJGetProperty
Description
Before you can use RPJGetProperty to determine the value of the print job property specified by
pszPropName, you first need to use RPJGetJobProps to store the job properties in the internal
hProp buffer.
Declaration
BOOL RPJGetProperty (
HPROPERTIES hproperties,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwBufferSize,
CMN_ERROR* pcmnerror );
Parameters
hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.
pszPropName
Pointer to the name of the print job property:
AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you can to stop the printout of the report at a
particular page.
JobName The name of the print job must be unique within a project and conform
to the Windows conventions.
LayoutName You can assign the print job a layout using the layout name.
PrinterName 1 Here, you specify the printer to which the printout is initially sent.
PrinterName 2 This specifies the printer to be used if the first printer is not available.
PrinterName 3 This specifies the printer to be used if the first two printers are not
available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you can to start the printout of the report at a
particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter
pvPropValue
Pointer to a buffer that should receive the name.
vtPropType
The type of the object property depends on pszPropName:
AbsoluteSelectionFrom VT_DATE
AbsoluteSelectionTo VT_DATE
CycleSpan VT_I4
DestinationFile VT_LPSTR
EnableCycle VT_I4
EnableStart VT_I4
EndPage VT_I4
JobName VT_LPSTR / VT_LPWSTR
If you want to change a string and your application is compiled in Unicode, you must use
vtProp VT_LPWSTR as the data type. Otherwise, vtProp has a VT_LPTSTR data type.
If vtProp has a VT_DATE data type, the prop parameter must refer to a SYSTEMTIME structure.
dwBufferSize
Size of the buffer to which prop refers in number of bytes.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job property determined
FALSE
Error
Comment
If the buffer for receiving the job property is configured too small, which can happen with job
name and layout name, for example, the buffer is filled but the function returns the
ERR_UNKNOWNERROR error message.
Error messages
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
Examples
Modify print job properties (Page 2126) "RD02.cpp"
See also
RPJGetJobProps (Page 2107)
RPJSetProperty (Page 2113)
RPJCreatePropertyHandle (Page 2092)
Modify print job properties (Page 2126)
Overview of the functions (Page 2067)
3.7.6.5 RPJPropertyClear
Description
This function is useful if you want to initialize a memory area referenced by a handle without
deleting the handle.
Declaration
BOOL RPJPropertyClear (
HPROPERTIES hproperties,
CMN_ERROR* pcmnerror );
Parameters
hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Memory initialized.
FALSE
Error
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
See also
RPJCreatePropertyHandle (Page 2092)
Overview of the functions (Page 2067)
3.7.6.6 RPJSetProperty
Description
This function allows you to temporarily change individual print job properties.
Before you can use RPJSetProperty to reset the value of the print job property specified by
pszPropName, you first need to use RPJGetJobProps to store the job properties in the internal
hProp buffer.
Declaration
BOOL RPJSetProperty (
HPROPERTIES hproperties,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwReserved,
CMN_ERROR* pcmnerror );
Parameters
hproperties
Handle of the print job properties. The handle is created by the RPJCreatePropertyHandle
function.
pszPropName
Pointer to the name of the print job property:
AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you can to stop the printout of the report at a
particular page.
JobName The name of the print job must be unique within a project and conform
to the Windows conventions.
LayoutName You can assign the print job a layout using the layout name.
PrinterName 1 Here, you specify the printer to which the printout is initially sent.
PrinterName 2 This specifies the printer to be used if the first printer is not available.
PrinterName 3 This specifies the printer to be used if the first two printers are not
available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you can to start the printout of the report at a
particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter
pvPropValue
Pointer on the value of the object property.
vtPropType
The type of the object property depends on pszPropName:
AbsoluteSelectionFrom VT_DATE
AbsoluteSelectionTo VT_DATE
CycleSpan VT_I4
DestinationFile VT_LPSTR
EnableCycle VT_I4
EnableStart VT_I4
EndPage VT_I4
If you want to change a string and your application is compiled in Unicode, you must use
vtProp VT_LPWSTR as the data type. Otherwise, vtProp has a VT_LPTSTR data type.
If vtProp has a VT_DATE data type, the prop parameter must refer to a SYSTEMTIME structure.
dwReserved
The parameter is reserved for future expansions.
pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Print job property temporarily changed
FALSE
Error
Comment
All available print job properties can be determined with the RPJGetNumJobProperties and
RPJGetJobPropertyAt functions.
Required files
rpjapi.h
rpjapi.lib
rpjapi.dll
Related functions
Examples
Modify print job properties (Page 2126) "RD02.cpp"
See also
RPJGetJobProps (Page 2107)
RPJGetProperty (Page 2109)
RPJCreatePropertyHandle (Page 2092)
Modify print job properties (Page 2126)
Overview of the functions (Page 2067)
3.7.7 Examples
Example
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle =
0x%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetNumJobMethods(&d, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetNumJobMethods:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
for (i = 0; i < d; i++)
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetJobMethodAt(i, buf, dwBufsize, &Error);
if (ret == FALSE)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %d
PrintJobMethod=%s"),i+1,buf);
}
ODKTrace(szText);
}
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle(hProp, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
RPJCreatePropertyHandle (Page 2092)
RPJDeletePropertyHandle (Page 2093)
RPJGetJobMethodAt (Page 2103)
RPJGetNumJobMethods (Page 2104)
Example
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
RPJCreatePropertyHandle (Page 2092)
RPJDeletePropertyHandle (Page 2093)
RPJGetJobNameAt (Page 2095)
RPJGetNumJobs (Page 2096)
Example
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
RPJCreatePropertyHandle (Page 2092)
RPJDeletePropertyHandle (Page 2093)
RPJGetJobPropertyAt (Page 2105)
RPJGetNumJobProperties (Page 2108)
Example
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetJobProps"));
ODKTrace(szText);
}
typ = VT_DATE;
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE);
_tcsncpy_s(propname, _countof(propname), _T("STARTTIME"), _TRUNCATE);
memset(&st, 0, sizeof(SYSTEMTIME));
ptr = (LPVOID)&st;
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetProperty (hProp, propname, ptr, (VARTYPE)typ, 16, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetProperty: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetProperty"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" Jobname=%s
Propname=%s"),jobname,propname);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %02d.%02d.%04d
%02d:%02d:%02d"),
(WORD)st.wDay,
(WORD)st.wMonth,
(WORD)st.wYear,
(WORD)st.wHour,
(WORD)st.wMinute,
(WORD)st.wSecond);
}
ODKTrace(szText);
// write properties
st.wHour = 11;
st.wMinute = 12;
st.wSecond = 13;
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJSetProperty (hProp, propname, ptr, (VARTYPE) typ, 16, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJSetProperty: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJSetProperty"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("
Jobname=%s ;Propname=%s"),jobname,propname);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %02d.%02d.%04d
%02d:%02d:%02d"),
(WORD)st.wDay,
(WORD)st.wMonth,
(WORD)st.wYear,
(WORD)st.wHour,
(WORD)st.wMinute,
(WORD)st.wSecond);
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJSetJobProps (hProp, jobname, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJSetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJSetJobProps"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle (hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE,
_T("RPJDeletePropertyHandle")); }
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
RPJCreatePropertyHandle (Page 2092)
RPJDeletePropertyHandle (Page 2093)
RPJGetJobProps (Page 2107)
RPJGetProperty (Page 2109)
RPJSetProperty (Page 2113)
Example
// =====================================================================
// =====================================================================
// : Modul with examples of Report Designer
// *********************************************************************
// Copyright (C) 1995-99 SIEMENS AG, A&D PT1 D2 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
#include "RD02.h"
#include "DM01.h"
}
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle =
0x%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJGetJobProps (hProp, jobname, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDeletePropertyHandle (hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetJobProps"));
ODKTrace(szText);
}
_tcsncpy_s(methode, _countof(methode), _T("PREVIEW"), _TRUNCATE); // preview
// _tcsncpy_s(methode, _countof(methode), _T("PRINTJOB"), _TRUNCATE); // print
// _tcsncpy_s(methode, _countof(methode), _T("SETSELECTIONALLPAGES"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJCallJobMethod (hProp, methode, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJCallJobMethod"));
}
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle (hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
RPJCreatePropertyHandle (Page 2092)
RPJDeletePropertyHandle (Page 2093)
RPJCallJobMethod (Page 2102)
RPJGetJobProps (Page 2107)
3.8.1 Basics
Overview
Overview
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
3.8.1.4 Constants
Runtime window
Export functions
Export/import formats
Import functions
Log types
Log types
Log flags
TLG_API_FLG_FAST_INSERT 0x00000001 WinCC V6.0 SP1 and higher: Fast insertion of data in
SQL Server with TLGInsertArchivData
Window templates
Templates
Limit values
Trend shape
TLG_DATATYP_TIMERANGE 0x00000001
TLG_DATATYP_USERARCHIV 0x00000002
TLG_DATATYP_BLOCKDATA 0x00000004
Time ranges
TLG_TR_MINUTE 1
TLG_TR_HOUR 2
TLG_TR_DAY 3
TLG_TR_WEEK 4
TLG_TR_MONTH 5
TLG_TR_YEAR 6
Axes
TLG_AXIS_X_TOP 0x00000001
TLG_AXIS_X_MIDDLE 0x00000002
TLG_AXIS_X_BOTTOM 0x00000004
TLG_AXIS_Y_LEFT 0x00000001
TLG_AXIS_Y_MIDDLE 0x00000002
TLG_AXIS_Y_RIGHT 0x00000004
Protocol connection
TLG_PROTFLG_TIME_RANGE 0x00000001
TLG_PROTFLG_DATA_RANGE 0x00000002
TLG_PROTFLG_DATA 0x00000001
TLG_PROTFLG_TITLE 0x00000002
TLG_PROTFLG_TIMEFIELD 0x00000004
TLG_PROTFLG_DATACOUNT 0x00000008
TLG_PROTFLG_DATEFIELD 0x00000010
TAG_PROT_CURVE_FORM_STEP 0x00000001
TAG_PROT_CURVE_FORM_POINTS 0x00000002
TAG_PROT_CURVE_FORM_DIRECT 0x00000003
TAG_PROT_CURVE_FORM_AREA 0x00000004
TLG_PROTFLG_FIRST_COL 0x00000000
TLG_PROTFLG_FIRST_COL_TIME 0x00000001
TLG_PROTFLG_FIRST_COL_DATA 0x00000002
TLG_PROTFLG_FIRST_COL_DATE 0x00000004
TLG_DATA_FROM_POS 0x00000000
TLG_DATA_FROM_BEGIN 0x00000001
TLG_DATA_FROM_END 0x00000002
TLG_DATA_FROM_ACTUAL 0x00000004
TLG_DATA_FROM_LEFT_ABS 0x00000008
TLG_DATA_FROM_RIGHT_ABS 0x00000010
PDE_DB_PRJ_PROJNAME_MAX_LENGHT 128
TLG_DB_PRJ_PROJNAME_MAX_LENGHT
PDE_DB_PRJ_COMMENT_MAX_LENGHT 200
TLG_DB_PRJ_COMMENT_MAX_LENGHT
PDE_DB_PRJ_USERDATE_MAX_LENGHT 12
TLG_DB_PRJ_USERDATE_MAX_LENGHT
PDE_DB_PRJ_USERNAME_MAX_LENGHT 30
TLG_DB_PRJ_USERNAME_MAX_LENGHT
PDE_DB_ARC_NAME_MAX_LENGHT 32
TLG_DB_ARC_NAME_MAX_LENGHT
PDE_DB_ARC_NAME_MAX_LENGHT 32
TLG_DB_ARC_NAME_MAX_LENGHT
TLG_DB_ARC_USER_NAME_MAX_LENGHT 8
PDE_DB_ARC_SERVERNAME_MAX_LENGHT 50
TLG_DB_ARC_SERVERNAME_MAX_LENGHT
PDE_DB_ARC_COMMENT_MAX_LENGHT 100
TLG_DB_ARC_COMMENT_MAX_LENGHT
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT 30
TLG_DB_ARC_ACTIONNAME_MAX_LENGHT
PDE_DB_VAR_NAME_MAX_LENGHT 64
TLG_DB_VAR_NAME_MAX_LENGHT
TLG_DB6_VAR_NAME_MAX_LENGHT 128
TLG_DB_MCP_VAR_MAME_MAX_LENGTH 128
PDE_DB_VAR_COMMENT_MAX_LENGHT 100
TLG_DB_VAR_COMMENT_MAX_LENGHT
PDE_DB_VAR_WRITEBACK_MAX_LENGHT 64
TLG_DB_VAR_WRITEBACK_MAX_LENGHT
TLG_DB6_VAR_WRITEBACK_MAX_LENGHT 128
PDE_DB_VAR_CYCLENAME_MAX_LENGHT 30
TLG_DB_VAR_CYCLENAME_MAX_LENGHT
PDE_DB_VAR_SIGNALTEX_MAX_LENGHT 30
TLG_DB_VAR_SIGNALTEX_MAX_LENGHT
PDE_DB_VAR_DLLNAME_MAX_LENGHT 30
TLG_DB_VAR_DLLNAME_MAX_LENGHT
PDE_DB_VAR_FUNCNAME_MAX_LENGHT 30
TLG_DB_VAR_FUNCNAME_MAX_LENGHT
PDE_DB_VAR_UNITDIR_MAX_LENGHT 30
TLG_DB_VAR_UNITDIR_MAX_LENGHT
PDE_DB_VAR_UNITSTR_MAX_LENGHT 64
TLG_DB_VAR_UNITSTR_MAX_LENGHT
TLG_DB6_VAR_UNITSTR_MAX_LENGHT 128
PDE_DB_FUNCNAME_MAX_LENGHT 30
TLG_DB_FUNCNAME_MAX_LENGHT
PDE_DB_DLLNAME_MAX_LENGHT 30
TLG_DB_DLLNAME_MAX_LENGHT
PDE_DB_SCALE_MAX_LENGHT 30
TLG_DB_SCALE_MAX_LENGHT
PDE_DB_TIMENAME_MAX_LENGHT 30
TLG_DB_TIMENAME_MAX_LENGHT
PDE_DB_FIELDNAME_MAX_LENGHT 64
TLG_DB_FIELDNAME_MAX_LENGHT
PDE_DB_STRUCTNAME_MAX_LENGHT 30
TLG_DB_STRUCTNAME_MAX_LENGHT
ENUM_TLG_TAG_FLAGVALUE_NOFLAGS 0 Default
ENUM_TLG_TAG_FLAGVALUE_LONGTERM_DISA‐ 1
BLE
ENUM_TLG_TAG_FLAGVALUE_ARCHIV‐ 2
ING_ON_SEGMENTCHANGE
3.8.2 Structures
3.8.2.1 TLG_ARCHIV_STR
Declaration
typedef struct {
TCHAR szName[
PDE_DB_ARC_NAME_MAX_LENGHT+1];
TCHAR szComment[
PDE_DB_ARC_COMMENT_MAX_LENGHT+1];
TCHAR szServername[
PDE_DB_ARC_SERVERNAME_MAX_LENGHT +1];
DWORD dwTyp;
DWORD dwAccessRead;
DWORD dwAccessWrite;
TCHAR szArchivAction[
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT+1];
BOOL fLocked;
DWORD dwRecordTyp;
DWORD dwFillMessage;
DWORD dwRecordSize;
DWORD dwStorage;
TCHAR szCircularAction[
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT+1];
TCHAR szCompressTime[
PDE_DB_TIMENAME_MAX_LENGHT+1];
DWORD dwSourceProcess;
TCHAR szRawDatVar[
PDE_DB_VAR_NAME_MAX_LENGHT+1];
TCHAR szSendAct[
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT+1];
TCHAR szRecAct[
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT+1];
DWORD dwRecItems;
}
TLG_ARCHIV_STR;
Members
szName
Gobal parameter for the name of the log
szComment
Global parameter for the comment on the project
szServername
Global parameter reserved for future upgrades
dwTyp
Global parameter which identifies the log type.
dwAccessRead
Global parameter which identifies the authorization stage for read access (0...999).
dwAccessWrite
Global parameter which identifies the authorization stage for write access (0...999).
szArchivAction
Global parameter with the name of the action for general log processing.
fLocked
Global parameters which identifies a log as freed or locked.
dwRecordTyp
Parameter for circular and sequential logs which identifies the log type.
dwFillMessage
Parameter for circular, sequential and compressed logs which identifies when a filling level
message is to be sent. Max. two filling level messages can be configured with a logic OR
operation.
e.g.: 100% || 50%-90%)
dwRecordSize
Parameter for circular logs which defines the size of the cyclic buffer in data records.
dwStorage
Parameter for circular logs which identifies the log location.
szCircularAction
Parameter for circular logs, name of the action for exporting the data of a circular log.
szCompressTime
Parameter for compressed logs, name of the timer object which specifies the compression
time period.
dwSourceProcess
Parameter for compressed logs which identifies the processing type of the source log.
PDE_COMPSRC_CALC Calculate
PDE_COMPSRC_CALCCOPY Calculate and copy
PDE_COMPSRC_CALCDEL Calculate and delete
PDE_COMPSRC_CALCCOPYDEL Calculate, copy and delete
szRawDatVar
The parameter is reserved for future development and must be preset to 0.
szSendAct
The parameter is reserved for future development and must be preset to 0.
szRecAct
The parameter is reserved for future development and must be preset to 0.
dwRecItems
The parameter is reserved for future development and must be preset to 0.
Comment
The parameters of the TLG_ARCHIV_STR structure depend on the log type (process log or
compressed log) and the type of logging (circular or sequential log).
Required files
pde_def.h
API functions
See also
TLGReadArchiv (Page 2234)
3.8.2.2 TLG_ARCHIVDATARAW
Declaration
typedef struct {
SYSTEMTIME stTime;
double doValue;
DWORD dwFlags;
}
TLG_ARCHIVDATARAW;
Members
stTime
stTime contains the logging time.
doValue
doValue contains the existing value at the time stTime.
dwFlags
The Tag Logging sets flags for every value which is written into the log which provides
information about the state of the tags.
The value must be converted to hexadecimal format for analysis of the flags. Whereby
• the left word (HighWord) contains flags from the data manager
• the left word (HighWord) quality codes, if PDE_RT_QUALITYCODE is set
• the right word (LowWord) status flags from the Tag Logging
Comment
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime must
be used and not GetSystemTime. There is generally a considerable time difference between
these two functions.
Set the PDE_RT_DAYLIGHT flag if the appropriate time falls in summer time. You can
determine the status of the flag with the GetTimeZoneInformation system function
(TIME_ZONE_ID_DAYLIGHT).
Required files
pdertdef.h
pdert.h
dmdefs.h
API functions
See also
TLGGetArchivDataEx (Page 2222)
3.8.2.3 TLG_BACKUP_TABLE_INFO
Declaration
typedef struct {
TCHAR szArchivName[ _MAX_PATH + 1 ];
TCHAR szFileName[ _MAX_PATH + 1 ];
TCHAR szComment[ _MAX_PATH + 1 ];
DWORD dwFormatFlags;
DWORD dwJobFlags;
DWORD dwSize;
SYSTEMTIME sysFrom;
SYSTEMTIME sysTo;
DWORD dwUserData;
}
TLG_BACKUP_TABLE_INFO;
Members
szArchivName
Name of the log from which the data is to be exported.
szFileName
Name of the export file with path and extension
szComment
Text of comment for export
dwFormatFlags
Format specifier:
dwJobFlags
Job-specific identification, following are possible:
dwSize
Size of the data to be exported
sysFrom
Start time from which the data is to be exported
sysTo
End time up to which the data is to be exported
dwUserData
Application-specific data
Required files
pdertdef.h
API functions
See also
TLG_ENUMBACKUP_ENTRIES (Page 2252)
3.8.2.4 TLG_CURVESCALEX
Declaration
typedef struct {
DWORD dwDataTyp;
DWORD dwBufferSize;
DWORD dwRangeTyp;
DWORD dwAxisLocation;
BOOL fActualize;
BOOL fAutoRange;
BOOL fGridLinesBig;
BOOL fGridLinesFine;
BOOL fGridLinesBigVisible;
BOOL fGridLinesFineVisible;
BOOL fPercent;
BOOL fLimitRange;
BOOL fSubstitute;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doGridBig;
double doGridFine;
double doShowDigits;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
double doDisplayRangeFrom;
double doDisplayRangeTo;
double doLimitRangeFrom;
double doLimitRangeTo;
COLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
TCHAR szText[ TLG_MAX_STD_TEXT_NAME ];
TCHAR szFunction[ TLG_MAX_FUNCTION_NAME ];
TCHAR szDLL[ TLG_MAX_DLL_NAME ];
}
TLG_CURVESCALEX;
Members
dwDataTyp
dwDataTyp determines which data type the trend is based on:
dwBufferSize
dwBufferSize corresponds to the number of measuring points of the trend and determines
the size of the trend data buffer.
dwRangeTyp
The parameter is reserved for future development and must be preset to 0.
dwAxisLocation
The parameter is reserved for future development and must be preset to 0.
fActualize
The trend is displayed dynamically when fActualize = TRUE. Otherwise it is static.
fAutoRange
Autoscaling is activated if fAutoRange = TRUE.
If a time-controlled log exists (dwDataTyp = TLG_DATATYP_TIMERANGE), fAutoRange has no
effect and the values specified in stFrom and stTo are valid.
fGridLinesBig
The parameter is reserved for future development and must be preset to 0.
fGridLinesFine
The parameter is reserved for future development and must be preset to 0.
fGridLinesBigVisible
The parameter is reserved for future development and must be preset to 0.
fGridLinesFineVisible
The parameter is reserved for future development and must be preset to 0.
fPercent
The parameter is reserved for future development and must be preset to 0.
fLimitRange
The parameter is reserved for future development and must be preset to 0.
fSubstitute
The parameter is reserved for future development and must be preset to 0.
stFrom
Start time of the display range. The parameter is only evaluated if
dwDataTy = TLG_TIME_RANGE.
stTo
End time of the display range. The parameter is only evaluated if
dwDataTyp = TLG_TIME_RANGE.
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
must be used and not GetSystemTime. There is generally a considerable time difference
between these two functions.
doFrom
Start value of the display range. The parameter is only evaluated if
dwDataTyp = TLG_DATA_RANGE.
doTo
End value of the display range. The parameter is only evaluated if in
dwDataTyp = TLG_DATA_RANGE.
doGridBig
The parameter is reserved for future development and must be preset to 0.
doGridFine
The parameter is reserved for future development and must be preset to 0.
doShowDigits
Number of decimal places
doLimitUpper1
The parameter is reserved for future development and must be preset to 0.
doLimitUpper2
The parameter is reserved for future development and must be preset to 0.
doLimitUpper3
The parameter is reserved for future development and must be preset to 0.
doLimitLower1
The parameter is reserved for future development and must be preset to 0.
doLimitLower2
The parameter is reserved for future development and must be preset to 0.
doLimitLower3
The parameter is reserved for future development and must be preset to 0.
doDisplayRangeFrom
Indicates from which value a data-controlled display is to be made.
doDisplayRangeTo
Indicates up to which value a data-controlled display is to be made.
doLimitRangeFrom
The parameter is reserved for future development and must be preset to 0.
doLimitRangeTo
The parameter is reserved for future development and must be preset to 0.
crColor
The Windows-specific 32-bit value crColor determines the color in which the trend is to be
displayed.
crColorTimeOverlapped
The parameter is reserved for future expansions.
crColorTimeJump
The parameter is reserved for future expansions.
crColorLimitUpper1
The parameter is reserved for future expansions.
crColorLimitUpper2
The parameter is reserved for future expansions.
crColorLimitUpper3
The parameter is reserved for future expansions.
crColorLimitLower1
The parameter is reserved for future expansions.
crColorLimitLower2
The parameter is reserved for future expansions.
crColorLimitLower3
The parameter is reserved for future expansions.
szSelectSQL
The parameter is reserved for future development and must be preset to NULL.
szText;
Labeling of the x-axis
szFunction
The parameter is reserved for future development and must be preset to NULL.
szDLL
The parameter is reserved for future development and must be preset to NULL.
Comment
TLG_CURVESCALEX is used by the TLG_TPLITEM_CURVE (Page 2177) structure.
Required files
pdertdef.h
See also
TLG_TPLITEM_CURVE (Page 2177)
3.8.2.5 TLG_CURVESCALEY
Declaration
typedef struct {
DWORD dwDataTyp;
DWORD dwRangeTyp;
DWORD dwAxisLocation;
DWORD dwCurveForm;
BOOL fAutoRange;
BOOL fGridLinesBig;
BOOL fGridLinesFine;
BOOL fGridLinesBigVisible;
BOOL fGridLinesFineVisible;
BOOL fPercent;
BOOL fLimitRange;
BOOL fSubstitute;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doGridBig;
double doGridFine;
double doShowDigitsF;
double doShowDigitsB;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
double doDisplayRangeFrom;
double doDisplayRangeTo;
double doLimitRangeFrom;
double doLimitRangeTo;
COLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
TCHAR szText[ TLG_MAX_STD_TEXT_NAME ];
}
TLG_CURVESCALEY;
Members
dwDataTyp
The data type (time/user/block data) has no significance here.
dwRangeTyp
The parameter is reserved for future development and must be preset to 0.
dwAxisLocation
The parameter is reserved for future development and must be preset to 0.
dwCurveForm
The appearance of the trend is defined by dwCurveForm
fAutoRange
fAutoRange = TRUE adapts the display range automatically.
fGridLinesBig
fgridLinesBig = TRUE activates big grid lines.
fGridLinesFine
fgridLinesFine = TRUE activates fine grid lines.
fGridLinesBigVisible
If fgridLinesBigVisible = TRUE, the big grid lines are displayed.
fGridLinesFineVisible
If fgridLinesFineVisible = TRUE, the fine grid lines are displayed.
fPercent
The parameter is reserved for future development and must be preset to 0.
fLimitRange
The parameter is reserved for future development and must be preset to 0.
fSubstitute
The parameter is reserved for future development and must be preset to 0.
stFrom
The parameter is reserved for future development.
stTo
The parameter is reserved for future development.
doFrom
Lower limit of the display range on the y-axis.
doTo
Upper limit of the display range on the y-axis.
doGridBig
Spacing of the big grid lines.
doGridFine
Spacing of the fine grid lines.
doShowDigitsF
Places in display of values (before decimal point)
doShowDigitsB
Determines the number of decimal places
doLimitUpper1
The parameter is reserved for future development and must be preset to 0.
doLimitUpper2
The parameter is reserved for future development and must be preset to 0.
doLimitUpper3
The parameter is reserved for future development and must be preset to 0.
doLimitLower1
The parameter is reserved for future development and must be preset to 0.
doLimitLower2
The parameter is reserved for future development and must be preset to 0.
doLimitLower3
The parameter is reserved for future development and must be preset to 0.
doDisplayRangeFrom
Determines the value from which the display range begins.
doDisplayRangeTo
Determines the value up to which the display range extends.
doLimitRangeFrom
The parameter is reserved for future development and must be preset to 0.
doLimitRangeTo
The parameter is reserved for future development and must be preset to 0.
crColor
The Windows-specific 32-bit value crColor determines the color in which the trend is to be
displayed.
crColorTimeOverlapped
The parameter is reserved for future development.
crColorTimeJump
The parameter is reserved for future development.
crColorLimitUpper1
The parameter is reserved for future development.
crColorLimitUpper2
The parameter is reserved for future development.
crColorLimitUpper3
The parameter is reserved for future development.
crColorLimitLower1
The parameter is reserved for future development.
crColorLimitLower2
The parameter is reserved for future development.
crColorLimitLower3
The parameter is reserved for future development.
szSelectSQL[ TLG_MAX_SQL_SELECT ];
The parameter is reserved for later upgrades and must be defaulted with ZERO.
szText[ TLG_MAX_STD_TEXT_NAME ];
Labeling of the y-axis
Comment
TLG_CURVESCALEY is used by the TLG_TPLITEM_CURVE (Page 2177) structure.
Required files
pdertdef.h
See also
TLG_TPLITEM_CURVE (Page 2177)
3.8.2.6 TLG_GETARCHIVDATA
Declaration
typedef struct {
LPTSTR lpszArchivName;
LPTSTR lpszVarName;
SYSTEMTIME stTime;
double doValue;
DWORD dwFlags;
}
TLG_GETARCHIVDATA;
Members
lpszArchivName
Pointer to the log name from which the data was read out.
lpszVarName
Pointer to the tag name whose values were read out.
stTime
x-value of the log value
doValue
y-value of the log value
dwFlags
The parameter is reserved for future development and must be preset to 0.
Required files
pdertdef.h
API functions
See also
TLG_GETARCHIVDATA_CALLBACK (Page 2220)
3.8.2.7 TLG_IO_BACKUP_SELECT
Declaration
typedef struct {
SYSTEMTIME sysFrom;
SYSTEMTIME sysTo;
LPTSTR lpszSqlString;
}
TLG_IO_BACKUP_SELECT;
Members
sysFrom
System time of the first data record to be selected
sysTo
System time of the last data record to be selected
lpszSqlString
The parameter is reserved for future development and must be preset to NULL.
Required files
pdertdef.h
API functions
See also
TLGGetBackupSize (Page 2255)
TLGExport (Page 2253)
3.8.2.8 TLG_PROT_CURVE_INFOS
Declaration
typedef struct {
TCHAR szArchivName[ 128 + 1 ];
TCHAR szVariableName[ 128 + 1 ];
TCHAR szTextX[ 128 + 1 ];
TCHAR szTextY[ 128 + 1 ];
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
DWORD dwFlags;
DWORD dwCurveForm;
}
TLG_PROT_CURVE_INFOS;
Members
szArchivName
Name of the log from which the data to be logged originates.
szVariableName
Name of the logging tag whose values are to be logged.
szTextX
Labeling of the x-axis
szTextY
Labeling of the y-axis
stFrom
Start time from which logging starts The parameter is only evaluated if dwFlags has
TLG_PROTFLG_TIME_RANGE set.
stTo
End time up to which logging takes place. The parameter is only evaluated if dwFlags has
TLG_PROTFLG_TIME_RANGE set.
If a current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.
doFrom
Start time from which logging is to take place. The parameter is only evaluated if dwFlags
has TLG_PROTFLG_DATA_RANGE set.
doTo
End time up to which logging is to take place. The parameter is only evaluated if dwFlags has
TLG_PROTFLG_DATA_RANGE set.
dwFlags
dwFlags determines which data type the trend is based on:
TLG_PROTFLG_TIME_RANGE The data originate from a time-controlled log (e.g.: process value
log). The values specified in stFrom and stTo are valid.
TLG_PROTFLG_DATA_RANGE The data originate from a data-controlled log (e.g.: user log). The
values specified in doFrom and doTo are valid.
dwCurveForm
The appearance of the trend is defined by dwCurveForm
Comment
TLG_PROT_CURVE_INFOS is used by the structures TLG_TABLESCALE (Page 2170)
and TLG_TPLITEM_INFO (Page 2178).
Required files
pdertdef.h
API functions
See also
TLGDrawCurvesInDC (Page 2236)
TLG_TABLESCALE (Page 2170)
TLG_TPLITEM_INFO (Page 2178)
3.8.2.9 TLG_SCAL_STR
Declaration
typedef struct {
double doScalVarUpper;
double doScalVarLower;
double doScalArcUpper;
double doScalArcLower;
TCHAR szStructName[PDE_DB_SCALE_MAX_LENGHT];
}
TLG_SCAL_STR;
Members
doScalVarLower
Lower limit of the tag value
doScalVarUpper
Upper limit of the tag value
doScalArcLower
The parameter is reserved for future development and must be preset to 0.
doScalArcUpper
The parameter is reserved for future development and must be preset to 0.
szStructName
Name of the scaling structure for the tag limit values
Comment
The TLG_SCAL_STR structure is used within the TLG_VAR_STR (Page 2180) structure and is
provided for later upgrades.
Required files
pde_def.h
See also
TLG_VAR_STR (Page 2180)
3.8.2.10 TLG_TABLE_INFO
Declaration
typedef struct {
DWORD dwArchivTyp;
TCHAR szArchivName[ _MAX_PATH + 1 ];
DWORD dwSaveTyp;
}
TLG_TABLE_INFO;
Members
dwArchivTyp
dwArchivTyp identifies the log type:
szArchivName
The form in which the name of the log is provided depends on the functions which use
TLG_TABLE_INFO.
The enumeration of the logs by TLGEnumArchivs and TLGEnumArchivsSel supplies the
log name as a table name, i.e. in the form "UA#ARCHIV#Archivname" for user logs and
"PDE#HD#Archivname#Variablenname" respectively because a table entry for every tag exists
here. Therefore every tag is enumerated.
The enumeration by TLGEnumArchivsEx supplies the "pure" log name.
dwSaveTyp
dwSaveTyp identifies the type of log:
Required files
pdertdef.h
API functions
See also
TLG_ENUMTABLES (Page 2215)
3.8.2.11 TLG_TABLESCALE
Declaration
typedef struct {
BOOL fActualize;
BOOL fVisible;
BOOL fModify;
BOOL fCommon;
DWORD dwDataTyp;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doShowDigits;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
OLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
}
TLG_TABLESCALE;
Members
fActualize
fVisible
fModify
fCommon
dwDataTyp
The parameter is reserved for future development and must be preset to 0.
stFrom
Start time of the display range.
stTo
End time of the display range.
If a current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.
doFrom
The parameter is reserved for future development and must be preset to 0.
doTo
The parameter is reserved for future development and must be preset to 0.
doShowDigits
Number of decimal places to be output.
doLimitUpper1
The parameter is reserved for future development and must be preset to 0.
doLimitUpper2
The parameter is reserved for future development and must be preset to 0.
dpoLimitUper3
The parameter is reserved for future development and must be preset to 0.
doLimitLower1
The parameter is reserved for future development and must be preset to 0.
doLimitLower2
The parameter is reserved for future development and must be preset to 0.
doLimitLower3
The parameter is reserved for future development and must be preset to 0.
crColor
The Windows-specific 32-bit value crColor defines the color used in the table column.
crColorTimeOverlapped
The parameter is reserved for future development.
crColorTimeJump
The parameter is reserved for future development.
crColorLimitUpper1
The parameter is reserved for future development.
crColorLimitUpper2
The parameter is reserved for future development.
crColorLimitUpper3
The parameter is reserved for future development.
crColorLimitLower1
The parameter is reserved for future development.
crColorLimitLower2
The parameter is reserved for future development.
crColorLimitLower3
The parameter is reserved for future development.
szSelectSQL
The parameter is reserved for later upgrades and must be defaulted with ZERO.
Comment
TLG_TABLESCALE is used by the TLG_TEMPLATEITEM_INFO (Page 2173) structure.
Required files
pdertdef.h
See also
TLG_PROT_CURVE_INFOS (Page 2166)
TLG_TPLITEM_INFO (Page 2178)
3.8.2.12 TLG_TEMPLATEITEM_INFO
Declaration
typedef struct {
TCHAR szTemplateItemName[
TLG_MAX_TEMPLATEITEM_NAME+1 ];
TCHAR szTemplateName[
TLG_MAX_TEMPLATE_NAME + 1 ];
TCHAR szArchivName[ 128 + 1 ];
TCHAR szVariableName[ 128 + 1 ];
TCHAR szDMVariableName[ 128 + 1 ];
DWORD dwReadAccessLevel;
DWORD dwWriteAccessLevel;
DWORD dwArchivTyp;
TCHAR szTimeNameRange[ 128 + 1 ];
DWORD dwTemplateItemTyp;
DWORD dwTemplateTyp;
BOOL fVisible;
TLG_TPLITEM_INFO tplInfo;
}
TLG_TEMPLATEITEM_INFO;
Members
szTemplateItemName
Name of the trend or column
szTemplateName
Name of the trend or table window template
szArchivName
Name of the log in which the log tag linked with the curve or column is logged.
szVariableName
Name of the log tag linked with the trend or column
szDMVariableName
Name of the data manager tag
dwReadAccessLevel
In the enumeration of trends or columns dwReadAccesLevel contains the user authorization
level for read access.
dwWriteAccessLevel
In the enumeration of trends or columns dwWriteAccesLevel contains the user authorization
level for write access.
dwArchivTyp
dwArchivTyp identifies the log type:
szTimeNameRange
Name of the time object which is to be used to determine a time range from a start time.
dwTemplateItemTyp
dwTemplateItemTyp must correspond to the value specified in dwTemplateTyp:
dwTemplateTyp
dwTemplateTyp identifies the type of window template
fVisible
tplInfo
Structure of the TLG_TPLITEM_INFO (Page 2178) type with the properties of a trend or
column template.
Required files
pdertdef.h
API functions
See also
TLG_TPLITEM_INFO (Page 2178)
TLG_TABLESCALE (Page 2170)
TLGInsertTemplateItem (Page 2238)
3.8.2.13 TLG_TIME_STR
Declaration
typedef struct {
DWORD dwBasis;
DWORD dwFactor;
TCHAR szTimeName[
PDE_DB_TIMENAME_MAX_LENGHT + 1 ];
}
TLG_TIME_STR;
Members
dwBasis
Timebase The cycle time is given by multiplying the time factor and timebase.
TLG_TBASE_500MS 500ms
TLG_TBASE_SEC 1 second
TLG_TBASE_MIN 1 minute
TLG_TBASE_HOUR 1 hour
TLG_TBASE_DAY 1 day
dwFactor
Time factor The cycle time is given by multiplying the time factor and timebase.
szTimeName
Name of the time object
Comment
Times are to be understood as acquisition and logging cycles which can be freely assigned. A
time object can be used simultaneously as an acquisition cycle and a logging cycle.
Required files
pde_def.h
API functions
See also
TLGReadTime (Page 2249)
3.8.2.14 TLG_TIMEDATA
Declaration
typedef struct {
TCHAR szTimeName[ _MAX_PATH + 1 ];
DWORD dwTimeBase;
DWORD dwTimeValue;
}
TLG_TIMEDATA;
Members
szTimeName
Name of the time object
dwTimeBase
Timebase The cycle time is given by multiplying the time factor and timebase.
TLG_TBASE_500MS 500ms
TLG_TBASE_SEC 1 second
TLG_TBASE_MIN 1 minute
TLG_TBASE_HOUR 1 hour
TLG_TBASE_DAY 1 day
dwTimeValue
Time factor The cycle time is given by multiplying the time factor and timebase.
Required files
pdertdef.h
API functions
See also
TLG_ENUMTIMES_CALLBACK (Page 2248)
3.8.2.15 TLG_TPLITEM_CURVE
Declaration
typedef struct {
TLG_CURVESCALEX csx;
TLG_CURVESCALEY csy;
}
TLG_TPLITEM_CURVE;
Members
csx
The TLG_CURVESCALEX (Page 2155) structure contains the data for scaling the X-axis of a
trend.
csy
The TLG_CURVESCALEY (Page 2160) structure contains the data for scaling the Y-axis of a
trend.
Description
TLG_TPLITEM_CURVE is used by the TLG_TPLITEM_INFO (Page 2178) structure.
Required files
pdertdef.h
See also
TLG_TPLITEM_INFO (Page 2178)
TLG_CURVESCALEX (Page 2155)
TLG_CURVESCALEY (Page 2160)
3.8.2.16 TLG_TPLITEM_INFO
Declaration
typedef union {
TLG_TPLITEM_CURVE tplCurve;
TLG_TPLITEM_TABLE tplTable;
}
TLG_TPLITEM_INFO;
Members
tplCurve
The properties of a trend are read from the TLG_TPLITEM_CURVE (Page 2177) structure.
tplTable
The properties of a column are read from the TLG_TPLITEM_TABLE (Page 2179) structure.
Comment
TLG_TPLITEM_INFO is used by the TLG_TEMPLATEITEM_INFO (Page 2173) structure.
Since a tag can be displayed both in a trend and in a table, both structures
TLG_TPLITEM_CURVE and TLG_TPLITEM_TABLE can be assigned values.
Required files
pdertdef.h
See also
TLG_PROT_CURVE_INFOS (Page 2166)
TLG_TABLESCALE (Page 2170)
TLG_TEMPLATEITEM_INFO (Page 2173)
TLG_TPLITEM_CURVE (Page 2177)
TLG_TPLITEM_TABLE (Page 2179)
3.8.2.17 TLG_TPLITEM_TABLE
Declaration
typedef struct {
TLG_TABLESCALE ts;
}
TLG_TPLITEM_TABLE;
Members
ts
TLG_TABLESCALE (Page 2170) with the properties of a table column.
Description
TLG_TPLITEM_TABLE is used by the TLG_TPLITEM_INFO (Page 2178) structure.
For organizational reasons, TLG_TABLESCALE cannot be used directly in the
TLG_TPLITEM_INFO structure.
Required files
pdertdef.h
See also
TLG_TPLITEM_INFO (Page 2178)
TLG_TABLESCALE (Page 2170)
3.8.2.18 TLG_VAR_STR
Declaration
typedef struct {
TCHAR szVarName [PDE_DB_VAR_NAME_MAX_LENGHT + 1];
TCHAR szProcName [PDE_DB_VAR_NAME_MAX_LENGHT + 1];
DWORD dwVarType;
DWORD dwArchivStyle;
TCHAR szWriteBackTo [PDE_DB_VAR_WRITEBACK_MAX_LENGHT + 1];
DWORD dwSupply;
BOOL fLocked;
TCHAR szComment [PDE_DB_VAR_COMMENT_MAX_LENGHT + 1];
TCHAR szRecordCycle [PDE_DB_VAR_CYCLENAME_MAX_LENGHT + 1];
TCHAR szArchivCycle [PDE_DB_VAR_CYCLENAME_MAX_LENGHT + 1];
DWORD dwMultiple;
DWORD dwValueFlow;
DWORD dwValueFollow;
DWORD dwSaveByFault;
DWORD dwArchivTrigger;
TCHAR szTextHighSignal [PDE_DB_VAR_SIGNALTEX_MAX_LENGHT + 1];
TCHAR szTextLowSignal [PDE_DB_VAR_SIGNALTEX_MAX_LENGHT + 1];
DWORD dwValProcess;
TCHAR szFuncValProcess [PDE_DB_VAR_FUNCNAME_MAX_LENGHT + 1];
TCHAR szDLLValProcess [PDE_DB_VAR_DLLNAME_MAX_LENGHT + 1];
TCHAR szFuncStartEvent [PDE_DB_VAR_FUNCNAME_MAX_LENGHT + 1];
TCHAR szDLLStartEvent [PDE_DB_VAR_DLLNAME_MAX_LENGHT + 1];
TCHAR szFuncStopEvent [PDE_DB_VAR_FUNCNAME_MAX_LENGHT + 1];
TCHAR szDLLStopEvent [PDE_DB_VAR_DLLNAME_MAX_LENGHT + 1];
TCHAR szFuncDynamic [PDE_DB_VAR_FUNCNAME_MAX_LENGHT + 1];
TCHAR szDLLDynamic [PDE_DB_VAR_DLLNAME_MAX_LENGHT + 1];
TCHAR szUnitDirect [PDE_DB_VAR_UNITDIR_MAX_LENGHT + 1];
TCHAR szUnitStruct [PDE_DB_VAR_UNITSTR_MAX_LENGHT + 1];
DWORD dwRecItems;
TCHAR szSourceArchiv [PDE_DB_ARC_NAME_MAX_LENGHT + 1];
TCHAR szSourceVarName [PDE_DB_VAR_NAME_MAX_LENGHT + 1];
TCHAR szRawdataName [PDE_DB_VAR_NAME_MAX_LENGHT + 1];
TCHAR szRawConvDLLName [TLG_DB_DLLNAME_MAX_LENGHT + 1];
DWORD dwRawDataIndex;
DWORD dwRawDataFormat;
TLG_SCAL_STR ScaleStruct;
TLG_RECORD_STR RecordStruct;
} TLG_VAR_STR;
Comment
The assignment of the parameters of the TLG_VAR_STR structure depends on the logging type
(acyclic, cyclic-selective or cyclic-continuous) and the tag type (binary or analog).
Members
szVarName
Global parameter for the name of the log tag or the tag group
The characters : ? " ' \ * % and blank may not be used in log tag names, otherwise the error
TLG_API_NAME_WRONG_CHAR is output.
szProcName
Gobal parameter for the name of the process tag
dwVarType
Global parameter which identifies the log tag type.
dwArchivStyle
Global parameter which identifies the logging type.
szWriteBackTo
Global parameter into which the name of the log tag is to be written back.
dwSupply
Global parameter which identifies the tag supply type.
fLocked
Global parameter which identifies the handling of the logging at system start.
TRUE disabled
FALSE enabled
szComment
Global parameter for the comment on the log tag
szRecordCycle
Name of the time object (e.g.: "1 minute") which specifies the acquisition cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous acquisition of analog and
binary tags.
szArchivCycle
Name of the time object (e.g.: "1 minute") which specifies the logging cycle. The logging
cycle is given by multiplying dwMultiple by szArchivCycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
dwMultiple
Identifies the multiplication factor. The logging cycle is given by multiplying dwMultiple by
szArchivCycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
dwValueFlow
Identifies the number of flow values
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
dwValueFollow
Identifies the number of return values.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
dwSaveByFault
Identifies the memory behavior in case of a fault.
The parameter is relevant for analog and binary tags of all logging types.
dwArchivTrigger
Identifies the trigger behavior of the logging
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.
szTextHighSignal
Text for signal state 1.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.
szTextLowSignal
Text for the signal state 0.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.
dwValProcess
Identifies the processing of the log value to be saved over the acquired values within the
logging cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog tags.
szFuncValProcess
Name of the action or the DLL function which specifies the processing of the log value to be
saved.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags and only relevant ifdwValProcess = TLG_VAL_DLL.
szDLLValProcess
Name of the DLL
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags and only relevant if dwValProcess = TLG_VAL_DLL.
szFuncStartEvent
Name of the action or the DLL function which specifies the start event.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
szDLLStartEvent
Name of the DLL.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
szFuncStopEvent
Name of the action or the DLL function which specifies the stop event.
The parameter is relevant for the cyclic-selective logging of analog and binary tags.
szDLLStopEvent
Name of the DLL
The parameter is relevant for the cyclic-selective logging of analog and binary tags.
szFuncDynamic
Name of the action or the DLL function which specifies the dynamic switching of the
detection and/or logging cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
szDLLDynamic
Name of the DLL
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.
szUnitDirect
Identifies the unit of the log tag.
The parameter is relevant for analog tags of all logging types.
szUnitStruct
Name of the structure that contains the unit of the log tag. NULL if the unit is configured
directly in szUnitDirect.
The parameter is relevant for analog tags of all logging types.
dwRecItems
The parameter is reserved for future development and must be preset to 0.
szSourceArchiv
Name of the source archive.
The parameter is relevant for the cyclic-continuous logging.
szSourceVarName
Name of the log tag in the source log
The parameter is relevant for the cyclic-continuous logging.
szRawdataName
Name of the raw data tag
The parameter is relevant for process-controlled tags.
szRawConvDLLName
Name of the normalization DLL
The parameter is relevant for process-controlled tags.
dwRawDataIndex
The number of the raw data tag corresponds to the log ID of the PLC in connection with
S7PMC.
The parameter is relevant for process-controlled variables.
dwRawDataFormat
Format of the raw data tag
The parameter is relevant for process-controlled tags.
ScaleStruct
TLG_SCAL_STR (Page 2168) Structure with the limits of the tag.
RecordStruct
The parameter is reserved for future development.
Required files
pde_def.h
API functions
See also
TLGReadVariable (Page 2205)
TLG_SCAL_STR (Page 2168)
3.8.2.19 TLG_VARIABLE_INFO
Declaration
typedef struct {
DWORD dwVariableTyp;
TCHAR szVariableName[ _MAX_PATH + 1 ];
}
TLG_VARIABLE_INFO;
Members
dwVariableTyp
dwVariableTyp identifies the type of tag. Possible values are:
szVariableName
Name of the tag
Required files
pdertdef.h
pde_typ.h
API functions
See also
TLG_ENUMVARIABLES (Page 2204)
3.8.3.1 TLGCSConnect
Description
The function establishes a connection with the WinCC project database.
Declaration
BOOL TLGCSConnect (
HWND hwndParent,
LPCMN_ERROR lpError );
Parameters
hwndParent
Window handle of the parent window
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Enum all acquisition and logging times (Page 2260) "TL01.cpp"
Read parameters of time object (Page 2274) "TL01.cpp"
Enum logs (Page 2263) "TL01.cpp"
Read log (Page 2270) "TL01.cpp"
See also
TLGCSConnectEx (Page 2188)
Enum logs (Page 2263)
TLGOpenProject (Page 2195)
Read parameters of time object (Page 2274)
Enum all acquisition and logging times (Page 2260)
3.8.3.2 TLGCSConnectEx
Description
The function establishes a connection with the WinCC project database.
Declaration
BOOL TLGCSConnectEx (
HWND hwndParent,
DWORD dwMode,
LPCMN_ERROR lpError );
Parameters
hwndParent
The parameter is reserved for later upgrades and must be defaulted with ZERO.
dwMode
The parameter is reserved for future development.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
See also
TLGCSConnect (Page 2186)
TLGOpenProject (Page 2195)
3.8.3.3 TLGCSDisConnect
Description
The function terminates an established connection to the WinCC project database. The call is
required so that the DLL can be cleanly unloaded again.
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX etc.) because this can
lead to a frozen call and subsequent program crash due to specific Microsoft-based mechanisms.
Declaration
BOOL TLGCSDisConnect (
LPCMN_ERROR lpError );
Parameters
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection terminated.
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Enum all acquisition and logging times (Page 2260) "TL01.cpp"
Read parameters of time object (Page 2274) "TL01.cpp"
Enum logs (Page 2263) "TL01.cpp"
Read log (Page 2270) "TL01.cpp"
See also
TLGCSConnect (Page 2186)
Enum all acquisition and logging times (Page 2260)
Enum logs (Page 2263)
Read log (Page 2270)
Read parameters of time object (Page 2274)
3.8.3.4 TLGChangeLanguage
Description
The currently used data language can be switched with this function.
Declaration
BOOL TLGChangeLanguage (
DWORD dwLanguage,
PCMN_ERROR lpError );
Parameters
dwLanguage
Code of the language to be used in future
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data language switched
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
3.8.3.5 TLGConnect
Description
The function initializes the log system and establishes a connection with the Tag Logging
Runtime.
Declaration
BOOL TLGConnect (
HWND hwndParent,
PCMN_ERROR lpError );
Parameters
hwndParent
The parameter is reserved for future development and must be preset to NULL.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection established
FALSE
Error
Comment
The call generates an invisible window for the communication which is only deleted with the
TLGDisconnect function. This may be important when Windows functions are also used.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
Related functions
Examples
Enumerate logs (Page 2268) "TL02.cpp"
See also
Enumerate logs (Page 2268)
TLGDisconnect (Page 2193)
Edit curve template - Example 1 (Page 2257)
3.8.3.6 TLGDisconnect
Description
An existing connection to the Tag Logging Runtime is disconnected with this function.
Declaration
BOOL TLGDisconnect (
PCMN_ERROR lpError );
Parameters
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Connection terminated
FALSE
Error
Comment
Note
The call may not be used in the destructor of an application (EXE, DLL, OCX...) because this can
lead to jamming of the call and thus the program due to specific Microsoft-based mechanisms.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
Related functions
Examples
Enumerate logs (Page 2268) "TL02.cpp"
See also
Enumerate logs (Page 2268)
TLGConnect (Page 2191)
Edit curve template - Example 1 (Page 2257)
Enum all acquisition and logging times (Page 2260)
3.8.4.1 TLGCloseProject
Description
Closes the current project. All the data objects belonging to this project are closed.
The function is not longer significant and always supplies TRUE as a return value.
Declaration
BOOL TLGCloseProject(
HANDLE hProject,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of a project opened with TLGOpenProject.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Project closed
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Examples
Read parameters of time object (Page 2274) "TL01.cpp"
Enum logs (Page 2263) "TL01.cpp"
Read log (Page 2270) "TL01.cpp"
See also
Read parameters of time object (Page 2274)
Enum logs (Page 2263)
Read log (Page 2270)
3.8.4.2 TLGOpenProject
Description
Establishes a connection with the WinCC project database.
Declaration
BOOL TLGOpenProject (
HANDLE* lphProject,
LPTSTR lpszProjectName,
HWND hwndParent,
LPCMN_ERROR lpoes );
Parameters
lphProject
Address of a memory area in which the handle is to be saved.
lpszProjectName
Name of the project to be opened.
The project path to be specified here can be determined with one of the following API
functions:
• DMEnumOpenedProjects
• DMGetRuntimeProject
• TLGEnumProject
If a different project path than the currently open project is specified the
TLG_API_PROJECT_NAME_NOT_EXIST error is returned. The TLG_API_NO_PROJECT_EXIST
error is returned if no project is open.
hwndParent
Handle of the parent window
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Project opened
FALSE
Error
Comment
If no connection was established with the WinCC project data base by TLGCSConnect first, the
connection error TLG_API_NO_CONNECTION is returned.
Error messages
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Read parameters of time object (Page 2274) "TL01.cpp"
Enum logs (Page 2263) "TL01.cpp"
Read log (Page 2270) "TL01.cpp"
Enum tags of a log (Page 2266) "TL02.cpp"
See also
TLGEnumProject (Page 2198)
TLGCSConnect (Page 2186)
TLGCSConnectEx (Page 2188)
Read parameters of time object (Page 2274)
Enum logs (Page 2263)
Read log (Page 2270)
Enum tags of a log (Page 2266)
3.8.4.3 TLGEnumProject
Description
The function determines the names of the open projects.
Declaration
BOOL TLGEnumProject (
TLG_ENUM_PROJECT_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );
Parameters
lpCallbackFunc
Pointer to your callback function which is called for every open project.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Projects listed
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
See also
TLG_ENUM_PROJECT_NAME_CALLBACK (Page 2199)
TLGOpenProject (Page 2195)
3.8.4.4 TLG_ENUM_PROJECT_NAME_CALLBACK
Description
In order to be able to evaluate the projects listed by the system, you must provide a callback
function of the TLG_ENUM_PROJECT_NAME_CALLBACK type.
Declaration
BOOL ( * TLG_ENUM_PROJECT_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );
Parameters
lpszName
The lpszName pointer refers to the name of the first project.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
The return values depend on your implementation.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdecscli.h
Related functions
See also
TLGEnumProject (Page 2198)
3.8.5.1 TLGEnumVariables
Description
The function determines all the tag names of a log.
Declaration
BOOL TLGEnumVariables (
HANDLE hProject,
LPTSTR lpszArchivName,
TLG_ENUM_VARIABLE_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the log is located.
lpszArchivName
Pointer to the name of the log
lpCallbackFunc
Pointer to your callback function which is called for every tag entry in the log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log tags listed
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
See also
TLG_ENUM_VARIABLE_NAME_CALLBACK (Page 2201)
TLGReadVariable (Page 2205)
3.8.5.2 TLG_ENUM_VARIABLE_NAME_CALLBACK
Description
In order to be able to evaluate the tags listed by the system, you must provide a callback function
of the TLG_ENUM_VARIABLE_NAME_CALLBACK type.
Declaration
BOOL ( * TLG_ENUM_VARIABLE_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );
Parameters
lpszName
The lpszName pointer refers to the name of the first tag.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdecscli.h
Related functions
See also
TLGEnumVariables (Page 2200)
3.8.5.3 TLGEnumVariablesEx
Description
The function determines all the tag names of a log.
Declaration
BOOL TLGEnumVariablesEx (
LPCTSTR lpszArchiveName,
TLG_ENUMVARIABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
lpszArchiveName
Pointer to the name of the log whose tags are to be listed.
lpfnCallback
Pointer to your callback function which is called for every tag of the log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tags listed
FALSE
Error
Error messages
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
pdertcli.h
pdertcli.lib
pdertcli.dll
Related functions
Examples
Enum tags of a log (Page 2266) "TL02.cpp"
See also
TLG_ENUMVARIABLES (Page 2204)
Enum tags of a log (Page 2266)
3.8.5.4 TLG_ENUMVARIABLES
Description
In order to be able to evaluate the data of a tag listed by the system, you must provide a callback
function of the TLG_ENUMVARIABLES type.
Declaration
BOOL ( * TLG_ENUMVARIABLES) (
PTLG_VARIABLE_INFO lpvi,
LPVOID lpUser );
Parameters
lpvi
Address of a structure of TLG_VARIABLE_INFO (Page 2185) type with the data of a tag.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdertcli.h
pde_glob.h
pdertdef.h
Related functions
Examples
Enum tags of a log (Page 2266) "TL02.cpp"
See also
TLGEnumVariablesEx (Page 2202)
TLG_VARIABLE_INFO (Page 2185)
Enum tags of a log (Page 2266)
TLGEnumArchivsEx (Page 2212)
3.8.5.5 TLGReadVariable
Description
Read the parameters of a tag
Declaration
BOOL TLGReadVariable (
HANDLE hProject,
LPTSTR lpszArchivName,
LPTSTR lpszVariableName,
PTLG_VAR_STR lpVariable,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the tag to be processed is located.
lpszArchivName
Pointer to the name of the log
lpszVariableName
Pointer to the name of a tag of the log
lpVariable
Address of the TLG_VAR_STR (Page 2180) structure from which the data of the tag are read
out.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Parameters read
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Read log (Page 2270) "TL01.cpp"
See also
TLG_VAR_STR (Page 2180)
TLGEnumVariables (Page 2200)
Read log (Page 2270)
3.8.6.1 TLGEnumArchives
Description
The function determines the names of all logs in the project hproject. All types of logs can be
processed with this function.
Declaration
BOOL TLGEnumArchives (
HANDLE hProject,
TLG_ENUM_ARCHIV_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the logs are located.
lpCallbackFunc
Pointer to your callback function which is called for every log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Logs listed
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Enum logs (Page 2263) "TL01.cpp"
See also
TLG_ENUM_ARCHIV_CALLBACK (Page 2208)
Enum logs (Page 2263)
TLGReadArchiv (Page 2234)
3.8.6.2 TLG_ENUM_ARCHIV_CALLBACK
Description
In order to be able to evaluate the logs listed by the system, you must provide a callback function
of the TLG_ENUM_ARCHIV_CALLBACK type.
Declaration
BOOL ( * TLG_ENUM_ARCHIV_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );
Parameters
lpszName
The lpszName pointer refers to the name of the log.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdecscli.h
Related functions
Examples
Enum logs (Page 2263) "TL01.cpp"
See also
TLGEnumArchives (Page 2207)
Enum logs (Page 2263)
3.8.6.3 TLGEnumArchivs
Description
Enumerates the existing logs Unlike TLGEnumArchivsSel the logs to be listed can only be limited
by the log type.
The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. The log name is transferred here as a table name, i.e. in the form
"UA#ARCHIV#ArchivName" or "PDE#HD#Archivname#Variablenname".
Declaration
BOOL TLGEnumArchivs (
DWORD dwArchivTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
dwArchivTyp
dwArchivTyp identifies the log type:
lpfnCallback
Pointer to your callback function which is called for every log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Logs listed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
Examples
Enumerate logs (Page 2268) "TL02.cpp"
See also
TLGEnumArchivsEx (Page 2212)
TLGEnumArchivsSel (Page 2213)
3.8.6.4 TLGEnumArchivsEx
Description
Enumerates the existing logs. Unlike TLGEnumArchivsSel the logs to be listed can only be limited
by the log type (user, process value, compressed log).
The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. Unlike TLGEnumArchivs not the table name of the log but the "pure" log
name is transferred.
Declaration
BOOL TLGEnumArchivsEx (
DWORD dwArchivTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
dwArchivTyp
dwArchivTyp identifies the log type:
lpfnCallback
Pointer to your callback function which is called for every log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Logs are listed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGEnumArchivsSel (Page 2213)
TLGEnumArchivs (Page 2210)
TLG_ENUMTABLES (Page 2215)
3.8.6.5 TLGEnumArchivsSel
Description
The function enumerates the existing log types. Unlike TLGEnumArchivs the logs to be listed can
be limited by the logging type (circular log, sequential log) in addition to by the log type.
The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. The log name is transferred here as a table name, i.e. in the form
"UA#ARCHIV#ArchivName" or "PDE#HD#Archivname#Variablenname". All tags of the log are
enumerated. This form is required for example in TLGBackup.
Declaration
BOOL TLGEnumArchivsSel (
DWORD dwArchivTyp,
DWORD dwSaveTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
dwArchivTyp
dwArchivTyp identifies the log type:
dwSaveTyp
dwSaveTyp identifies the type of log:
lpfnCallback
Pointer to your callback function which is called for every log.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The logs are listed.
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGEnumArchivsEx (Page 2212)
TLGEnumArchivs (Page 2210)
TLG_ENUMTABLES (Page 2215)
TLG_TABLE_INFO (Page 2169)
3.8.6.6 TLG_ENUMTABLES
Description
In order to be able to evaluate the logs listed by the system, you must provide a callback function
of the TLG_ENUMTABLES type.
Declaration
BOOL TLG_ENUMTABLES (
LPTSTR lpTableName,
PTLG_TABLE_INFO lpti,
PVOID lpUser );
Parameters
lpTableName
Pointer to the name of the log
lpti
Information about the database table is contained in the TLG_TABLE_INFO (Page 2169)
structure.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
Examples
Enumerate archives "TL02.cpp"
See also
TLGEnumArchivs (Page 2210)
TLGEnumArchivsSel (Page 2213)
TLG_TABLE_INFO (Page 2169)
TLGEnumArchivsEx (Page 2212)
3.8.6.7 TLGFreeMemory
Description
A memory area allocated by TLGGetArchivDataEx is freed with this function.
Declaration
BOOL TLGFreeMemory (
LPVOID lpMemory );
Parameters
lpMemory
You get the pointer to the memory area to be freed when calling the TLGGetArchivDataEx
function in the ppTLGData parameter.
Note
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.
Return value
TRUE
Memory is freed
FALSE
Error
Note
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.
Required files
pdertcli.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGGetArchivDataEx (Page 2222)
3.8.6.8 TLGGetArchivData
Description
The function reads out the data from a log between two times. Unlike TLGGetArchivDataEx the
values of the log tags are provided by a callback function.
A maximum 10,000 data records can be read with one call. If there are more data records
between start time and end time, you only get the first 10,000.
You get the following data records by adding a millisecond to the time of the last data record
and using this as a start time in a new call for TLGGetArchivData.
Declaration
BOOL TLGGetArchivData (
LPTSTR lpszArchivName,
LPTSTR lpszVarName,
SYSTEMTIME stStart,
SYSTEMTIME stStop,
TLG_GETARCHIVDATA_CALLBACK lpfnCallback,
PVOID lpUser,
DWORD dwFlags,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log from which data is to be read.
lpszVarName
Pointer to the name of the log tag whose values are to be read.
stStart
Start time from which data should be read.
stStop
End time up to which the data should be read
lpfnCallback
Pointer to your callback function which is called for every measuring point to be read out.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
dwFlags
The parameter is reserved for future development and must be preset to 0.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log data determined
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLG_GETARCHIVDATA_CALLBACK (Page 2220)
TLGGetArchivDataEx (Page 2222)
3.8.6.9 TLG_GETARCHIVDATA_CALLBACK
Description
In order to evaluate the log data listed by the system, you must provide a callback function of the
TLG_GETARCHIVDATA_CALLBACK type.
Declaration
BOOL ( * TLG_GETARCHIVDATA_CALLBACK) (
PTLG_GETARCHIVDATA lpGAD,
PVOID lpUser );
Parameters
lpGAD
The system reserves temporary storage of the length of the TLG_GETARCHIVDATA structure
per log. The lpGAD pointer refers to the beginning of the first element.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only move data if possible. The following types of function calls within the callback can lead to
deadlocks or a stack overflow:
• Functions in which a message loop is accessed, e.g. GetMessage
• Runtime API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdertcli.h
pde_glob.h
pdertdef.h
Related functions
See also
TLGGetArchivData (Page 2218)
TLG_GETARCHIVDATA (Page 2164)
3.8.6.10 TLGGetArchivDataEx
Description
Reads out the data from a log between two times. Unlike TLGGetArchivData the values of the log
tags are saved in the memory.
Note
The assigned memory in ppTlgData must be freed by TLGFreeMemory.
Declaration
BOOL TLGGetArchivDataEx (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstStart,
SYSTEMTIME* pstStop,
PTLG_ARCHIVDATARAW* ppTlgData,
DWORD* pdwNumberOfData,
DWORD* pdwFlags,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the log name from which the data are read out.
lpszVarName
Pointer to the name of the log tag whose values are read.
stStart
Start time from which data are read.
stStop
End time up to which the data are read
If a current timer for transferring a SYSTEMTIME parameter is required, use the GetLocalTime
function and not GetSystemTime. There is generally a considerable time difference between
these two functions.
ppTlgData
Address of a pointer in which the address of the data of the log tag is stored. The data
field is allocated by TLGGetArchivDataEx and gets structures of the TLG_ARCHIVDATARAW
(Page 2150) type.
Note
The assigned memory must be freed again by TLGFreeMemory.
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.
pdwNumberOfData
Pointer to number of data records
• Before the call: Maximum number of data records to be read
• After the call: Number of read data records with the values of the log tags (of structures of
the TLG_ARCHIVDATARAW type).
Maximum 10,000 data records can be read with a call. If there are more data records
between start time and end time, you only get the first 10000. You get the next ones by
adding a millisecond to the time of the last data record and using this as a start time in a new
call for TLGGetArchivDataEx.
dwFlags
The parameter is reserved for future development and must be preset to 0.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log data determined
FALSE
Error
Note
The memory assigned by TLGGetArchivDataEx in ppTlgData must be freed again by
TLGFreeMemory.
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGFreeMemory (Page 2217)
TLGGetArchivData (Page 2218)
TLG_ARCHIVDATARAW (Page 2150)
3.8.6.11 TLGGetClosestTime
Description
The function determines the adjacent logging times at a given time.
Declaration
BOOL TLGGetClosestTime (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstTime,
BOOL bPrevious,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log
lpszVarName
Pointer to the name of the tag
pstTime
pstTime is used as an input and output parameter. When calling TLGGetClosestTime, pstTime
contains the system time for which the adjacent logging times are to be determined. After
the successful function call, pstTime contains the closest logging time.
bPrevious
bPrevious identifies whether a previous or next logging time is to be determined at the
transferred system time.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
pstTime contains an adjacent logging time.
FALSE
Error or no adjacent logging time could be determined.
Comment
If bPrevious is specified as TRUE and pstTime contains an existing value, exactly this time may be
returned and not the previous time. If bPrevious is specified as FALSE, the next time is always
supplied.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGGetClosestTimeEx (Page 2226)
3.8.6.12 TLGGetClosestTimeEx
Description
The function determines the adjacent logging times at a given time.
Declaration
BOOL TLGGetClosestTimeEx (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstTime,
BOOL bPrevious,
BOOL bIgnoreInvalid,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log
lpszVarName
Pointer to the name of the tag
pstTime
pstTime is used as an input and output parameter. When calling TLGGetClosestTime,
pstTime contains the system time for which the adjacent logging times are determined.
After the successful function call, pstTime contains the closest logging time.
bPrevious
bPrevious identifies whether a previous or next logging time is to be determined at the
transferred system time.
bIgnoreInvalid
Indicates whether values with the connection fault flag are to be ignored in the time
determination.
TRUE The values with connection fault are ignored and skipped.
FALSE All values are used for the time determination so that the same function exists as in
TLGGetClosestTime().
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
pstTime contains an adjacent logging time.
FALSE
Error or no adjacent logging time could be determined.
Comment
If bPrevious is specified as TRUE and pstTime contains an existing value, exactly this time may be
returned and not the previous time. If bPrevious is specified as FALSE, the next time is always
supplied.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLGGetClosestTime (Page 2224)
3.8.6.13 TLGInsertArchivData
Description
The function offers the possibility of inserting any data in an existing log on the hard disk.
If you perform TlgInsertArchivData for values which were created during summer time, you
have to allow for the time shift. Set the PDE_RT_DAYLIGHT flag when calling these values.
Without this flag, reading calls, e.g. TLGGetArchivData or TLGGetClosestTime return the
default time.
Note
Since the correctness of the data to be inserted is not checked, there is a danger of the log being
destroyed.
Declaration
BOOL TLGInsertArchivData (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
PTLG_ARCHIVDATARAW pTlgData,
DWORD dwNumberOfData,
DWORD dwFlags,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log
lpszVarName
Pointer to the name of the tag
pTlgData
Pointer to the first of the structures of the TLG_ARCHIVDATARAW type with the tag values to
be inserted in the log.
dwNumberOfData
Number of tag values (of the TLG_ARCHIVDATARAW structures) to be inserted.
dwFlags
TLG_API_FLG_FAST_INSERT If this flag is set, the data are written much faster in optimized
mode. However, a prerequisite for using this performance op‐
timization is that the timestamps of the written data records are
sorted chronologically and are always more up to date than the
data records already in the log.
When inserting older data records between existing data re‐
cords, this flag may not be used. If values are inserted which are
older than existing ones or ones which are not sorted chrono‐
logically, the older values are rejected without error messages.
TLG_API_FLG_REPLACE_INSERT If this flag is set, the data in the log is overwritten. The
"TLG_API_FLG_REPLACE_INSERT" flag cannot be used together
with the "TLG_API_FLG_FAST_INSERT" flag.
TLG_API_FLG_DETAILED_ERRORCODES If this flag is set, detailed error codes are output.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag values inserted in log
FALSE
Error
Error codes
If a log which is located in the main memory is specified under lpszArchivName, an error
message TLG_API_ERR_SUPPLY is output.
Only logs on the hard disk can be addressed with this function. If write errors occurred for
individual values, a more exact error description is returned in CMN_ERROR . Due to the
limited length of the CMN_ERR.szErrorText the number of detail errors is limited to max. 57.
If a log which is located in the main memory is specified under lpszArchivName, an error
message TLG_API_ERR_SUPPLY is output.
dwError1 TLG_API_ERR_SUPPLY
dwError2 0
dwError3 Line number in the source code
dwError4 Number of errors (max. 57)
dwError5 Number of data to be written (dwNumberOfData)
szErrorText TLG-API: an error occurred, line xxx; Pos:0=0xXX,1=0xXX,2=0xXX, ... (,
56=0xXX)
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
3.8.6.14 TLGLockArchiv
Description
Locks or frees a complete log. New data are not logged if a log is locked.
Declaration
BOOL TLGLockArchiv (
HWND hwnd,
LPTSTR lpszArchivName,
BOOL fLocked,
PCMN_ERROR lpError );
Parameters
hwnd
Window handle of the PDE runtime window
lpszArchivName
Pointer to the name of the log
fLocked
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log locked/freed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
3.8.6.15 TLGLockVariable
Description
Locks or frees a tag. A locked tag is no longer updated and no longer logged.
Declaration
BOOL TLGLockVariable (
HWND hwnd,
LPTSTR lpszArchivName,
LPTSTR lpszVarName,
BOOL fLocked,
PCMN_ERROR lpError );
Parameters
hwnd
Window handle of the PDE runtime window
lpszArchivName
Pointer to the name of the log
To select a certain server the "ServerPrefix::" can be prefixed to the log name.
lpszVarName
Pointer to the name of the tag
fLocked
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Tag freed / locked
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
3.8.6.16 TLGReadArchiv
Description
Read the parameters of an existing log in the hProject project. All types of logs can be processed
with this function.
Declaration
BOOL TLGReadArchiv (
HANDLE hProject,
LPTSTR lpszArchivName,
PTLG_ARCHIV_STR lpArchiv,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the log to be processed is located.
lpszArchivName
Name of the log to be processed.
lpArchiv
Address of the TLG_ARCHIV_STR (Page 2147) structure in which the paraneters of the log are
to be saved.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log contents read
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Read log (Page 2270)"TL01.cpp"
See also
TLGEnumArchives (Page 2207)
Read log (Page 2270)
TLG_ARCHIV_STR (Page 2147)
3.8.7.1 TLGCloseWindow
Description
An application window is closed with the function.
Declaration
BOOL TLGCloseWindow (
HWND hwnd,
PCMN_ERROR lpError );
Parameters
hwnd
Handle to the parent window of the application to be closed.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Application window closed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll
3.8.7.2 TLGDrawCurvesInDC
Description
Trends can be shown in an application window with this function.
Declaration
BOOL TLGDrawCurvesInDC (
HDC hDC,
PRECT lprect,
PTLG_PROT_CURVE_INFOS lpci,
DWORD dwNumberOfCurves,
LPCMN_ERROR lpError );
Parameters
hDC
Handle to the parent window in which the trend is to be output
lprect
Pointer to the Windows-specific structure of the RECT type with the size data of the window.
lpci
Pointer to the first structure of the TLG_PROT_CURVE_INFOS (Page 2166) type with
information about how the trends are to be output.
dwNumberOfCurves
Number of the structures (number of trends to be shown) transferred in lpci.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Trends shown
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
See also
TLG_PROT_CURVE_INFOS (Page 2166)
3.8.7.3 TLGInsertTemplateItem
Description
The function inserts a new entry for an existing window template, either a trend template or a
table template.
Declaration
BOOL TLGInsertTemplateItem (
LPTSTR lpszTemplateName,
PTLG_TEMPLATEITEM_INFO lpptii,
LPCMN_ERROR lpError );
Parameters
lpszTemplateName
Pointer to the name of the window template to which a trend or table template is to be
added.
lpptii
Pointer to a structure of the TLG_TEMPLATEITEM_INFO (Page 2173) type with the data of the
trend or table template to be added.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Window template extended
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Examples
Edit curve template - Example 1 (Page 2257) "TL02.cpp"
See also
TLG_TEMPLATEITEM_INFO (Page 2173)
Edit curve template - Example 1 (Page 2257)
3.8.7.4 TLGPressToolbarButton
Description
You can trigger functions linked with the toolbar buttons with this function.
Declaration
BOOL TLGPressToolbarButton (
LPTSTR lpszTemplate,
DWORD dwButtonID,
PCMN_ERROR lpError );
Parameters
lpszTemplate
Name of the template
dwButtonID
Code number for the button to be triggered:
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
3.8.7.5 TLGSetRulerWindowVisible
Description
The data window of the read line is shown or hidden with this function.
Declaration
BOOL TLGSetRulerWindowVisible (
LPTSTR lpszTemplateName,
BOOL bShowRulerWindow,
LPCMN_ERROR lpError );
Parameters
lpszTemplateName
Pointer to the name of the window template
bShowRulerWindow
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The parameter for the visibility of the read line data window was re-entered.
FALSE
Error
Comment
The function is not effective in the f(x) trend view and table view until the appropriate image
with the object is displayed.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
3.8.7.6 TLGShowWindow
Description
The function influences the display form of the window.
Declaration
BOOL TLGShowWindow (
HWND hwnd,
DWORD dwFlags,
PCMN_ERROR lpError );
Parameters
hwnd
Window handle of the runtime window
dwFlags
The same flags apply here as in ::ShowWindow(HWND hwnd, int nCmdShow) as they are
defined in WinUser.h (SW_SHOW, SW_HIDE, ...).
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Application window shown
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
WinUser.h
3.8.8.1 TLGEnumTime
Description
Enumerates the names of all detection and logging times of a project
Declaration
BOOL TLGEnumTime (
HANDLE hProject,
TLG_ENUM_TIME_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the time objects to be listed are located.
lpCallbackFunc
Pointer to your callback function which is called for every existing time object.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Time objects listed
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Related functions
Examples
Enum all acquisition and logging times (Page 2260) "TL01.cpp"
See also
TLG_ENUM_TIME_NAME_CALLBACK (Page 2245)
Enum all acquisition and logging times (Page 2260)
3.8.8.2 TLG_ENUM_TIME_NAME_CALLBACK
Description
In order to be able to evaluate the time objects listed by the system, you must provide a callback
function of the TLG_ENUM_TIME_NAME_CALLBACK type.
Declaration
BOOL ( * TLG_ENUM_TIME_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );
Parameters
lpszName
The lpszName pointer refers to the name of the first time object.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdecscli.h
Related functions
Examples
Enum all acquisition and logging times (Page 2260) "TL01.cpp"
See also
Enum all acquisition and logging times (Page 2260)
TLGEnumTime (Page 2244)
3.8.8.3 TLGEnumTimes
Description
Enumerates all detection and logging times.
Declaration
BOOL TLGEnumTimes(
TLG_ENUMTIMES_CALLBACK lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
lpfnCallback
Pointer to your callback function
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Time objects listed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLG_ENUMTIMES_CALLBACK (Page 2248)
3.8.8.4 TLG_ENUMTIMES_CALLBACK
Description
In order to be able to evaluate the time objects listed by the system, you must provide a callback
function of the TLG_ENUMTIMES_CALLBACK type.
Declaration
BOOL ( * TLG_ENUMTIMES_CALLBACK) (
PTLG_TIMEDATA lpTime,
PVOID lpUser );
Parameters
lpTime
The system reserves temporary storage of the length of the TLG_TIMEDATA (Page 2176)
structure per time object. The lpTime pointer refers to the beginning of the first element.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdertcli.h
pde_glob.h
pdertdef.h
Related functions
See also
TLGEnumTimes (Page 2246)
TLG_TIMEDATA (Page 2176)
3.8.8.5 TLGReadTime
Description
Read the parameters of an already created time object
Declaration
BOOL TLGReadTime (
HANDLE hProject,
LPTSTR lpszTimeName,
PTLG_TIME_STR lpTime,
LPCMN_ERROR lpoes );
Parameters
hProject
Handle of the project in which the time object to be processed is located.
lpszTimeName
Pointer to the name of the time object
lpTime
Address of the TLG_TIME_STR (Page 2175) structure with the data of the time object.
lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Parameters of the time object read
FALSE
Error
Required files
pdecscli.h
pdecscli.lib
pdecscli.dll
Examples
Read parameters of time object (Page 2274) "TL01.cpp"
See also
TLG_TIME_STR (Page 2175)
Read parameters of time object (Page 2274)
3.8.9.1 TLGEnumBackupEntries
Description
This function is no longer supported and supplies FALSE and the error code
TLG_API_NOT_SUPPORTED as a return value.
Declaration
BOOL TLGEnumBackupEntries (
LPTSTR lpszArchivName,
TLG_ENUMBACKUP_ENTRIES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log
lpfnCallback
Pointer to your callback function which is called for every existing backuo.
lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Backups listed
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
Related functions
See also
TLG_ENUMBACKUP_ENTRIES (Page 2252)
3.8.9.2 TLG_ENUMBACKUP_ENTRIES
Description
The TLGEnumBackupEntries function is no longer supported. In order to be able to evaluate the
backups listed by the system, you must provide a callback function of the
TLG_ENUMBACKUP_ENTRIES type.
Declaration
BOOL ( * TLG_ENUMBACKUP_ENTRIES) (
PTLG_BACKUP_TABLE_INFO lpbti,
PVOID lpUser );
Parameters
lpbti
The system reserves temporary storage of the length of the TLG_BACKUP_TABLE_INFO
(Page 2153) structure per backup. The lpbti pointer refers to the beginning of the first
element.
lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is cancelled.
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
Required files
pdertcli.h
pde_glob.h
pdertdef.h
Related functions
See also
TLGEnumBackupEntries (Page 2250)
TLG_BACKUP_TABLE_INFO (Page 2153)
3.8.9.3 TLGExport
Description
Parts of a log can be exported with the function. The data records to be exported are selected by
the TLG_IO_BACKUP_SELECT structure.
Declaration
BOOL TLGExport (
LPTSTR lpszArchivName,
LPTSTR lpszFileName,
PTLG_IO_BACKUP_SELECT lpibs,
DWORD dwJobFlags,
DWORD dwFormatFlags,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log The name must be specified made up in the form "log
name\tag name" zusammengesetzt anzugeben.
The parts of the name can be determined with TLGEnumArchivsEx and TLGEnumVariablesEx.
lpszFileName
Pointer to the name of the file into which the data are to be exported.
lpibs
Address of the transfer structure TLG_IO_BACKUP_SELECT (Page 2165) for the selection
parameters.
dwJobFlags
The parameter is provided for later upgrades and must be supplied with 0L.
dwFormatFlags
Format specifier:
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Log data exported
FALSE
Error
Comment
This function is only useful for sequential logs, circular logs and compressed logs.
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
See also
TLG_IO_BACKUP_SELECT (Page 2165)
3.8.9.4 TLGGetBackupSize
Description
The function is no longer supported and supplies FALSE and the error code
TLG_API_NOT_SUPPORTED as a return value.
Declaration
BOOL TLGGetBackupSize (
LPTSTR lpszArchivName,
DWORD* lpdwSizeOfTable,
PTLG_IO_BACKUP_SELECT lpibs,
DWORD dwJobFlags,
DWORD dwFormatFlags,
PCMN_ERROR lpError );
Parameters
lpszArchivName
Pointer to the name of the log
lpdwSizeOfTable
Address of a DWORD in which the size of the selected data in bytes is written.
lpibs
Address of the transfer structure TLG_IO_BACKUP_SELECT (Page 2165) for the selection
parameters.
dwJobFlags
Job-specific identification, following are possible:
dwFormatFlags
Format specifier:
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Size of data determined
FALSE
Error
Error messages
Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
See also
TLG_IO_BACKUP_SELECT (Page 2165)
3.8.10 Examples
Example
// =====================================================================
// =====================================================================
// : Modul with examples to TagLogging-API
// *********************************************************************
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
//#include "odkapi.h" // if console application
#include "TL02.h"
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#include <time.h>
// IMPLEMENTATION
//{{ODK_EXAMPLE}Edit curve template (example no. 1) (TLG)}
//{{FUNCTION}TLGConnect (TLG)}
//{{FUNCTION}TLGDisconnect (TLG)}
//{{FUNCTION}TLGInsertTemplateItem (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTLGInsertTemplateItem(void) ODK TL RT
// =====================================================================
// : Edit curve template
// : Defines a new curve with previous settings
// =====================================================================
void MyTLGInsertTemplateItem (void)
{
#define COLOR_RED 0x000000FF
// scripts
BOOL ret = FALSE;
CMN_ERROR Error;
TCHAR szText[255];
HWND hwndParent = NULL;
TLG_TEMPLATEITEM_INFO TemplateItem;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGInsertTemplateItem: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
memset(&TemplateItem, 0, sizeof(TLG_TEMPLATEITEM_INFO));
_tcsncpy_s(TemplateItem.szArchivName, _countof(TemplateItem.szArchivName),
_T("PLSMWA"), _TRUNCATE); // archive name
_tcsncpy_s(TemplateItem.szTemplateName, _countof(TemplateItem.szTemplateName),
_T("KV_PID1"), _TRUNCATE); // template for curve window
_tcsncpy_s(TemplateItem.szVariableName, _countof(TemplateItem.szVariableName),
_T("VPID1_X"), _TRUNCATE); // DM variable name
_tcsncpy_s(TemplateItem.szDMVariableName, _countof(TemplateItem.szDMVariableName),
_T("VPID1_X"), _TRUNCATE);
_tcsncpy_s(TemplateItem.szTemplateItemName,
_countof(TemplateItem.szTemplateItemName), _T("KPID3_X"), _TRUNCATE); // curve name
TemplateItem.dwTemplateTyp = TLG_TEMPLATE_CURVE;
TemplateItem.dwTemplateItemTyp = TLG_TEMPLATEITEM_CURVE;
TemplateItem.dwReadAccessLevel = 1;
TemplateItem.dwWriteAccessLevel = 1;
TemplateItem.dwArchivTyp = TLG_ARCTYP_PROCESS; //_USER, _PROCESS, _COMPRESS
_tcsncpy_s(TemplateItem.szTimeNameRange, _countof(TemplateItem.szTimeNameRange),
_T("500 ms"), _TRUNCATE);
TemplateItem.fVisible = TRUE;
TemplateItem.tplInfo.tplCurve.csx.dwDataTyp = TLG_DATATYP_TIMERANGE;
TemplateItem.tplInfo.tplCurve.csx.fAutoRange = TRUE;
TemplateItem.tplInfo.tplCurve.csx.fActualize = TRUE;
TemplateItem.tplInfo.tplCurve.csx.dwBufferSize = 10;
TemplateItem.tplInfo.tplCurve.csy.dwDataTyp = TLG_DATATYP_BLOCKDATA;
TemplateItem.tplInfo.tplCurve.csy.fAutoRange = TRUE;
TemplateItem.tplInfo.tplCurve.csy.crColor = COLOR_RED;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGInsertTemplateItem(TemplateItem.szTemplateName, &TemplateItem, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGInsertTemplateItem: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("InsertItem:
TemplateItemName= %s "), TemplateItem.szTemplateItemName);
}
ODKTrace(szText);
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
TLGInsertTemplateItem (Page 2238)
TLGConnect (Page 2191)
TLGDisconnect (Page 2193)
Example
/ =====================================================================
// =====================================================================
// : Modul with examples to TagLogging-API
// *********************************************************************
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
#include "stdlib.h"
#include "TL01.h"
#include "dm01.h"
// IMPLEMENTATION
// =====================================================================
// 4. Callback
// =====================================================================
//{{ODK_EXAMPLE}Enum all acquisition and archiving times (TLG)}
//{{FUNCTION}TLGCSConnect (TLG)}
//{{FUNCTION}TLGCSDisConnect (TLG)}
//{{FUNCTION}TLGEnumTime (TLG)}
//{{FUNCTION}TLG_ENUM_TIME_NAME_CALLBACK (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: TLGEnumTime(void) ODK TL CS
// =====================================================================
// : Enum all acquisition and archiving times
// :
// =====================================================================
BOOL MyTLGEnumTimeNameCallback (LPTSTR szTime, PVOID lpUser)
{
TCHAR szText[255];
sprintf(szText,"...Enum Time %s", szTime);
ODKTrace(szText);
//printf("%s\r\n",szText);
return TRUE;
}
void MyTLGEnumTime(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
TCHAR szText[255];
HANDLE hProject;
CMN_ERROR Error;
PVOID pUser = NULL;
sprintf(szText, "TLGEnumTime");
ODKTrace(szText);
//printf("%s\r\n",szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGCSConnect: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else
{
sprintf(szText, " TLGCSConnect");
ODKTrace(szText);
//printf("%s\r\n",szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGOpenProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else //TLGOpenProject OK
{
sprintf(szText, " TLGOpenProject");
ODKTrace(szText);
//printf("%s\r\n",szText);
// read projected archiving times
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumTime(hProject, MyTLGEnumTimeNameCallback, pUser, &Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGEnumTime: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, " TLGEnumTime");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
//TLGCloseProject();
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject, &Error);
if(FALSE == ret)
{
sprintf(szText, "Error in TLGCloseProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, " TLGCloseProject");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGCSDisConnect: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, " TLGCSDisConnect");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
//{{ODK_EXAMPLE}(END)}
See also
TLGCSConnect (Page 2186)
TLG_ENUM_TIME_NAME_CALLBACK (Page 2245)
TLGEnumTime (Page 2244)
TLGDisconnect (Page 2193)
TLGCSDisConnect (Page 2189)
Example
void MyTLGEnumArchives(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HANDLE hProject;
PVOID pUser = NULL;
TCHAR szText[255];
TCHAR szArchivName[255];
_tcsncpy_s(szArchivName, _countof(szArchivName), _T("PLSMWA"), _TRUNCATE);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
//TLGConnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
//TLGOpenProject
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGOpenProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
// TLGEnumArchives
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumArchives(hProject, MyTLGEnumArchivCallback, pUser, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGEnumArchives: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGEnumArchives"));
}
ODKTrace(szText);
}
//CloseProject
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject,&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCloseProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCloseProject"));
}
ODKTrace(szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSDisConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCSDisConnect"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}
See also
TLGCSConnect (Page 2186)
TLGOpenProject (Page 2195)
TLGCloseProject (Page 2194)
TLGEnumArchives (Page 2207)
TLG_ENUM_ARCHIV_CALLBACK (Page 2208)
TLGCSDisConnect (Page 2189)
Example
void MyTLGEnumVariablesEx(void)
{
BOOL ret = FALSE;
TCHAR szText[255];
CMN_ERROR Error;
HANDLE hProject = NULL;
TCHAR szArchivName[255];
HWND hwndParent = NULL;
VOID* pUser = NULL;
_tcsncpy_s(szArchivName, _countof(szArchivName), _T("PLSMWA"), _TRUNCATE);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGConnect"));
ODKTrace(szText);
// Info
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumVariablesEx (szArchivName, MyTLGEnumVariablesExCallback,
pUser, &Error );
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGEnumVariablesEx: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGEnumVariablesEx: OK"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
TLGOpenProject (Page 2195)
TLGEnumVariablesEx (Page 2202)
TLG_ENUMVARIABLES (Page 2204)
Example
void MyTLGEnumArchivs(void)
{
BOOL ret = FALSE;
//DWORD StartTime = 0;
//DWORD StopTime = 0;
void* lpUser = NULL;
CMN_ERROR Error;
TCHAR szText[255];
HWND hwndParent = NULL;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGConnect"));
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumArchivs(TLG_ARCTYP_PROCESS, MyTLGEnumTablesCallback, lpUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGEnumArchivs:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGEnumArchivs: OK"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}
See also
TLGConnect (Page 2191)
TLGDisconnect (Page 2193)
TLGEnumArchivs (Page 2210)
Example
{
// read
memset(&TLGArchivStruct,0,sizeof(TLG_ARCHIV_STR));
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGReadArchiv(hProject, szArchivName, &TLGArchivStruct, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGReadArchiv:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGReadArchiv"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ArcName=%s
Comments=%s dwTyp=0x%04x dwRecSize=%d"),
TLGArchivStruct.szName,
TLGArchivStruct.szComment,
TLGArchivStruct.dwTyp,
TLGArchivStruct.dwRecordSize);
ODKTrace(szText);
}
memset(&TLGVarStruct, 0, sizeof(TLG_VAR_STR));
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGReadVariable(hProject, szArchivName, szVarName, &TLGVarStruct, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGReadVariable: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGReadVariable"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szVarName=%s"),
TLGVarStruct.szVarName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szProcName=%s"),
TLGVarStruct.szProcName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwVarType=0x%04X"),
TLGVarStruct.dwVarType);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("
dwArchivStyle=0x%04X"), TLGVarStruct.dwArchivStyle);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szWriteBackTo=%s"),
TLGVarStruct.szWriteBackTo);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwSupply=0x%04X"),
TLGVarStruct.dwSupply);
ODKTrace(szText);
//{{ODK_EXAMPLE}(END)}
See also
TLGOpenProject (Page 2195)
TLGCloseProject (Page 2194)
TLGCSConnect (Page 2186)
TLGReadVariable (Page 2205)
TLGReadArchiv (Page 2234)
TLGCSDisConnect (Page 2189)
Example
See also
TLGOpenProject (Page 2195)
TLGCloseProject (Page 2194)
TLGCSConnect (Page 2186)
TLGReadTime (Page 2249)
TLGCSDisConnect (Page 2189)
3.9.1 Basics
Overview
See also
uaUsers (Page 2290)
Introduction
User archives are individual tables in the database that can be structured by the user in any
manner, except for the first column. The data types are limited to char, double, int, and
DateTime fields.
The GetField and SetField functions act on an internal hRecord data record that can be
written to the archive with Insert and Update.
If the user archive is modified directly via the database (ODBC/SQL), an online
synchronization is not performed.
UAArchiveImport
UAArchiveInsert
UAArchiveMoveFirst
UAArchiveMoveLast
UAArchiveMoveNext
UAArchiveMovePrevious
UAArchiveReadTagValues
UAArchiveReadTagValuesByName
UAArchiveRequery
UAArchiveSetFieldValueDate
UAArchiveSetFieldValueDouble
UAArchiveSetFieldValueFloat
UAArchiveSetFieldValueLong
UAArchiveSetFieldValueString
UAArchiveSetFilter
UAArchiveSetSort
UAArchiveUpdate
UAArchiveWriteTagValues
UAArchiveWriteTagValuesByName
<--- UAArchiveClose
<---
UAReleaseArchive
<--- UADisconnect
Overview
The following error messages can be queried with API function UAGetLastError.
3.9.1.5 Constants
Configuration constants:
Archive types
Archive flags
Communication types
Field types
Field flags
Maximum length
Parameter constants:
Actions
UA_ACTION_GENERIC 0 Configuration
UA_ACTION_INSERT 1 Insert
UA_ACTION_UPDATE 2 Synchronize/overwrite
UA_ACTION_DELETE 3 Delete
Move values
3.9.2 Structures
3.9.2.1 uaCONFIGARCHIVE
Declaration
typedef struct {
LONG lArchiveId;
LONG lPosition;
CHAR szName[UA_MAXLEN_NAME+1];
CHAR szAlias[UA_MAXLEN_ALIAS+1];
LONG lType;
LONG lNumRecs;
LONG lCommType;
CHAR szPLCID[UA_MAXLEN_PLCID+1];
CHAR szDMVarName[UA_MAXLEN_DMVARNAME+1];
CHAR szIDVar[UA_MAXLEN_DMVARNAME+1];
CHAR szJobVar[UA_MAXLEN_DMVARNAME+1];
CHAR szFieldVar[UA_MAXLEN_DMVARNAME+1];
CHAR szValueVar[UA_MAXLEN_DMVARNAME+1];
DWORD dwReadRight;
DWORD dwWriteRight;
DWORD dwFlags;
} UACONFIGARCHIVE;
Members
lArchiveId
Unique ID of the user archive.
lPosition
Position of the user archive
szName
Archive name max. 20 characters
szAlias
Alias name max. 50 characters
lType
lNumRecs
Max. number of data records
lCommType
UA_COMMTYPE_NONE No communication
UA_COMMTYPE_RAW Communication with raw data
UA_COMMTYPE_DIRECT Communication with WinCC tags
szPLCID
PLCID of the raw data tag
szDMVarName
Name of the raw data tag
szIDVar
ID of the control tag
szJobVar
"Job" control tag
szFieldVar
"Field" control tag
szValueVar
"Value" control tag
dwReadRight
Read access rights
dwWriteRight
Write access rights
dwFlags
3.9.2.2 uaCONFIGFIELD
Structure "uaCONFIGFIELDA"
typedef struct {
LONG lArchiveId
LONG lFieldId;
LONG lPosition;
CHAR szName[UA_MAXLEN_NAME+1];
CHAR szAlias[UA_MAXLEN_ALIAS+1];
LONG lType;
LONG lLength;
LONG lPrecision;
CHAR szMinValue[UA_MAXLEN_VALUE+1];
CHAR szMaxValue[UA_MAXLEN_VALUE+1];
CHAR szStartValue[UA_MAXLEN_VALUE+1];
CHAR szDMVarName[UA_MAXLEN_DMVARNAME+1];
DWORD dwReadRight;
DWORD dwWriteRight;
DWORD dwFlags;
} UACONFIGARCHIVE;
Members
lArchiveId
Unique ID of the user archive.
lFieldID
Unique ID of the data field
lPosition
Position of the user archive
szName
Archive name max. 20 characters
szAlias
Alias name max. 50 characters
lType
lLength
Maximum number of characters if the data field is of the type STRING; otherwise, not used
lPrecision
Reserved for internal use
szMinValue
Minimum value. Not used for data fields of the type STRING or DATE.
szMaxValue
Maximum value. Not used for data fields of the type STRING or DATE.
szStartValue
Start value
szDMVarName
Name of the WinCC tag. Used for recipes with communication over WinCC tags.
dwReadRight
Read access rights
dwWriteRight
Write access rights
dwFlags
3.9.3.1 uaGetLastError
Description
Many functions return a Boolean value. TRUE indicates error-free function processing. If the
value FALSE is returned, the error can be read in the last function used by using the
uaGetLastError function.
uaGetLastError always takes you back to the last error. If you know precisely which function
contains an error, you must evaluate the return after each call of a function and call
uaGetLastError in the event of an error.
Return value
Error status of the last function executed. Error constants and predefined items are determined
in CCUACAPI.H.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
3.9.3.2 uaIsActive
Description
Check that no recipe is in use in an active Runtime.
Declaration
BOOL uaIsActive (
UAHCONNECT hConnect )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
Return value
TRUE
Recipe in use in active Runtime.
FALSE
Recipe not in use in active Runtime.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
3.9.3.3 uaUsers
Description
Provides the number for all users, connected to a recipe by uaConnect. Here, consider calls by
users, e.g. through scripts that are also contained within WinCC.
Declaration
LONG uaUsers (
UAHCONNECT hConnect )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
Return value
Number of active connections
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
3.9.3.4 uaSetLocalEvents
Description
Sets local events.
Declaration
void uaSetLocalEvents (
UAHCONNECT hConnect
BOOL bLocalEvents )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
bLocalEvents
Local Event
Return value
No return value
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
3.9.4.1 uaConnect
Description
Generates a connection to a recipe in Runtime.
Declaration
BOOL uaConnect (
UAHCONNECT* phConnect )
Parameters
phConnect
Pointer to the recipe handle.
Return value
TRUE
Connection to recipe generated
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Comments
The supplied handle is required for the functions uaDisconnect, uaIsActive, uaUsers,
uaOpenViews, uaOpenArchives, uaQueryArchive and uaQueryArchiveByName.
Related functions
See also
uaIsActive (Page 2289)
uaUsers (Page 2290)
uaSetLocalEvents (Page 2291)
uaDisconnect (Page 2293)
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaOpenArchives (Page 2314)
uaOpenViews (Page 2343)
Overview of the functions (Page 2276)
3.9.4.2 uaDisconnect
Description
When a connection is made to a recipe in Runtime, the connection is terminated.
Declaration
BOOL uaDisconnect (
UAHCONNECT hConnect )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
Return value
TRUE
Connection terminated.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
Overview of the functions (Page 2276)
3.9.4.3 uaQueryArchive
Description
Makes a connection to a recipe. uaQueryArchive generates the handle phArchive.
Declaration
BOOL uaQueryArchive (
UAHCONNECT hConnect,
LONG lArchive,
UAHARCHIVE* phArchive )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
lArchive
ID of the archive to be connected.
phArchive
Pointer to the connected recipe handle.
Return value
TRUE
Connection established
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Comments
If only an archive index is available, the ID of the archive can be determined with the
configuration function uaGetArchive.
Related functions
See also
uaConnect (Page 2292)
uaReleaseArchive (Page 2299)
uaArchiveClose (Page 2302)
uaArchiveDelete (Page 2303)
uaArchiveExport (Page 2304)
uaArchiveGetID (Page 2306)
uaArchiveGetName (Page 2307)
uaArchiveGetSort (Page 2308)
uaArchiveImport (Page 2309)
uaArchiveOpen (Page 2310)
uaArchiveUpdate (Page 2311)
uaArchiveGetCount (Page 2315)
uaArchiveGetFilter (Page 2317)
uaArchiveInsert (Page 2318)
uaArchiveMoveFirst (Page 2319)
3.9.4.4 uaQueryArchiveByName
Description
Makes a connection to a recipe by name. uaQueryArchiveByName generates the handle
phArchive.
Declaration
BOOL uaQueryArchiveByName (
UAHCONNECT hConnect,
LPCSTR pszName,
UAHARCHIVE* phArchive )
Parameters
hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.
pszName
Recipe name.
phArchive
Pointer to the connected recipe handle.
Return value
TRUE
Connection established
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Comments
If only an archive index is available, the name of the archive can be determined with the
configuration function uaGetArchive.
Related functions
See also
uaConnect (Page 2292)
uaReleaseArchive (Page 2299)
uaArchiveClose (Page 2302)
uaArchiveDelete (Page 2303)
uaArchiveExport (Page 2304)
uaArchiveGetID (Page 2306)
uaArchiveGetName (Page 2307)
3.9.4.5 UaQueryConfiguration
Description
Generates the connection to a recipe for the configuration.
Declaration
BOOL uaQueryConfiguration (
UAHCONFIG* phConfig )
Parameters
phConfig
Pointer to receptor handle.
Return value
TRUE
Connection established
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
See also
uaReleaseConfiguration (Page 2301)
uaGetArchive (Page 2312)
uaGetNumArchives (Page 2314)
uaGetNumFields (Page 2323)
uaGetField (Page 2338)
Overview of the functions (Page 2276)
3.9.4.6 uaReleaseArchive
Description
Breaks off the connection to the currently connected recipe.
Declaration
BOOL uaReleaseArchive (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Connection terminated.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Comment
To successfully terminate the connection you must set the hArchive handle to NULL . If you use
a handle that is no longer valid the error message UA_ERROR_INVALID_HANDLE is generated.
This avoids unnecessary memory overloading.
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.4.7 uaReleaseConfiguration
Description
Terminates a connection to a recipe after configuring it.
Declaration
BOOL uaReleaseConfiguration (
UAHCONFIG hConfig,
BOOL bSave )
Parameters
hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.
bSave
Establishes that changes to a configuration are saved before terminating the connection.
Note
bSave = TRUE should only be used, if a recipe is not used in an active WinCC Runtime! Check if
Runtime is active by using the uaIsActive function.
Return value
TRUE
Connection terminated.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
UaQueryConfiguration (Page 2298)
Overview of the functions (Page 2276)
3.9.5.1 uaArchiveClose
Description
Closes an open recipe.
Declaration
BOOL uaArchiveClose (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Recipe closed.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaArchiveOpen (Page 2310)
Overview of the functions (Page 2276)
3.9.5.2 uaArchiveDelete
Description
Deletes data from a recipe. The configured recipe remains selected.
Declaration
BOOL uaArchiveDelete (
UAHARCHIVE hArchive,
LPCSTR pszWhere )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszWhere
String with the SQL selection for the data entries to be deleted. This string corresponds to the
SQL instruction DELETE FROM <archive> WHERE pszWhere.
Note
If pszWhere is empty, the entire user archive will be deleted.
Return value
TRUE
Data deleted.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.3 uaArchiveExport
Description
Exports data from a recipe to CSV file.
Declaration
BOOL uaArchiveExport (
UAHARCHIVE hArchive,
LPCSTR pszDestination,
LONG lType,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszDestination
Target file name. When calling the function on a client, the path specified refers to the server.
lType
Target file data format. Two formats are available:
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data exported.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaArchiveImport (Page 2309)
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.4 uaArchiveGetID
Description
Reads the recipe ID
Return Value:
"ID" of the user archive
Declaration
LONG uaArchiveGetID (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
ID of the recipe
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.5 uaArchiveGetName
Description
Reads the recipe name.
Declaration
VOID uaArchiveGetName (
UAHARCHIVE hArchive,
LPSTR pszName,
LONG cMaxLen )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszName
Pointer to the recipe name buffer.
cMaxLen
Maximum Length
Return value
No return value
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
Example
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.6 uaArchiveGetSort
Description
Reads the recipe sort parameters.
Declaration
VOID uaArchiveGetSort (
UAHARCHIVE hArchive,
LPSTR pszSort,
LONG cMaxLen )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszSort
Sort parameters as SQL statement.
cMaxLen
Maximum Length
Return value
No return value
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.7 uaArchiveImport
Description
Imports data from a CSV file to a recipe. The structure of the recipe must be identical to the
imported CSV archive.
Declaration
BOOL uaArchiveImport (
UAHARCHIVE hArchive,
LPCSTR pszSource,
LONG lType,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszSource
File name using the data to be imported.
lType
Source file data format. Two formats are available:
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data imported.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaArchiveExport (Page 2304)
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.8 uaArchiveOpen
Description
Opens a recipe. Calling uaArchiveOpen is required to read or write in a recipe. Foe example
calling the functionsuaArchiveMoveNext, uaArchiveDelete or uaArchiveUpdate.
Declaration
BOOL uaArchiveOpen (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Recipe open.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaArchiveClose (Page 2302)
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.9 uaArchiveUpdate
Description
Updates an open recipe. All changed recipe data will be applied in the database. The recipe
structure remains unchanged.
Declaration
BOOL uaArchiveUpdate (
U AHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Recipe data updated.
FALSE
In the case of a consistency violation, the error message Update_failed = 106 is displayed.
This kind of consistency violation exists, for example, if a field has the "Field must contain a
value" property, but there is no value in the field.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.5.10 uaGetArchive
Description
Reads the recipe configuration.
Declaration
BOOL uaGetArchive (
UAHCONFIG hConfig,
Long lArchive,
UACONFIGARCHIVE* pArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryConfiguration.
lArchive
Recipe index. Value: 0... uaGetNumArchives() -1
pArchive
Point on the configuration data buffer.
Return value
TRUE
Successful access.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
UaQueryConfiguration (Page 2298)
Overview of the functions (Page 2276)
uaCONFIGARCHIVE (Page 2284)
3.9.5.11 uaGetNumArchives
Description
Reads the number of recipes currently configured.
Declaration
LONG uaGetNumArchives (
UAHCONFIG hConfig )
Parameters
hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.
Return value
Number of recipes configured. If an error occurs -1 is output.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
UaQueryConfiguration (Page 2298)
Overview of the functions (Page 2276)
3.9.5.12 uaOpenArchives
Description
Communicates the number of recipes in the open Runtime.
Declaration
LONG uaOpenArchives (
UAHCONNECT hConnect )
Parameters
hArchive
Handle on recipe. This handle is generated using uaConnect.
Return value
Number of recipes open.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
Overview of the functions (Page 2276)
3.9.6.1 uaArchiveGetCount
Description
Reads the number of data records.
Return Value:
Number of data records. If "0" the archive is empty or an error has occurred. A query using
"uaGetLastError" is required.
Declaration
LONG uaArchiveGetCount(
UAHARCHIVE hArchive,
LONG* plCount )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
plCount
Pointer to a tag in which the number of records should be stored.
Return value
Number of data records. If 0 the archive is empty or an error has occurred. A query using
uaGetLastError is recommended.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.2 uaArchiveGetFilter
Description
Reads the selection criteria for the current data record.
Declaration
VOID uaArchiveGetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter,
LONG cMaxLen )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszFilter
Selection parameters as SQL statement.
cMaxLen
Maximum Length
Return value
No return value
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.3 uaArchiveInsert
Description
Inserts the local data record buffer into the recipe. In order for meaningful records to be stated
in the new data file, before calling uaArchiveInsert the fields of the local data record buffers must
be written using the uaArchiveSetFieldValue...function.
The "ID" field must be written using uaArchiveSetFieldValueLong function if an archive has no
ID or if it is written as "0".
Declaration
BOOL uaArchiveInsert (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Data record inserted.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.4 uaArchiveMoveFirst
Description
Goes to the first data record.
Declaration
BOOL uaArchiveMoveFirst (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Successful jump.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.5 uaArchiveMoveLast
Description
Goes to the last data record.
Declaration
BOOL uaArchiveMoveLast (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Successful jump.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.6 uaArchiveMoveNext
Description
Goes to the next data record.
Declaration
BOOL uaArchiveMoveNext (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Successful jump.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.7 uaArchiveMovePrevious
Description
Goes to the previous data record.
Declaration
BOOL uaArchiveMovePrevious (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Successful jump.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.6.8 uaGetNumFields
Description
Supplies the number of the configured fields. The "ID", "Last User" and "Last Access" fields are not
included. In the configuration calls the index is stated using"0 … uaGetNumFields() -1".
Declaration
LONG uaGetNumFields (
UAHCONFIG honfig,
long lArchive )
Parameters
hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.
lArchive
Recipe index. Value: 0... uaGetNumArchives() -1
Return value
Number of the configured fields. If an error occurs -1 is output.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
UaQueryConfiguration (Page 2298)
Overview of the functions (Page 2276)
3.9.7.1 uaArchiveGetFieldLength
Description
Reads the length of a field in the current data record.
Declaration
LONG uaArchiveGetFieldLength(
UAHARCHIVE hArchive,
LONG lField )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
Return value
Length of the current field.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.2 uaArchiveGetFieldName
Description
Reads the name of a field in the current data record.
Declaration
VOID uaArchiveGetFieldName (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszName,
LONG cMaxLen )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pszName
Field Name
cMaxLen
Maximum Length
Return value
TRUE
Name read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.3 uaArchiveGetFields
Description
Reads the number of the configured data fields. The "ID", "Last User" and "Last Access" fields are
included. In Runtime calls the index of configured fields is indicated using 1 ... N. The "ID" field
has a "0" index. The "Last User" and "Last Access" fields are appended at the end of the configured
fields.
Declaration
LONG uaArchiveGetFields (
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
Number of the configured fields.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.4 uaArchiveGetFieldType
Description
Reads the type of a field in the current data record.
Declaration
LONG uaArchiveGetFieldType (
UAHARCHIVE hArchive,
LONG lField )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
Return value
Type of the current field. The symbolic definitions of the field types are:
UA_FIELDTYPE_INTEGER
UA_FIELDTYPE_FLOAT
UA_FIELDTYPE_DOUBLE
UA_FIELDTYPE_STRING
UA_FIELDTYPE_DATETIME
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.5 uaArchiveGetFieldValueDate
Description
Reads the date and time of a field in the current data record.
Declaration
BOOL uaArchiveGetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pstDateTime
Pointer to a tag of the SYSTEMTIME type.
Return value
TRUE
Change date and time.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.6 uaArchiveGetFieldValueDouble
Description
Reads a value of the Double data type from a field in the current data record.
Declaration
BOOL uaArchiveGetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double* pdValue )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pdValue
Pointer to the tag for the field value.
Return value
TRUE
Value read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.7 uaArchiveGetFieldValueLong
Description
Reads a value of the Long data type from a field in the current data record.
Declaration
BOOL uaArchiveGetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG* pdValue )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pdValue
Pointer to the tag for the field value.
Return value
TRUE
Value read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.8 uaArchiveGetFieldValueString
Description
Reads a value of the String data type from a field in the current data record.
Declaration
BOOL uaArchiveGetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPSTR pszString,
LONG cMaxLen )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pszString
Pointer to the tag for the field value.
pdValue
Maximum length of the string.
Return value
TRUE
Value read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.9 uaArchiveSetFieldValueDate
Description
Writes the date and time into a field of the current data record.
Declaration
BOOL uaArchiveSetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pstDateTime
Date and Time.
Return value
TRUE
Value written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.10 uaArchiveSetFieldValueDouble
Description
Writes a value from the Double data type from a field in the current data record.
Declaration
BOOL uaArchiveSetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double dValue )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
dValue
Value to be written.
Return value
TRUE
Value written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.11 uaArchiveSetFieldValueLong
Description
Writes a value from the Long data type from a field in the current data record.
Declaration
BOOL uaArchiveSetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG dValue )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
dValue
Value to be written.
Return value
TRUE
Value written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.12 uaArchiveSetFieldValueString
Description
Writes a value from the String data type from a field in the current data record.
Declaration
BOOL uaArchiveSetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszString )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pszString
String to be written.
Return value
TRUE
Value written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.7.13 uaGetField
Description
Reads the field configuration.
Declaration
BOOL uaGetField (
UAHCONFIG hConfig,
Long lArchive,
Long lField,
UACONFIGFIELD* pField )
Parameters
hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.
lArchive
Recipe index. Value: 0... uaGetNumArchives() -1
lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses the
"ID" field.
pField
Point on the configuration data buffer.
Return value
TRUE
Configuration read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
UaQueryConfiguration (Page 2298)
Overview of the functions (Page 2276)
uaCONFIGFIELD (Page 2286)
3.9.8.1 uaArchiveRequery
Description
After calling for uaArchiveSetFilter and uaArchiveSetSort you must reload the recipe
usinguaArchiveRequery.
Note
You can use the uaArchiveSetSort and uaArchiveSetFilter functions, without opening the recipe
with uaArchiveOpen. In this case you must not make a call using uaArchiveRequery.
Declaration
BOOL uaArchiveRequery(
UAHARCHIVE hArchive )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
Return value
TRUE
Recipe reloaded.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Comment
You can also make a call using uaArchiveRequery, if you have inserted Runtime values in the
recipe view.
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.8.2 uaArchiveSetFilter
Description
Sets the selection parameters for the recipe. You can also use the function, without opening the
recipe using uaArchiveOpen.
If you have opened a user archive using uaArchiveOpen, you must reload the recipe after
filtering using uaArchiveRequery.
Declaration
VOID uaArchiveSetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszFilter
Selection parameters as SQL parameters.
Return value
TRUE
Selection parameters changed.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.8.3 uaArchiveSetSort
Description
Sets the sort for a recipe. You can also use the function, without opening the recipe using
uaArchiveOpen.
If you have opened a recipe using uaArchiveOpen, you must reload the recipe after sorting
using uaArchiveRequery.
Declaration
BOOL uaArchiveSetSort (
UAHARCHIVE hArchive,
LPSTR pszSort )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszSort
Sort parameters as SQL statement.
Return value
TRUE
Sort successful.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
Overview of the functions (Page 2276)
3.9.9.1 uaOpenViews
Description
Gives the number of recipes in the open Runtime view.
Declaration
LONG uaOpenViews (
UAHCONNECT hConnect )
Parameters
hArchive
Handle on recipe. This handle is generated using uaConnect.
Return value
Number of currently open views.
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaConnect (Page 2292)
Overview of the functions (Page 2276)
3.9.10.1 uaArchiveReadTagValues
Description
Reads the current value from the field tag.
Declaration
BOOL uaArchiveReadTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pnFields
The parameter is reserved for future development and must be preset to 0.
cFields
The parameter is reserved for future development and must be preset to 0.
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaArchiveWriteTagValues (Page 2346)
Overview of the functions (Page 2276)
3.9.10.2 uaArchiveReadTagValuesByName
Description
Reads the current values from the tags.
Declaration
BOOL uaArchiveReadTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszFields
The parameter is reserved for future development and must be preset to NULL.
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data read.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaArchiveWriteTagValuesByName (Page 2348)
Overview of the functions (Page 2276)
3.9.10.3 uaArchiveWriteTagValues
Description
Writes the values of the current data record to the tag.
Declaration
BOOL uaArchiveWriteTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pnFields
The parameter is reserved for future development and must be preset to 0.
cFields
The parameter is reserved for future development and must be preset to 0.
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaArchiveReadTagValues (Page 2344)
Overview of the functions (Page 2276)
3.9.10.4 uaArchiveWriteTagValuesByName
Description
Writes the values of the current data record to the tag.
Declaration
BOOL uaArchiveWriteTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )
Parameters
hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.
pszFields
The parameter is reserved for future development and must be preset to NULL.
lOptions
The parameter is reserved for future development and must be preset to 0.
Return value
TRUE
Data written.
FALSE
Error
Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll
Related functions
See also
uaQueryArchive (Page 2294)
uaQueryArchiveByName (Page 2296)
uaArchiveReadTagValuesByName (Page 2345)
Overview of the functions (Page 2276)
3.10.1 Basics
Overview
See also
MSRTEnumMsgRTDataPlus (Page 2420)
MSRTLockGroupPlus (Page 2447)
Overview
Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:
Alarm Logging CS
Alarm Logging RT
3.10.1.4 Constants
General specifications
Alarm states
State machines
Group alarms
Single alarms
Alarm classes
Alarm blocks
The main type of the alarm blocks is available in the HIWORD. The LOWORD includes the
subtypes of the alarm blocks.
Date format
Window options
Filter conditions
Quick selection
The end time of the quick selection refers to the current system time of the local computer. The
start time is back calculated n * (months, days, hours).
Log types
3.10.2 Structures
3.10.2.1 MSG_BACKUP_STRUCT_PLUS
Declaration
typedef struct {
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
WCHAR szArchivFile[MAX_PATH+1];
WCHAR szArchivTextFile[MAX_PATH+1];
WCHAR szCommentFile[MAX_PATH+1];
WCHAR szInstanceFile[MAX_PATH+1];
WCHAR szComment[MAX_PATH+1];
DWORD dwFlags;
DWORD dwFormat;
}
MSG_BACKUP_STRUCTPlus;
Members
stFrom
Date from
stTo
Date to
szArchivFile
File name and path of the export file for log
szArchivTextFile
File name and path of the export file for log texts
szCommentFile
File name and path of the export file for comments
szInstanceFile
File name and path of the export file for instances
szComment
User-defined comments
dwFlags
dwFormat
You can use the following constants from the "m_global.h" file for formatting the export file:
Comment
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime must
be used and not GetSystemTime. There is generally a considerable time difference between
these two functions.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTEnumBackupListPlus (Page 2464)
MSRTExportPlus (Page 2465)
Overview of structures (Page 2350)
3.10.2.2 MSG_CLASS_STRUCT_PLUS
Declaration
typedef struct {
WCHAR szName[MSG_MAX_TEXTLEN+1];
DWORD dwName;
DWORD dwClassID;
COLORREF crStateCome[2];
COLORREF crStateGo[2];
COLORREF crStateQuit[2];
WORD wQuitType;
WORD wHornQuit;
DWORD dwHornVar;
WCHAR szState[MSG_MAX_STATE][MSG_MAX_TEXTLEN+1];
DWORD dwState[MSG_MAX_STATE];
WCHAR szStateQuit[MSG_MAX_TEXTLEN+1];
DWORD dwStateQuit;
DWORD dwCreatorID;
DWORD dwClassTyp;
}
MSG_CLASS_STRUCT_PLUS;
Members
szName
The class name to be specified is dependent on the selected data language!
dwName
If the class name is included in the project texts, the ID can be specified here.
dwClassID
Alarm class ID
crStateCome
Color for the "incoming" status
crStateGo
Color for the "outgoing" status
crStateQuit
Color for the "acknowledged" status
wQuitType
The acknowledgment philosophy is defined by means of the following constants from the
"m_global.h" file:
You can logically combine the constants of the state machines bit-by-bit with "OR", provided
they are not mutually contradictory.
wHornQuit
Acknowledgment of central horn
dwHornVar
Tag of central horn
szState
Text for the "incoming", "outgoing", and "incoming and outgoing" statuses.
dwState
TextID
szStateQuit
Text for the "acknowledged" status.
dwStateQuit
TextID
dwCreatorID
CreatorID
dwClassTyp
The parameter is reserved for future development and must be preset to 0.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTGetClassInfoPlus (Page 2421)
Overview of structures (Page 2350)
3.10.2.3 MSG_COMMENT_INSTANCE_STRUCT_PLUS
Declaration
typedef struct {
SYSTEMTIME stTime;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
WCHAR szText[MSG_MAX_TB_CONTENT+1];
WCHAR szUser[MSG_MAX_USERNAME+1];
WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH+1];
WCHAR szApplicationName[MSG_MAX_APPLNAME+1];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_COMMENT_INSTANCE_STRUCT_PLUS;
Members
stTime
Date/time
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number, generally set to 0L.
szText
Comment
szUser
User name
szComputerName
Computer name
szApplicationName
Application name
szInstance
Instance name
Comment
An alarm-specific comment is assigned to an alarm in the archive. This assignment is dependent
on the alarm number and the date/time of the alarm.
If a current time is needed for the passing of a SYSTEMTIME parameter, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTSetCommentInstancePlus (Page 2459)
MSRTGetCommentInstancePlus (Page 2457)
Overview of structures (Page 2350)
3.10.2.4 MSG_CSDATA_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwStatus;
WORD wClass;
DWORD dwTextID[MSG_MAX_TB];
DWORD dwQuitVar;
WORD wQuitBit;
DWORD dwStateVar;
WORD wStateBit;
DWORD dwMsgVar;
WORD wMsgBit;
WORD wAGNr;
WORD wAGSubNr;
DWORD dwGroupID;
DWORD dwPriority;
DWORD dwHidingMask;
}
MSG_CSDATA_STRUCT_PLUS;
Members
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L).
dwStatus
The individual alarm parameters are defined by means of the following constants from the
file "m_global.h":
You can OR these constants, provided they do not contradict each other.
wClass
Alarm class
dwTextID
Reference to the text blocks
dwQuitVar
Acknowledgment tag. Use dwID from DM_VARKEY (Page 1594).
wQuitBit
Bit of acknowledgment tag
dwStateVar
Alarm status as tag. Use dwID from DM_VARKEY (Page 1594)
wStateBit
wStateBit is used to specify which bits of dwStateVar define the alarm status.
If wStateBit = 1 and dwStateVar is of data type "8 Bit unsigned", then Bit 1 of dwStateVar
specifies the incoming/outgoing status, and bit 5 specifies the need for acknowledgment.
If wStateBit = 2 and dwStateVar is a word tag, then Bit 2 of dwStateVar specifies the incoming/
outgoing status, and bit 10 specifies the need for acknowledgment.
dwMsgVar
Alarm tag. Use dwID from DM_VARKEY (Page 1594).
wMsgBit
Alarm tag bit
wAGNr
PLC number
wAGSubNr
PLC sub-number
dwGroupID
ID for the alarm group (internal)
dwPriority
Priority of the alarm
dwHidingMask
Display suppression mask
Comment
By means of this structure, your application can use API functions to determine the
configuration data of a single message.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTGetMsgCSDataPlus (Page 2428)
DM_VARKEY (Page 1594)
Overview of structures (Page 2350)
3.10.2.5 MSG_CSDATA_EX_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwStatus;
WORD dwClass;
DWORD dwTextID[MSG_MAX_TB];
DWORD lpstrQuitVar;
WORD dwQuitBit;
DWORD lpstrStateVar;
WORD dwStateBit;
DWORD lpstrMsgVar;
WORD dwMsgBit;
WORD dwAGNr;
WORD dwAGSubNr;
DWORD dwGroupID;
DWORD dwPriority;
DWORD dwHidingMask;
}
MSG_CSDATA_STRUCT_PLUS;
Members
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L).
dwStatus
The individual alarm parameters are defined by means of the following constants from the
file "m_global.h":
You can OR these constants, provided they do not contradict each other.
wClass
Alarm class
dwTextID
Reference to the text blocks
lpstrQuitVar
Acknowledgment tag (with server prefix, if not local).
dwQuitBit
Bit of acknowledgment tag
lpstrStateVar
Alarm status as tag (with server prefix, if not local).
dwStateBit
dwStateBit is used to specify which bits of lpstrStateVar define the alarm status.
If dwStateBit = 1 and lpstrStateVar is of data type "8 Bit unsigned", then Bit 1 of lpstrStateVar
specifies the incoming/outgoing status, and bit 5 specifies the need for acknowledgment.
If dwStateBit = 2 and lpstrStateVar is a word tag, then Bit 2 of lpstrStateVar specifies the
incoming/outgoing status, and bit 10 specifies the need for acknowledgment.
lpstrMsgVar
Alarm tag (with server prefix, if not local).
dwMsgBit
Alarm tag bit
dwAGNr
PLC number
dwAGSubNr
PLC sub-number
dwGroupID
ID for the alarm group (internal)
dwPriority
Priority of the alarm
dwHidingMask
Display suppression mask
Comment
By means of this structure, your application can use API functions to determine the
configuration data of a single message.
Required files
CCMSRTCLIPlus.h
API functions
MSRTGetMsgCSDataExPlus (Page 2432) Query configuration data of alarms from the speci‐
fied alarm server
MSG_CSDATA_EX_CALLBACK_PROC_PLUS Callback function for evaluation of configuration
(Page 2434) data
3.10.2.6 MSG_FILTER_STRUCT_PLUS
Declaration
typedef struct {
WCHAR szFilterName[MSG_MAX_TEXTLEN+1];
DWORD dwFilter;
SYSTEMTIME st[2];
DWORD dwMsgNrLow[2];
DWORD dwMsgNrHigh[2];
VARIANT vMsgClasses;
DWORD dwMsgState;
WORD wAGNr[2];
WORD wAGSubNr[2];
DWORD dwArchivMode;
WCHAR szTB[MSG_MAX_TB][MSG_MAX_TB_CONTENT+1]
DWORD dwTB;
double dPValue[MSG_MAX_PVALUE][2];
DWORD dwPValue[2];
ULONGLONG ullMsgCounter[2]; /* in Script it has the union type
MSGULONGLONG, see CCMsrtCliPlus.h */
DWORD dwQuickSelect;
DWORD dwPriority[2];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_FILTER_STRUCT_PLUS;
Members
szFilterName
Filter name
dwFilter
The filter conditions are defined by means of the following constants from the file
"m_global.h":
st
st[0] Date and time of the start point, st[1] Date and time of the end point
You must assign st, if you use the filter criteria
MSG_FILTER_DATE, MSG_FILTER_DATE_FROM, MSG_FILTER_DATE_TO, MSG_FILTER_TIME,
MSG_FILTER_TIME_FROM, or MSG_FILTER_TIME_To.
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
must be used and not GetSystemTime. There is generally a considerable time difference
between these two functions.
dwMsgNrLow
dwMsgNrLow Less significant DWORD of 64-bit alarm number. Here, dwMsgNr[0] is the start
number (from) and dwMsgNr[1] is the end number (to).
dwMsgNrHigh
dwMsgHigh More significant DWORD of 64-bit alarm number (generally set to 0L).
You must assign dwMsgNrLow and dwMsgNrHigh, if you use the MSG_FILTER_NR,
MSG_FILTER_NR_FROM, or MSG_FILTER_NR_TO filter criteria.
vMsgClasses
List of utilized alarm classes in one-dimensional variant array. The alarm type (MsgType) is
not supported here. You determine the IDs of the alarm classes in the engineering system.
dwMsgState
Alarm status bit-coded.
Assign this field, if you use the filter criterion MSG_FILTER_STATE.
You must filter other status values yourself, e.g., MSG_STATE_HIDE or MSG_STATE_UNHIDE,
since these are not taken into consideration in the filter condition. To filter these status
values, use e.g. MSG_FILTER_HIDDENONLY.
wAGNr
wAGNr [0] First PLC number, wAGNr [1] last PLC number.
You must assign wAGNr, if you use the filter criteria MSG_FILTER_AG_FROM or
MSG_FILTER_AG_TO.
wAGSubNr
wAGSubNr [0] First PLC number, wAGSubNr [1] last PLC number.
You must assign wAGSubNr, if you use the filter criteria MSG_FILTER_AGSUB_FROM or
MSG_FILTER_AGSUB_TO.
dwArchivMode
ID for log or report. The parameter must be assigned 0.
szTB
Texts of the text blocks
You must assign szTB, if you use the filter criterion MSG_FILTER_TEXT.
dwTB
Active text blocks, bit coded
You must assign dwTB, if you use the filter criterion MSG_FILTER_TEXT
dPValue
Process values from - to
You must assign dPValue, if you use the filter criterion MSG_FILTER_PVALUE.
dwPValue
Process values, bit-coded
You must assign dwPValue, if you use the filter criterion MSG_FILTER_PVALUE.
ullMgCounter
Internal 64-bit alarm counter
You must assign dwllMsgCounter, if you use the filter criterion MSG_FILTER_COUNTER_....
When used in the script, ullMsgCounter is not type ULONGLONG, but instead a union
MSGULONGLONG (see CCMsRtCliPlus.h).
dwQuickSelect
The parameter is reserved for future development and must be preset to 0.
dwPriority
Priority of the alarm
szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created.
Required files
CCMsRTCliPlus.h
API functions
See also
MSRTGetLastMsgWithCommentPlus (Page 2423)
MSRTSetMsgWinFilterPlus (Page 2455)
MSRTStartMsgServicePlus (Page 2397)
MSRTSetMsgFilterPlus (Page 2453)
MSRTCheckWinFilterPlus (Page 2451)
MSRTGetFilterDataPlus (Page 2450)
Overview of structures (Page 2350)
MSGULONGLONG (Page 2396)
3.10.2.7 MSG_HELPTEXTS_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwLCID;
DWORD dwFlags;
DWORD dwResponseTime;
LPWSTR lpszHelp_Description;
DWORD dwHelp_DescriptionCount;
LPWSTR lpszHelp_Causes;
DWORD dwHelp_CausesCount;
LPWSTR lpszHelp_Action;
DWORD dwHelp_ActionCount;
LPWSTR lpszHelp_Consequence;
DWORD dwHelp_ConsequenceCount;
LPWSTR lpszHelp_Reserved;
DWORD dwHelp_ReservedCount;
}
MSG_HELPTEXTS_STRUCT_PLUS;
Members
dwMsgNrLow
Less significant DWORD of 64-bit alarm number. The number must be specified as an input
parameter.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L). The number must be
specified as an input parameter.
dwLCID
The language ID for the language of the help texts of the alarm. The ID must be specified as
an input parameter.
dwFlags
If you have allocated a self-specified buffer, the USERALLOC_xxx flags are not changed and
not taken into account by the function.
If you have not specified a buffer and the buffer was allocated by the function, the
FUNCALLOC_xxx flags are set by the function.
If you have specified a buffer that is too small and the function has truncated the help text,
the TRUNCATE_xxx flags are set.
After the function is called and the help texts are processed, the user must release the
allocated buffers again. See also the definition in "MSRTAPI.H"
USERALLOC_HLPDESCRIPTION 0x000000 The user has allocated the buffer for the "Descrip‐
01 tion".
FUNCALLOC_HLPDESCRIPTION 0x000000 The function has allocated the buffer for the "De‐
02 scription".
USERALLOC_HLPCAUSES 0x000000 The user has allocated the buffer for the "Causes".
04
FUNCALLOC_HLPCAUSES 0x000000 The function has allocated the buffer for the "Cau‐
08 ses".
USERALLOC_HLPACTION 0x000000 The user has allocated the buffer for the "Action".
10
FUNCALLOC_HLPACTION 0x000000 The function has allocated the buffer for the "Ac‐
20 tion".
USERALLOC_HLPCONSEQUENCE 0x000000 The user has allocated the buffer for the "Conse‐
40 quence".
FUNCALLOC_HLPCONSEQUENCE 0x000000 The function has allocated the buffer for the "Con‐
80 sequence".
USERALLOC_HLPRESERVED 0x000001 Reserved for future use.
00
FUNCALLOC_HLPRESERVED 0x000002 Reserved for future use.
00
TRUNCATE_HLPDESCRIPTION 0x000100 Buffer for "Description" too small. The text was trun‐
00 cated.
TRUNCATE_HLPCAUSES 0x000200 Buffer for "Causes" too small. The text was truncated.
00
TRUNCATE_HLPACTION 0x000400 Buffer for "Action" too small. The text was truncated.
00
TRUNCATE_HLPCONSEQUENCE 0x000800 Buffer for "Consequence" too small. The text was
00 truncated.
You can OR these constants, provided they do not contradict each other.
dwResponseTime
The response time in seconds in which the alarm must be responded to is returned here.
lpszHelp_Description
Pointer to a text buffer for storage of the help text for "Description".
If "NULL" is set, the function sets the pointer to the internally allocated buffer for
"Description". "dwHelp_DescriptionCount" is set to the internal buffer size.
dwHelp_DescriptionCount
Size of buffer in number of characters.
If "0L" is set, the function sets the buffer size and stores a pointer in "lpszHelp_Description".
lpszHelp_Causes
Pointer to a text buffer for storage of the help text for "Causes".
If "NULL" is set, the function sets the pointer to the internally allocated buffer for
"Description". "dwHelp_CausesCount" is set to the internal buffer size.
dwHelp_CausesCount
Size of buffer in number of characters.
If "0L" is set, the function sets the buffer size and stores a pointer in "lpszHelp_Causes".
lpszHelp_Action
Pointer to a text buffer for storage of the help text for "Action".
If "NULL" is set, the function sets the pointer to the internally allocated buffer for
"Description". "dwHelp_ActionCount" is set to the internal buffer size.
dwHelp_Action
Size of buffer in number of characters.
If "0L" is set, the function sets the buffer size and stores a pointer in "lpszHelp_Action".
lpszHelp_Consequence
Pointer to a text buffer for storage of the help text for "Consequnce".
If "NULL" is set, the function sets the pointer to the internally allocated buffer for
"Description". "dwHelp_ConsequenceCount" is set to the internal buffer size.
dwHelp_ConsequenceCount
Size of buffer in number of characters.
If "0L" is set, the function sets the buffer size and stores a pointer in "lpszHelp_Consequence".
lpszHelp_Reserved
Reserved for future use.
dwHelp_Reserved
Reserved for future use.
Comment
By means of this structure, your application can use API functions to determine the configured
help texts for the specified language of a single message.
Required files
CCMSRTCLIPlus.h
API functions
3.10.2.8 MSG_INFOTEXT_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
WCHAR szText[MSG_MAX_TB_CONTENT+1];
}
MSG_INFOTEXT_STRUCT_PLUS;
Members
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number, generally set to 0L.
szText
Info text
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTGetInfotextPlus (Page 2461)
MSRTSetInfotextPlus (Page 2462)
Overview of structures (Page 2350)
3.10.2.9 MSG_RTCREATE_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwFlags;
SYSTEMTIME stMsgTime;
double dPValue[MSG_MAX_PVALUE];
WORD wPValueUsed;
MSG_TEXTVAL256_STRUCT_PLUS mtTextValueW[MSG_MAX_PVALUE]
WORD wTextValueUsed;
}
MSG_RTCREATE_STRUCT_PLUS;
Members
dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L).
dwFlags
Setting for time base. "MSG_TIMESTAMP_LOCAL" is valid by default. With
"MSG_TIMESTAMP_UTC" you can individually switch the function being used in each case
to "UTC".
stMsgTime
Date and time for coming-in or going-out of an alarm. The system time of the PLC or the OS
will be used when acknowledging.
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
must be used and not GetSystemTime. There is generally a considerable time difference
between these two functions.
dPValue
Numeric process values.
wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.
mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 2395) type with the associated text
values.
wTextValueUsed
Text process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSG_TEXTVAL256_STRUCT_PLUS (Page 2395)
Overview of structures (Page 2350)
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTCreateMsgPlus (Page 2415)
3.10.2.10 MSG_RTDATA_INSTANCE_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
ULONGLONG ullCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL256_STRUCT_PLUS mtTextValue[MSG_MAX_PVALUE]
TCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_RTDATA_INSTANCE_STRUCT_PLUS;
Members
dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:
The statuses listed will only be used internally by the system and can only by set by the API
using MSRTCreateMsgInstancePlus.
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L).
stMsgTime
Date and time for coming-in or going-out of an alarm.
dwTimeDiff
Duration coming in or going out, telegram time in seconds.
ullCounter
Internal 64-bit alarm counter.
dwFlags
Flags in compliance with the constants in the "m_global.h" file:
wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.
wTextValueUsed
Text values used, bit-coded.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value.
In the case of erroneous double entry the dPValue has priority.
dPValue
Process values.
mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 2395) type with the associated text
values.
szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTCreateMsgInstancePlus (Page 2413)
MSG_TEXTVAL256_STRUCT_PLUS (Page 2395)
MSGULONGLONG (Page 2396)
3.10.2.11 MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS
Declaration
typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
DWORD ullCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL256_STRUCT_PLUS mtTextValue[MSG_MAX_PVALUE];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
WCHAR szComment[MSG_MAX_TB_CONTENT+1];
WCHAR szUser[MSG_MAX_USERNAME+1];
WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH+1];
WCHAR szApplicationName[MSG_MAX_APPLNAME+1];
WCHAR szServerPrefix[_MAX_PATH+1];
}
MSG_RTDATA_INSTANCECOMMENT_STRUCTPlus;
Members
dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:
The statuses listed will only be used internally by the system and can only by set by the API
using MSRTCreateMsgInstanceWithCommentPlus.
dwMsgNrLow
Less significant DWORD of 64-bit alarm number.
dwMsgNrHigh
More significant DWORD of 64-bit alarm number (generally set to 0L).
stMsgTime
Date and time for coming-in or going-out of an alarm.
dwTimeDiff
Duration coming in or going out, telegram time in seconds.
ullCounter
Internal 64-bit alarm counter.
dwFlags
Flags in compliance with the constants in the "m_global.h" file:
wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.
wTextValueUsed
Text values used, bit-coded.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value.
In the case of erroneous double entry the dPValue has priority.
dPValue
Process values.
mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 2395) type with the associated text
values.
szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created
szComment
Comment name
szUser
User name.
szComputerName
Computer name.
szApplicationName
Application name.
szServerPrefix
Server prefix.
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTGetLastMsgWithCommentPlus (Page 2423)
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
MSRTGetSelectedMsgPlus (Page 2440)
MSRTCheckWinFilterPlus (Page 2451)
Overview of structures (Page 2350)
MSGULONGLONG (Page 2396)
3.10.2.12 MSG_RTGROUPENUM_STRUCT_PLUS
Declaration
typedef struct {
BOOL fIDUsed;
DWORD dwID;
TCHAR szName[MSG_MAX_TEXTLEN+1];
DWORD dwMsgCount;
DWORD dwMsg[MSG_MAX_GROUPITEMS];
}
MSG_RTGROUPENUM_STRUCT_PLUS;
Members
fIDUsed
Specifies whether the Group ID (fIDUsed = TRUE) or name (fIDUsed = FALSE) is used to specify
the alarm group.
dwID
Group ID
szName
Group name
dwMsgCount
Number of single alarms in dwMsg
dwMsg
Locked single alarms
Required files
CCMSRTCLIPlus.h
API functions
See also
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
MSRTEnumGroupMsgPlus (Page 2446)
Overview of structures (Page 2350)
3.10.2.13 MSG_RTGROUPSET_STRUCT_PLUS
Declaration
typedef struct {
BOOL fIDUsed;
DWORD dwID;
WCHAR szName[MSG_MAX_TEXTLEN+1];
SYSTEMTIME stTime;
DWORD dwData;
}
MSG_RTGROUPSET_STRUCT_PLUS;
Members
fIDUsed
Specifies whether the Group ID (fIDUsed = TRUE) or name (fIDUsed = FALSE) is used to specify
the alarm group.
dwID
Group ID (for alarm classes, alarm types)
szName
Group name
stTime
Time of occurrence
dwData
If the structure is used within the scope of MSRTLockGroupPlus, dwData = 1 signifies locking
and dwData = 0 releasing
Required files
CCMSRTCLIPlus.h
API functions
See also
MSRTEnumGroupMsgPlus (Page 2446)
MSRTLockGroupPlus (Page 2447)
MSRTQuitGroupPlus (Page 2449)
Overview of structures (Page 2350)
3.10.2.14 MSG_RTLOCK_STRUCT_PLUS
Declaration
typedef struct {
WCHAR szName[MSG_MAX_TEXTLEN+1];
WCHAR szParent[MSG_MAX_TEXTLEN+1];
DWORD dwLockID;
BOOL fLock;
DWORD dwMsgNum;
DWORD dwMsgLock[MSG_MAX_LOCKITEMS];
}
MSG_RTLOCK_STRUCT_PLUS;
Members
szName
Lock name
szParent
Parent group
dwLockID
Lock ID
fLock
Lock and release
dwMsgNum
Number of locked alarms
dwMsgLock
Locked single alarms
Required files
CCMSRTCLIPlus.h
API functions
See also
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
Overview of structures (Page 2350)
3.10.2.15 MSG_TEXTVAL256_STRUCT_PLUS
Declaration
typedef struct {
WCHAR szText[MSG_MAX_TEXTVAL256+1];
}
MSG_TEXTVAL256_STRUCT_PLUS;
Comment
The structure is used within the following structures:
• MSG_RTCREATE_STRUCT_PLUS (Page 2383)
• MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 2385)
• MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
Members
szText
Text
Required files
CCMSRTCLIPlus.h
API functions
3.10.2.16 MSGULONGLONG
Declaration
Members
dwLow
Less significant DWORD of 64-bit value. The two parameters dwLow and dwHigh combined
produce the 64-bit alarm number.
dwHigh
More significant DWORD of 64-bit value. The two parameters dwLow and dwHigh combined
produce the 64-bit alarm number.
dwdw.Low
see dwLow
dwdw.dwHigh
see dwHigh
ull
unsigned 64-bit value
cy
CURRENCY for COLEVariant handling
Required files
CCMSRTCLIPlus.h
API functions
3.10.3.1 MSRTStartMsgServicePlus
Description
Starts a service for sending and receiving of notifications in the alarm system.
Declaration
BOOL MSRTStartMsgServicePlus (
LPDWORD lpdwServiceID,
LPCWSTR lpszServer,
DWORD dwFlags,
DWORD dwFilterCount
LPMSG_FILTER_STRUCT_PLUS* lppMsgFilterPlus,
DWORD dwNotifyMask,
MSG_SERVICE_NOTIFY_PROC_PLUS lpfnNotifyProcPlus
LPVOID lpvUserNotify,
MSG_TAID_COMPLETION_PROC_PLUS lpfnTAIDProcPlus
LPVOID lpvUserTAID
LPCMN_ERRORW lpError );
Parameters
lpdwServiceID
After successful call of the function, this parameter contains the service ID that is needed by
many functions.
lpszServer
Pointer to the symbolic name of the alarm server without server delimiter ::
If an empty string, NULL or "@default" is specified, the default server set will be used.
If an incorrect server name is specified, the configured standard server is used or the
MSG_ERR_API_SERVICE error is returned.
dwFlags
The parameter is reserved for later enhancements and must be preset to 0L.
dwFilterCount
Number of message filters in the pointer list lppMsgFilterPlus
lppMsgFilter
Pointer to a list of pointers to alarm filter structuresMSG_FILTER_STRUCT_PLUS (Page 2375).
The list must contain at least as many entries as specified in dwFilterCount. If dwFilterCount
is equal to 0, lppMsgFilterPlus should be set to ZERO.
dwNotifyMask
Designates the kind of notification, in accordance with the definition of constants in the
"msrtapi.h" file:
lpfnNotifyProcPlus
Pointer to your callback function of type MSG_SERVICE_NOTIFY_PROCPlus for transfer of
alarms by the service.
With lpfnNotifyProcPlus = NULL the service will not return any notifications.
Note
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
lpvUserNotify
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpfnTAIDProcPlus
Callback function for transfer of the status of execution of asynchronous functions.
The calls are marked with the respective TAIDs (TransactionIDs), which are allocated by the
respective asynchronous function calls. These enable assignment of the feedback messages.
lpvUserTAID
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Service started.
FALSE
Error
Comment
Your application can install a maximum of 16 services. In total up to 128 services can be installed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTCreateMsgInstancePlus (Page 2413)
MSRTExportPlus (Page 2465)
MSRTEnumBackupListPlus (Page 2464)
MSRTGetInfotextPlus (Page 2461)
MSRTSetInfotextPlus (Page 2462)
MSRTGetClassInfoPlus (Page 2421)
MSRTSetMsgFilterPlus (Page 2453)
MSG_FILTER_STRUCT_PLUS (Page 2375)
MSRTGetMsgCSDataPlus (Page 2428)
MSRTCheckWinFilterPlus (Page 2451)
MSRTGetMsgPriorityPlus (Page 2437)
MSRTGetMsgQuitPlus (Page 2439)
MSRTGetSelectedMsgPlus (Page 2440)
MSRTResetMsgPlus (Page 2444)
MSRTLoopInAlarmPlus (Page 2442)
MSRTGetFilterDataPlus (Page 2450)
MSRTEnumArchivDataPlus (Page 2466)
MSRTStopMsgServicePlus (Page 2400)
MSRTSetCommentInstancePlus (Page 2459)
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
MSRTQuitHornPlus (Page 2402)
MSRTGetCommentInstancePlus (Page 2457)
MSRTEnumGroupMsgPlus (Page 2446)
MSRTLockGroupPlus (Page 2447)
MSRTGetMsgActualPlus (Page 2427)
Overview of the functions (Page 2349)
MSRTGetMsgHelptextsPlus (Page 2436)
3.10.3.2 MSRTStopMsgServicePlus
Description
Stops the service for sending and receiving messages
Declaration
BOOL MSRTStopMsgServicePlus (
DWORD dwServiceID,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Service ended.
FALSE
Error
Comment
Note
The call should not be used in an application destructor (EXE, DLL, OCX, etc.), because a
Microsoft-specific mechanism can sometimes lead to a call hang and therefore a program hang
too.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTEnumBackupListPlus (Page 2464)
MSRTStartMsgServicePlus (Page 2397)
Overview of the functions (Page 2349)
3.10.3.3 MSRTQuitHornPlus
Description
Class-specific central horn acknowledgement.
Declaration
BOOL MSRTQuitHornPlus(
DWORD dwServiceID,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpdwTAID
Pointer to a DWORD in which the TAID (TransactionID) for asynchronous status feedback
message can be stored. If NULL is transferred, no MSG_TAID_COMPLETION_PROC_PLUS Notify
is called for this call.
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarm acknowledged.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
Overview of the functions (Page 2349)
3.10.3.4 MSG_SERVICE_NOTIFY_PROC_PLUS
Description
Your callback function for send/receive service.
Enumeration functions of the alarm system run asynchronously. As a result, you must
synchronize the calls using semaphores.
Declaration
BOOL ( * MSG_SERVICE_NOTIFY_PROC) (
DWORD dwNotify,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUserNotify);
Parameters
dwNotify
The notification type is specified by the constants in the "MSRTAPI.h" file:
lpbyData
lpbyData contains a pointer to data depending on the notification type.
dwItems
Contains the number of objects returned in lpbyData. If dwItems = 0, then lpbyData = NULL.
Notify will be ended and the semaphore will be released.
lpvUserNotify
Pointer to application-specific data. This pointer is made available again in the callback
function.
Return value
TRUE
Notification was recognized and processed.
FALSE
Error
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
particular the GetTag...- and SetTag-calls will not work. Where appropriate, processing must
be performed in other actions, that are only triggered by the callback.
Required files
CCMSRTCLIPlus.h
Related functions
See also
MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 2385)
MSG_RTGROUPENUM_STRUCT_PLUS (Page 2392)
MSG_RTLOCK_STRUCT_PLUS (Page 2394)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
MSRTStartMsgServicePlus (Page 2397)
MSG_TEXTVAL256_STRUCT_PLUS (Page 2395)
MSRTEnumGroupMsgPlus (Page 2446)
Overview of the functions (Page 2349)
3.10.3.5 MSG_TAID_COMPLETION_PROC_PLUS
Description
Your callback function for feedback about the asynchronous execution status.
Enumeration functions of the alarm system run asynchronously. As a result, you must
synchronize the calls using semaphores. The TAID_COMPLETION_PROC described here
simplifies synchronization between the asynchronous functions.
Declaration
BOOL ( * MSG_TAID_COMPLETITION_PROC_PLUS) (
DWORD dwTAID,
DWORD dwTAIDNotify,
Variant* pvTAIDError,
LPVOID lpvUserTAID);
Parameters
dwTAID
The TAID (TransactionID) for assignment to a called asynchronous function.
dwTAIDNotify
State and status of the asynchronous function
pvTAIDError
Pointer to a VARIANT. Generally of the type VT_BSTR which contains the TAID message about
the status.
lpvUserTAID
Pointer to application-specific data. This pointer is made available again within the callback
function.
Return value
TRUE
Notification was recognized and processed.
FALSE
Error
Comment
Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which a message loop is accessed, for example: GetMessage
• API functions from the same DLL
• Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unread
messages could block WinCC notifications or finally block WinCC altogether.
In rare cases, the Notify may already be delivered before the function call has returned.
Required files
CCMSRTCLIPlus.h
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.3.6 MSRTWebClientPlus
Description
Initializes the DLL for a WebClient
Declaration
Parameters
pszProjectPath
Path to the Web Project
dwDataLocale
Local ID of the language used
Return value
This function has no return value.
3.10.4.1 MSRTActivateMProtPlus
Description
Pause or continue report service for output of an alarm sequence report.
Declaration
BOOL MSRTActivateMProtPlus(
BOOL fActive,
LPCMN_ERROR lpError );
Parameters
fActive
Establishes how the report service should be handled:
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Function successfully completed.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
3.10.4.2 MSRTPrintMProtPlus
Description
Prints currently pending alarms of the alarm sequence report, even when a page is not yet full.
Declaration
BOOL MSRTPrintMProtPlus(
DWORD* pdwLines,
LPCMN_ERRORW lpError );
Parameters
pdwLines
Pointer to the row number Here the number of rows printed is returned. Thus the parameter
should be preassigned with NULL before the call.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Current pending alarms printed.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
3.10.5.1 MSRTCreateMsgInstanceWithCommentPlus
Description
Generates an alarm with the specified alarm number with instance name and comment. In
contrast to most other Create calls, the text associated values may contain up to 256 characters
(255 + EndOfString). The alarm is included in the current alarm list with the specified data.
Declaration
Parameters
dwServiceID
ID of the Service - service
lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.
lpdwTAID
Pointer to the TransactionID of asynchronous processing feedback
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.
If the call is used to acknowledge an alarm, the specified time must be the incoming alarm
time stated to the closest millisecond.
WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
MSRTStartMsgServicePlus (Page 2397)
MSRTCreateMsgInstancePlus (Page 2413)
3.10.5.2 MSRTCreateMsgInstancePlus
Description
Creates an alarm with the stated alarm number. The alarm is included in the current alarm list
with the specified data.
Declaration
Parameters
dwServiceID
ID of the installed service
lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.
lpdwTAID
Pointer to the TransactionID for asynchronous processing feedback
lpError
Pointer to the extended error structure
Return value
TRUE
Function successful
FALSE
Error
Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.
If the call is used to acknowledge an alarm, the specified time must be the incoming alarm
time stated to the closest millisecond.
WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTStartMsgServicePlus (Page 2397)
MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 2385)
MSRTSetCommentInstancePlus (Page 2459)
3.10.5.3 MSRTCreateMsgPlus
Description
Creates an alarm with the stated alarm number. The alarm is included in the current alarm list
with the specified data.
Declaration
Parameters
dwServiceID
ID of the installed service
lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.
IpdwTAID
Pointer to the TransactionID for asynchronous processing
lpError
Pointer to the extended error structure
Return value
TRUE
Function successful
FALSE
Error
Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.
WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTCreateMsgInstancePlus (Page 2413)
MSRTStartMsgServicePlus (Page 2397)
MSG_RTCREATE_STRUCT_PLUS (Page 2383)
3.10.5.4 MSRTDialogMsgLockPlus
Description
Dialog for locking and releasing alarms.
Declaration
BOOL MSRTDialogMsgLockPlus(
HWND hwndParent,
LPCMN_ERRORW lpError );
Parameters
hwndParent
Parent window, that contains the dialog.
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Dialog successfully closed.
FALSE
Error or the dialog was canceled.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
3.10.5.5 MSRTEnumArchivInstancePlus
Description
Enumerates all alarms in the specified log with instance name. The
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS structure is returned.
Declaration
Parameters
dwServiceID
ID of the installed service
fArchiv
Circular or sequential log
dwMaxRecords
Maximum number of records for enumeration\n. Enumeration is aborted when the
maximum number is exceeded.
dwParams
Supplementary parameter, MSG_ENUM_ARCHIV_DESC = Sort in descending order
lpdwTAID
Pointer to the TransactionID for asynchronous processing feedback
lpError
Pointer to the extended error structure
Return value
TRUE
Function successful
FALSE
Error
3.10.5.6 MSRTEnumLockedMsgPlus
Description
Enumerates all the locked alarms.
Enumeration functions work asynchronously. As a result, you must synchronize the calls
using semaphores.
Declaration
Parameters
dwServiceID
ID of the installed service
lpdwTAID
Pointer to the TransactionID for asynchronous processing
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure.
Return value
TRUE
Alarms enumerated
FALSE
Error.
3.10.5.7 MSRTEnumMsgRTDataPlus
Description
Enumerates all alarms that are present in the current alarm list. Its callback function
MSG_SERVICE_NOTIFY_PROCPlus callback function is called with notification type
MSG_NOTIFY_MSGENUM, enumeration of alarms. lpbyData refers to data of the
MSG_RTDATA_STRUCTPlus structure.
Enumeration functions work asynchronously. As a result, you must synchronize the calls
using semaphores.
Declaration
BOOL MSRTEnumMsgRTData(
DWORD dwServiceID,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpdwTAID
Pointer to the TransactionID for asynchronous processing.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarms enumerated
FALSE
Error.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.5.8 MSRTGetClassInfoPlus
Description
Get information about an alarm class.
Declaration
Parameters
dwServiceID
ID of the Service - service whose server is to be connected
lpszServer
Server prefix without ::
If an empty string or NULL is input the default server set will be used.
dwMsgNrLow
Alarm number of the lower DWORD
dwMsgNrHigh
Alarm number of the upper DWORD WinCC
lpClassPlus
Pointer that includes the information
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Comment
The MSRTGetClassInfoPlus function can also be called up without MSRTStartMsgServicePlus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetClassInfoPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_CLASS_STRUCT_PLUS (Page 2366)
MSRTStartMsgServicePlus (Page 2397)
3.10.5.9 MSRTGetLastMsgWithCommentPlus
Description
Retrieves the last alarm from a log based on filter conditions and an instance name.
Declaration
Parameters
lpszServer
Server prefix without '::'. If an empty string or NULL is input the default server set will be used.
lpszInstance
Instance name. An empty string or also NULL will be added for the filter condition.
lppFilter
Pointer to a pointer list of structures MSG_FILTER_STRUCT_PLUS for transferring filter
conditions.
dwFilterCount
Number of specified filter structures via lppFilter. At least one filter structure must be
specified.
lpMsg
Returns the message data.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure.
Return value
TRUE
Alarm queried.
FALSE
Error.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_FILTER_STRUCT_PLUS (Page 2375)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
MSG_TEXTVAL256_STRUCT_PLUS (Page 2395)
3.10.5.10 MSRTGetMsgAttributesPlus
Description
Retrieves the attributes of the last message from single messages, lock list, archive, hit list, or
hide list on the basis of the filter condition, instance name and NotifyMask.
Declaration
Parameters
lpszServer
Server prefix without ::
If an empty string or NULL is input, the set default server will be used.
lpszInstance
Instance name. An empty string or also NULL will be added for the filter condition.
lppFilter
Pointer to a pointer list of structures MSG_FILTER_STRUCT_PLUS for transferring filter
conditions.
Because this function always allows only one alarm to be queried, dwMsgNrLow and
dwMsgNrHigh must contain the number of the alarm to be queried.
dwFilterCount
Number of specified filter structures via lppFilter. At least one filter structure must be
specified.
dwNotifyMask
The information as to which type of message the message belongs to is defined by means of
the following constants from the file "msrtapi.h" via "CCMsRtCliPlus.h":
lpdwAttributeList
Pointer to a DWORD array of the variable dwAttributeListCount, in which the attributes of the
message to be queried must be specified. At least one attribute must be specified.
Possible attributes are specified using the constants MSG_ATTR_xxx in the "msrtapi.h" file via
"CCMsRtCliPlus.h".
dwAttributeListCount
Specifies how many attributes are specified in the list lpdwAttributeList. At least one attribute
must be specified.
lpvAttributeValues
Pointer to a VARIANT which must be initialized with VT_EMPTY. A one-dimensional
(VT_ARRAY|VT_VARIANT) for the requested attributes is returned here.
The first values are always assigned message numbers (index (0), time stamp (index 1),
status (index 2) and instance (index 3). The requested attributes are stored from index 4 in
the array. You can find more information in the offset definition STARTINDEX_MSG_ATTR in
"m_global.h".
If the VARIANT remains empty without the function reporting an error, no hits would be
found via the filter condition.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure.
Return value
TRUE
Message data queried.
FALSE
Error.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_FILTER_STRUCT_PLUS (Page 2375)
3.10.5.11 MSRTGetMsgActualPlus
Description
The function states the number of currently pending alarms in the alarm list.
Declaration
BOOL MSRTGetMsgActualPlus (
LPDWORD lpdwCount,
LPCMN_ERRORW lpError );
Parameters
lpdwCount
Pointer to a buffer in which the number of currently pending alarms is stored.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number stated.
FALSE
Error
Comment
The MSRTGetMsgActualPlus function can also be called up without MSRTStartMsgServicePlus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgActualPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.5.12 MSRTGetMsgCSDataPlus
Description
Query the configured data for an alarm.
Declaration
BOOL MSRTGetMsgCSDataPlus (
DWORD dwServiceNr,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPMSG_CSDATA_STRUCT_PLUS lpmCSDataPlus,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpszServer
Server prefix without ::
If an empty string or NULL is input the default server set will be used.
dwMsgNrLow
Number of the first alarm
dwMsgNrHigh
Number of the last alarm
lpmCSDataPlus
Pointer to the configuration data (alarm class, type of alarm, text block index, etc.) for this
alarm in the MSG_CSDATA_STRUCT_PLUS (Page 2370) structure.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
Configuration data queried.
FALSE
Error
Comment
The MSRTGetMsgCSDataPlus function can also be called up without MSRTStartMsgServicePLus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgCSDataPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Example
The example shows the embedding of the function call in a C function.
#include "GlobalDefinitions.h"
void OnClick(char* screenName, char* objectName, char* propertyName)
{
//add your Code hiere
#pragma code("CCMSRTCLIPlus.dll")
#include "CCMSRTCLIPlus.h"
#pragma code()
BOOL ret = FALSE;
CMN_ERRORW Error;
// DWORD dwMsgNrU;
// DWORD dwMsgNrO;
int i;
WCHAR lpszMsgText[255];
DWORD lpdwCount = 255;
MSG_CSDATA_STRUCT_PLUS msgCSData;
MSGULONGLONG msgID;
msgID.dwdw.dwLow = 1;
msgID.dwdw.dwHigh = 0;
memset( &msgCSData, 0, sizeof( msgCSData ));
// dwMsgNrU = 1;
// dwMsgNrO = 0;
ret = MSRTGetMsgCSDataPlus(0L, NULL, msgID.dwdw.dwLow, msgID.dwdw.dwHigh,
&msgCSData, &Error );
if(TRUE==ret)
{
for (i = 0; i < (sizeof(msgCSData.dwTextID)/sizeof(DWORD)); i++){
printf("TextID[%d] = %d,\r\n",i, msgCSData.dwTextID[i]);
}
}
else
{
printf("Error = %ls\r\t", Error.szErrorText);
}
}
Related functions
See also
MSG_CSDATA_STRUCT_PLUS (Page 2370)
MSRTStartMsgServicePlus (Page 2397)
MSGULONGLONG (Page 2396)
3.10.5.13 MSRTGetMsgCSDataExPlus
Description
Query configuration data of an alarm from the specified alarm server. The function returns the
tag names including the server prefixes in the MSG_CSDATA_EX_STRUCT_PLUS structure.
Declaration
BOOL MSRTGetMsgCSDataExPlus (
DWORD dwServiceNr,
LPCWSTR lpszServer,
DWORD lpdwMsgNrLow,
DWORD lpdwMsgNrHigh,
DWORD dwMsgNrCount,
MSG_CSDATA_EX_CALLBACK_PROC_PLUS lpfnCSDataCallbackPlus,
LPVOID lpvUser,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpszServer
Pointer to the symbolic name of the alarm server without server delimiter ::
The alarm server specified here is only used when dwServiceID is supplied with 0L. If an
empty string or NULL is specified, the default server set will be used.
lpdwMsgNrLow
Pointer to DWORD list with less significant DWORD of 64-bit alarm numbers.
lpdwMsgNrHigh
Pointer to DWORD list with more significant DWORD of 64-bit alarm numbers (generally
occupied with 0L).
dwMsgNrCount
Number of alarm numbers in the list
lpfnCSDataCallbackPlus
Your callback function that receives the configuration data of the alarms.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but rather
provided again in the callback function.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
Configuration data queried.
FALSE
Error
Comment
The MSRTGetMsgCSDataPlus function can also be called up without MSRTStartMsgServicePLus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgCSDataPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Example
The example shows the embedding of the function call in a C function.
#include "GlobalDefinitions.h"
void OnClick(char* screenName, char* objectName, char* propertyName)
{
//add your Code hiere
#pragma code("CCMSRTCLIPlus.dll")
#include "CCMSRTCLIPlus.h"
#pragma code()
BOOL ret = FALSE;
CMN_ERRORW Error;
// DWORD dwMsgNrU;
// DWORD dwMsgNrO;
int i;
WCHAR lpszMsgText[255];
DWORD lpdwCount = 255;
MSG_CSDATA_STRUCT_PLUS msgCSData;
MSGULONGLONG msgID;
msgID.dwdw.dwLow = 1;
msgID.dwdw.dwHigh = 0;
memset( &msgCSData, 0, sizeof( msgCSData ));
// dwMsgNrU = 1;
// dwMsgNrO = 0;
ret = MSRTGetMsgCSDataPlus(0L, NULL, msgID.dwdw.dwLow, msgID.dwdw.dwHigh,
&msgCSData, &Error );
if(TRUE==ret)
{
for (i = 0; i < (sizeof(msgCSData.dwTextID)/sizeof(DWORD)); i++){
printf("TextID[%d] = %d,\r\n",i, msgCSData.dwTextID[i]);
}
}
else
{
printf("Error = %ls\r\t", Error.szErrorText);
}
}
Related functions
3.10.5.14 MSG_CSDATA_EX_CALLBACK_PROC_PLUS
Description
In order to evaluate the configuration data of alarms listed by the system, you must provide a
callback function of type MSG_CSDATA_EX_CALLBACK_PROC_PLUS
Declaration
BOOL ( * MSG_CSDATA_EX_CALLBACK_PROC_PLUS) (
DWORD dwIndex,
LPMSG_CSDATA_EX_STRUCT_PLUS lpmCSDataExPlus,
LPVOID lpvUser );
Parameters
dwIndex
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpmsgCSDataExPlus
Pointer to a structure of type MSG_CSDATA_EX_STRUCT_PLUS (Page 2372) with the
configuration data of the alarm.
lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but rather
provided again in the callback function.
Comment
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
• Functions in which an alarm loop is accessed, for example: GetMessage
• Enumerations that call other enumerations
If a program registers a Notify routine, it must clear its alarm queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
The pointers to the tag names in the structure do not have to be enabled. That automatically
happens internally after return of the callback. Therefore, the pointers themselves cannot
be copied because they are invalid after the callback or end of function. If needed, the tag
names must be copied as a string.
Return value
TRUE
The enumeration is continued.
FALSE
The enumeration is discontinued.
Required files
CCMSRTCLIPlus.h
Related functions
3.10.5.15 MSRTGetMsgHelptextsPlus
Description
The function determines the configured help texts of an alarm from the specified alarm server.
Declaration
BOOL MSRTGetMsgHelptextsPlus(
DWORD dwServiceID;
LPCWSTR lpszServer,
LPMSG_HELPTEXTS_STRUCT_PLUS lpHelptexts,
LPCMN_ERROR lpError );
Parameters
dwServiceID
Service ID of "MSRTStartMsgServicePlus" or "0L".
When the service ID is specified, this ID has precedence and the corresponding alarm server
of the associated "MSRTStartMsgServicePlus" is used.
lpszServer
Pointer to the symbolic name of the alarm server without server delimiter "::", "NULL" or
empty string.
The alarm server specified here is only used when "dwServiceID" is supplied with "0L".
lpHelptexts
Pointer to a structure of type MSG_HELPTEXTS_STRUCT_PLUS (Page 2379), in which the help
texts "ResponseTime", "Description", "Causes", "Action", "Consequence" are returned.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The configured help texts were queried.
FALSE
Error
Comment
The MSRTGetMsgHelptextsPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all calls.
In this case only the first call of MSRTGetMsgPriorityPlus is slowed.
You have the option of specifying your own fixed or allocated text buffer for each help
text in which the help texts are stored. "lpszHelp_xxx" and "dwHelp_xxx" then both have
to be specified. If "NULL" is specified for "lpszHelp_xxx" "and/or "0L" for "dwHelp_xxx", the
"MSRTGetMsgHelptextsPlus" function itself allocates the text buffers and also enters this in
the "lpHelptexts" structure. After call up, this can be evaluated using the "dwFlags"
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
3.10.5.16 MSRTGetMsgPriorityPlus
Description
Query the priority of the given alarm.
Declaration
BOOL MSRTGetMsgPriorityPlus (
DWORD dwServiceID,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
long* plPriority,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgService is called.
lpszServer
Server prefix without ::
If an empty string or NULL is input the default server set will be used.
dwMsgNrLow
dwMsgNrLow Number of the first alarm
dwMsgNrHigh
dwMsgHigh Number of the last alarm
plPriority
Pointer to a tag of the long data type, in which the priority is stored.
This parameter must not be NULL!
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Priority queried.
FALSE
Error
Comment
The MSRTGetMsgPriorityPlus function can also be called up without MSRTStartMsgServicePlus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgPriorityPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.5.17 MSRTGetMsgQuitPlus
Description
Query the number of alarms that require acknowledgement.
Declaration
BOOL MSRTGetMsgQuitPlus(
LPDWORD lpdwCount,
LPCMN_ERRORW lpError );
Parameters
lpdwCount
Pointer for the number of alarms that require acknowledgement
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Number stated.
FALSE
Error
Comment
The MSRTGetMsgPriorityPlus function can also be called up without MSRTStartMsgServicePlus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgPriorityPlus is slowed.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.5.18 MSRTGetSelectedMsgPlus
Description
The function determines the alarm number for an alarm selected in an alarm window or an alarm
view. The view is specified using lpszTemplate.
Declaration
BOOL MSRTGetSelectedMsgPlus(
LPCWSTR lpszTemplate,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsgRTPlus,
LPCMN_ERROR lpError );
Parameters
lpszTemplate
Pointer to the name of the view in which an alarm is selected.
lpMsgRTPlus
Pointer to a structure of the MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
type, in which the alarm number is returned.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Data queried.
FALSE
Error
Comment
The MSRTGetMsgPriorityPlus function can also be called up without MSRTStartMsgServicePlus.
These calls are however significantly slower. You can improve performance by performing a
MSRTStartMsgServicePlus beforehand and retaining it for all calls. In this case only the first call
of MSRTGetMsgPriorityPlus is slowed.
Note
According to which view is set in the display, the flags in dwFlags of the
MSG_RTDATA_INSTANCECOMMENT_STRUCTPlus structure will be assigned differently:
• for the online view: MSG_RT_FLAG_xxx flags,
• for the log view: MSG_FLAG_ flags, and
• for the hit list: no assignment is possible and flags will be ignored.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
Examples
Get selected Msg "MS02.cpp"
See also
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
MSRTStartMsgServicePlus (Page 2397)
3.10.5.19 MSRTLoopInAlarmPlus
Description
API function for loop-in-alarm The alarm number is decisive.
Declaration
BOOL MSRTLoopInAlarmPlus(
DWORD dwServiceID,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
ID of the Service - service whose server is to be connected
lpszServer
Server prefix without ::
If an empty string or NULL is input the default server set will be used.
dwMsgNrLow
Alarm number of the lower DWORD
dwMsgNrHigh
Alarm number of the upper DWORD WinCC
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.5.20 MSRTResetMsgPlus
Description
The stated alarm will be acknowledged.
Declaration
BOOL MSRTResetMsgPlus(
DWORD dwServiceID,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPDWORD lpdwTAID
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgService is called.
dwMsgNrLow
dwMsgNrLow Number of the first alarm
dwMsgNrHigh
dwMsgHigh Number of the last alarm
You must assign dwMsgNrLow and dwMsgNrHigh, if you use the MSG_FILTER_NR,
MSG_FILTER_NR_FROM, or MSG_FILTER_NR_TO filter criteria.
lpdwTAID
Pointer to the TransactionID for asynchronous processing.
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.
Return value
TRUE
Alarm acknowledged.
FALSE
Error
Comment
WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
3.10.6.1 MSRTEnumGroupMsgPlus
Description
Enumerate all single alarms of the alarm group. MSG_MAX_GROUPITEMS gives the maximum
number of single alarms that can be enumerated. Its callback function
MSG_SERVICE_NOTIFY_PROCPlus is called using the MSG_NOTIFY_GROUPENUM notification
type. lpbyData refers to data of the MSG_RTGROUPENUM_STRUCTPlus structure.
Enumeration functions of the alarm system run asynchronously. As a result, you must
synchronize the calls using semaphores.
Declaration
Parameters
dwServiceID
ID of the Service - service
lpmGroupPlus
Pointer to the alarm group info
IpdwTAID
Pointer to the TransactionID for asynchronous processing feedback
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 2393)
MSRTStartMsgServicePlus (Page 2397)
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
MSG_RTGROUPENUM_STRUCT_PLUS (Page 2392)
3.10.6.2 MSRTLockGroupPlus
Description
Lock a configured alarm group. All individual alarms in the alarm group and also individual
alarms in underlying groups will be locked.
Declaration
BOOL MSRTLockGroupPlus (
DWORD dwServiceID,
LPMSG_RTGROUPSET_STRUCTPlus lpmGroupPlus,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );
Parameters
dwServiceID
ID of the service returned with the call of MSRTStartMsgServicePlus.
lpmGroupPlus
Pointer to the MSG_RTGROUPSET_STRUCT_PLUS (Page 2393) structure with information on
the alarm groups.
Lock: dwData != 0; enable: dwData = 0
pdwTAID
Pointer to the transaction ID for asynchronous processing feedback message
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarms in the alarm group locked.
FALSE
Error
Comment
Only configured alarm groups will be locked or released. Groups defined in runtime will not be
included and the function will have no effect.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 2393)
MSRTStartMsgServicePlus (Page 2397)
Overview of the functions (Page 2349)
3.10.6.3 MSRTQuitGroupPlus
Description
Acknowledgment of an alarm group. All single alarms of the alarm group as well as the alarms
of subordinate groups are acknowledged.
Declaration
BOOL MSRTQuitGroupPlus (
DWORD dwServiceID,
LPMSG_RTGROUPSET_STRUCTPlus lpmGroupPlus,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );
Parameters
dwServiceID
ID of the service returned with the call of MSRTStartMsgServicePlus.
lpmGroupPlus
Pointer to a structure of the MSG_RTGROUPSET_STRUCT_PLUS (Page 2393) type with
information of the alarm groups.
Lock: dwData != 0; enable: dwData = 0
pdwTAID
Pointer to the transaction ID for asynchronous processing feedback message
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarms in the alarm group are acknowledged.
FALSE
Error
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 2393)
3.10.7.1 MSRTGetFilterDataPlus
Description
Reads the selection criteria of the alarm view and writes the result to the
MSG_FILTER_STRUCT_PLUS structure.
Declaration
Parameters
dwServiceID
ID of the Service - service
lpszName
Alarm view name. You assign the name in the alarm view properties.
lppMsgFilterPlus
Pointer to array filter pointer to filter structures
lpdwFilterCount
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Comment
Only configured alarm filters are determined. Alarm filters that are set using
MSRTStartMsgServicePlus or MSRTSetMsgFilterPlus are not included.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_FILTER_STRUCT_PLUS (Page 2375)
MSRTStartMsgServicePlus (Page 2397)
MSRTSetMsgFilterPlus (Page 2453)
3.10.7.2 MSRTCheckWinFilterPlus
Description
Tests if the stated alarm corresponds to a filter parameter.
Declaration
BOOL MSRTCheckWinFilterPlus (
DWORD dwServiceID,
LPCWSTR lpszServer,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsgRTPlus,
LPMSG_FILTER_STRUCT_PLUS* lppMsgFilter,
DWORD dwFilterCount,
LPWORD lpwReturn,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
ID of the service returned with the call of MSRTStartMsgServicePlus.
lpszServer
Server prefix without ::
If an empty string or NULL is input the default server set will be used.
lpMsgRTPlus
Pointer to a structure of the MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
type with the runtime data of an alarm.
lppMsgFilter
Pointer to filter pointer array on filter structures.
lpwReturn
Pointer to the function results
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Testing will be performed.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_FILTER_STRUCT_PLUS (Page 2375)
MSRTStartMsgServicePlus (Page 2397)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 2388)
3.10.7.3 MSRTSetMsgFilterPlus
Description
Resets the filter for the specified service.
Declaration
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lppMsgFilterPlus
Pointer to ARRAY pointer for filter conditions
dwFilterCount
Number of filters in the ARRAY
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. The system
writes error information into this structure in the case of an error.
Return value
TRUE
Function successful
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
MSG_FILTER_STRUCT_PLUS (Page 2375)
MSRTGetFilterDataPlus (Page 2450)
3.10.7.4 MSRTSetMsgWinFilterPlus
Description
Defines new filter conditions for the alarm view. All current alarm views at preset with this name
will be updated.
Declaration
BOOL MSRTSetMsgWinFilterPlus (
LPMSG_FILTER_STRUCT_PLUS lppMsgFilterPlus,
DWORD dwFilterCount,
LPCMN_ERRORW lpError );
Parameters
lppMsgFilterPlus
Pointer to a structure of the MSG_FILTER_STRUCT_PLUS (Page 2375) type with the alarm filter
data. The name of the filter structure is the same as the window name.
dwFilterCount
Number of filters
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Filter was set
FALSE
Error
Error messages
See also
MSG_FILTER_STRUCT_PLUS (Page 2375)
3.10.8.1 MSRTMsgWinCommandPlus
Description
Performs a control function in an alarm view. If you use this function, you only use an alarm
window template once within a screen. The commands are also passed on to controls with the
caption name identical to the template name. (When screens with alarm templates are
converted to screens with controls, the resulting controls have a caption name identical to the
template name.)
Declaration
BOOL MSRTMsgWinCommandPlus(
LPTSTR lpszTemplate,
DWORD dwCommandID,
LPCMN_ERROR lpError );
Parameters
lpszTemplate
Pointer to the window name
dwCommandID
The ID of the control function is specified using the constants in the "m_global.h" file:
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Control function executed
FALSE
Error
Comment
All opened alarm views with the specified name execute the control function.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
3.10.9.1 MSRTGetCommentInstancePlus
Description
Gets the comment text for a logged alarm.
Declaration
BOOL MSRTGetCommentInstancePlus (
DWORD dwServiceID,
LPMSG_COMMENT_INSTANCE_STRUCT_PLUS lpmCommentPlus,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpmCommentPlus
Pointer to a MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 2368) type structure with the
data of a comment. The following values in the structure are necessary: Alarm number, date
and time, and instance name.
Note
Date and time must exactly match the time stamp of the message for which the comment text
is to be determined to the millisecond.
lpError
Pointer to the data of the extended error message in the CMN_ERROR W structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Comment text determined.
If no comment exists, the call returns TRUE, but the szText element is empty.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 2368)
3.10.9.2 MSRTSetCommentInstancePlus
Description
Specifies the comment text for a logged alarm.
Declaration
Bool MSRTSetCommentInstancePlus (
DWORD dwServiceID,
LPMSG_COMMENT_INSTANCE_STRUCT_PLUS lpmCommentPlus,
DWORD* pdwTAID,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
ID of the service returned with the call of MSRTStartMsgServicePlus.
lpmCommentPlus
Pointer to a MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 2368) type structure with the
data of a comment. The following values in the structure are necessary: Alarm number,
instance name, date, time of day, text, and user name.
pdwTAID
Pointer to the transaction ID for asynchronous processing feedback message
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Successfully sent to server.
FALSE
Error
Comment
The data of the MSRTSetCommentPlus function are written asynchronously. As a result, not all
errors are returned to the user. Use MSRTGetCommentInstancePlus to check how data are
written.
If MSRTSetCommentInstancePlus is executed after MSRTCreateMsgPlus or
MSRTCreateMsgInstancePlus, the asynchronous writing along with the degree of utilization
of the system can cause data to be "overtaken" by other data. As a result, the comment is
specified before the alarm is created.
Instead of the call combination, use the MSRTCreateMsgInstanceWithCommentPlus function.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 2368)
MSRTStartMsgServicePlus (Page 2397)
MSRTCreateMsgInstanceWithCommentPlus (Page 2411)
MSRTCreateMsgInstancePlus (Page 2413)
3.10.10.1 MSRTGetInfotextPlus
Description
Gets the info text for an alarm. The following values have to be transferred to this purpose: Alarm
number
Declaration
Parameters
dwServiceID
ID of the Service - service
lpmInfotext
Pointer of the info text structure
lpError
Pointer that includes the extended error message
Return value
TRUE
Function successful
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_INFOTEXT_STRUCT_PLUS (Page 2382)
MSRTStartMsgServicePlus (Page 2397)
3.10.10.2 MSRTSetInfotextPlus
Description
Sets the info text for an alarm.
Declaration
Parameters
dwServiceID
ID of the Service - service
lpmInfotextPlus
Pointer of the info text structure
lpdwTAID
Pointer to the TransactionID with feedback for asynchronous processing.
lpError
Pointer that includes the extended error message.
Return value
TRUE
Function successful
FALSE
Error
Comment
The new info text will be effective from the next minute changeover after one. Until then the
previous info text will be used.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_INFOTEXT_STRUCT_PLUS (Page 2382)
MSRTStartMsgServicePlus (Page 2397)
3.10.11.1 MSRTEnumBackupListPlus
Description
Lists the entries of the export file for the sequential archive.
Declaration
BOOL MSRTEnumBackupListPlus (
DWORD dwServiceID,
LPCMN_ERROR lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Export list created.
FALSE
Error
Comment
The Enum functions work asynchronously. This has the result that any calls must be
synchronized by semaphore
The callback function MSG_SERVICE_NOTIFY_PROCPlus is called using the
MSG_NOTIFY_BACKUPENUM parameter. The lpbyData parameter points to the data in the
MSG_BACKUP_STRUCT_PLUS (Page 2364) structure.
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_BACKUP_STRUCT_PLUS (Page 2364)
MSRTStartMsgServicePlus (Page 2397)
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
3.10.11.2 MSRTExportPlus
Description
Exports alarms from the circular log and the related log backup files.
Declaration
BOOL MSRTExportPlus (
DWORD dwServiceID,
LPMSG_BACKUP_STRUCT_PLUS lpMsgBackup,
LPCMN_ERRORW lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
lpMsgBackup
Pointer to a structure of the MSG_BACKUP_STRUCT_PLUS (Page 2364) type.
lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarms exported.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSRTStartMsgServicePlus (Page 2397)
MSG_BACKUP_STRUCT_PLUS (Page 2364)
3.10.11.3 MSRTEnumArchivDataPlus
Description
Enumerates all alarms in the specified log. Its callback function
MSG_SERVICE_NOTIFY_PROC_PLUS is called using the MSG_NOTIFY_ARCHIVENUM notification
type. lpbyData refers to data of the MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS structure.
Enumeration functions work asynchronously. As a result, you must synchronize the calls
using semaphores.
Declaration
BOOL MSRTEnumArchivDataPlus(
DWORD dwServiceID,
BOOL fArchiv,
DWORD dwMaxRecords
DWORD dwParams
LPDWORD lpdwTAID
LPCMN_ERROR lpError );
Parameters
dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.
fArchiv
Designates the log type.
dwMaxRecords
Maximum number of the data records to be listed. If the dwMaxRecords is exceeded
numbering will stop. If dwMaxRecords = 0xFFFFFFFF, all alarms will be listed.
dwParams
Parameters for the sort order:
lpdwTAID
Pointer to TransactionID for asynchronous processing.
lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
Alarms listed.
FALSE
Error
Error messages
Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll
Related functions
See also
MSG_SERVICE_NOTIFY_PROC_PLUS (Page 2403)
MSRTStartMsgServicePlus (Page 2397)
Overview of the functions (Page 2349)
3.11.1.1 Basics
General information
You can use this function to switch from a screen in WinCC Runtime directly to the point of use
of a process tag in the program code of STEP 7. This provides the possibility of quick and simple
diagnostics of faults. To speed up the entry point functions, you can start the TIA Portal and open
a project. This is typically done at the startup of WinCC Runtime.
A check is first made to determine whether the TIA Portal is already open at the entry point. If
this is not the case, the TIA Portal is automatically started. The corresponding editor opens in
the TIA Portal and a search is performed for the point of use, assignment, call or step.
Header files
The declaration of the functions and structures explained here takes place in the header files:
Libraries
The DLL link for the functions explained here is provided in the kopapi.dll "lib" files
kopapi.lib Library
kopapi.dll
See also
OpenTIAPortalProject (Page 2470)
OpenTIAPortalIECPLByCall (Page 2471)
OpenTIAPortalIECPLByAssignment (Page 2474)
OpenTIAPortalS7GraphByBlock (Page 2476)
Example: Integration in a WinCC function (Page 2478)
3.11.1.2 OpenTIAPortalProject
Description
You can use this function to start the TIA Portal and open a project. This will speed up the
individual jump functions. However, you should consider that a program open in the
background requires memory and computation time.
Declaration
BOOL OpenTIAPortalProject (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);
Parameters
dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
• KOPAPI_FLAG_TIAPORTAL_CHECK_PROJECT_STATE: If this bit is set, the status of the project
is checked. The project is not opened.
• The project is open.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_NOT_OPEN
• The project is open and contains no changes.
Return value TRUE
error.dwError1 = 0
• The project is open and contains changes.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_MODIFIED
• The project is opened read only.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_READ_ONLY
KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT: If this bit is set, the call is
canceled when the project is already open and contains changes.
KOPAPI_FLAG_TIAPORTAL_OPEN_READONLY: When this bit is set to TRUE, the project is
opened in write-protected mode in the engineering system of the TIA Portal.
lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example,
"D:\TIAProjects\Project1\Project1.ap14"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap14", …);
lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 2493) when asynchronous functions that do not provide instant results
are called.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
See also
Basics (Page 2469)
3.11.1.3 OpenTIAPortalIECPLByCall
Description
The function is used for the LAD and FBD languages and shows the preceding logic of a network
input of a standard block.
Declaration
BOOL OpenTIAPortalIECPLByCall (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);
Parameters
dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
• IECPLVIEWER_PIN_SUBSTRING_SEARCH=0x0001: When searching for the pin name, a
substring is searched for, which means the pin name starts with the string passed in lpszPin.
If this bit is not set, the complete pin name is compared to lpszPin.
• KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA Portal does not
go into online mode after the block is opened. If this bit is not set, online mode is started after
opening the block.
• KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x0008L: If this bit is set, the call
is canceled when the project is already open and contains changes.
• KOPAPI_FLAG_TIAPORTAL_OPEN_READONLY: When this bit is set to TRUE, the project is
opened in write-protected mode in the engineering system of the TIA Portal.
lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example,
"D:\TIAProjects\Project1\Project1.ap14"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap14", …);
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.
lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not those in the call structure. The first part of the name ("Line1") cannot be enclosed in
quotes, because this is a global icon, as can be recognized by the context. Quotation marks
are required for the individual name components when special characters such as spaces,
dots, etc., occur in them. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
The use of the name of a FB is not allowed.
lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
• For local instances, the hash sign # must be specified here, for example, "#feeder1".
• For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to make the specified pin
visible within the network in the editor.
Only lpszCalledBlock is shown as visible with lpszPin=ZERO.
lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 2493) when asynchronous functions that do not provide instant results
are called.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
See also
Basics (Page 2469)
3.11.1.4 OpenTIAPortalIECPLByAssignment
Description
The function is used for the LAD and FBD languages and shows the assignment to an operand
and its preceding logic.
Declaration
BOOL OpenTIAPortalIECPLByAssignment (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszOperand,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);
Parameters
dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
• KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA Portal does not
go into online mode after the block is opened. If this bit is not set, online mode is started after
opening the block.
• KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x0008L: If this bit is set, the call
is canceled when the project is already open and contains changes.
• KOPAPI_FLAG_TIAPORTAL_OPEN_READONLY: When this bit is set to TRUE, the project is
opened in write-protected mode in the engineering system of the TIA Portal.
lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example,
"D:\TIAProjects\Project1\Project1.ap14"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap14", …);
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.
lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
lpszOperand
Name of a local or global operand to which an assignment is made.
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
• For local operands, the hash sign # must also be specified here.
• For global operands, the global name without hash sign # must be specified.
If lpszOperand is written several times within lpszContainingBlock or its FB, the entry point is
always the first write access of lpszOperand.
lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 2493) when asynchronous functions that do not provide instant results
are called.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
See also
Basics (Page 2469)
3.11.1.5 OpenTIAPortalS7GraphByBlock
Description
The function is used for the S7 Graph languages and shows a step in a sequencer.
Declaration
BOOL OpenTIAPortalS7GraphByBlock (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszBlock,
DWORD dwStepNumber,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);
Parameters
dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
• KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA Portal does not
go into online mode after the block is opened. If this bit is not set, online mode is started after
opening the block.
• KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x00000008L: If this bit is set,
the call is canceled when the project is already open and contains changes.
• KOPAPI_FLAG_TIAPORTAL_OPEN_READONLY: When this bit is set to TRUE, the project is
opened in write-protected mode in the engineering system of the TIA Portal.
lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example,
"D:\TIAProjects\Project1\Project1.ap14"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap14", …);
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.
lpszBlock
Instance name of the S7 Graph block to be displayed.
dwStepNumber
Number of the step to be displayed
dwStepNumber=0 automatically searches for the active step and enables "Track active step"
mode.
lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 2493) when asynchronous functions that do not provide instant results
are called.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
See also
Basics (Page 2469)
Description
The example shows the embedding of the function calls in a user-defined function. For better
maintainability, the call should be made externally in a global script function, in which the path
to the TIA Portal and the name of the PLC station are then determined.
BOOL useTiaPortal = TRUE; // use the TIA Portal or the viewer control?
char* pTiaPortalProject = "c:\\Projects\\myproject\\myproject.ap14";
char* pStationName = "PLC_Name"; // TODO: read from internal tag
char* pContainingBlock = "Block_IDB"; // TODO: get from current selection
char* pOperand = "OUT"; // TODO: get from current selection
CMN_ERROR error;
BOOL result;
if(useTiaPortal)
{
result = OpenTIAPortalIECPLByAssignment(0, pTiaPortalProject,
pStationName, pContainingBlock, pOperand, &error);
}
else
{
char *pServerPrefix = NULL, *pTagPrefix = NULL, *pWindowPrefix =
NULL;
// determine ServerPrefix of the current environment
GetServerTagPrefix(&pServerPrefix, &pTagPrefix, &pWindowPrefix);
// make the screen which contains the viewer control visible
SetVisible("SYSTEM#Basic_Screen", "Screen_window_IECPLViewer",
TRUE);
result = OpenViewerIECPLByAssignment(0, pServerPrefix,
"SYSTEM#IECPLViewer", "IECPLViewerObject", pStationName, pContainingBlock,
pOperand, &error);
}
}
See also
Basics (Page 2469)
3.11.2.1 Basics
General information
You can use these functions to display the current program status of PLC programs in a PLC code
view.
The screen containing the PLC code view must have been opened via ActivateScreen(), for
example.
Header files
The declaration of the functions and structures explained here takes place in the header files:
Libraries
The DLL link for the functions explained here is provided in the "lib" files: pdecscli.dll
kopapi.lib Library
kopapi.dll
See also
OpenViewerIECPLByCall (Page 2482)
OpenViewerIECPLByAssignment (Page 2488)
OpenViewerS7GraphByBlock (Page 2479)
3.11.2.2 OpenViewerS7GraphByBlock
Description
The function displays in the PLC language, S7 Graph, a step called from a sequencer in the PLC
code view.
Declaration
BOOL OpenViewerS7GraphByBlock (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszBlock,
DWORD dwStepNumber,
LPCMN_ERROR lpdmError);
Parameter
dwFlags
Bit array in which the individual values are ORed bit-by-bit.
Note
To display hierarchical comments, bit 0x4 has to be set.
lpszServerPrefix
The parameter is reserved for later upgrades.
lpszPictureName
Name of the screen with the PLC code view.
lpszObjectName
Name of the PLC code view.
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal. No commas are permitted in the name.
lpszBlock
Instance name of the S7 Graph block to be displayed. If special characters such as spaces,
periods, etc. occur in the name, quotation marks need to be used.
dwStepNumber
Number of the step to be displayed.
dwStepNumber=0 automatically searches for the active step and enables "Track active step"
mode.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name of
the PLC station is also determined.
See also
Error-handling (Page 2493)
Basics (Page 2479)
3.11.2.3 OpenViewerIECPLByCall
Description
The function is used for the LAD and FBD languages and shows the preceding logic of a network
input of a standard block in the PLC code view.
Note
If the input is occupied by a constant (TRUE, FALSE), this value is not displayed in the PLC code
view. To display the value in the PLC code view correctly, you should allocate a tag to the input
that has the appropriate value.
Declaration
BOOL OpenViewerIECPLByCall (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCMN_ERROR lpdmError);
Parameter
dwFlags
Bit array in which the individual values are ORed bit-by-bit.
Note
To display hierarchical comments, bit 0x4 has to be set.
lpszServerPrefix
The parameter is reserved for later upgrades.
lpszPictureName
Name of the screen with the PLC code view.
lpszObjectName
Name of the PLC code view.
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal. No commas are permitted in the name.
lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not those in the call structure. The first part of the name ("Line1") cannot be enclosed in
quotes, because this is a global icon, as can be recognized by the context. Quotation marks
are required for the individual name components when special characters such as spaces,
dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
The use of the name of a FB is not allowed.
lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
• For local instances, the hash sign # must be specified here, for example, "#feeder1".
• For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
The use of the name of an FC is not allowed.
If lpszCalledBlock is called several times within lpszContainingBlock or its FB, the entry point
is always the first call of lpszCalledBlock.
lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to display the network
interconnected to the input pin in the PLC code view.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name of
the PLC station is also determined.
See also
Error-handling (Page 2493)
Basics (Page 2479)
3.11.2.4 OpenViewerIECPLByFCCall
Description
The function is used for the LAD and FBD languages and shows the preceding logic of a network
input of a standard block in the PLC code view while taking the UDT instance into
consideration.
Note
If the input is occupied by a constant (TRUE, FALSE), this value is not displayed in the PLC code
view. To display the value in the PLC code view correctly, you should allocate a tag to the input
that has the appropriate value.
Declaration
BOOL OpenViewerIECPLByFCCall (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCTSTR lpszUdtInstance
LPCMN_ERROR lpdmError);
Parameters
dwFlags
Bit array in which the individual values are ORed bit-by-bit.
Note
To display hierarchical comments, bit 0x4 has to be set.
lpszServerPrefix
The parameter is reserved for future development and must be an empty string ("").
lpszPictureName
Name of the screen with the PLC code view.
lpszObjectName
Name of the PLC code view.
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal. No commas are permitted in the name.
lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not those in the call structure. The first part of the name ("Line1") cannot be enclosed in
quotes, because this is a global icon, as can be recognized by the context. Quotation marks
are required for the individual name components when special characters such as spaces,
dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
The use of the name of a FB is not allowed.
lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
• For local instances, the hash sign # must be specified here, for example, "#feeder1".
• For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
The use of the name of an FC is not allowed.
If lpszCalledBlock is called several times within lpszContainingBlock or its FB, the entry point
is always the first call of lpszCalledBlock.
lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to display the network
interconnected to the input pin in the PLC code view.
lpszUdtInstance
The parameter is used to limit the display of FBs or FCs called multiple times. The limitation is
based on an UDT instance interconnected to a given input pin or inout pin.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The function has been completed without any errors.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name of
the PLC station is also determined.
3.11.2.5 OpenViewerIECPLByAssignment
Description
The function is used for the LAD and FBD languages and shows the assignment of an operand
and its preceding logic in the PLC code view.
Declaration
BOOL OpenViewerIECPLByAssignment (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszOperand,
LPCMN_ERROR lpdmError);
Parameter
dwFlags
Bit array in which the individual values are ORed bit-by-bit.
Note
To display hierarchical comments, bit 0x4 has to be set.
lpszServerPrefix
The parameter is reserved for later upgrades.
lpszPictureName
Name of the screen with the PLC code view.
lpszObjectName
Name of the PLC code view.
lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal. No commas are permitted in the name.
lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as names:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not those in the call structure. The first part of the name ("Line1") cannot be enclosed in
quotes, because this is a global icon, as can be recognized by the context. Quotation marks
are required for the individual name components when special characters such as spaces,
dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
lpszOperand
Name of a local or global operand to which an assignment is made.
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock. For global operands, the global name without hash sign # must be
specified.
The following restrictions apply to operands:
• Tags from the "TEMP" area cannot be used
• Input tags cannot be used
• Static tags are only allowed in FBs
• Networks within an FC can only be displayed if no local tags are used within the network
• Networks within an FB that use tags from the "TEMP" area cannot be displayed
If lpszOperand is written several times within lpszContainingBlock or its FB, the entry point is
always the first write access of lpszOperand.
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The data was transferred to the PLC code view. Error messages such as "Operand not
supported" or "Operand not found" are output in the PLC code view and cannot be queried
via the function.
FALSE
An error has occurred.
Required files
kopapi.h
kopapi.lib
kopapi.dll
Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name of
the PLC station is also determined.
See also
Error-handling (Page 2493)
Basics (Page 2479)
3.11.2.6 IsJumpableProDiagAlarm
Core message
The function returns a Boolean value.
The Boolean value contains the information on whether a jump to the PLC code of the
selected alarm is possible.
Definition
Parameters
screenName
Pointer to the data of the screen in which the relevant object is configured.
objectName
Pointer to the data with the name of the respective object (alarm)
id
Number of the alarm in the alarm list, not the ID of the alarm.
If several alarms are selected, the value is"0".
lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.
Return value
TRUE
The jump to the PLC code of the selected alarm is possible.
FALSE
The jump to the PLC code of the selected alarm is not possible.
Required files
kopapi.h
kopapi.lib
kopapi.dll
Example
The example shows the embedding of the function call in a user-defined C function, which is
started when an alarm is selected in the alarm view.
#include "GlobalDefinitions.h"
void OnSelectedIdChanged(char* screenName, char* objectName, long id) {
#pragma code("KOPAPI.dll")
#include "kopapi.h"
#pragma code()
CMN_ERROR errorStruct;
BOOL bResult;
3.11.3 Error-handling
General information
Execution of the functions for the network entry is divided in a synchronous part and an
asynchronous part. The synchronous part checks the parameters and transfers them to the
asynchronous part.
The return value of the functions specifies whether an error has occurred in the
asynchronous section of the function. If an error has occurred, the return value is FALSE.
Such errors occur when parameters, for example, the lpszErrorTag parameter is not supplied
or incorrectly supplied.
Errors that occur in the asynchronous functions are reported through the lpszErrorTag
parameter. Such errors include: Project not found, block not available, ... lpszErrorTag
contains the name of a tag of the String data type. In order to respond to the return value,
you have to configure a function that is triggered with the cycle "To change" at a value
change of the error tags. The error tag should also be used to prevent further function calls
or the operation of a button, for example, as long as the error tag has the value "RUNNING".
lpszErrorTag
Name of a tag of the String data type. If the tag is not required, NULL can be transferred as the
parameter. If required, the tag name can include a ServerPrefix.
Error text
When the asynchronous part was terminated with an error, the error tag contains a multi-line
string whose lines are separated by a linefeed character ('\n'). The seventh line contains one of
the following error texts:
3.12.1 Basics
Introduction
WinCC provides a library that allows you to display PLC code from Runtime in an external
application. Information about networks or values pending at block interfaces is returned in
"XML" format.
The FBD and LAD programming languages are supported. The table below shows the
instructions supported by the respective programming language:
If other instructions are contained in networks, an error is returned in XML in the section
"NetworkHeaderInfo".
Requirements
The following requirements apply in order to be able to display PLC code using the application
programmed in MS Visual Studio:
• The application is on the PC on which Runtime has been started.
• An HMI connection between HMI and PLC is configured.
• The PLC is in RUN - required for querying dynamic data.
Procedure
Querying data is carried out in three steps:
1. Calling static information
In this step, you use the "RequestByAssignment" or "RequestByCall" functions to obtain
information about available networks
2. Dynamic information
In this step, you call information about the current flow or pending states for one of the
determined networks.
3. Responding to events (optional)
State changes in the PLC
– Change to the user program
– Connection to PLC interrupted
– Connection to PLC restored
These state changes are provided via the interface "IPlcCodeViewerExternalClientCB" using
the "OnEvent" method:
HRESULT OnEvent( [in] PlcCodeViewerExternalClientEvent event );
See also
Structure of the XML data (Page 2505)
3.12.2.1 Initialize
Description
The function initializes the interface.
Note
The use of the function "InitializeEx" is recommended for version V16. The "serverString"
parameter is no longer needed with the new version.
Declaration
Parameters
IPlcCodeViewerExternalClientCB
Implements the interface which provides the methods for querying network information.
serverString
Name of the PC on which Runtime is running.
Return value
-
See also
Terminate (Page 2504)
3.12.2.2 InitializeEx
Description
The function initializes the interface.
Declaration
Parameters
IPlcCodeViewerExternalClientCB
Implements the interface which provides the methods for querying network information.
Return value
-
See also
Terminate (Page 2504)
3.12.2.3 SetLanguage
Description
The function defines the language in which comments of tags of a network are output in the
XML file.
Declaration
Parameters
language
Defines the language. Use the "Culture Name" as notation from the following reference:
National Language Support (NLS) API Reference (https://msdn.microsoft.com/de-de/goglobal/
bb896001.aspx)
Another language must always be specified for hierarchical comments, and only the
hierarchical comments of this language are output.
If there are no comments in the specified language, other comments will be output in one of
the following languages:
1. German (de-DE)
2. English (en-US or en-GB)
3. If you do not define a language, the comments are output in all available languages.
Return value
-
3.12.2.4 RequestByAssignment
Description
The function shows the assignment to an operand and its preceding logic. All networks in which
the operand is written are output.
Note
This function is a legacy function with which you can call simple comments.
Declaration
Parameters
PLCName
Name of the PLC whose user program contains the block. The name is identical to the station
name displayed in the project tree in the TIA Portal.
ContainingBlock
Name of the block to be displayed or name of the instance of an FB.
The following can be used as names:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not the call structure. The first part of the name ("Line1") does not have to be enclosed
in quotation marks, because it is clear from the context that this is a global icon. Quotation
marks are required for the individual name components when special characters such as
spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
OperandName
Name of the block to be searched for in the code block belonging to "ContainingBlock".
• For local operands, the hash sign # must be specified here.
Return value
ID with which the request is uniquely identified. The ID is generated and returned with the call
of the function.
See also
RequestByCall (Page 2501)
StartDynamicDataSubscription (Page 2508)
CancelRequest (Page 2504)
3.12.2.5 RequestByAssignmentEx
Description
The function shows the assignment to an operand and its preceding logic. All networks in which
the operand is written are output. The function returns hierarchical comments.
Declaration
Parameters
PLCName
Name of the PLC whose user program contains the block. The name is identical to the station
name displayed in the project tree in the TIA Portal.
ContainingBlock
Name of the block to be displayed or name of the instance of an FB.
OperandName
Name of the block to be searched for in the code block belonging to "ContainingBlock".
• For local operands, the hash sign # must be specified here.
Return value
ID with which the request is uniquely identified. The ID is generated and returned with the call
of the function.
See also
RequestByCallEx (Page 2503)
StartDynamicDataSubscriptionEx (Page 2509)
CancelRequest (Page 2504)
3.12.2.6 RequestByCall
Description
The function displays the preceding logic of a network input of a standard block. All networks
which contain the input pin are returned.
Note
This function is a legacy function with which you can call simple comments.
Declaration
Parameters
PLCName
Name of the PLC whose user program contains the block. The name is identical to the station
name displayed in the project tree in the TIA Portal.
ContainingBlock
Name of the block to be displayed or name of the instance of an FB.
CalledBlock
Name of the FB or FC which is called in the network of "ContainingBlock". Alternatively, you
can also configure a DB or a multi-instance.
The following can be used as names:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not the call structure. The first part of the name ("Line1") does not have to be enclosed
in quotation marks, because it is clear from the context that this is a global icon. Quotation
marks are required for the individual name components when special characters such as
spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
PinName
Name of an input pin of "CalledBlock". The parameter is used to ensure that the network
interconnected to the input pin is contained in the XML data.
PartialPinNameMatch
TRUE if input pins which begin with the name specified under "PinName" are also to be taken
into consideration.
Return value
ID with which the request is uniquely identified. The ID is generated and returned with the call
of the function.
See also
RequestByAssignment (Page 2499)
StartDynamicDataSubscription (Page 2508)
CancelRequest (Page 2504)
3.12.2.7 RequestByCallEx
Description
The function displays the preceding logic of a network input of a standard block. All networks
which contain the input pin are returned. The function returns hierarchical comments.
Declaration
Parameters
PLCName
Name of the PLC whose user program contains the block. The name is identical to the station
name displayed in the project tree in the TIA Portal.
ContainingBlock
Name of the block to be displayed or name of the instance of an FB.
CalledBlock
Name of the FB or FC which is called in the network of "ContainingBlock". Alternatively, you
can also configure a DB or a multi-instance.
The following can be used as names:
• Name of a single instance DB. Its FB is then displayed. Example "Station1"
• Name of a multi-instance in an instance DB. Its FB is then displayed. When multi-instance
name paths are specified, these are data hierarchies such as those displayed in the DB editor,
and not the call structure. The first part of the name ("Line1") does not have to be enclosed
in quotation marks, because it is clear from the context that this is a global icon. Quotation
marks are required for the individual name components when special characters such as
spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
• Name of an FC or OB
PinName
Name of an input pin of "CalledBlock". The parameter is used to ensure that the network
interconnected to the input pin is contained in the XML data.
PartialPinNameMatch
TRUE if input pins which begin with the name specified under "PinName" are also to be taken
into consideration.
Return value
ID with which the request is uniquely identified. The ID is generated and returned with the call
of the function.
See also
RequestByAssignmentEx (Page 2500)
StartDynamicDataSubscriptionEx (Page 2509)
CancelRequest (Page 2504)
3.12.2.8 CancelRequest
Description
The function cancels an ongoing request.
Declaration
Parameters
RequestId
ID of the request which is canceled.
Return value
-
See also
RequestByAssignment (Page 2499)
RequestByCall (Page 2501)
3.12.2.9 Terminate
Description
The function ends the execution of a COM object implemented with "Initialize":
• All active requests and subscriptions are ended.
• The callback functions "OnModeXML", "OnDynamicDataXML" and "OnEvent" are ended.
Declaration
HRESULT Terminate();
Parameters
-
Return value
-
See also
Initialize (Page 2497)
Structure
<PlcCodeViewerExternalClientModel Version="1.0.0.0">
<CommonHeaderInfo>
</CommonHeaderInfo>
<Networks>
<Networks>
<NetworkHeaderInfo>
<NetworkHeaderInfo>
<FlgNet>
<Parts>
<Part>
<Parameters>
<Parameters>
</Part>
</Parts>
<Wires>
<Wire>
</Wire>
</Wires>
</FlgNet>
<Networks>
</Networks>
</PlcCodeViewerExternalClientModel>
"<PlcCodeViewerExternalClientModel>" section
Contained: [1]
Contains the sections "CommonHeaderInfo" and "Networks".
"<Networks>" section
Contained: [0..n]
Represents a network which is uniquely identified via the attribute "NetId". Contains the
sections "NetworkHeaderInfo" and "FlgNet".
"<NetworkHeaderInfo>" section
Contained: [1]
Contains information about the network, e.g. the name of the instruction or the network
title.
"<FlgNet>" section
Contained: [1]
Represents the description of the network. Contains the sections "Parts" and "Wires".
"<Part>" section
Contained: [0..n]
Represents an instruction or an operand.
"<Wire>" section
Contained: [0..n]
Represents networking between instructions and operands.
Relevant attributes
The following table shows the attributes of the XML data.
3.12.3.1 StartDynamicDataSubscription
Description
The function queries cyclic information for the specified network. The information is integrated
into the XML data which you queried beforehand with "RequestByAssignment" or
"RequestByCall". Because multiple static subscriptions are supported, the subscription from the
last made call is used.
If you pass the value "0" for "DynIDCount" and the value "NULL" for "DynIDs", the data of all
assigned "DynIDs" are output. To specify the dynamic data for "DynIDs", you must pass the
corresponding ID for "DynIdCount" and "DynIDs".
Declaration
Parameters
NetworkID
ID of the network whose static data was queried previously. The ID is available in the XML
data in the attribute "NetID".
DynIDCount
Number of areas for which the dynamic information is queried.
DynIDs
IDs of pins or inputs for which current flows or current values are displayed. The IDs are
available in the XML data in the attribute "DynID".
Return value
ID with which the subscription is uniquely identified. The ID is generated and returned with the
call of the function.
See also
RequestByAssignment (Page 2499)
RequestByCall (Page 2501)
3.12.3.2 StartDynamicDataSubscriptionEx
Description
The function queries cyclic information for the specified network. The information is integrated
into the XML data which you queried beforehand with "RequestByAssignment" or
"RequestByCall". This function allows you to apply a static subscription for a request via
"NetworkId" and "RequestId".
If you pass the value "0" for "DynIDCount" and the value "NULL" for "DynIDs", the data of all
assigned "DynIDs" are output. To specify the dynamic data for "DynIDs", you must pass the
corresponding ID for "DynIdCount" and "DynIDs".
Declaration
Parameters
NetworkID
ID of the network whose static data was queried previously. The ID is available in the XML
data in the attribute "NetID".
DynIDCount
Number of areas for which the dynamic information is queried.
DynIDs
IDs of pins or inputs for which current flows or current values are displayed. The IDs are
available in the XML data in the attribute "DynID".
Return value
ID with which the subscription is uniquely identified. The ID is generated and returned with the
call of the function.
See also
RequestByAssignmentEx (Page 2500)
RequestByCallEx (Page 2503)
3.12.3.3 StopDynamicDataSubscription
Description
The function ends a current subscription.
Declaration
Parameters
SubscriptionId
ID of the subscription which is ended.
Return value
-
3.12.3.4 StopDynamicDataSubscriptionEx
Description
The function ends a subscription which you define using "RequestId" and "SubscriptionId".
Declaration
Parameters
RequestId
ID of the request which initializes the ending of the subscription.
SubscriptionId
ID of the subscription which is ended.
Return value
-
3.13 Troubleshooting
3.13.1 CMN_ERROR
Description
The extended error structure CMN_Error contains the error code and an error text for the error
that occurred. Each application can use the error structure to evaluate or to output error
messages.
Declaration
Typedef struct {
DWORD dwError1;
DWORD dwError2;
DWORD dwError3;
DWORD dwError4;
DWORD dwError5;
Char szErrorText[512];
}
CMN_ERROR;
Members
dwError1 .. dwError5
Each of the API descriptions contains information on the values of the entries in case of an
error. Unless otherwise specified, the error codes are in dwError1.
szErrorText
Buffer for the text description of the error cause. The content is determined from the
resources and is generally language-dependent.
Comment
Some modules use the following error code assignments, as required
See also
Error messages (Page 1559)
3.13.2 CCStorageError.h