LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set up time for ni 6501 to control relay

Solved!
Go to solution

Tbob

Thank you so much

I know how to change time when running program. The further question is that when program is running, valve state keep unchanged , but I like to pause the data collecting then resume collecting it .

 

Thanks 

0 Kudos
Message 11 of 20
(1,892 Views)

To pause then resume, you will need a case structure with a pause boolean as the input.  The pause boolean action must be switch when pressed or released.  When pause is false, do nothing and continue with the program.  When true, use a loop to continusously check the pause button again.  End the loop when pause is false.  Then the program will continue.

 

If you run into problems, post your code so we can see it.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 20
(1,876 Views)

Hi Tbob,

Thank you so much,

 

I will try to write pause.Right now I have a new question. I have attached my code . Please check it. For this code, the upper part is for control relay.

 

The low part is for reading data from PR4000 read out. When I run program , it works separately.  Of course, I try to put PR 4000 reading data code into  solenoid valve "Acquire " case to acquire data. But I hope I can let PR4000 read out data always show up in waveform chart to monitor the system pressure, when solevoid valve goes to "Acquire " case, data began to be saved to be file.

 

 

Do you have some advice?

 

0 Kudos
Message 13 of 20
(1,866 Views)

Tbob

I have tried the pause code. It works well. But once I pause it, then resume it, the first data is always 0. Please check the attachment. I just use random number to try pause.

0 Kudos
Message 14 of 20
(1,860 Views)

For pasue ,I solve this problem. I did not connect wire in the true case. So 0 always show up when resuming it.

Thanks,

0 Kudos
Message 15 of 20
(1,857 Views)

Do you still have any problems?  One word of advice.  Your block diagram is too large.  I don't have 4x4 monitors stacked up.  If it can't fit on one screen, it is too large.  A large vi is hard to follow.  I will not look at it.  You should cut the size down by eliminating lots of wasted space, and by creating subvi's where necessary.

I don't have a lot of time to look at other people's code.  That is why I insist on the code being clean and fitting on one screen.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 20
(1,848 Views)
Solution
Accepted by topic author MYLONG

Tbob

Thank you so  much.

 

I think I have solved it. I use the local variable. Thank you so much. You give me a lot of help. I am a labview beginner. I need make my code neat , not messy. I will try .

 

Regards,

Yanfang

0 Kudos
Message 17 of 20
(1,837 Views)

You have just give yourself credit for the accepted solution.  You should give it to the post that really solved your problem.  You are not the first to do this.  I think maybe the system is not too straight forward.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 18 of 20
(1,830 Views)

I have 5 solenoid valves to be controlled . The operation is : 

 

Step-1 V-1,V-2,V-3 will be opend and stay for 5 min. and close

Step-2  V-1,V-4,V-5 will be opend and stay for 5 min and close again.

 

 

 How can i do this with labview

 

Thank u inadvance.

0 Kudos
Message 19 of 20
(1,543 Views)

Hi bstar,

 

Since you have a different question than what is posted above, I would encourage you to create a new post with your question so that we can help you out and keep the integrity of the thread in place. 

Kyle A.
National Instruments
Senior Applications Engineer
0 Kudos
Message 20 of 20
(1,528 Views)