Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic digital output

Hi all,

 

I am using a CompactRIO and am trying to dynamically control output data for an automatic test sequence, for example I want to turn on and off outputs for a certain length of time automatically without having any user input other than to start the program. Is there any examples of how I would go about doing this? I have already went through the examples in the help section and I could not find anything similar

 

Thanks Cat Happy

0 Kudos
Message 1 of 4
(2,248 Views)

Hello plastic-bag,

The best implementation for this depends on the scope of your project and the timing you need. Is it seconds we are talking about, or microseconds? Is the test sequence fixed (it sounds like it is)?

 

  • If it is just a simple, slow, one-shot test: Script a sequence manually in LabVIEW. E.g.: Write 1 to your output, wait 10 seconds, write 0 to your output. This is software-controlled by your Windows PC.
  • In case the sequence is rather complicated, consider using a state machine architecture. This has more benefits, like allowing your user to stop the test gracefully.
  • If the output is quick, let's say an arbitrary waveform with a sampling rate above 20Hz, then you need to program your application that it runs on your cRIO only. Do you have a Real-Time or FPGA license?
  • In case the outputs shall react on measurements done on inputs in real-time, then there is no way around FPGA code.
  • What exact hardware do you have? What cRIO model, which modules?

Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 2 of 4
(2,216 Views)

Hi ikaiser, 

 

Ideally the test sequence is not fixed, it will be programmable by the user. Yes in the future it would be preferable to deal with time in microseconds. 

Yes I have a real time and FPGA license.

I am using a CRIO 9057, currently I'm using 9203 and 9482 but this is just for a test rig and soon I will have more cards to control such as analogue voltage cards.

0 Kudos
Message 3 of 4
(2,213 Views)

Okay, so you have quite high requirements, but also all the needed items available, good. When you need exact timing in the order of single microseconds, then FPGA is the way to go.

 

Sounds like the general concept your application needs is to define the sequence on your user interface (maybe a simple table of output value and duration), and then code on the FPGA that follows this recipe. I am not aware on any example about specifically this. How good are you in LabVIEW and FPGA coding? A good start would be the examples shipped with LabVIEW (Help » Find Examples » Browse by Task » Toolkits and Modules » FPGA » CompactRIO).


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 4 of 4
(2,172 Views)