LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using 2 slots on SCX1-1600 simultaneously

Solved!
Go to solution

Hi,

 

i've been using Labview 9, but decided to help out a colleague who has 7.1.  I knocked up this vi which is supposd to aquire data from a SCX1 - 1600 with two slots; SCX1-1102 (32x thermocouples) and SCX1-1314 (strain gauges).  I need to look and aquire this data simultaneously, but whenever I start the vi, only one of the tasks displays data (seems to be random which one).  I thought you could use two DAQmx aquisitions of different types without getting into trouble about reserved resources?  Anyway I've attached the vi, I would be very grateful if anyone could offer any support.

 

Cheers

 

Luke

 

 

0 Kudos
Message 1 of 7
(2,758 Views)
Sorry forgot to add: If i'd want to take an average of every 10 samples before I wite to file, would it be best to do something like the pic attached where the while loop is replaced by a for loop?
0 Kudos
Message 2 of 7
(2,753 Views)
Solution
Accepted by lpaza

Hi Luke,

 

I am not very experienced with SCXI, but I believe you have to have all your channels in the same task, and then only have one VI to set timing, start, read, and clear. The timing would always be the same since SCXI always multiplexes all channels together anyway. In terms of writing the average of 10 iterations to the file, the method would depend on whether you only need 10 samples, or whether you want the average of every 10 samples (several times) logged to the file. 

 

I've modified your VI and attached it below. Please let me know if that works, I have just simulated the hardware in MAX.

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

Download All
Message 3 of 7
(2,732 Views)

Thanks Imtiaz!  Yup it seems all the channels have to be in the same task.  So the fellow wants the display to update every second so I choose sample rate and buffer of 1.  But he also wants the file to contain 1 of every ten samples for each channel to reduce file size since he wants to run for long periods of time..   I replaced the while loop with a for loop and moved the 'write to file' outside the loop so it saves the 10th value (I think!) of each channel.  I was thinking it would be neater for the 'write to file' to save an average over ten iterations for each channel but I was struggling to do so.  Do you have any suggestions? 

 

Thanks for your help!

 

Luke

 

p.s. I couldn't find the diagram cleanup button!  do you know where it is?

0 Kudos
Message 4 of 7
(2,714 Views)

You're welcome Luke! I'm glad the theory works in practise too! You are correct that the easiest way to do that is make the while loop into a for loop, and then just take out the Write to Measurement file and place a while loop around that and the for loop. Inside the for loop you can create a stacked shift register with 9 elements on the left side, add them together and average them (the 10th one is the current value), and of course remember to always initialise your shift registers 😉

 

average.png 

 

I've attached a modified VI (LV 2009). The block diagram cleanup tool is right right-most button on the toolbar (only appears in the block diagram).

 

cleanup.png 

Message Edited by alpha1 on 10-06-2010 04:23 PM

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

Message 5 of 7
(2,703 Views)

Thank you for all your help! 

 

 

Best regards

 

Luke

0 Kudos
Message 6 of 7
(2,698 Views)
You're very welcome, hope it all goes well 🙂

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

Message 7 of 7
(2,696 Views)