Retrieving Logged Front Panel Data Using a SubVI

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

When you enable database access, the inputs and outputs of the subVI actually act as outputs, returning their logged data to the front panel of the current VI.

Note  If you display a subVI or Express VI as expandable, you cannot enable database access for that node.

Complete the following steps to retrieve logged front panel data using a subVI.

  1. Click the Select a VI icon or text on the Functions palette.
  2. Navigate to the VI that logged the front panel data and place it on the block diagram.
  3. Right-click the VI and select Enable Database Access from the shortcut menu. A yellow box that looks like a file cabinet appears around the VI.
  4. Right-click the record # terminal and select Create»Control from the shortcut menu. LabVIEW adds a numeric control to the front panel you use to enter a record number.
  5. Right-click the invalid record # terminal and select Create»Indicator from the shortcut menu. LabVIEW creates a round LED that indicates whether the record is valid.
  6. Right-click the front panel data terminal and select Create»Indicator from the shortcut menu. LabVIEW creates a cluster that contains the front panel data.
  7. Right-click the time stamp terminal and select Create»Indicator from the shortcut menu. LabVIEW creates a cluster that contains the time stamp value.
  8. Run the VI. The front panel cluster and time stamp cluster return the data to the front panel of the current VI, according to the record number wired at the input. It also returns a Boolean value that indicates whether the indicated record number is invalid.

You can access records relative to the last logged record using negative record numbers. –1 represents the last record, –2 represents the second to the last, and so on, through –n, which represents the first record. If you wire a number outside the range –n to n – 1 to the record # terminal, the invalid record # output is TRUE, and the subVI retrieves no data.

Complete the following steps to retrieve values for specific inputs and outputs.

  1. Click the Select a VI icon or text on the Functions palette.
  2. Navigate to the VI that logged the front panel data and place it on the block diagram.
  3. Right-click the VI and select Enable Database Access from the shortcut menu. A yellow box that looks like a file cabinet appears around the VI.
  4. Right-click the record# terminal and select Create»Control from the shortcut menu. LabVIEW adds a numeric control to the front panel you use to enter a record number.
  5. Instead of creating indicators to retrieve front panel data and time stamp data, wire directly to a terminal on the subVI and create indicators.
  6. Run the VI. The VI returns data to the VI front panel according to the terminals you wired.

To disable database access, right-click a subVI and select Disable Database Access from the shortcut menu.

WAS THIS ARTICLE HELPFUL?

Not Helpful