01-19-2017 01:57 PM
Hi All,
I have a problem.
I made a program in LabView to read the oxygen value of VERNIER oxygen sensor. I am reading the signal by using a DAQ sensor card. I am able to read in the value in LabView. Until this level, everything goes well.
Now I want to read the signal of 3 sensors. I am able to read in those three values within the same VI.
I was looking to a method to spread these sensor signals to 3 different labview programs. How can I do this?
Somebody suggested me to do it with a GLOBAL VARIABLE but I have a problem with that.
When I insert a global variable, I am not able to connect this variable with a numeric value. The icon of the global variable stays dark and I get the error message: "you have connected two terminals of a different type. The type of the source is double (64-bit real (15 digit precision)) the type of the sink is void.
Can somebody help me how to solve this problem?
regards
Michel
01-19-2017 02:08 PM
Why do you want to split them out? Depending on your DAQ card, you probably won't be able to read 3 different sensors simultaneously. So by putting them all in the same task, the DAQ card will read them back to back. If you try to program them to be read separately, there will still need to be some dependency between the reads so that you don't get a "resource in use" error.
01-19-2017 02:09 PM
Michel000 wrote:I was looking to a method to spread these sensor signals to 3 different labview programs. How can I do this?
Ok, let's clarify some things first.
1. What exactly do you mean by "LabVIEW programs"? Different executables? Different VIs inside of the same executable that are running in parallel? Different loops in the same VI that are running in parallel?
2. Do these other "programs" need to process all of the read data points or do they only care about the latest value?
01-19-2017 02:33 PM
I programmed a whole main vi with subVI's that does different calculations with the sensor signal. I would like to make 3 exact copies of this. So for every sensor I would like to have 1 mainVI or program that is running. Therefore, in total I would like to have 3 programs that I can run separately.
Why do i need something like a global variable? I found out that it is not possible to run more than one VERNIER DAQ function simultaneously in different VI's?? Due to this, I am not able to collect the data continuously in different VI's so I have to collect the data in the same file.
But during the data collection I have to “spread” it to the good VI’s…..
01-19-2017 02:37 PM - edited 01-19-2017 02:38 PM
If your sink is "void" that may indicate you have not selected WHICH global. I do not use them but I think you can right-click and select???
Ben
01-19-2017 02:38 PM
01-19-2017 03:04 PM
Attach your VI's including your global.
It is hard to help you improve your code when we can't see it.
01-19-2017 03:14 PM
Lets clarify what you are saying with some corrected LabVIEW terminology.
You want:
Now we need to ask ourself what the options are and what each methods pro's and cons are:
Global Variable: (it is an option) Pro write once read many times so its a 1-N data tranfer. It's LOSSY (you can only store the current value) and you can't get any information other than the data like "Has it changed?"
Notifier: Again its a 1:N data transfer and it is lossy (only the latest value is available) it has the advantage over the Global in that you can wait for a new value before processing the data
Queues: These are 1:1 data transfer so the sender needs to know who is expecting the data. They are LOSSLESS up to a certain limit (queue size max.) A best implementation would need all consumers running all the time but, they may be controlled in such a way as to either "Process and Log" or "Just bit-bucket the data."
I hope you don't chose using the Global but, if you do, you actually have to create the global.vi (File>>New...>>Global)
01-19-2017 03:25 PM
Hi Jeff,
you described my plan perfectly!
i never used the notifier but i will do some research to find out how it works!
regards
Michel