Romilly's HART® and Fieldbus Web Site
Copyright © Romilly Bowden 1999.
Here is a small sample of DDL, including the description of a Variable, a Menu to get to that Variable, and a Command to write a new value to it.
The phrases in square brackets [xxx] are references to a Standard Dictionary of common phrases, provided as part of the DD scheme, with ready-made translations into several languages.
The punctuation (curly brackets and semicolons) is taken from the "C" programming language. It's quite easy once you've learned it!
Anything between /* and */ is a comment.
VARIABLE low_flow_cutoff
{
LABEL "Low flow cutoff";
HELP "Low Flow Cutoff: the value below which the process variable
will indicate zero, to prevent noise or a small zero error
being interpreted as a real flow rate.";
TYPE FLOAT
{
DISPLAY_FORMAT "6.4f"; /* ##.#### */
}
CONSTANT_UNIT "%";
HANDLING READ & WRITE;
}
MENU configure_input
{
LABEL "Configure input";
ITEMS
{
flow_units, /* variable */
rerange, /* edit-display */
low_flow_cutoff, /* variable */
flow_tube_config, /* menu */
}
}
COMMAND write_low_flow_cutoff
{
NUMBER 133;
OPERATION WRITE;
TRANSACTION
{
REQUEST
{
low_flow_cutoff
}
REPLY
{
response_code,
device_status,
low_flow_cutoff
}
}
RESPONSE_CODES
{
0, SUCCESS, [no_command_specific_errors];
3, DATA_ENTRY_ERROR, [passed_parameter_too_large];
4, DATA_ENTRY_ERROR, [passed_parameter_too_small];
5, MISC_ERROR, [too_few_data_bytes_received];
7, MODE_ERROR [in_write_protect_mode];
}
}
|