Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamping of left mouse clicks in Windows

I need to get the Windows XP system time when the left mouse is clicked while the cursor is placed over one of the control buttons created in Labview.  The system time and the proper button description pair will need to be sent over the LAN to a National Instruments FPGA module (NI 7833R) for data logging.  The NI Labview software was used to place button on the screen VI.  Again, the pair needs to be generated when the left mouse button is clicked while the cursor is placed over the Labview button.   

I am sorry to say that I am very new at this, so I will not understand a very technical explanation.   Don

0 Kudos
Message 1 of 9
(3,911 Views)
DL Novice,

Please take a look at the attached example. This VI uses an event structure to capture when user presses a button on the front panel. Once the user hits the button, the program will aquire a timestamp from the Windows system time. You can then send this using a DMA FIFO. I am not sure why you mention sending it over the LAN, but if you are using a PCI card it is all internal in the PC. Please look at the following document that shows you how to use DMA channels. http://zone.ni.com/devzone/cda/tut/p/id/4534


Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(3,886 Views)
Eli,
Thank you for the reply.   We have the NI chassis next to the equipment it is monitoring and the host computer in the control room one floor below so the controllers can use the keyboard and monitor with  the Labview application on it.   The connection between the NI chassis and host computer is via LAN. 
 
I am new and just started supporting this system that was installed a couple of years ago.  Our team is just trying to add functionality.   If you ask specific questions I may be able to give you more information in which to give me more advice. 
 
Thanks for the help so far.
Don
0 Kudos
Message 3 of 9
(3,872 Views)
DL Novice,

So if I understand correcly, you have your NI 7833R in a PXI chassis which is connected on a network with your regular host computer. If this is the case, you have to make a VI similar to what I have created above that will run on the host computer but instead of sending it to a DMA FIFO, you will be sending it to the controller on the PXI chassis. In order to send the time-stamp to from the host to the PXI-controller, you can either use TCP communication or shared Variables. You can find examples that show you how to do both of these on the LabVIEW example finder. To get to the example finder in LabVIEW go to the Help Menu and click where it says Find Examples... Once you are in the Example Finder click the Search Tab and then type Shared Variables.  The first result you find is called Shared Variable Client-Server.lvproj. Go through this example as it shows you how you can accomplish what you want using shared variables, which I consider is the simplest way to do it.
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 9
(3,847 Views)

Eli,

I think you understand me correctly.  However, to understand your suggested solution I think I need more NI training.  I have only had: an Intro to LabView 6 hours CD- Sep 2003 edition, and attend a one day workshop called "Build a complete Automated test system in 3 hours using LabView".  The courses I am currently thinking about taking in the next several months are:  LabView Basics I, LabView Basics II, LabView FPGA, and Data Acquistion and Signal Conditioning.  

My questions to you are: 

In order to gain the knowledge to understand the solution you suggested above, are these NI courses the best way to spend $3500?  

Or, in your opinion, are there other courses I should consider?

Thank you so much for your help,

Don

0 Kudos
Message 5 of 9
(3,822 Views)

DL Novice,

I think it is a really good idea to consider formal training. I realize that these courses can be somewhat pricey, but the benefits in the long-run far outweigh the costs. The LabVIEW Basics I & II are pretty extensive classes and cover all the basic LabVIEW programming techniques. I really think that these two courses are very important to take if you are going to be developing any type of LabVIEW application.

As far as the Data Acquisition (DAQ) and Signal Conditioning courses, they cover important DAQ concepts in general but they are geared towards our DAQ boards and not really the FPGA board you have. The FPGA course teaches you more about FPGA programming and not so much about DAQ. If you are going to be doing DAQ with FPGA boards I think that taking both of these courses would be very helpful.

If you have more questions you can call our Customer Education Department and they can answer more specific questions. The number is (800) 531-5066. You can also post more questions here and I will be glad to help you out as much as I can.

Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 9
(3,799 Views)
Hi Eli,
 
I do have some more questions:
 
I am signing up for the four courses right now.  Are there any additional courses that would be helpful to me for being able to do the solutions you recommended? 
 
Other than being the simpliest way, do shared variables have any other advantages over TCP?
 
I tried to find the examples you referenced but could not find them.  Here is what I found:
 
 
Could you send me a link that would get me directly to the examples?
 
Thanks again for the help.
DL
0 Kudos
Message 7 of 9
(3,787 Views)
 

Not trying to but in but have you considered the NI Training and Certification Membership program? I might be worth the cost if you are going to take alot of NI courses.

https://www.ni.com/en-us/shop/product/training-membership.html

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 8 of 9
(3,784 Views)
DL Novice,

The examples I mentioned are NOT online. The example finder is actually part of LabVIEW so it is in your computer. To get to the example finder, go to the help menu IN LABVIEW and click where it says Find Examples... Once the Example Finder comes up click on the Search Tab and search for Shared Variables.

As far as advantages, the only real advantage of using shared variables is the easy of programing and implementation. They are really quick to set-up. Functionality-wise, using lower-level TCP will actually give you a better performance.

Also, as mentioned above, signing up for the program is a really good deal because it costs almost as much as one course, but you can take unlimeted amount of courses for one year. You should really call our Customer Service department and find out more about all the options available to you.
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 9
(3,768 Views)