Coder Social home page Coder Social logo

labview-dcaf / uimodules Goto Github PK

View Code? Open in Web Editor NEW
3.0 13.0 2.0 12.15 MB

Modules for interacting with user interface elements

Home Page: https://decibel.ni.com/content/projects/reference-designs-for-distributed-control-systems

License: Apache License 2.0

LabVIEW 100.00%

uimodules's Introduction

Overview

Writes latest value to, and reads latest value from, a linked LabVIEW front panel running on the same target as the engine in which the module resides.

Using the UI Reference Module

Before Configuration

  • Build out the front panel that you wish to link to DCAF. For a monitoring only UI, no block diagram code is needed, just the front panel items with appropriate labels and data types. To show the user interface at run-time, make sure that the Show Front Panel When Called option is enabled. This can be enabled in the SubVIs properties by navigating to File>>VI Properties>>Window Appearance>>Customize and enabling the Show Front Panel When Called option.
  • The UI VI should be included in the build of the application, either statically by dropping it on the block diagram, or via the build specification settings.

Channel Configuration

UI Configuration

Choose a UI to Load by selecting the folder button and navigating to the user interface VI you wish to link to DCAF.

To automatically generate a channel for each Front Panel item, select Configure from UI. A dialog will ask whether you want to "Automatically map tags to channels?". Selecting No will create a channel for each Front Panel item which does not already exist and set each channel to the appropriate Terminal Name, Direction, and Data Type. Selecting Yes will also map each channel to a tag with the same value as the Terminal Name. If that tag does not exist within the engine already, a new one will be created.

Channels can be individually added or removed from the configuration by selecting the + and - buttons respectively. If you wish to modify an existing table item, press the gear button to configure the selected item.

Import/Export Configuration

Configuration_Import_Export

Export: Export current module configuration to a CSV file. You will be prompted by a file dialog to select the name and location of this exported file.

Import: Select CSV file to import. This will completely replace the current channel configuration which means the current configuration will be lost.

Limitations

  • Requires each mapped control/indicator to have a unique label. Note that you can give each control/indicator a unique label and have different displayed captions.
  • Does not support cluster data types
  • Does not support subpanels directly (a UI Reference Module for each running subpanel VI would need to be instantiated)
  • Requires Embedded UI to be enabled for use on LinuxRT targets. Lack of an enabled embedded UI will result in runtime errors.
  • Latest value only - no event-based interface. All values are read and written every time the engine iterates, regardless of whether they have changed or not.

Software Requirements

LabVIEW 2014 or later

uimodules's People

Contributors

becega avatar thesloopjohnb avatar dcaf-builder avatar pollockm avatar setbdautobuilder avatar

Stargazers

Johnathan Radünz Nunes avatar Lee Harding avatar  avatar

Watchers

James Cloos avatar Matt Slaughter avatar  avatar  avatar Richard Tollerton avatar  avatar  avatar George H Burrows IV avatar  avatar Ryan Poulos avatar Johnathan Radünz Nunes avatar Luis Camacho avatar  avatar

uimodules's Issues

UI Module should include Pane items as well as Panel items

UI Module doesn’t detect items higher levels than the panel. Example is tab controls or sub panels.

Looks like it would be capable just by adding a property node or two.

this snippet is in a few existing VI’s, this is oversimplified in some cases… but indicates what I am looking for
1

This is how I think it should be to include elements inside of “panes” which I believe is how Labview refers to tab controls as.
2

It could probably be modified to include both Panel-->controls and Panel-->Panes-->Controls just by concatenating the result arrays.

2D Arrays on Terminal list bock UI Updates

Hi
I had a UI with a 2D array of strings on it. It was listed in DCAF UI Terminal Label list but not mapped. This blocked the UI being updated. See attached zip file with screenshots and example.

Problem is unsupported 2D+ arrays being listed on the UI Configuration Terminal List.
Generate Channels from UI needs to add get array information for number of dimensions and limit to one. This is a quick easy fix to stop 2D arrays getting into the system avoiding giving the user grief, but there must be a blocking issue with the update UI.

This took quite a while to find this bug on a large WIP UI with many unmapped channels (as modules for them were still being developed. (I had assumed unmapped channels were harmless).

I would also recommend adding a button to remove unmapped channels to UI.

P.S. I note the type VIs are depreciated in LV2018. Can the new ones be used? (I am not sure if they are included with LV2015).

Zip file: Has 3 images of bug, DCAF config screen and fix. Also dcaf example pcfg and host.
UI Bug.zip

Invalid control name generates cryptic error at runtime

If a control name doesn't exist, the engine throws the following error:

"Error 1055 occurred at Property Node in ... Possible reason(s): LabVIEW object reference is invalid."

This should be changed to a more meaningful error or handled better.

Update the license in VIP to Apache

We need to update the license text to the apache license. We also need to rename the file to LICENSE and add a NOTICE file. The Readme.md also needs to be updated to reference Apache. Finally the vipb file needs to be updated to include the Apache header to every source file.

Mapping Usability

This table is almost exactly the same as the fixed-channel module, but the mapping works much differently. I really like having the right-click option to connect tags. I don't know how much work it would be, but it would be cool if this was essentially just a fixed-channel module, but without the fixed-channel part.

Add Column Headers to Exported CSV

Adding headers to the exported CSV file would increase the readability of the generated file. This would also require changes to the import from CSV function to handle any added headers.

As we add the import/export feature to more modules, it would probably be best to not only add the appropriate column headers but also add the module's alias and the actual class of the module to make it more clear what you are editing.

Useless Error if you don't have your UI VI on the Block Diagram of your engine

If you don't have the UI VI on your block diagram, you get an error code out of your output.vi in the runtime with error 1000 coming out of the 'Set Control Values by Index' node. Not very helpful.

It took me way too long to figure out what the problem was.

This is something we could probably verify in the 'resolve control references.vi' of the runtime.

Array of Double match method fails

image

in Labview 2015, the coerce to range doesn't seem to work for array double data types. probably others, but did not test. Data types that do have an explicit case work.

Was able to resolve issue by explicitly putting a case for data type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.