LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDA auto-increment challenge!!!

OK ... here's a challenge for you LabVIEW PDAers (Pocket PC) out there!! ... Attached is a VI that I have been trying to set some sort of variable increment on.  Here a explaination ... what I would like to do is this .. when you press the increment (or decrement) button once, the number increments or decrements once ... when you hold down the button it increments at a fast rate.  I'm left with the impression that it cannot be done with Labview PDA ... but I thought I would let it out to the community to see what you can do ... If this is not possible ... another option would be to detect which box has focus and increment and decrement that box (hours, minutes, or seconds) when the appropriate buttons are pressed (but using only the four buttons that are on the screen now, as usual with PDA apps - space is at a premium .. .and yes the buttons must remain that big)... but alas .. I don't think this can be done either .... if anyone has any ideas please feel free to post ... I'm at a loss.


BTW this is saved in 8.0.1 .. if anyone needs it saved as an earlier version, let me know

Thanks in advance
Greycat
0 Kudos
Message 1 of 8
(3,330 Views)

I can't see the code, but doing the short or long implementation should be fairly easy using a switch until released mechanical action (you can even do it in an event structure if you place a loop inside the value change case), but I don't remember whether the PDA module supports this action. Obviously, the buttons will have to be seperate from the control.

I believe that doing the focus thing should also be possible if you use the mouse down event to detect which control was clicked on last and increment that control.

BTW, since you're already playing with incrementing controls, my experience has shown that it's better to place them at the right side of the control (for right-handed people) to avoid hiding the control with your hand.


___________________
Try to take over the world!
0 Kudos
Message 2 of 8
(3,312 Views)
Hi tst ... Mouse Down Event and switch until released mechanical action are both UNsupported by the PDA module - I've tried already (actually running into a lot of things that are not supported and are very difficult to make work arounds) ... Good point about the location of the Increment buttons - they should be on the right hand side !!! .. .Thanks for the suggestion ... What do you mean you could not see the code?  You could see the front panel but not the code?  Interesting ... if anyone else downloads this, let me know if you have this issue as well?

Greycat
0 Kudos
Message 3 of 8
(3,307 Views)

a) I simply don't have LV 8.

b) The mouse down event was supported at least since 7.1 (If I remember correctly it wasn't for 7.0), but maybe that's only for picture controls.

c) If that's the case than you should be able to use a picture control as the button you click on. A mouse down will trigger the incrementing (you can change the event structure timeout or use a seperate loop with a flag) and a mouse up will stop it.


___________________
Try to take over the world!
0 Kudos
Message 4 of 8
(3,299 Views)
ah right ... the mouse down on the picture control is supported (at least as far as I have read)  .... hmm interesting ... I think that that might just work  ... thanks for the idea ... I'll try that out sometime in the next week and I'll post with how it goes ... thanks once again tst

Greycat
Message 5 of 8
(3,291 Views)
Ok ... I have accomplished this but have a mouse down event and mouse up event on a picture control ... all this does is simply set a flag to true or false (mouse down?) ... then I have the timeout event set at around 5 milliseconds ... it executes and adds the last flag to an array of 10 elements ... it then checks the array and if all elements are True, it increments by 10 ... if not all elements are True but the last one added to the array is true it increments by one ... if the last one added to the array if false it does nothing .... this works great for the auto increment function  ... but I have found that if I hit the picture control fast enough ... it doesn't register an event ... just remains with the flag false ... it should not do that. ... ny thoughts on the matter?  Any way to decrease the wait time?  Seems to take almost a whole second and the whole code halts  for that time?  Is this just the way the mouse down event works?  I haven't used it before.  And if the mouse down event is possible for picture controls, why isn't it possible for buttons and other controls? ... Given the fact that there is a limited latch capabilities of the PDA software this would help out alot.  Anyone from NI want to chime in?  Thanks

Greycat
0 Kudos
Message 6 of 8
(3,261 Views)

I have the same problem, event structures are not working for my PDA (labview 8.5). The Vi works perfect for my PC, so I think it is a bugSmiley Sad hope from labview know for it and fix it

 

0 Kudos
Message 7 of 8
(2,477 Views)

Hi Greycat,

 

I have attached a small example to do what i think you are trying to achieve. I have done it without using an event structure as i believe you are experiencing problems with this on a PDA. The example basically increments a button once if pressed once. If held it will increment at a set speed and then after an input amount of increments will switch to a second speed. Both speeds and the point at which they change are settable.

 

Hope this is along the lines of what you are after.

 

Regards,

 

Lucither.

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 8 of 8
(2,414 Views)