10-04-2018 08:00 AM
and the SUB VI
10-05-2018 03:10 AM
Hi Max,
on your "solution":
- when manipulating file path you should use file functions (like GetFileExtension, StripPath and BuildPath) instead of converting a whole path into a string. Much more safe once you start to use different OS…
- Using two hidden FP elements to store information looks wrong to me. Why not use (uninitialized) shift registers instead?
- Recent LabVIEW versions also support a "Create File with Incrementing Suffix" function…
- Banging DAQ hardware with "1 sample on demand" mode as fast as possible is most often the wrong way to read AI signals.
- Your subVI should use its connector pane according to the StyleGuide: lower left/right connector is "reserved" for errorIO. A nice descriptive icon would be fine, too.
- You never seem to use the AutoCleanup tool - it still improves your code (as you don't follow the StyleGuide)…
This snippet is still not "perfect", but shows some of the comments:
10-05-2018 03:57 AM
Wow thanks man ! taking your time to give me all of those advices I really appreciate it ! you're really a nice guy and I can't express how thankfull I am.
-No worries I fixed some of the problems as this was a prototype. I used the loops indicator instead of those saved reset thingies
-I did use the auto clean up on the part that checks if the file exist and replaces it. I dont use it on a grand scale as it makes the program sometime look confusing:
-Im quite curious as what problem could cranking up the speed of a DAQ that reds sample on demand could lead.
-How do you name the header when you're saving a table as Im doing right now??
10-05-2018 04:19 AM
Hi Max,
Im quite curious as what problem could cranking up the speed of a DAQ that reds sample on demand could lead.
The sample rate is not consistent.
You get a high CPU load for a job you could delegate to the hardware…
How do you name the header when you're saving a table as Im doing right now??
Write the header first, then append the data to the file. (Read the help for WriteSpreadsheetFile!)