LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping array

currently, my programme works in such a way that when i click on the save button, the data from my instrument (in the form of XY graph) is saved into MS SQL... but what i really need is to save only 250 readings (one cycle) and the graph continue to move... then the save button will return to the default mode and when i press it again, it'll save another 250 readings..
 
i'm stucked at the limiting to 250 readings only as the graph passes 250 each iteration... when i set, array size = 250, it returns true... but the problem is after it reaches 250 for the first time, it'll always be true as it passes 250 readings each time... so the saving process is forever true until i stop the VI... Smiley Sad
 
can some1 help me out?? thanx in advance... Smiley Very Happy
Best Regards,

JQ

LV 8.0 user...
0 Kudos
Message 1 of 4
(2,739 Views)

I have attached an example that simulates the saving of data every 250 points. You mentioned clicking a button so I am going to assume that you want to do the saving of the data interactively instead of automatically. So the example uses a producer/consumer with events. The idea of this is to make sure that the Save Data: Value Change event executes quckly and passes all work to save to the database to the consumer loop. This is design to will avoid any front panel lock ups caused by events taking a long time to execute.

Now all this really depends on the architecture of your program but hopefully it will give you some ideas.

David

Message 2 of 4
(2,721 Views)
thanx david for responding... i'll check it out at work tomorrow as i dun have labview at home... thanx once again... Smiley Very Happy
Best Regards,

JQ

LV 8.0 user...
0 Kudos
Message 3 of 4
(2,707 Views)
it took me 2 days to solve the problem... haha.. thanx david... ur example did gave me some "enlightenment"... hahaha... Smiley Very Happy
Best Regards,

JQ

LV 8.0 user...
0 Kudos
Message 4 of 4
(2,695 Views)