LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read multiple analogue signals ?

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

0 Kudos
Message 1 of 13
(2,464 Views)

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.

 

 

0 Kudos
Message 2 of 13
(2,451 Views)

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.

0 Kudos
Message 3 of 13
(2,448 Views)

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

0 Kudos
Message 4 of 13
(2,447 Views)

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.

0 Kudos
Message 5 of 13
(2,445 Views)

ow yes, now u mention it. I indeed am only clearing one task. fixed it already 🙂

0 Kudos
Message 6 of 13
(2,443 Views)

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.

 

0 Kudos
Message 7 of 13
(2,441 Views)

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

0 Kudos
Message 8 of 13
(2,436 Views)

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?

0 Kudos
Message 9 of 13
(2,432 Views)

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

0 Kudos
Message 10 of 13
(2,431 Views)