Is there a way to put the play/start button on the main screen?
and also how can i center the main screen so that when i create a exe file it is centered instead having to scroll the screen to the center every time the exe is loaded.
Go to VI properties and the set the respective setting.
Like window run time position centered.
you can change the vi options to "run when loaded".
Can you explain the second question please?
but regarding the start button. it is by default run on open, but my program will stop ocassionally, so is it possible to put the play button on the main screen?
or how else is this normally handled by more expereinced labview programmers? i can try to loop the program so it continues to run but the stored variables in the register are only reset during the initialisation process (eg. when the program is stoped and started again.)
but my program will stop ocassionally, ...
Make sure it never stops. Handle all error and go to an idle state if there is nothing to do or initiate any desired action with regular front panel controls.
You cannot have the Run button on the main front panel. It should not be needed in a built application.
i only stoped it because it was chewing up my processing power, is there was a way to keep it in idle state and reinitiate when required?
is there a simple example of doing this?
If it is "chewing up processing power" when it is not doing anything new and useful, your program is bad. A program only need to consume CPU when something new happens (input change, etc.).
Don't have tight loops without waits that calculate the same old thing over and over as fast as the CPU allows.
Don't spin loops millions of times per second to poll a button.
Use an event based state machine architecture. If nothing needs to happen, no CPU is consumed. 😉
Feel free to post your code so we can give more detailed advice.
actually i have a delay of 50ms however the procesor is still working on 20%, because the whole time the program is reading voltage from 8 channels from a usb9221, is this normal for the processor to be this high?
the reason why i choose the 50ms is because i am sampling at 20hz on the "continous" setting.
at minimum the program will run the reading from the usb and at full pace the program wil do this as well as recording the data and doing mathmatic and logic calculations.
i wil try to get the VI up here but it is on a differnt computer .. but for now does this seem right for the processor speed?
also before i put the 50ms delay in the program the processor was at 70-80% and there was a huge delay as the program continued to run, by delay i mean the voltage reading was lagging by up to 5 seconds (ie. not showing instantaneous data)
can you explain this?