02-23-2023 10:34 AM
Please bear with my code. I have attached my code and subVIs. Code called "Main Code" is my main code, the rest are just subvis that belong to the main code.
Read instructions on the front panel to be able to run the code.
I just can't see what I am doing wrong. Can someone please help?
Note: To avoid broken VI, put all the code in one folder.
Thanks for your help!
INSTRUCTIONS how my code works
1. Create a file you would like to save the data.
2. Pick a time to start data logging
3. Create how often you want to create new file (every 2, 3, 4, etc.. minutes, sec, hour)
4. Click start test to start the program
02-23-2023 11:24 AM - edited 02-23-2023 11:48 AM
02-23-2023 11:59 AM
I'm not sure I understood your code, however I notice that after writing to the file you close it, so Log Ref becomes invalid. Maybe you are trying to use this reference for another write.
02-23-2023 12:04 PM
Yes, I saw that too but I assumed that the "build acq array" will execute again before the next write. It is too tedious to figure out the entire state diagram, but it seems that he is actually trying to reuse the closed reference. Still, that's only the tip of the iceberg!
02-23-2023 12:31 PM
@pinkpanther and Mr. Altenbach,
Yes, I think that may be the reason I'm getting error 1, trying to reuse the close reference.
I created a code, playing with it, trying to generate code 1 on purpose. The only time, I would generate error code 1 is if my code looks like this below.
02-23-2023 01:06 PM
@GRCK5000 wrote:
The only time, I would generate error code 1 is if my code looks like this below.
I can probably come up with dozens of other code alternatives to generate the same error code. 😄
02-23-2023 02:46 PM - edited 02-23-2023 02:48 PM
Haha.. sometimes LabVIEW can be complicated. one error can be caused by multiple things.😩 I think I found the solution for this problem, but I have a different question. I'll make a post for it.
02-23-2023 02:58 PM
@GRCK5000 wrote:
Haha.. sometimes LabVIEW can be complicated. one error can be caused by multiple things.😩 I think I found the solution for this problem, but I have a different question. I'll make a post for it.
I really think you are digging yourself into a deeper and deeper hole with that completely misguided and not scalable overall architecture, applying band-aid solutions. I recommend to start from scratch.