06-21-2011 07:57 AM
i have a slider in a program to control a velleman k8055
the slider controls a dac output 0-5v volts witch then controls a sero through a ne555 timer board.
i need the slider to be able to be controled by keyboard (worked that out) but i also want when im not pressing the button for it to return to centre.
please help... im a novise at labview and mainly only need this one program. i have attached what iv got so far
Solved! Go to Solution.
06-21-2011 08:09 AM
Does your version of LabVIEW give you access to the event structure?
Your stacked sequence structure is not good for interactive control. You'll need to change this over to a state machine or simple control loop.
06-21-2011 08:24 AM
yes i think i have event structure.
i really need a good example of a state machine to use in this case.
also i have attached dll for k8055 if needed.
06-21-2011 09:37 AM
It appears that your code is set up so that you use the Run Continuously button in the toolbar. If this is the case, STOP. That button is intended for debug situations, not for normal operation. If the VI is supposed to run all the time, you need to use a loop in your VI. As noted, a simple event structure can be used in your case. However, I do not understand what you mean by " i also want when im not pressing the button for it to return to centre". What button?
please help... im a novise at labview and mainly only need this one program. i have attached what iv got so far
Have you done any of the LabVIEW tutorials? To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
i really need a good example of a state machine to use in this case.
You can read all about state machines here: Application Design Patterns: State Machines . You can create a state machine template from File -> New, and then select VI -> From Template -> Frameworks -> Design Patterns.
06-21-2011 07:00 PM
well i would like to use the arrow keys on the keyboard.
i will have a look at the tutorials thats a good idea.
thanks for your help so far and i will get back to you once i run through the tutorials
06-22-2011 12:57 AM
Hi,
You may take a look at the attached VI. I have done this using the event structure and the explanations are given on the block diagram. Hope it helps you.
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved;))
06-22-2011 06:53 PM
Can you please save as labview 8.0
06-23-2011 12:09 AM
Hi turbojet,
This one is in 8.0
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved)
06-23-2011 03:29 AM
GREAT YOUR THE BEST MATE THANKS HEAPS