08-08-2023 03:10 PM
Hello!
So my team and I are new to LabVIEW and are having some issues with our data collection, so sorry if this is a simpler question. We had the system able to collect data and append it to a csv file from the start up from the program. However, our goal is to make this loop occur only when a button is pressed using an entered time value, only giving data from that time forwards. We also are wanting this to be repeatable during one run (our previous loop worked only if we ended the run). The current structure builds an array equal to the desired data collection time, then appends that array to our file. We tried working it with loops and case structures but cannot seem to figure it out, so any suggestions would be appreciated! We also plan to expand this collection with three more data entries but their structure should be essentially identical to this first one.
As an aside, our system that appends values to the array seems to only append integers requiring us to have the extra multiply by 10000 step, if you know how to make that a floating number so we skip that little bit of math we would also appreciate that.
All the best,
Logan Holler
Oregon State University
08-08-2023 04:03 PM
A couple of comments/suggestions:
I'd go "back to the Drawing Board" and write a simple routine that generates "fake data" at your desired data rate and lets you start and stop saving of the data. Try not to "fancy up" your Block Diagrams with pretty colored boxes that look like LabVIEW Structures (but are pure fluff).
Bob Schor
08-09-2023 11:52 AM
Hello Logan,
It sounds like you need help with LabVIEW programming in general, nothing specific to LabJack, but if you want us to check something out take & post a screenshot as we don't have new enough LabVIEW to open your VI that reports version 21.0.
Hello Bob,
Sounds like you are seeing calls to the LJM Library that supports our T-series devices:
https://labjack.com/pages/support?doc=/software-driver/ljm-users-guide/
I'm guessing you are looking at a call to eReadName. You pass the name of a single register ("AIN0" is indeed analog input 0) and it returns 1 reading. We call this a command-response or software-timed function, as the timing is controlled by the software not our hardware.
https://labjack.com/pages/support?doc=/software-driver/ljm-users-guide/ereadname/
08-09-2023 08:13 PM
Hello, Jack. Thanks for the followup post, and for your offer to help out the Original Poster. It's always a Good Sign when a vendor helps the user/customer make successful use of the Product.
Bob Schor