phiellaep Posted June 17, 2010 Report Share Posted June 17, 2010 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 Quote Link to comment
asbo Posted June 17, 2010 Report Share Posted June 17, 2010 You didn't attach your VI Quote Link to comment
phiellaep Posted June 17, 2010 Author Report Share Posted June 17, 2010 You didn't attach your VI Argh! I must not have clicked 'attach'. I will add it when I get back into the office. Thank you! Quote Link to comment
phiellaep Posted June 18, 2010 Author Report Share Posted June 18, 2010 Here is my VI. It is basically a repeating sequence, but the hold-up lies with the start-stop of the pulse in every iteration. Switch_1x2.vi Quote Link to comment
Mellroth Posted June 18, 2010 Report Share Posted June 18, 2010 ...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 Quote Link to comment
phiellaep Posted June 18, 2010 Author Report Share Posted June 18, 2010 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? Quote Link to comment
Mellroth Posted June 18, 2010 Report Share Posted June 18, 2010 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). /J Quote Link to comment
phiellaep Posted June 18, 2010 Author Report Share Posted June 18, 2010 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. Quote Link to comment
Maci Posted February 23, 2011 Report Share Posted February 23, 2011 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.