LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview floating point and decimal differentiation

Solved!
Go to solution
  • All your buttons should be "latch when released" (mechanical action).
  • Your events should all be "value changed" event, not "mouse down".
  • Your timeout event is pointless because a timeout never happens. Remove it!
  • The "output indicator" needs to go before the event structure so it correctly resets when the VI starts (currently it will contain stale data until at least one event has occurred).
  • An Enum would be more appropriate that a string/combo-box to carry the operation type.
  • You can set the format based on the last operation.
  • Too much duplicate code, e.g. why do you need two "." string diagram constants right next to each other. wouldn't one be sufficient?
  • etc.
0 Kudos
Message 11 of 35
(552 Views)

Hi, can anyone tell how to connect all the vi for keydown? event. I have no idea on how to make the numpad functional.

0 Kudos
Message 12 of 35
(531 Views)

Hi tan,

 


@tan99323 wrote:

Hi, can anyone tell how to connect all the vi for keydown? event. I have no idea on how to make the numpad functional.


You don't need the "Keypress?" event, the plain Keypress (without question mark!) is ok too:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 35
(517 Views)

Can i know what type def did you make for both enum ? I have tried and still unable to input from keyboard number.

Download All
0 Kudos
Message 14 of 35
(509 Views)

Hi tan,

 


@tan99323 wrote:

Can i know what type def did you make for both enum ?


LabVIEW basics: to create constants/controls of the same type you  just right-click an input/output/wire and select create->constant.

That enum is supplied by LabVIEW, no need to create your own!

 


@tan99323 wrote:

I have tried and still unable to input from keyboard number.


When you press any numpad key you should get the corresponding ASCII values, like any numbers or +-*/…

You still need to handle this in your VI correctly, like concatenating larger values from several numbers!

 

(Hint: I would probably handle numbers using numeric datatypes instead of using strings.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 35
(505 Views)

I have make the keydown event similar to what in cluster 0-9 case. Any mistake or which property node should i add ? The number do shown in display but I cannot perform any operation.

0 Kudos
Message 16 of 35
(513 Views)

Hi tan,

 


@tan99323 wrote:

I have make the keydown event similar to what in cluster 0-9 case. … The number do shown in display but I cannot perform any operation.


You cannot "perform operations" because you made it similar, but not the same…

 

What's the point in concatenating the numeric input (via numpad keypress) with the intended operation string?

 

You really start with creating a sketch of your algorithm on a sheet of paper!

You should think about using proper datatypes for each item: numeric datatypes for numeric data, (typedefined) enum for the operation.

You should cleanup the block diagram to use straight wires, at least. This really helps to understand the block diagram and can help to prevent silly errors while wiring!

 

You got so many comments for improvements so far, but it seems you didn't take any of them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 35
(507 Views)

I did follow all the steps above, and I have adjusted the keydown event and it is basically same as cluster 0-9 event currently. Just lack of the property node as (booltext-text) in the cluster event. So it cannot hide the operation as I input any from numpad.

0 Kudos
Message 18 of 35
(502 Views)

Hi tan,

 


@tan99323 wrote:

I did follow all the steps above, and I have adjusted the keydown event and it is basically same as cluster 0-9 event currently.


No, it is NOT THE SAME!

In the ValueChange event you use different inputs for ConcatString as in the KeyPress event case!

 

Until now you did not "follow all the steps above", not even for using straight wires…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 35
(493 Views)

Keydown event : Can I know why I only can input single number from numpad? how to have more input ? like 13

0 Kudos
Message 20 of 35
(453 Views)