epiz Posted July 24, 2023 Report Share Posted July 24, 2023 I am aware you can attach a button to an event structure and when clicked it will perform said event. Is it possible to have two buttons in the same event structure(I don't think its possible but want to confirm). Lets say one of the events is to read data from a device and it displays on the vi. Is it possible to just create another event that can simply just pull that said data and write it to a file? Thanks Quote Link to comment
LogMAN Posted July 25, 2023 Report Share Posted July 25, 2023 14 hours ago, epiz said: Is it possible to have two buttons in the same event structure(I don't think its possible but want to confirm). Yes. One event can be triggered by as many buttons as you want. 14 hours ago, epiz said: Lets say one of the events is to read data from a device and it displays on the vi. Is it possible to just create another event that can simply just pull that said data and write it to a file? Technically yes but this is bad design because it would have to go through the UI thread, which is super slow. There are more robust ways to do that. Please take a look at the "Continuous Measurement and Logging" project template that ships with LabVIEW. Quote Link to comment
epiz Posted July 25, 2023 Author Report Share Posted July 25, 2023 Is the first method you suggest able to work for the situation I described in the second sentence? I will check out the project template, thank you Quote Link to comment
LogMAN Posted July 26, 2023 Report Share Posted July 26, 2023 No. The image shows how to assign multiple event sources to a single event case in the Event Structure. You would have to create a custom user event and handle it in another event case to be able to do what you describe. It is just not a good solution for your particular usecase. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.