VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a PXI-6624 with VeriStand

Part of my test system includes two PXI-6624 Timing/Counter cards.  In the previous test set up (without VeriStand) we are using these cards to generate 2-channel quadrature outputs.  Does anyone know what the best way would be to set these up to do the same thing in VeriStand?  Would I need to create a custom device?

 

I see that you can add a DAQ device in the system definition file of VeriStand and can set it to CTR.  Although that only seems to let me use counting features of the card rather than any pulse generation features.  As I've mentioned in other posts I'm already reading up on creating custom devices, but I'd like to know if this is the proper direction for this or if VeritStand already has something built in for it.  Thanks in advance.

0 Kudos
Message 1 of 10
(7,979 Views)

Hi,

 

As you've found, pulse generation is not natively available with DAQ device CTRs in VeriStand. 

 

If you have an FPGA card available, it's pretty easy to generate pulse trains on that. On the example FPGA config files that ship with VeriStand, the PWM outputs are already set up.

 

Otherwise, a custom device or a LabVIEW model might be good options.

0 Kudos
Message 2 of 10
(7,954 Views)

I do have FPGA cards in this project, but they are populated with other I/O functions and these two 6624 cards are what is being requested to use for quadrature generation.

 

I am exploring the Easy Custom Device Tool that I found here and seeing if I can use that.  It sure simplifies making a basic custom device.

 

You mentioned a LabVIEW model... what do you mean by that and how exactly does it work?  I'm not stuck to using a custom device, but I do need to be able to vary things like duty cycle, frequency, and direction... and if possible phase (requested by end-user, but not required).

 

Thanks for the help.

0 Kudos
Message 3 of 10
(7,951 Views)

Hi Joe,

 

I'm not really sure whether a custom device or a labview model would be the easier/better answer. It depends somewhat on your system topology and loop speeds etc.

 

Here is some data about how you would create and use a LabVIEW model with VeriStand:

https://www.ni.com/en/support/documentation/supplemental/11/using-simulation-models-with-ni-veristan...

 

I also found this forum describing how this person intended to do a very similar thing to what you propose:

https://forums.ni.com/t5/LabWindows-CVI/How-to-make-a-Veristand-model-with-LabWindows-CVI/td-p/14583...

That might give you some insights into the possibillities.

0 Kudos
Message 4 of 10
(7,930 Views)

Here is a great article for customizing veristand options. https://www.ni.com/docs/en-US/bundle/veristand/page/integrate-execute-models.html

Stephen B
0 Kudos
Message 5 of 10
(7,927 Views)

Thank you for the information.  I'll start going through it.  I have another question related to the timing of the outputs that maybe one of you can help with.  I need to have a 90 degrees phase difference between the two waveforms - ideally it'd be adjustable but I'll worry about that later.  How can I enforcethe timing of the waveforms?  I've never used one of these timeing I/O cards before.  I'm thinking that I can maybe do something with a software trigger?  My first attempt - though I figured it wouldn't work - was to try to time them by controlling when the DAQmx Start Task VI would run, but as expected it gives me inconsistant results.

 

I'll keep looking around for a solution, but if either of you know a way to do that I'd be much obliged.  Thanks again!

0 Kudos
Message 6 of 10
(7,916 Views)

Here's what I have been doing so far... I will probably end up making another topic since it's getting away from my original post a bit, but here it is anyway.  Now I have been just working on the functionality of outputs rather than worrying about the custom device at the moment.

 

I have no problem generating two pulses and triggering both of them with one external trigger.  What I'd like to do is make that a software internal trigger (not sure how to do that) and I need help with the timing.  I have been trying to use the Start.Delay property in the Trigger Property Node, but I get an unnamed task error everytime and I'm not sure why.  If I remove that portion of the code it works fine and both waveforms are triggered at the same time and line up in phase.  I need to have a delay to create a phase shift for the quadrature output.

 

I have attached a snippet of my code to show what I have right now.  Any ideas would be helpful.  Thanks.

 

NOTE:  I've been doing testing on a 6602 because of equipment availability, but as far as I'm aware the basic functionality is the same from a programming perspective.

0 Kudos
Message 7 of 10
(7,909 Views)

I'm sure I need to make a custom device without the easy custom device tool, but I gave it a shot anyway because I thought looking through how that sets up a custom in a "simple" way would help me understand the fundamentals of creating a custom device with the template provided with Veristand.

 

I was wondering if anyone would have time to look at this and tell me why it doesn't work.  There are a few constants and things in there that probably need to be changed for a final custom device, but as-is, I don't see why it wouldn't at least generate something the first time through (even if resetting values doesn't work).

 

I appreciate it if anyone can take a look and give me some input.  Thanks.

0 Kudos
Message 8 of 10
(7,897 Views)

I really recommend making your hardware/pulse timing questions into a new forum, probably on the counter/timing forum unless they involve VeriStand directly (https://forums.ni.com/t5/Counter-Timer/bd-p/40)

 

As for evaluating your custom device, is there any more details you can provide as to what doesn't work? Can you build it? What troubleshooting have you done? 

0 Kudos
Message 9 of 10
(7,890 Views)

It builds and it deploys without any errors.  In fact I don't get any errors at all.  Just no output. 

 

And I did make a new post in another section about the counter/timer issues and I have found a solution to that.  Although my current fix for that is not in the custom device - the custom device does have a temporary fix that works just fine outside of the custom device (i.e., just running it through real-time).

0 Kudos
Message 10 of 10
(7,887 Views)