LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Input directly to output

Hi, what I need is simply a labview VI that would take analog voltage input and then output it straight away without any modification. I am using PCIe-6363 with a BNC-2110.

I am not very good at labview so I hoped to find something in the examples, but as far as I can tell it doesn't exist, is my best bet to try and stitch together input and output examples?

0 Kudos
Message 1 of 4
(178 Views)

So basically you want a VI that simulates a wire? 😮 What else does it need to do?

0 Kudos
Message 2 of 4
(161 Views)

@hetag wrote:

Hi, what I need is simply a labview VI that would take analog voltage input and then output it straight away without any modification. I am using PCIe-6363 with a BNC-2110.

I am not very good at labview so I hoped to find something in the examples, but as far as I can tell it doesn't exist, is my best bet to try and stitch together input and output examples?


So you want to capture a signal using 6363's AI and just send it out without modification on 6363's AO?

 

Sure, you can, but there will be a "delay" as there is overhead to read the analog signal, and write back the analog signal to the DAQ.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 4
(151 Views)

@hetag wrote:

Hi, what I need is simply a labview VI that would take analog voltage input and then output it straight away without any modification. I am using PCIe-6363 with a BNC-2110.


You want to know how LabVIEW deals with hardware such as the PCIe-6363.  [I'm not sure precisely what this is, but I'm pretty sure it is a card that plugs into the PC backplane and provides a variety in inputs and outputs, probably including Analog and Digital Inputs and Outputs.]

 

LabVIEW has a sub-system called DAQmx for handling data acquisition and signal generation hardware such as the PCIe-6363.  If you do a Web search for "Learn DAQmx", you will probably find a link to "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications".

 

Here are my suggestions for getting started:

  1. Download and skim through "Learn 10 Functions".  You can skip the sections on .NET and C/C++.  I also recommend that you skip the first section which describes the "Dreaded DAQ Assistant", which will definitely lead you astray into Bad Habits.
  2. Start with "Learning Your Device".  Plug your device in (it it is plugged into your PC's backplane, it is already "plugged in").  Open MAX (the Measurement and Automation Explorer), look in Systems and Interfaces, and find your device.  Click to select it.
  3. Open a Test Panel.  This lets you test out the various sub-systems of your device.  For example, "Analog Inputs" shows you the Analog Input channels (AI0..AI7, perhaps) associated with your device, and lets you select what you are measuring (Voltage, in your code).  You can set the Voltage Range, Sampling frequency, sampling type (single sample, a finite number of samples, say 100, then stopping, or continuous sampling, say 100 and immeciately another 100 with no break in the spacing between samples) and sampling rate.  If your board has other capabilities, MAX will show them to you and let you choose. You can then start sampling, and MAX will show you a chart of the results (if its an input).  For example, if you asked for 1000 samples at 1 kHz on an Analog In channel, started it, and touched an input port, you should see 60 cycle "noise" when you touch the input.
  4. For a simple A/D routine, you need about 4 or 5 DAQmx functions, well-discussed in "Learn 10 Functions".
    1. Create Virtual Channel (to define the Hardware you will use, including the Max/Min Range).
    2. NI-DAQmx Timing defines the sampling type and rate.
    3. DAQmx Start (to start the process, though some hardware can "auto-start" when you first ask it to Read or Write).
    4. Assuming you are doing Continuous Sampling, such as 1000 samples at 1 kHz in Timing, put the DAQmx Read (or Write) function inside a While Loop, defining how you want the data to be handled (for a single channel, you can have a 1D Array or a Waveform, for example).  The Data output from the DAQmx Read can instantly be plotted on a Chart or written to disk (you have an entire second before more data will be presented by the DAQmx Read, plenty of time to do simple tasks like plotting and saving).
    5. Other DAQmx functions after the While Loop can stop and/or clear the Task.
    6. The DAQmx Read section of "Learn 10 Functions" shows all of the above operations.
  5. LabVIEW also ships with (overly-complete, sometimes "too much information") Examples.  For something as simple as reading Analog Voltage, I'd stick with "Learn 10 Functions", but if you want more complex things like using Counter-Timers to create Pulse Trains, go to "Help", "Find Examples", "DAQmx", and search away.  If you do open an Example, I recommend you immediately to a "Save As" and save a copy in your LabVIEW work directory to avoid messing up the Example code that LabVIEW provided;

Bob Schor

 

0 Kudos
Message 4 of 4
(145 Views)