LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

modifying existing driver (newbie question?)

Solved!
Go to solution

Hi

 

we are trying to modify an existing driver, but we are fairly new to Labview. We have some generic questions, but I will give some specific info about what we are trying to do as well.

 

We downloaded a driver (for the NDI Polaris motion tracker) from the NI site and want to modify this a little bit.

 

The zip file contains an ndipolaris subdirectory with 2 .llb files and some .mnu files.

 

Our first problem is that if we just open the .llb files, there are a lot of vi's in there (including working examples), but there are no project files, nor class definitions. This seems to prevent us from creating a new class that derives from a class which is apparently defined in the driver (but for which we don't seem to have the definition). Maybe a driver can be distributed without these definitions such that you can only use it, but not modify it?

 

Our second problem is that if we use the "create new driver from existing driver" method, the NDI Polaris does not show up in the list of existing drivers. (We did copy the ndipolaris directory to the labview/instr.lib directory and restarted labview). (This is probably not a major problem as we could just modify the existing driver instead).

 

 

Note that the existing driver is working nicely. We just want to add a time-stamp in the data. The existing driver has apparently a class (called "Tool info", whcih is a cluster of a few different types of data) for all the info that the Polaris returns, so we thought to modify that class or to derive a new class from it with the time-stamp added.

 

 

Sorry if this is a trivial question. Thanks for any pointers.

 

Kris

 

0 Kudos
Message 1 of 6
(2,861 Views)

The project did not exist prior to LabVIEW 8. LVOOP is new as well. You don't need either to modify any of the VIs in the driver. If you want to rewrite the driver to use LVOOP, then that is up to you but it's certainly not necessary and none of the existing drivers from use LVOOP. These are just plain VIs. You do not need to make it any more complicated than that.

 

The existing driver has no 'classes' at all. If there is a VI with an indicator called 'Tool Info', just edit it like would any other control/indicator and save it.

Message 2 of 6
(2,852 Views)

Hi Dennis

 

thanks for that. This clarifies a lot of our confusion.

 

Another question then! There is no "Tool Info.vi". So, maybe this is just a cluster (although it's always called "Tool Info" if you follow it over the "wires". How do we add a "field" to that then? We've tried to right-click, double-click, etc. We can add a label, remove items, add duplicate items, but not add a new one. I guess we're missing something really obvious here, sorry.

 

Thanks again for your answer.

 

Kris

0 Kudos
Message 3 of 6
(2,844 Views)

You are going to have to explain what VI you have open when you see this.

 

Adding an item to a cluster is trivial and no different than adding a control or indicator any other place on the front panel. Right click on the inside and you should get the Controls palette. Select your control/indicator. If the existing items are controls, you have to add a control. If the existing items are indicators, you have to add an indicator.

 

Identifying different types of controls/indicators is basic. You should be able to tell a numeric control from a string control from an array and from a cluster. They are pretty obvious on the front panel and distinctly different on the block diagram. Please look at the beginning LabVIEW tutorials.

0 Kudos
Message 4 of 6
(2,841 Views)
Solution
Accepted by topic author Kris Thielemans

Hi Dennis

 

thanks to your suggestions, we've sorted this out. We were confused by the fact that you cannot add controls when in "block diagram" view. Here is what we did:

 

The data cluster was constructed using  the "bundle by name" function, which takes a "template" cluster as input. It was this template that we needed to modify. However, as the template was a "constant", it didn't show up on the front panel, and so we couldn't add any controls to it. So, when viewing the block diagram, we right-clicked the template-cluster, converted it to a control, then switched to the front panel, created a new (string) control on the front panel, and placed that into the control corresponding to the template-cluster. Then we switched back to the block diagram, and converted our template cluster back to a "constant".

 

Not straightforward I think, but once you know (i.e. get help from you and read a bit of the manual...),  it's ok.

 

thanks again

 

Kris

 

0 Kudos
Message 5 of 6
(2,809 Views)
You did not have to go through all of that. You could have simply dragged a new constant into the cluster. You have constants for all datatypes on the function palettes.
Message 6 of 6
(2,802 Views)