LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two VI merging (a Temperature PID and Light sensor detecting) plz help

Hi,

my goal is to get the data from the light sensing detectors and also to control the Temperature too.

So I designed a VI named Light detecting "sensor and data storage.vi" but the problem was temperature controlling.

as in this VI I can not set the temperature which I want.

So I made another VI named "temperature control PID.vi", and now I can control the temperature through the thermocouple.

 

But again the problem is that I can not run Both the VIs at the same time.

and when I try to run both the VIs at same time, the following error appears,

error when both are running.JPG

 

 

and I think, it is because that both the VIs has the settings for same thermocouple and can not acquire the data (teperature) at the same time.

 

So I want to remove the thermocouple settings from the "Light detecting sensor and data storage.vi" and want to put the " temperature control PID.vi" into it. 

 

I am uploading both the VIs, If anyone can solve it, His work will be appreciated.

0 Kudos
Message 1 of 11
(4,426 Views)
Did you try doing a search for that error code? You've made a very common mistake and the answer is to simply have both channels in the same task. In your first VI, you would add another DAQmx Create Channel to the task.
0 Kudos
Message 2 of 11
(4,423 Views)
But I want to make only one VI from the above two VIs. How can I merge these two?
0 Kudos
Message 3 of 11
(4,403 Views)
0 Kudos
Message 4 of 11
(4,395 Views)
But how to merge these two VIs? I cant do it by myself.
0 Kudos
Message 5 of 11
(4,372 Views)
Why not? You created the original VIs didn't you? As I said, you just have to add another DAQmx Create channel to your first VI, this will define the termperature channels(s) that you have in the express VI. These new channels are new elements in the waveform array that you get back with the DAQmx Read. Index these out the same way you indexed out the other channels.
0 Kudos
Message 6 of 11
(4,365 Views)

Dear DENNIS KNUTSON,

 

I have attached the VIs. please modify it and upload it for me.

then I will check, whether it will work or not?

 

thank u very much for helping me.

0 Kudos
Message 7 of 11
(4,343 Views)

Hi,

I mean to say that from the first VI, i m getting the signals from detectors and it also shows me the temperature. but from this VI, I can not set the temperature of the heater.

thats why I made another VI <the second one in attached files> by which I can control the temperature.

but both the VIs are not working simultaneously.

so plz delete the temperature settings from the first VI and put the second VI into it.

thanks.

 

 

0 Kudos
Message 8 of 11
(4,320 Views)

Hi akhpal,

 

You will not be able to aquire the data at the same time from two VIs. You should collect it in one place and apss it on.

 

Flash

National Instruments
Applications Engineer
0 Kudos
Message 9 of 11
(4,299 Views)

I have attached the VIs of Both. could you finish the settings of thermocouple and output amperes <current> from it. and then putting the PID into it.

 

 

0 Kudos
Message 10 of 11
(4,287 Views)