LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FREQUENCY DIVISION ONLY IN SIMULATION

Solved!
Go to solution

Dividing by 2 requires going to advanced counter school.  😊   But yes, it's possible.  There's a pretty obscure DAQmx property that I'm having a hard time locating.

 

For now I'll describe it and will post back when I find it.  Counters can be configured so that they either toggle or pulse their output when they reach terminal count.  By default, input tasks won't do anything at their output pin unless you explicitly configure it.  Output tasks will be set to toggle.

 

That's basically how the low ticks / high ticks thing works.  Low ticks get loaded up into the count register, incoming edges make it count down, when it reaches 0, the output pin toggles state and the high ticks value gets loaded into the register.   Then it counts down and when it reaches 0, the output pin toggles state again.   And so on.

 

You *can* override the default behavior for an output task by telling the counter to *pulse* when it reaches terminal count.  Then when it counts down to 0, it'll issue a fixed-duration brief pulse with a pulse width that's something like 1 cycle worth of the device's default internal timebase.  I don't think the pulse width can be controlled.

 

So now I've just gotta figure out where to find that property again...

 

 

-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 31 of 32
(387 Views)

Ok, you find it under the DAQmx Export Signal property node.  (Note: not available under the full-size function for exporting signals.)

 

You choose Events->Counter Output->Output Behavior as the property.  Right-click and make sure the property is set for "write" not "read".  Right click again and create a constant.  The options are Pulse and Toggle.

 

Actually, it may also be necessary to set a neighboring property for "Output Terminal".  The Behavior property *might* only affect a signal that's normally just an internal signal, unless you tell DAQmx to send it out to a designated Output Terminal.

 

See screencap below:

 

 

-Kevin P

 

image.png

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 32 of 32
(384 Views)