06-22-2021 07:35 AM
The main problem with my actual VI is that it saves (at least) in a folder only one set of data and then it puts itself in error mode.
But I want a looot of data.
06-22-2021 07:53 AM
06-22-2021 08:16 AM
No worries,
You are already very nice to have a look when you've got time 🙂
I continued to work on it,
And I have some results. (the last version of the VI is in this message)
(But I must admit that I'm not sure yet of why it finally worked o:)
With this it can create a file
It's already something after few days of fighting against LabVIEW 🙂🤓
06-22-2021 09:28 AM
Hmm.
I tried to have a proper time line for my samples by multiplying the number of iterations of the producer loop by the number of milliseconds that I wait between each samples.
But of course if I try to put this whole resistance measure VI in an other labview program, while the program is running the iterations are also running.
So I need to find a way to put back to 0 the number of iterations when I want to start my measure. And/Or I need a button to start it. 🤔
Learning is a never ending process 🙂
06-22-2021 04:27 PM
Hi
I changed the complete vi you did send.
Modified timing completely and save only to file after 100 measurements or when stopping.
I need some more time to compare with your newest version but probably my timing is more accurate.
see the attachments.
Just make sure you have a filename filled in. Including the extension.txt for text.
The file does not have to exist but the folder does have to exist.
save to disk is a subvi again.
06-23-2021 02:11 AM
You are awesome,
I've been looking at it a bit this night and I continue this morning !
Thanks a lot for your guidance,
I hope my next question won't need you to redo anew the whole VI o:)
Bastien
06-23-2021 03:54 AM - edited 06-23-2021 04:22 AM
I didn't know about the "get data/time in seconds.vi", this solution is really helpful.
I'm trying today to :
- Have a look a the consumer loop ( if I stop the measure between two sets of 100 samples, the remaining is not registered in the file (but that's not a real problem, I can just wait a bit to be sure))
- Trying to understand how to modify the program so that I can click to start the measure, click to stop it once I'm done, and click to start again without having to quit and relaunch the whole VI.
(Because I'll be using this VI in another LabVIEW program that a colleague made. The program is giving instructions continuously to a motor and my measurement VI will have to measure the sample's resistance maybe few times, without quitting the program controlling the motor.)
Might be impossible thought so I keep the possibility of just quitting the whole thing to start anew the measure.
I think a sate machine could do the trick. Maybe 🙂
Thanks again to Albert.Geven for his counsels, help and teaching !
06-23-2021 06:06 AM
I tried it like this with a kind of state machine.
The "problem" (that I saw, there might be others) is that I need 2 buttons ("stop" to close the producer loop, and "save" to close the consumer loop). And it would make more sense with one. But it seems I cannot stop both loop at once.
And if I don't close both, I cannot come back to the "wait" state.
Never this close to the goal 😉
06-23-2021 07:06 AM
Hi
The idea was that the consumer part would see the error of the close of the queue.
But the merge errors is holding that.
So you don't need to have a save button but the merge error should be after the release Queue function.
So just swap positions for release Queue and Merge Error and remove your save button and the OR.