orko Posted February 23, 2006 Report Share Posted February 23, 2006 Hello all, I've been tasked to write up some VIs that are communicating to an old microcontroller in a unit through GPIO (this really doesn't matter, but I thought I'd give you an idea of how old the stuff is I'm dealing with ). The old program is written in Turbo Pascal ( ) Anyway, it will be a pleasure to port these over to LabView. I'm wondering, since my old UI used binary 1's and 0's to allow the user to communicate/program registers, is there a set of old school controls somewhere that have been built that make it convenient? Like: Addr: 0|0|1|0|0|1|0|0 Value: 1|0|1|0|1|0|1|0 And an "enter" button to press when you have the right values in them. A plus would be if the control "auto-tabbed" through the bits while you were typing. In other words, clicking on the first bit in Addr and typing "00100100" would fill in the booleans appropriately without having to tab or click again on each bit. Any thoughts/pointers? I'll start mixing up my own if no one can find their keys to the "OMG that's old" locker. Joe (orko) Quote Link to comment
AnalogKid2DigitalMan Posted February 23, 2006 Report Share Posted February 23, 2006 If I understand correctly, how about an array or cluster of LED controls? 1 = ON = Illuminated, 0 = OFF = dark? Or are you looking for text entry? Could use a string control and then parse it into bits. Quote Link to comment
orko Posted February 23, 2006 Author Report Share Posted February 23, 2006 If I understand correctly, how about an array or cluster of LED controls? 1 = ON = Illuminated, 0 = OFF = dark? That's what I'm after, essentially. I was hoping someone with more artistic talent than me had made one that had good picture overlays of the zeros and ones. Or perhaps had already solved the whole "auto-tabbing through an array" while someone is typing one bit at a time? Or are you looking for text entry? Could use a string control and then parse it into bits. Nope. No text. Just binary. I know I could use a numeric control, but would prefer a more "graphical" one, like the boolean array discussed above. Thanks for your input! I'm thinking more now that I'll have to work these up myself, but if anyone has seen an example like this using boolean or picture ring controls, please let me know. Joe (orko) Quote Link to comment
David Boyd Posted February 24, 2006 Report Share Posted February 24, 2006 Without having actually used the feature yet (he said authoritatively ), this sounds like an excellent place to try developing an XControl. Something along the lines of a cluster of booleans which capture keystrokes, test for 1's and 0's, and increment an active location while toggling little retro-PDP-8 paddle switches. Any chance you have LV8 but haven't broken the shrinkwrap/updated your LAVA profile? Not an especially useful reply - but perhaps one to get others thinking... Dave Quote Link to comment
Louis Manfredi Posted February 24, 2006 Report Share Posted February 24, 2006 Hi Joe: Any reason why you don't want to use a regular numeric control in binary display mode? Right click on a control, properties>format and precision>binary; then (if you wish)appearance>show radix. (Control has to be I or U type for the options to be available.) Hope this helps, best Regards, Louis Quote Link to comment
orko Posted February 24, 2006 Author Report Share Posted February 24, 2006 [...] this sounds like an excellent place to try developing an XControl. Something along the lines of a cluster of booleans which capture keystrokes, test for 1's and 0's, and increment an active location while toggling little retro-PDP-8 paddle switches. Any chance you have LV8 but haven't broken the shrinkwrap/updated your LAVA profile? I should be * :clock: :clock: * getting LV 8.0 from the "ones with plastic cards" in my division soon. Of course, that may be months, but I'm trying to push it for March. XControls caught my eye when I first saw mention of them. It sure would be nice to assign functionality to controls that you use more than once. Perhaps I'll wait to put the finishing touches on this particular app until they give me my 8.0? Thanks for the input! Any reason why you don't want to use a regular numeric control in binary display mode? Aesthetics. Pure aesthetics Joe (orko) Quote Link to comment
Louis Manfredi Posted February 24, 2006 Report Share Posted February 24, 2006 Aesthetics. Pure aesthetics Joe (orko) ...Good reason. Still remember feeling somehow cheated the first time I used a computer which didn't have a couple of banks of toggle switches and lights-- Somehow didn't seem quite like a computer when the only switches on the box itself were power and reset. Best Regards, Louis Quote Link to comment
David Boyd Posted February 24, 2006 Report Share Posted February 24, 2006 Aesthetics. Pure aesthetics Joe (orko) Of course, to be really faithful to the retro look, you would need to have paddle switches with labels like 'Examine' and 'Deposit/Next'. Something similar to this... ...perhaps? Dave Quote Link to comment
orko Posted February 24, 2006 Author Report Share Posted February 24, 2006 Still remember feeling somehow cheated the first time I used a computer which didn't have a couple of banks of toggle switches and lights-- Somehow didn't seem quite like a computer when the only switches on the box itself were power and reset. Of course, to be really faithful to the retro look, you would need to have paddle switches with labels like 'Examine' and 'Deposit/Next'.Dave Working where I do, I'm more used to seeing something like this... Yep... those are lights, pushbuttons and banks of switches... for the UI...in octal. Joe (orko) Quote Link to comment
jpdrolet Posted February 25, 2006 Report Share Posted February 25, 2006 Is that what you want? Download File:post-447-1140837999.vi Quote Link to comment
orko Posted February 25, 2006 Author Report Share Posted February 25, 2006 Is that what you want? This is very, *very* close... I love how you handled tabbing through the array! Updating the array from another control instead of trying to work backwards and move the focus each time a value was enterred *into* the array was something I hadn't even considered. I think that with a little tweaking I can make the boolean controls in the array look more like the labels that appear below them (instead of the green LED look) and then hide the existing labels so it looks like you're enterring the zeros/ones into a register. Then I could play with the pics to get them to look the way my gui was designed to look. Old This could be very workable... :thumbup: Thanks you very much! Joe (orko) Quote Link to comment
Khalid Posted February 25, 2006 Report Share Posted February 25, 2006 Here's another variation: I have used a Cluster of numeric controls (restricted to 0 and 1 values only) and the KeyFocus property to get the "autotabbing." Run the VI and start typing the 0s and 1s. The last entry (7th bit) will output the final array of values entered. :!: NOTE: Run this VI by clicking on the Run arrow on the toolbar, and NOT by hitting Ctrl+r. Ctrl+r seems to trigger the KeyUp events! This behaviour can be fixed by filtering "Menu" keys (i.e., Ctrl) using the 'Mods' output in the Event structure. This is left as an exercise for the students Regards, -Khalid Download File:post-311-1140852807.vi Quote Link to comment
orko Posted February 26, 2006 Author Report Share Posted February 26, 2006 Here's another variation: Khalid, Thanks for the different way of doing this. I'll take a look at it when I get back to the office on Monday, but it always helps to have several ways of handling a problem before deciding the best way Cheers! Joe (orko) 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.