02-07-2008 09:29 AM - last edited on 02-19-2024 10:34 AM by migration-bot
Hi everyone!
Is there any possibility to use the NI-8451 (USB-I2C/SPI Interface) with Visual Basic 6? Are there some Code examples?
According to the product-site only LabVIEW, LabWindows™/CVI, and Microsoft Visual C/C++ 6.0 are supported....
I hope, someone can help me.
Best regards
Simon Keller
Switzerland
02-11-2008 08:32 AM
05-10-2012 04:02 PM
I can't see the contents of the website,Provide you with web sites
07-14-2013 11:19 AM
I use the VBA interface in Excel to control the USB 8451 device. Excel acts as a very good user interface for the type of automation, testing, and post-processing I need to do as an engineer. Originally I started trying to create functions in Visual Basic that would call the C functions. Calling the functions directly would allow me to control the USB 8451 directly using the Visual Basic code. Unfortunately my lack of knowledge about how to properly call pointers in Visual Basic ended this effort. Even if I knew how to call functions, It would have probably been too large an effort to justify my usage. So I went off into another direction...
I started with the C language examples and created executable files that could be passed command line arguments to setup all of the options I need (I think I ended up using around 20 arguments). I only deal in small sets of data that control digital attenuators and DACs, for example, so I only needed to send a few bytes of data - which I also passed to the executable file as options. I then used Excel VBA to create a user interface where I could select the parameters in Excel, create a batch file with these options, and call up a command window to execute the batch file. This worked great!
Hope this helps someone else that might be wanting to do something similar. I looked everywhere for a Visual Basic wrapper or something similar that would allow me to code something directly. Unfortunately I work under a tight schedule, so I had to go in a different direction quickly to get results faster.