VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass DAQmx I/O channel name to Veristand 2011 Custom Device?

Solved!
Go to solution

I am building a custom device that is going to run some DAQmx task on the RT target.

I am using VS2011 and also the Easy Custom Device Tool, which at this point I am not sure whether it can run under VS2011...

 

I created the libraries fine, and added the custom device (a PWM input called InputPWM) to the System Explorer.  Running it returns the following error when I deploy: 

-----------

LabVIEW: VI Reference type does not match VI connector pane.
=========================
NI VeriStand: Open VI Reference in Custom Devices Storage.lvlib:Open Device Reference (HW Interface).vi->Custom Devices Storage.lvlib:Initialize Device (HW Interface).vi->NI VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi->NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi->NI VeriStand Engine.lvlib:VeriStand Engine.vi->NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi<APPEND>
c:\ni-rt\VeriStand\Custom Devices\InputPWM\InputPWM Engine.llb\InputPWM RT Driver VI.vi

----------------------

 

On the console, it says the error is 1026 , LabVIEW: VI Refernece is invalid.

 

I suspect that a potential issue is that I used a DAQmx I/Os in the Configuration.ctl  and that the InputPWM RT Driver VI.vi in the framework cannot deal with this type. So my  questions: 

 

- What is the simplest way to pass I/Os names to the custom device? For a quick test, I could go with hardcoding, but a more generic solution would also help. Does it have to be based on MAX addressing for the I/Os? Do I have to create the ctr under the DAQ devices in VS? 

 

- as an aside, is there a way to step through these framework VIs to see where the issues is, just like one would do with LV - RT ??

 

Thx.

L.

0 Kudos
Message 1 of 6
(5,984 Views)

This error is being thrown because NI VeriStand.rtexe is attempting to run the driver VI and it is expecting a different connector pane pattern than what is actually present.

 

Looking at the call chain, it appears NI VeriStand thinks your custom device is an inline hardware custom device, however... the easy custom device tool is only an asynchronous custom device. So therefore the connector pane doesn't match and there is an error.

 

If you wish to use the easy custom device tool, you must use the template as-is... meaning it is limted to be an asynchronous custom device. If you want to make an inline custom device, you can... just not with the easy custom device tool.

Stephen B
0 Kudos
Message 2 of 6
(5,979 Views)

Oh brother! I indeed set this thing to "in-line hardware"... Smiley Mad.... That things took me 30 min in LabVIEW RT to run, and this is now in the order of hours and hours to get it in VS... it is a simple PWM input...  Very frustrating.

 

Back to one of the questions though, what is the best way to define a DAQmx IOs though?

Thx

L.

0 Kudos
Message 3 of 6
(5,974 Views)
Solution
Accepted by topic author LDBM

if you're using the easy custom device tool, just put anything you need inside the configuration data cluster and that same data will be in the main page of the custom device (for the user to set) and be available at run time in the custom device RT code.

 

You could have them type in the name of the DAQ card and have an array of names for channels to use. Then at run time you create the task. or something like that. Up to you.

Stephen B
0 Kudos
Message 4 of 6
(5,968 Views)

Ok...it looks like the counter path is correctly taken by the custom device... However  I observe the following behavior:

 

LV-RT 2011: PWM runs fine

VS 2011:  I can see that the custom device with PWM iterates: I placed an increment indicator, and it is updating, looking at it on the Channel Viewer Tool. However the DAQAvailable Samples DAQmx property, which should be return non-zero value is stuck at 0... 

 

Is there a way to debug the RT driver.VI on the RT machine??

 

L.

0 Kudos
Message 5 of 6
(5,961 Views)

More comments about this:  "Is there a way to debug the RT driver.VI on the RT machine??"  were redirected to this thread.

L.

0 Kudos
Message 6 of 6
(5,930 Views)