LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop without exit

eheheh , good morning Ray

The start button is active now , but it does not do any thing , the running bar does not change color , so it is not measuring any thing ......

any idea why that is not working ?

LV 8.2
0 Kudos
Message 21 of 51
(1,850 Views)

Wow..  I wasn't expecting that. 

I must have screwed up something in the logic..  And I suspect I know where I went wrong.  I changed my approach to the state machine mid way, so I had a state called Idle that is no longer being used.  I wonder if I placed it in there...  I need to re-visit the block diagram to confirm.  I also took out my DAQmx USB board, so I can try running the VI and see what's going on.

 

Once again, it may be this evening before I look at it, unless I go home for lunch. 

Message 22 of 51
(1,843 Views)
Ok i will be checking the forum every hour 🙂
LV 8.2
0 Kudos
Message 23 of 51
(1,840 Views)

I would wait until the afternoon  😉

No need to check the forum just yet..

 

LOL!

Message 24 of 51
(1,838 Views)

Hahaha ok Ray , man it is cold out there .......!! dont forget to take look at the exit button also please 🙂 and GUI.vi i told them that i will give the Gui today...wish we could make it today.

 

LV 8.2
0 Kudos
Message 25 of 51
(1,833 Views)

LOL!!

 

You have to learn not to promiss anything.. 😉

 

It looks like I can't escape work until this evening.  I will look at it right after dinner.

 

RayR

Message 26 of 51
(1,822 Views)

Yea specially in this situation 🙂

I'll check the forum back this evenining.

have a good dinner !!1

LV 8.2
0 Kudos
Message 27 of 51
(1,812 Views)

Here it is.

 

It works on my machine..  I had to change some settings so you'll have to look at the DAQ code..  Check my comments in the initialize state.

 

For instance: 

Are you sure you want to use the built-in function for the cold junction compensation?  Maybe that will work on your setup... it didn't work on mine.

Also, are you sure you are using "T" type thermocouples?  The usual ones are K & J types.. 

I changed those values to get it working.

 

The run indicator now works..  And so does the Pause button.  The exit was strange... It would not retain the value from the button... Maybe the mechanical action (?).  In any case, I did not want the Producer Loop to exit and kill the Queue BEFORE having closed the DAQ reference, so I wired a delay based on the sample rate.  This means there will be a small delay between the time you press the exit button and the software exits..

 

Since there is no documentation or design specifications, I did not program any "revert" actions when the Stop button is pressed.  I do not know what the full intent of this button is.

 

Try running it.  It is in LV 8.2. 

 

Good nite.

 

RayR

 

Message 28 of 51
(1,803 Views)

Are you sure you want to use the built-in function for the cold junction compensation? 

what's that RAY ?

Also, are you sure you are using "T" type thermocouples?  The usual ones are K & J types.. 

Well the one I had T and was working so it is T

 

I saw different problems :

the stop button is doin the same thing as pause button. I want a stop button to reset the graph and all states to the default one....so the user can take another Test .

 

i also found out that when i use another Daq refresh rate , the vi freezes up , it works only fine with 500ms .

I would also love to have the user enable the channels after running the programe , not before 🙂 as i had it in my last VI......

 

Why dont we use the VI  I had and just add stop button to reset every thing to default (to do another test) , or the architecure i have does not allow that ?

 

this is what NI eng suggested :

 

However, I noticed that you have an empty case in the Case Structure that executes when the "Start Button" is not selected.  You can design your application so that it will reset when the "Start Button" is not selected, and develop your resetting code in the False case of the Case Structure. If you want to proceed this way I suggest you do the following:

 - In the False case of the case structure have the same property nodes and constants that you use in the structure "Reinitialize to Default". With doing that, when the Start Button is not selected, the Physical Channels, Daq Rate, File Path and Waveform Chart indicators will be cleared. I understand that’s what you want performed when you say you want it to reset.

With this suggestion, you don’t need to implement a new "Reset" button and the logic about it to manipulate the while loops. I’m suggesting this due to your time constraints. Please let me know if this is helpful or if you have other specific questions related to this issue.

 

So Ray what do u think ?

 

 

LV 8.2
0 Kudos
Message 29 of 51
(1,783 Views)
I will answer within your response

kmous wrote:

Are you sure you want to use the built-in function for the cold junction compensation? 

what's that RAY ?

You should do a search on this forum

 

Also, are you sure you are using "T" type thermocouples?  The usual ones are K & J types.. 

Well the one I had T and was working so it is T

 

I saw different problems :

the stop button is doin the same thing as pause button. I want a stop button to reset the graph and all states to the default one....so the user can take another Test .

 

You didn't mention that in your problem statement...  So it is not a problem, it is a lack of definition 😉

Here's your original request (post 1).  You have to be specific..  😉

Hi Guys , Just wondering how to add a stop button to reset my program without exiting.

I have 3 buttons , 1-Start 2-Pause(it pauses the data collected but once i hit start again , it will continue on the same graph and same output file) 3-Exit (this exit the whole program) .

How can I add a stop(more likely as reset) button to collect a new data without exiting the program ?

I know it is something to do with the inner loop.

Thank you

 

i also found out that when i use another Daq refresh rate , the vi freezes up , it works only fine with 500ms .

I would also love to have the user enable the channels after running the programe , not before 🙂 as i had it in my last VI......

 

I didn't try the other rates, but they are likely so slow that it "feels" like it is frozen (although the weather is not helping :D)

I can look at that on the weekend..

 

Why dont we use the VI  I had and just add stop button to reset every thing to default (to do another test) , or the architecure i have does not allow that ?

 

THe architecture would not allow the other feature about clearing the graphs... This architecture is scalable, meaning you can add to it.  Plus, how well did the original one work?  And why would you want to revert (step back) to the older code??

 

this is what NI eng suggested :

 

However, I noticed that you have an empty case in the Case Structure that executes when the "Start Button" is not selected.  You can design your application so that it will reset when the "Start Button" is not selected, and develop your resetting code in the False case of the Case Structure. If you want to proceed this way I suggest you do the following:

 - In the False case of the case structure have the same property nodes and constants that you use in the structure "Reinitialize to Default". With doing that, when the Start Button is not selected, the Physical Channels, Daq Rate, File Path and Waveform Chart indicators will be cleared. I understand that’s what you want performed when you say you want it to reset.

With this suggestion, you don’t need to implement a new "Reset" button and the logic about it to manipulate the while loops. I’m suggesting this due to your time constraints. Please let me know if this is helpful or if you have other specific questions related to this issue.

 

So Ray what do u think ?

 

He may have wanted to preserve your architecture.  I wouldn't recommend it.

 

 


 

Message 30 of 51
(1,779 Views)