VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM generation using counter within Veristand

 

Do you know if it is possible to define a PWM signal within the Veristand system definition file?  I only see the option to measure a count signal using the CTR setup in the System Explorer.  If I attempt to add a counter, I get the option to select the address and the type.  Types are Frequency Measurement, Period Measurement, Count Up/Down, and Position Measurement.  I would like to generate a signal, not measure one.  

 

I am running Veristand 2011 on a PXI chassis with devices 6229 and 6723, both of which have counter channels.

0 Kudos
Message 1 of 13
(8,093 Views)

NI VeriStand 2012 added Pulse Generation mode for X series class DAQ devices. So.. you would need to upgrade your software and hardware 😕

 

Or if that is not an option, you could write a custom device.

Stephen B
0 Kudos
Message 2 of 13
(8,084 Views)

Correction:

 

Pulse Measurement in NIVS 2012 works only for X series PCI or PXI devices (usb not supported)

Pulse Generation in NIVS 2012 works on any DAQ device if the "hardware timed single point" property is set false. If that property is left at default, true, then it requires PCI/PXI X series (usb not supported)

Stephen B
Message 3 of 13
(7,909 Views)

@StephenB wrote:

Correction:

 

Pulse Measurement in NIVS 2012 works only for X series PCI or PXI devices (usb not supported)

Pulse Generation in NIVS 2012 works on any DAQ device if the "hardware timed single point" property is set false. If that property is left at default, true, then it requires PCI/PXI X series (usb not supported)


Does this Pulse Generation (in my case, using NI PXI-6220) allow to generate PWM (on the fly variable duty cycle). I don't think so, please correct me if I'm wrong.

0 Kudos
Message 4 of 13
(7,775 Views)

Yes it does. just be sure to set "enable hwtsp" to false.

 

also note the DAQ card won't let you change the frequency too fast so I've recommended people using models to place a discrete zero order hold and a quantizer on any outputs maped to DAQ PWM channels

Stephen B
0 Kudos
Message 5 of 13
(7,750 Views)

Hi StephenB,

 

I have the problem when changing frequency. I have got error everytime i vary the frequency. 

I am using NIVS2012 and NI PXI-6602.

 

What do you mean with "using models to place a discrete zero order hold and a quantizer on any outputs maped to DAQ PWM channels"

 

- Rajamodol

0 Kudos
Message 6 of 13
(7,713 Views)

Hey Rajamodol,

 

Have you double checked that Enable HWTSP is set to false? It's set to true by default and will need to be changed to false since you're not using an X Series Device.

 

forum.JPG

 

Also, what error are you receiving? Can you provide the error number and a screenshot? And how are you changing the frequency (via a model, workspace control, etc)?

 

Ryan_S

0 Kudos
Message 7 of 13
(7,693 Views)

Hi Ryan_S,

 

Thank you for your answer.  I have set "Enable HTSWP" to False.

CounterSetting.png

 

I still have the error. I am changing the frequency and Duty Cycle through Workspace, but in the future, it should be changed through Teststand. Here is the Error Screenshot:

 

Error -201021.png

 

 

Sometimes i have also this error:

 

 

error -200301.png

 

 

I am currently stuck on this problem. I just want to generate PWM Output with NI PXI 6602. Please help.

 

Thank you,

 

Rajamodol

 

0 Kudos
Message 8 of 13
(7,646 Views)

It looks like you have many counters. Be sure to set all of their "Enable HWTSP" properties to false. The error is coming from counter 2 on PXI1Slot3, but your screenshot shows counter 1.

Stephen B
0 Kudos
Message 9 of 13
(7,629 Views)

Hi StephenB,

 

The screenshot was only for 1 counter, but i have set Enable HWTSP to False for all counters (8 counters).

 

Any idea?

 

Rajamodol

0 Kudos
Message 10 of 13
(7,622 Views)