03-26-2019 03:46 AM
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!
Solved! Go to Solution.
03-26-2019 06:34 AM
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.
03-26-2019 07:21 AM - edited 03-26-2019 07:45 AM
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.
03-26-2019 09:08 AM
Edit the numeric indicator and use NI 7SEG font:
03-26-2019 10:12 AM - edited 03-26-2019 10:15 AM
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!
03-27-2019 04:25 AM
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?
03-27-2019 08:57 AM
@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.
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!
03-27-2019 05:18 PM
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