LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Multimeter display

Solved!
Go to solution

As it is shown in these two pictures, how can I display the value in LabWindows/CVI, need I use NI DMM? or which graph can I use in the user interface? I don't know how to make it, if you can tell me, thanks in advance! 

Snipaste_2019-03-26_16-41-30.jpgSnipaste_2019-03-26_16-40-38.jpg

0 Kudos
Message 1 of 8
(3,681 Views)
Solution
Accepted by topic author whily

NI-DMM is not required to interface with your instrument. You may either develop your own set of functions to communicate with the DMM over the serial port using the instrument documentation or use a specific driver available for CVI, that you can download from here

Both ways imply the use of serial communications so you will need a serial port available in your system.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 8
(3,657 Views)

Thanks, I want to develop my own one, then here comes the problems:

 

How can I make into the number like 8.8.8.8.8. in square form like the picture.

0 Kudos
Message 3 of 8
(3,651 Views)
Solution
Accepted by topic author whily

Edit the numeric indicator and use NI 7SEG font:

 

Screenshot 2019-03-26 15.00.40.png



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 8
(3,644 Views)

WOW, you help me a lot.

now I run into another problem:

 

There is a SHIFT button which activates the second function of other buttons.

After pressing SHIFT button, and press another one's second function, how to make all the other button return to the original status? it means only make SHIFT work one time, so which function should I use?

 

And, how to detect I'm pressing a button for more than 2 seconds?

 

Thanks, so nice you are!

0 Kudos
Message 5 of 8
(3,639 Views)
Solution
Accepted by topic author whily

As far as I can understand, you are trying to replicate on the PC the exact behavior of the instrument, but in my opinion you will not succeed in this task completely since we are speaking of really different hardware and software. You must consider that some item will necessarily be different between the two boxes.

 

Having said this, I can think to at least two different approaches to address your first question.

 

Solution #1: Use a toggle button as SHIFT control. In the callback of every button that you want to have a double function test the value of the toggle and operate consequently (eg if toggle = 1 do the alternate function, otherwise do the regular one). At the end of each control callback force the value of the toggle button to 0.

 

Solution #2: When pressing the toggle button iterate on all controls and install a different callback for the alternate function. At the end of each button callback restore all original callbacks

 

Of course you will need additionally to modify the button labels to show the appropriate text for original or alternate function.

 

 

Detecting a long click on a button is one of the things that you cannot easily replicate in my opinion. I can't even offer you a feasible solution for it at present: it is possible that it can be replicated playing a bit with button events and/or extended mouse events, but will it worth the effort?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 8
(3,619 Views)

@RobertoBozzolo Hi, I've used the first method and it works fine. Thanks!

and I finally can't work out the long click problem, I don't know how to use mouse events, here is the problem.

 

When I click HOLD/THR button, it appears HOLD on the screen,

and when I click HOLD/THR for more than 2 seconds the next time, HOLD disappears from the screen.

Snipaste_2019-03-27_21-45-34.jpg

 

Snipaste_2019-03-27_21-56-26.jpg

Is it

EVENT_LEFT_CLICK_UP or EVENT_LEFT_CLICK  

I don't know if I should use them, but won't work.

Thanks in advance!

 

0 Kudos
Message 7 of 8
(3,605 Views)

This is exactly one point where in my opinion you should design the PC program differently from the instrument: you could for example add a toggle on the UI with hold /free meaning.

 

BTW checking for EVENT_LEFT_CLICK while you are handling EVENT_COMMIT is nonsense Smiley Wink



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 8
(3,592 Views)