07-14-2011 06:37 AM
Hi,
I want too read 3 analogue signals at roughly the same time.
What I made works for a bit, it doesn't give any errors but this is not the result I am after.
In the attachment u can find my VI. Don't mind the lower part. That is a sequence, remove if u like or must.
Regards,
Stieve
07-14-2011 08:58 AM
Could you try to explain what you are doing?
What are the 3 channel you what to read at the same time?
There are a lot of subvi's missing, so I can only comment on the top while loop.
You are using local variables too offen, get rid of some them.
And just a quick one, why are you changing the color of the bolean, and not the state? Use the state, true/false, to show different colors.
And for the releasing and clearing of your tasks, you are only clearing one task, not all 8. This will give you trouble later on.
07-14-2011 09:01 AM
And one thing more, how are you stopping to top while loop ?
As you have wired a constant False to the stop condition, it will never be able to stop.
07-14-2011 09:07 AM
Hi,
Thanks for the responds.
I had it working to slow. I changed the 200mS to only 10 and now it runs more smooth.
Indeed, there a lot of subvi's missing because the lower part is the sequence from something and it not very important to the solution.
When I was making the subvi's is noticed that the local variables acted strange. But to be honest i don't know what else I can place instead of the local variables.
You say only 1 task will be cleared but isn't it so I clear all the tasks that have bin created in the for loop?
Regards,
Stieve
07-14-2011 09:09 AM
At the moment I am stopping by the stop button from labview ... I tried to make it differently but was not able to yet.
The program is stuck in somekind of loop, I will have to look into that.
07-14-2011 09:11 AM
ow yes, now u mention it. I indeed am only clearing one task. fixed it already 🙂
07-14-2011 09:14 AM
Stopping a program with the toolbar stop button is a NO GO, particularly if you are using some hardware.
And no you are not clearing all your task from the for loop, only the lastest one your have got a sample from.
07-14-2011 09:19 AM
I know that stopping the program from the tool bar is a no go but I noticed it a bit late that it didn't work anymore.
And for the second remark, that has bin fixed already. I placed the connection before using the tasks.
Regards,
Stieve
07-14-2011 09:27 AM
What are your program expected to do?
What should be the program flow?
Take a moment to write down, and draw the program flow, not in LabVIEW, but on paper.
How are you stopping the subvi's?
How offen would you like to sample the inputs?
07-14-2011 09:30 AM
I have posted a vi of how my structure acts.
And why can't I post a snipped? It says it exceeds 10.000 characters ?
Regards,Stieve