02-06-2009 10:41 AM
I do not have easy access to LV 7.0 right now but I think the procedure was similar. Select the control. Then under the Edit menu look for Customize Control... or something like that. This will open a new window which looks like a VI front panel but does not have a block diagram.
Also look in the LV help for Customize Control or typedef or type definition.
I did a job similar to yours a couple of years ago. I bid the job as a fixed price contract based on my estimate (and the customer's input) that it would take about 50-60 hours. I made about 50 cents an hour for the time it actually took. If I were to take on your project I would probably bid it as two or three phases. The first phase would be to define the project. This might include some reverse engineering of your existing code and would define the actions the program was to take for each control on the panel, a timing diagram, an understanding of error and fault conditions, ... In other words a test specification. Once everyone agreed to that, then I would decide how much time it would take to write the program.
The way I would get rid of the locals for the buttons is the use of events and queues. You have about 20 buttons on the panel. That means about 20 more case in the event structure. In each of the cases a command is put onto a queue. The queue is read in the other loop (the cycling loop) and the command is processed there. The boolean value typically only exists in the event case. The command is a typedefed enum. By using an enum, the case structure which interprets the commands will have the command text in the case selection label at the top -- self documenting!
Lynn
02-06-2009 12:47 PM
In LV 7.1, Customize is located under Advanced...
Felix
02-06-2009 03:23 PM
can you guys help me with one more thing...
after going from B to C,
i noticed that I broke something and I can't seems to figure it out..i should be very simple..
02-06-2009 03:24 PM
02-06-2009 04:33 PM
ok..nevermind..i think i got it..
thanks everyone for all your help and advices..
i'll try to work on it some more..
02-08-2009 12:10 PM
02-09-2009 01:31 PM
After the last view of your project, I need to repeat myself and others:
You keep all data in one big cluster. That just minimizes wire-mess, but not structures the data. So:
1) You can have clusters inside clusters.
2) You can have both Type Defed.
3) You can use the Sub-Clusters as Controls/Indicators on your Front Panel
4) On the FP, you can hide the Cluster borders using the Paint Tool (for the border, right!!!-click and toggle using the space button on your kexboard)
5) Using an event structure, you can also monitor the elements of your clusters
Once you're convinient with these nested structures, you can replace a lot of globals by controls in the main cluster.
To conclude: I think you're better off having your data structured by means of nested clusters....
Felix
02-09-2009 04:51 PM
i still haven't figured out how to do that Type Defed.
can you give me an examples because i can't seem to get it right.
02-09-2009 05:18 PM
1. Take a control that you want to turn into a typedef.
2. On the front panel, right click, Advanced, Customize.
3. The control opens up in the control editor. On the toolbar it will say "Control". Select the Drop Down and pick "Type Def."
4. Close the edited control. Save it as a meaningful name. I recommend putting the letters TD at the end of the name so you know it's a type def. So it would be called MyClusterTD.ctl.
5. Now wherever you also use that control or indicator, or constant, replace it with the saved copy of your control.
02-10-2009 03:14 PM