LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
kosist90

Set/Get Common Waveform Attributes API VIs

Status: New

LabVIEW functions "Set Waveform Attribute" and "Get Waveform Attribute" could write/read any attribute name/value to waveform. But, according to help files (http://zone.ni.com/reference/en-XX/help/371361N-01/lvwave/set_waveform_attribute/), there are default attributes such as device number, channel name, etc., which could be set by NI-DAQ, and Express VIs. But sometimes there is need to set them manually (for example, while reading data from FPGA and building waveform from it).
It would be handy to include to Waveform pallete simple API with polymorphic VI to set and get those default attributes. Then one should not remember what exact name it has, but just take the function, select which attribute he needs, and use it.

 

Sincerely, kosist90.

7 Comments
AristosQueue (NI)
NI Employee (retired)

This idea requires changes outside of LabVIEW -- the list of attributes that can be set by the various hardware interfaces is an open-ended list, and I'm not sure how LabVIEW could ever list them all since any piece of hardware can just freely add a new attribute to the data it generates. It seems like there would need to be an API per hardware to do this.

 

The closest I could find (someone else actually found it for me) was this not-in-the-palettes VI:

        vi.lib\express\express shared\transition.llb\SetAllExpressAttribs.vi

This VI appears to set all the attributes that are applied to waveforms from the various Express VIs. I don't know if that helps you.

 

Since this is not anything LabVIEW can address, I believe this idea should be closed. You may wish to ask specific hardware drivers to add the functionality you are seeking. (I realize that this may feel like I'm asking you to jump through useless bureaucratic hoops... normally, I'd just pass this along to the relevant HW team, but I don't know which hardware you are using, so I think it makes sense for you to file a separate request to the specific hardware API that you're wanting extended.)

crossrulz
Knight of NI

Here is a related idea over on the DAQ Idea Exchange: Additional TDMS Metadata


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
kosist90
Active Participant

AristosQueue (NI)
NI Employee (retired)

@kosist90: Speaking strictly for myself, not as NI policy... I believe there's a difference between documentation and an API. People who read documentation will pick up on the subtlety of "common" or "frequently used." An API conveys more of a sense of completeness. Mentioning some common attributes used by a close partner is helpful documentation. Enshrining those attributes in an API that LabVIEW does not own just handcuffs the other product or requires the other product to be aware that its API has leaked out beyond functions that it owns whenever it changes its own API. Neither of those options is good for code maintenance. Honestly, having the documentation poses the same problem, but it is a lower threshold of threat, in my opinion.

 

We had an analogous problem years ago with the "Get Error Codes" VI (circa LV 6.0) that was supposed to be the common errors that LV could possibly return. Lots of people treated it as a complete set of errors.

 

Whenever we build a pluggable system for third-parties (and, yes, independent groups inside NI are third-parties for the purposes of this conversation), we face the problem of documenting all the things that can plug in. Waveform attributes are a pluggable system. I've never really found a satisfactory way to handle this, but I have seen options that are "bad" and options that are "worse". Among the "worse" -- in my experience -- is having APIs that try to list programmatically the plugged in pieces of another system.

Korsar
Member

As Diadem is a NI-Product and very often used to evaluate Data logged with a Labview Program it would be more than helpfull to have a list within Labview help to set these attributes i a corect syntax and simplify the work with Diadem.

It is not easy to extract these attributes from DIADEM.

AristosQueue (NI)
NI Employee (retired)

Notice that, despite my personal skepticism, this idea remains open. I've passed it along to others within NI to consider.

Korsar
Member

Just as an Idea, start with the TDMS Properties.

There you find already what is needed for the waveform attributes.

unit_string/ wf_xname/ wf_xunit_string/ NI_ChannelName   ......