Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

simple pulse generation toggle

Below is an excerpt from the 6602 manual.  The figure may not show so I've attached a word document showing it.  I want to do exactly what this says but am not sure how to make it happen.  I need to generate a quadrature signal and I think this would work wonderfully.  I want to setup one counter as my source and have two others toggle appropriately (keeping 90 degree phase shift). 

 

How do I get into "Toggle" mode???

 

Thanks!

 

In toggled mode, the counter output changes state on the SOURCE edge

that follows the assertion of the TC pulse. Figure 3-6 illustrates the two

output modes for a pulse generation with a delay of two and a pulse width

of four.

Figure 3-6. Output Modes

0 Kudos
Message 1 of 7
(5,019 Views)
Howdy SirMutt,

You can configure the output mode to be Toggle (as opposed to Pulse) in DAQmx by using a DAQmx Export Signal Property Node found under Functions»Measurement I/O»DAQmx»Task Config/Ctrl»DAQmx Signals»Signal Node. The property you want is Events»Counter Output Event»Output Behavior. After adding this Signal Node to your block diagram and selecting the Output Behavior property, right-click on the CtrOutEvent.OutputBehavior property and select Create»Constant. This creates an enum with two possible values--Pulse and Toggle.

I hope this helps!
Warm regards,

pBerg
0 Kudos
Message 2 of 7
(5,008 Views)

I found that easy enough.  Thanks.  But the manual says to set a delay and a pulse width.  Where do these settings take place.  All the generation VIs have an initial delay as well as fequency and duty cycle, or high and low ticks.  It looks from the manual that a simple delay and pulse width setting will get me where I want to be.

Thanks.

0 Kudos
Message 3 of 7
(5,001 Views)
Howdy,

You can use any of three DAQmx Create Channel VI's (CO Pulse Freq, Time or Ticks) to accomplish this generation. For this particular application, CO Pulse Ticks would probably be easiest since it allows us to input an initial delay, number of high ticks, and number of low ticks. For example, looking at Figure 3-6, to generate the bottom waveform, we would have something like the following config:
the top waveform (SOURCE) would be connected to the source of ticks input on the DAQmx Create Channel (CO Pulse Ticks).vi
initial delay: 3
high ticks: 4
low ticks: 2

The DAQmx help for DAQmx Create Virtual Channel goes into more detail about these three Create Channel VI's if needed.

(Just in case anyone references this thread in the future, this discussion is referring to Figure 3-6 of the January 1999 version of the 6601/6602 User Manual available here.)
Warm regards,

pBerg
0 Kudos
Message 4 of 7
(4,991 Views)
I've been able to set this up in Tick mode... Thanks.  But, there was no need for the toggle mode.  I'm still not clear on how to setup Toggle Mode for future reference.  There is nothing in the 6602 manual and I can't find anything in the LabView books I have.  Where would one find information on how to set this up.  It goes a little beyond just the toggle mode.  Where is documenation on features like this?  Would it be in a manual or book somewhere?
0 Kudos
Message 5 of 7
(4,982 Views)
"Toggle" mode is the default for any pulse generation task so you won't need to set it explicitly in this app.  I'm sure there must be info in one of the help files, probably the DAQmx Help.  Not 100% sure though, as I haven't consulted the counter help in a while.
 
If you dig down into various DAQmx property nodes, you'll eventually find the place where the setting can be written or read.  Most likely its a DAQmx Channel property node.  However, the name of the property might not be as obvious as "output mode."  It may be a property that refers to something like "behavior on TC (terminal count)".
 
I would pull down a pile of the properties, then right-click the ones that sound plausible and select "create constant."  Sooner or later you'll find the one that gives you the options of "toggle" or "pulse."
 
Sorry I can't be more direct -- don't have ready access to LV from here.
 
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 7
(4,979 Views)
Glad to hear you got your application working!

The NI-DAQmx Help reference explains each of the three exported signal behaviors (pulse, toggle, and level). With the NI-DAQmx Help file opened, click the Search tab and type toggle. You specify which behavior you want your counter output to have by using the Output Behavior property node we discussed.
Warm regards,

pBerg
0 Kudos
Message 7 of 7
(4,964 Views)