PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

timer switch

Hi Experts,
                 Got a simple question that Im stuck on.  it's to deal with timer switches, the problem is Im outputting a signal out on my I/O board from my NI-6052E card but I have two sources to stream out on the same channel.  Obviously I will have one source as my default source going out onto the I/O board but I also want to be able to switch to my other source for a desired time value I set.  I have looked into the realys function of my labview 8.0 Im developing on but haven't found my answer.  So could yous please advise me.  Thank you for your time.

Best Regards,
Cazza
0 Kudos
Message 1 of 11
(3,922 Views)
Hi Cazza,

I'll be more than happy to help you with this issue but could you please clarify what you are trying to achieve? On your M-Series card you have 2 Analogue O/P channels and 8 DIO Channels. I'd like to know exactly what signals you require to input and output to and from your DAQ card, and what conditions (if any) need to be met in order to trigger an output or an input (digital or analogue). If you let me know these things I will be more than happy to help you use LabVIEW in conjuction with your DAQ Card and achieve these objectives.
 
Best Regards,

Ian C
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 11
(3,902 Views)
Hi Ian,
          Thanks for replying, I believe what im looking for is simplying within the software development.  I need to output a voltage single through my analogue channel to control the speed of a DC machine.  So basically I building a speed controller and also a fault simulator, so to simulate a fault I have to switch my output to the fault simulator output instead of the speed controller ouput.  As to whether how to control the relay, im hoping bascially by manual, so if I enter a specific time like 2 seconds, I expect the realy to be closed for 2 seconds and then open after the 2 seconds elasped when i order it to perform the connection.  Also would it be too much trouble to have some kind of a remote control, say from another computer on the same netwrk and send a signal to this developing machine and hence sets off the relay.  Hope this makes sense.  Any more queries please let me know.

Best Wishes,
Cazza
0 Kudos
Message 3 of 11
(3,896 Views)

Hi Cazza,

Thanks for that its a great help. So just to clarify so that I am on the right tracks here, you wish to:

1) Output a variable analogue output voltage on AO1

2) Have the option to switch your signal to AO2 using a front panel switch in LabVIEW

3) Control a relay from a DIO port (it would have to be powered externally probably) by entering a time to be closed then press a button on your LabVIEW front panel to activate it.

4) Have the option to trigger the relay DIO from a LabVIEW application on a remote PC instead of the local button suggested in point 3

Is this correct? Please let me know as if so, I have a few ideas on how this can be achieved.

Best Regards,

Ian

0 Kudos
Message 4 of 11
(3,890 Views)
Hi Ian,
       Thanks for the reply, sorry I haven't explained very well in my last message,  so there's a little misunderstanding.  I want, well hope to achieve the realy switching operation within the software.

- I will have only 1 output by outputing through AO1
- The output to AO1 is determined by 2 sources within the software, so say I have 2 sine waves of different phase simulating, WaveA will be outputting to AO1 and hence WaveB wouldn't.  But I want a software relay that will allow me to switch to WaveB for a desired time period that I can set hence to ouput WaveB to AO1 for that time period.
- You are right in the last point, I want to remotely set the software relay off but i don't really have a clue in doing so.

Hope I explained a bit better this time.  Thanks for your time.

Best Wishes,
Cazza
0 Kudos
Message 5 of 11
(3,879 Views)
Hi Cazza,
 
That's crystal clear thanks for that. What i'm going to do is write a small example for you that shows how to achive the Analogue output and switching between the two software signal sources. Once you are happy with that i will look into the remote side of things which is potentially more difficult, but we can certainly do that.
 
You should hear from me within the next few days with an example VI for you.
 
Best Regards,
 
Ian 
0 Kudos
Message 6 of 11
(3,874 Views)
Hi Ian,
        Thank you for the reply, thats great! I look forward to your reply.  Thank You

Best Wishes
Cazza
0 Kudos
Message 7 of 11
(3,872 Views)
Hi Cazza,

Please have a look at the attached VI (place the .ctl in the same folder as the VI) and see if it does the job that you require. Let me know your thoughts on it and then we can have a look at the remote networked control that you wish to impliment.

Best Regards,

Ian
Download All
0 Kudos
Message 8 of 11
(3,847 Views)
Hi Ian,
         Thanks for providing the vi, I have throughly analysed the code and adapted to my current project, however there seems to be a little problem, the thing is that I need to call the current output value whether its the default or the temp signal as long as it's the real-time, current one inside the while loop to the outside of the while loop.  I have attached the desired vi, so basically i need to update trial 2 indicator outside the while loop from the vlaue passed to trial indicator inside the while loop.  It is here that I experience problems the thing is that my trial 2 outside the while loop isn't updating as well, as you can run the program to see it yourself.  The main reason of this is because implementing this part into my current program will get my program stuck in the while loop and hence i would like to call the variable out of the while loop.  Hope i have exlpained it okay.  Let me know if there are any further questions.  Thank you

Best Wishes,
Cazza
Download All
0 Kudos
Message 9 of 11
(3,817 Views)
Hi Cazza,

This has been implemented in the attached code. You were having a problem because LabVIEW was stuck inside the single while loop you had and never updated the indicator called "trial". By moving any code you wish to run in parallel into a parallel while loop, LabVIEW intelligently multithreads the application causing both loops to iterate in parallel and your "trial" indicator to update.

Hope this helps,

Ian
Download All
0 Kudos
Message 10 of 11
(3,807 Views)