08-31-2023 11:06 AM
Hi Folks,
I have created a VI that will read data from a detector and collate this information in a multicolumn listbox in a hexadecimal format (see attached VI). Now I would like to only collect this data once a "data collection" button is switch on. I have tried to mess around with event and case structures for this, but can't seem to figure this out. Any suggestions as to how I might accomplish this?
I am fairly new to LabVIEW so any suggestions on how to improve my program are also welcomed. Thank you!
Solved! Go to Solution.
08-31-2023 11:29 AM - edited 08-31-2023 11:32 AM
Hi Zifikis,
A simple case structure should be sufficient.
Could you save your code for LV2021 (On your VI, go to File -> Save for Previous Version -> 21.0).
When posting code to the forum, ensure it is not in a version superior to LV2021, as lots of users don't have higher versions installed (for various reasons).
Regards,
Raphaël.
08-31-2023 11:46 AM
Hi Raphaël,
Good to know. I have now attached the 21.0 version.
Regards,
Zifikis
08-31-2023 12:22 PM - edited 08-31-2023 12:24 PM
Attached is an example where I put the building of the data array in the case structure.
I also disabled the VISA part and added random generation of data to allow anyone to test the VI.
I also recommend that you check the available VISA examples:
Go to Help -> Find Examples -> Search "visa serial" -> Open "Continuous Serial Write and Read.vi"
Regards,
Raphaël.
08-31-2023 12:44 PM
Your suggestion got the VI to work as intended. Thanks for taking a look at this.