LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

differential analog inputs

I am working with PCI 6255 to acquire about 30 analog voltage signals using SCB-68 with differential input configration. Please let me know how to read the data from the read VI congifured with Analog 2D DBL NChan NSamp? 

Download All
0 Kudos
Message 1 of 26
(4,699 Views)

Are you kidding me?  You posted a blank VI?  Show us what you've done, we'll look at it, and give you suggestions.

 

Bob Schor

0 Kudos
Message 2 of 26
(4,685 Views)

Whoa, Sorry for that!

0 Kudos
Message 3 of 26
(4,677 Views)

The real question is "What do you want to do with the data?"  Log it?  Just show it in a chart?  You are already using the DAQmx Read function here.  What is your real issue?

 

Some general comments on your code here:

1. Use a FOR loop to add your channels.  It will make your code a lot simpler.

2. Since you are using the Cointinuous Mode, do not use the "samples per channel" input on the DAQmx Timing VI.  You are just limiting your buffer size, which could lead to issues.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 26
(4,672 Views)

Another suggestion -- if this VI is inside a LabVIEW Project, create a new Task, configure the Task with all of the parameters in the DAQmx VIs to the left of your Start DAQmx function, and then just wire a Task Constant to the input of Start, click the drop-down arrow and choose your new Task, and all of those messy details to the left are handled.  Note that the way you've done it makes it easy/convenient to alter the parameters at run time, but if they are supposed to be "constants", then make them Constants by defining them as part of a Task Constant.

 

Bob Schor

Message 5 of 26
(4,669 Views)

...uh you have it.  Well the loop on the right anyway.  Instead of taking your 2D array, and converting it to a dynamic data type, then converting to a 1D array, then converting to a cluster, then unbundling that cluster...just drop a Waveform Graph on your front panel and wire it to the 2D array.  It will show the N channels and the N samples.  I believe each row is a channel and each column is a sample in that channel.  If you don't like that you can change the read to return a 1D array of waveforms which can also be wired to a graph.

 

Also isn't there continuous sampling examples where you can add channels?

0 Kudos
Message 6 of 26
(4,666 Views)

Thanks for the post.

Now I need to log thses voltages after simple mathematical operations in csv file.

I have no idea what you meant by using a FOR loop for the physical channels.

0 Kudos
Message 7 of 26
(4,660 Views)

Why am I getting only 16 rows while my channels are more than 16?

0 Kudos
Message 8 of 26
(4,658 Views)

I don't think you can perform creating two tasks, on the same device like you are.  Your first Create Task makes the 16 channels (0-7,16-23), then the second create task probably throws an error or just ignores it because the task already exists.

 

You need to use the Create Task once, for this device adding all the channels at once you want to read.  Just combine the two calls into one with "Dev1/ai0:7, Dev1/ai16:23, Dev1/ai32:36, Dev1/ai38:37, Dev1/ai39" as the channels.

Message 9 of 26
(4,651 Views)

Never used LABVIEW projects, I have only worked with VIs and SubVIs. I will have a look if 'projects' can help organise stuff because I am only starting, my project involves a lot of stuff.

0 Kudos
Message 10 of 26
(4,649 Views)