|
Topic: DMD0210
Using the Data View |
|
|
The Data
View is used to monitor the status of, and optionally change the values
of selected memory locations in the Do-more
controller. Multiple data views can be open at the same time, each viewing
the same or different memory locations, in the same or a different format
(Native, Binary, Octal, BCD/ Hex, etc.).
Docking / Floating - the Data View dialog is a dockable
and floatable
window. Note:
double-clicking the title bar of the Data View will toggle between the
Docked and Floating states.
To create
a new Data View select the Debug->
Data View-> New menu option, or press the Ctrl+Shft+F3 keys.
To open an
existing Data View select the Debug->
Data View-> Open menu option. The File Open dialog will appear,
allowing the user to navigate to the saved data view file.
To save the
current Data View, select the Debug-> Data View-> Save menu
option. If the Data View has previously been saved, then the current contents
of the Data View will be written to the previously specified file. If
the Data View has not been previously saved the SaveAs dialog will appear,
allowing the user to specify a file name.
To Export
All of the contents of a Data View in CSV format:
right-click with the mouse
on the Data View and select Export->
All from the pop-up menu. The Save As dialog will appear, allowing
the programmer to specify a file name.
To Export
only Some of the contents of a Data View in CSV format:
click and drag with the mouse
(or use the shift + arrow keys) to select
the entries in the Data View to export
right-click with the mouse
on the Data View and select Export->
Selection from the pop-up menu. The Save As dialog will appear,
allowing the programmer to specify a file name.
To Open a
new Trend View with All of the contents of a Data View:
right-click with the mouse
on the Data View and select Trend All from the pop-up menu to send all
of the elements in the Data View to the new Trend View
To Open a
new Trend View with only Some of the contents of a Data View:
left-click and drag with the
mouse (or use the shift + arrow keys) to select the entries in the Data
View to send to the Trend
View.
right-click with the mouse
on the Data View and select Trend Element / Selection from the pop-up
menu to send only the previously selected elements in the Data View to
the Trend View.
|
|
The Data View Dialog

The following is a quick discussion of the
toolbar buttons found at the top of the Data View dialog, from left to
right:
Edit
Mode - click this button (right-click -> Toggle Edit Mode) to
enable the write operation for elements that are read/write.
Display
Format - this selection drop-down will contain a list of display
formats that are appropriate for the selected element. The default display
format for non-structure elements is "Native",
which means the element's value will be displayed in the proper format
for it's native data type. This will normally be the correct selection
for numeric values, and should only be changed to specifically display
the value in a particular format. For example, displaying unsigned values
as Hexadecimal or Binary is sometimes appropriate when the bits of that
value represent flags or status bits.
The optional display formats available for bit and numeric fields are:
Binary, Octal , BCD/Hex, Timer, Seconds Time, Date Field, Time Field,
1970 Epoch, IP Address.
Structures are a special case because they have multiple fields with
differing data types. Displaying structures in the Data View will take
multiple rows, so there are four different displays formats specifically
for structure that take this into account: They
are: "short multi-line", "long multi-line", "short
single line", and "long single line". These display formats
have varying amounts of data and are oriented for tall/thin displays or
short/wide displays. The default display format for structures is "short
multi-line".
Strings too are a special case in that there are some purpose-built
display formats that aid in debugging string manipulation operations.
Refer to the following example where the String element SS0 contains "Step
7: Open Drain Valve". This table lists the 7 display formats and
shows how the contents of SS0 will be displayed in each.
|
ASCII: displayed
as ASCII characters
Step 7: Open Drain Valve
|
|
Quoted: displayed
as ASCII characters enclosed in double quotes
"Step 7: Open Drain Valve"
|
|
Hexadecimal:
displayed as Hexadecimal numbers
53 74 65 70 20
37 3A 20 4F 70 65 6E 20
44 72 61 69 6E 20 56 61
6C 76 65
|
|
4 Hex/ASCII:
displayed as 4 Hexadecimal numbers and corresponding 4 ASCII characters
per line
53 74 65 70 Step
20 37 3A 20 7:
4F 70 65 6E Open
20 44 72 61 Dra
69 6E 20 56 in
V
61 6C 76 65 alve
|
|
8 Hex/ASCII:
displayed as 8 Hexadecimal numbers and corresponding 8 ASCII characters
per line
53 74 65 70 20
37 3A 20 Step 7:
4F 70 65 6E 20
44 72 61 Open Dra
69 6E 20 56 61
6C 76 65 in Valve
|
|
16 Hex/ASCII:
displayed as 16 Hexadecimal numbers and corresponding 16 ASCII characters
per line
53 74 65 70 20
37 3A 20 4F 70 65 6E 20
44 72 61 Step 7: Open Dra
69 6E 20 56 61
6C 76 65 in
Valve
|
|
32 Hex/ASCII:
displayed as 32 Hexadecimal numbers and corresponding 32 ASCII characters
per line
53 74 65 70 20
37 3A 20 4F 70 65 6E 20
44 72 61 69 6E 20 56 61
6C 76 65 Step
7: Open Drain Valve
|
The three buttons to the right of the format
field are used to manage the contents of the Edits columns as follows:
Clear
Edits - click this button to remove all of the values from the
Edits column.
Write
Current Edit - click this button to write the value in the Edits
column for the currently selected element only.
Write
All Edits - click this button to write all of the values in the
Edits column to the controller. The process of writing multiple edits
will take multiple controller scans because each write operation will
be done on a separate scan, which means that the values will NOT end up
in the controller at the same time.
The remaining portion of the Data View is
a grid that has three columns, as follows:
Element
- contains the controller elements to monitor
Status
- displays the current value of the element, using the selected display
format
Edits
- is only visible if Edit Mode is enabled - is where the user enters new
values for the controller element
|
|
Customizing the Data
View Display
The look and functionality of the Data Views can be customized by the
selections on the Data View tab of the View-> Options menu.
The 'Apply Options to' selections at the top specify
which Data Views the changes to the options will be applied to.
Current
View - the changes apply only to the currently selected Data View.
All Open
Views - the changes apply to all of the currently open Data Views.
New Views
- the changes do not apply to the currently selected Data Views, only
to Data Views that are opened from this point forward
The General Settings group controls
the look of the grid.
Status On -
when selected, status updates will occur
Show Toolbar
- when selected, the toolbar will be displayed at the top of the dialog
Show Status Line
- when selected, the status bar at the bottom of the dialog will be displayed
Show Column Headers
- when selected, the "Elements", "Status", and "Edits"
column headers will be displayed
Show Grid Lines
- when selected, the horizontal and vertical grid lines will be displayed
Show Row Headers
- when selected, the row numbers will be displayed
Show Column Headers
in CSV - when selected, the "Elements", "Status",
and "Edits" column headers will be exported along with the Data
View contents when a Data View-> Export operation is performed.
The Documentation group enables/disables the element documentation display
in the element column.
Elements -
display the element name
Nicknames -
for elements that have nicknames only the nickname is displayed, if the
element does not have a nickname the element name is displayed.
Extra Info -
displays the element's Extra Info (if present)
Descriptions
- displays the element's Description (if present)
The Title (current view only)
allows the user to specify a 16 character name for the currently selected
view. By default, Data Views are named "Data" plus a sequentially
assigned number.
The Mode group specifies whether
the Data View can write new values for controller elements
The Safety selection specifies
whether a write operation will display a confirmation before the operation
is performed.
The Bit Display Settings group
allows the user to select what is displayed in the Status column for bit
elements.
Click on the "On"
button to display a dialog that contains additional icons that can be
displayed for the ON status of a bit element.
Click on the "Off"
button to display a dialog that contains additional icons that can be
displayed for the OFF status of a bit element.
Click the OK button to save
the changes to the Options.
Click the Cancel button to discard
any changes made to the Options.
|
|
Entering
Controller Elements in a Data View
Entering
controller elements in a Data View is quite easy, simply place
the cursor in a cell in the Element column and type in the name of the
controller element (or it's nickname if it has one) then press the enter
key. Controller elements can also be entered by selecting them from the
Element Browser (F9), or using the down-arrow (auto-complete).
Editing an
item in a Data View is done by placing the cursor on the item to
be edited and press <F2>, or double-clicking on the item to be edited.
Deleting
an item from a Data View is done by placing the cursor on the item
to be deleted and pressing the delete key. To delete a range of items,
select the range and press the delete key. To select a range of items,
place the cursor on the first item to be selected. Hold down the <shift>
key and press the up or down arrows, or click with the mouse and drag
the cursor to select the desired range of items.
Note: pressing the delete key a second
time will move the contents of the rows below the deleted element to move
up
Using the
cut / copy / paste operations to add / remove items from / to data
views is done by selecting the itmes to be cut, copied, or pasted, then
selecting the appropriate option from the edit menu. The cut option will
remove the selected items from the current view and place them into the
cut buffer. The copy option will leave the selected items in the current
view AND place them into the cut buffer. The paste option will copy the
items from the cut buffer into the current view.
Adding
successive items to a Data View
The auto-increment option is a quick way to add a range of items to
a Data View. To use this feature, Insert the first element of the range
into the Data View. Then place the cursor on the first element of the
range and press Ctrl+Enter (or right-click on the item with the mouse
and choose increment). The next controller element in that range will
be added to the Data View.
Structures in the controller are handled as
a special case of the increment option because Structures have multiple
fields. The auto-increment operation changes based on what has been selected:
If the structure
element itself is being incremented:
Ctrl+Enter
- (Increment) - adds the next structure to the Data View. For example,
if Timer structure T0 is selected, Ctrl+Enter will add the Timer structure
for T1 to the Data View.
Ctrl+Shft+Enter
- (Expand Structure) - adds all of the elements of the structure
to the Data View. For example, if Timer structure T0 is selected, Ctrl+Shift+Enter
will add all of the structure fields from Timer Structure T0 to the Data
View
If a single
field of a structure is being incremented:
Ctrl+Enter
- (Increment) - adds the same field of the next structure to the
Data View, For example. if the field T0.Acc is selected, Ctrl+Enter will
add T1.Acc to the Data View.
Ctrl+Shift+Enter
- (Next Field) - adds the next field (this could be the next field
in the same structure or the first field of the next structure) to the
Data View. For example, if the field T0.Acc is selected, Ctrl+Shift+Enter
will add T0.Done to the Data View. The next Ctrl+Shift+Enter will add
T0.Zero to the Data View.
|
|
Using
Casts to Control How Values are Displayed in a Data View
Casting is a ”C"-programming language
term that means "to change the type of" a variable. Do-more Designer uses the colon ":"
character to perform casting operations. The most common situations where
casting is used are mapping operations like bit-picks or packing bits
into Bytes, Words, or DWords.
Note:
except for 'Bit-of-Word' and 'Mapping Bit Ranges to Bytes, Words, or DWords'
operations, casting elements from one type to another is normally not
needed.
|
Desired Operation |
Casting Operator |
Notes |
Examples |
|
bit-pick operation
(bit-of-word operation) |
element : bit location number |
bit locations are 0-based numbers |
R0:0 - the low bit (1st) of R0
D7:10 - the 11th bit of D7
V1400:15 - the high bit (16th) of V1400
|
|
|
|
referencing a range of bits as a Byte, Word, or DWord |
element : type |
Byte / Word / DWord type options:
(UB - Unsigned Byte - 8 bits)
(SB - Signed Byte - 8 bits)
(UW) - Unsigned Word - 16 bits)
(SW - Signed Word - 16 bits)
(SD - Signed DWord - 32 bits) |
X0:UB = X0 - X7 (unsigned byte) |
|
X0:UW = X0 - X15 (unsigned Word) |
|
X0:SD = X0 - X31 (signed DWord) |
|
|
|
referencing a specific Byte of a Word or DWord |
element : B + byte number |
byte numbers are 0 based,0 - 3 |
V7:B0 references first byte of V7
D4:B3 references 4th byte of D4
|
|
|
|
referencing a specific Word of a DWord |
element : W + word number |
word numbers are 0 based,0 - 1 |
D4:W0 references 1st word of D4
|
|
|
|
interpret element in different numeric format |
element : new type |
type options:
(B - Byte)
(W - Word)
(D - DWord)
(S - Signed)
(U - Unsigned)
(R - Real) |
V0:R = V0 & V1 interpreted as a Real (floating point)
V7:S interprets V7 (16-bit unsigned) as a signed 16 bit value |
For more information on using Cast operations in Do-more Designer refer
to the help topic on Casting.
|
|
Changing the Update Interval
There are times when the ability to change the default update rate of
the various Views in the Do-more
Designer software is needed. By default, Do-more
Designer will generate communication requests at a rather high rate in
an effort to present the most current status values for the on-screen
elements. But on computers that are CPU-speed-challenged or memory-challenged,
maintaining this update rate at the expense of allowing CPU time for other
processing can be a problem. To address this need, Do-more
Designer uses two entries in the [SETUP] group of DmDesigner.Ini, named
ProgViewInterval & DataViewInterval,
to govern the rate at which the Views will update the values of the elements
they contain.
ProgrViewInterval applies to Ladder Views, Debug Views, the Module Browser,
Data Views, Device Views, PID Overview, etc.. Its value is the frequency
(in milliseconds) that status communication requests occur for those views.
The default for these views is 25ms. If the entry does not exist, or is
commented out (like in the example below), the frequency will be the 25ms
default. This value can have it be as small (for a fast update), or as
large (for a slow update) as desired. Note: 0 means ”as fast as possible” not
”instantaneous”.
The Data View has a separate entry, called DataViewInterval, in the
same group, Its value is the frequency (in milliseconds)
that status communication requests occur only for Data Views. The default
value is 75ms.
If both ProgViewInterval & DataViewInterval exist in DmDesigner.Ini,
ProgViewInterval will supersede DataViewInterval ONLY if it is SLOWER
(i.e. a higher number). If only the ProgViewInternal exists, any Data
View will use the slower of that value or the value or 75 (the default
for Data Views).
The default condition for both of these entries is that they are both
commented out (as shown below), meaning that all of the views in Do-more Designer will operate at an update
frequency of 25ms, and on most modern computers with sufficient RAM the
default intervals should not cause any issues.
[SETUP]
;ProgViewInterval=25
;DataViewInterval=75
To engage one of these settings, remove the semicolon from the entry
and change the update interval to the millisecond value desired. Note: because
Do-more Designer only reads the entries from DmDesigner.Ini
when the software is first started, Do-more Designer will need to be closed, then re-opened
to put the changes into effect. |
|
See Also:
Using
the Trend View to Monitor the Do-more Controller
Using the Data View to Monitor
Do-more Controller Memory
Forcing
I/O and Memory Items
Using
the Change Value Dialog
|
|