Jump to content

Software retriggerable pulsing?


phiellaep

Recommended Posts

Hi all, this is my first post. Like most people I am requesting help with something! Sorry!

I am trying to implement TTL control of a device using LabVIEW and my 6052e PXI.

The control is pretty simple, and completely TTL. It's just 4 pins for setting the new switch status, then a 5th pin to be pulsed (high to low) to initiate the switching.

My VI for this (attached) does work. However, it works slowly. I can't get it to update at more than 5 Hz, and I have identified the hold-up as being the Start and Stop for the pulse. Without this, the loop runs very fast indeed.

Clearly, I am not retriggering the pulse efficiently by Starting and Stopping it every iteration, and there must be a better way of doing it. However, having looked at the 'Retriggerable pulse' example VIs, it seems I would need to use a hardware trigger to start the pulsing.

Ideally, what I want is to set up the pulsing channel, and for it to pulse only when I request it. But without using a hardware trigger! Surely this can be done? If not, why? And if so, how?

Many thanks for any advice.

Philip

Link to comment

...The control is pretty simple, and completely TTL. It's just 4 pins for setting the new switch status, then a 5th pin to be pulsed (high to low) to initiate the switching....

Maybe I misunderstand what you are trying to do, but why are you using a counter output to do the switching? Why not use a digital output instead?

/J

Link to comment

Do you mean one of the Digital I/O lines?

To specify a 15 us pulse I need to use proper pulse generation, the default pin for which is CTR0.

What I wanted to do was set up the pulse channel, and have it triggered whenever, for example, a boolean variable went HIGH.

What it seems I will have to do (although I not sure why) is use a Digital I/O channel to gate the trigger (PFI9) to start the 15 us pulse. So I'm having to physically wire a Digital I/O line to PFI9 to gate the pulse, which seems daft - why can't I just do it in software?

Link to comment

To specify a 15 us pulse I need to use proper pulse generation, the default pin for which is CTR0.

As I said, I might miss some part of your problem and I do missed the fact you had to generate a pulse with 15us width.

If you want to have the pulse generation restarted a bit more efficiently you could try committing the pulse settings to the board before starting the task. I don't know if this will give you the loop rates you need, but it should be more efficient than the current solution (if your hardware support it).

post-5958-075323600 1276863093_thumb.png

/J

Link to comment

OK, thanks.

What I have now is one Digital I/O output physically wired directly to the gate input, which when it goes high starts the retriggerable pulse. It does work, and fast, but it seems a little silly. Possibly this is the best way however.

If anyone has any other ideas I'd be happy to hear them.

Thanks again.

Link to comment
  • 8 months later...

DAQ0.viHello All, I have a similar trigger issue, if someone can help, please. I want to acquire one second worth of (acceleration) data at the signal provided by a digital input., set to trigger on the rising edge. Here is what I have (see attachment), and it is not triggering. Thank you

Maci

DAQ0.vi

OK, thanks.

What I have now is one Digital I/O output physically wired directly to the gate input, which when it goes high starts the retriggerable pulse. It does work, and fast, but it seems a little silly. Possibly this is the best way however.

If anyone has any other ideas I'd be happy to hear them.

Thanks again.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.