Discussion:
NI-USB-6501 / NI-USB-6509 and Java
(too old to reply)
SanderG
2008-06-16 13:40:09 UTC
Permalink
Hi, I'm developing a application in Java that lets a user create a combination of outputs, and set them to high and low.Right now, i'm using experimental boards of Velleman. With JNI (Java Native Interface), I can control the DLL's supplied with these boards, and I'm able to set outputs low and high how I want it. However, I'm look for an alternative, since I need lots of outputs (40+). I stumbled upon the 6501 and 6509 boards, and they seem very interesting for my needs.However, I would like to know if these boards can be accessed and programmed with Java. Does anyone have experience with these boards in combination with a Java-based application ? I suppose the DLL's are shipped with the modules?Another question: the 6501 seems to suit my needs perferctly. If I want more than 24 inputs/outputs, is it possible to do the following ? Instead of buying the 6509 board, can I just buy a few 6501 boards, hook them up to USB ports, and still access them through software _independantly_ ? It would be more price-efficient to buy a few 6501 boards than to buy 1 6509 board. Thanks in advance for your advice and help,Regards,Sander Goossens
demux
2008-06-17 14:10:10 UTC
Permalink
Greetings Sander, The NI devices you are referring to indeed come with *.dll's which you can address from JAVA. They don't come with a Java driver however. More information can be found <a href="http://digital.ni.com/public.nsf/allkb/802A9D349090D3F5862565CC0076BCF9?OpenDocument" target="_blank">here</a>. The second part you are inquiring about is also possible. The different USB devices that you hook up will automatically receive a different name in the Measurement &amp; Automation explorer. This name is what you later use in the function calls to define which device you are referring to. Kind Regards,Wouter<a href="http://digital.ni.com/worldwide/belgiumdt.nsf/main?readform" target="_blank">NI Belgium</a>
SanderG
2008-06-18 18:40:10 UTC
Permalink
Hi Wouter,Thanks for your reply. Good thing to know that NI acknowledges compatibility with Java! I assume that some code samples are shipped with the module ? However, the thing is that I am completely unfamiliar with C programming. I guess I woud need to write my own "ni-usb-6501.c" file that interfaces between java and the dll ? Do you know a guide that could show me the way, or, does anyone have the necessary C-code for this module ? I'd be very greatful if someone could provide me some sample code for this module, or shed some light on how to start this off.The "Measurement &amp; Automation explorer": is this a software that is shipped with the module, in which you can see which device has which unique name ?Thanks for your help,SanderMessage Edited by SanderG on 06-18-2008 01:27 PM
Spacetronics
2008-07-02 12:10:10 UTC
Permalink
Hello Sander, When you buy a data-acquisition board of NI, it comes with the driver NI-DAQmx, which includes the necesarry DLL's for you.Secondly, it will also provide you with the "NI-DAQmx C Reference Help", a Windows help file which explaines how the access the DAQ board's functions and configuration.It also comes with examples. Additional examples can be found on ni.com/examplesThe Measurement &amp; Automation Explorer (short: MAX) is also configuration and test tool for the NI Devices.Here you can configure your device and create measurement channels which you can call from your application.Of course we cannot learn you how to program in C or Java.We can only point you to some NI recommended reading: http://zone.ni.com/devzone/cda/tut/p/id/5065If you need some advise on which product would best fit your application needs, please contact your local NI Branch: http://www.ni.com/contact.Success with your application.
Continue reading on narkive:
Loading...