Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


starting with VB.net 2012 and U12

VB.net U12

  • Please log in to reply
4 replies to this topic

#1 optics22000

  • Members
  • 3 posts

Posted 12 August 2013 - 12:52 PM

My last experience with VB was VB6 back in the day.  VB.net is different.....   I'm trying to get the sample programs running; they seem to freeze VB, the screen greys out.  Is there something I should be looking for?

In addition to the U12, I'll need to be doing some serial port port (RS232)  any words of wisdom regarding serial port access (not necessarily through the labjack) will be greatly appreciated.

Are there other VB.net samples I could try?

Thanks in advance.


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 August 2013 - 03:17 PM

Which examples are you using?  They should be the ones from here.


The U12 does have some UART support.  For info on that you want to start with the functions Asynch and Asynch Config.  If you have any questions about how that works we should be able to answer them for you.

#3 optics22000

  • Members
  • 3 posts

Posted 12 August 2013 - 03:41 PM

Yes, those are the ones I tried.  The notes around them made me suspect that they haven't been updated in a while. It's possible that they worked with older versions of VB.net and don't work with current version, now available in a 2012 version.  They change details of VB.net with every new release.

What I did was unzip the file, open VB.net and try to open VBEAnalogIn.vbproj

Does it matter where the files were unzipped?

Thanks once again.

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 13 August 2013 - 01:52 PM

It doesn't matter where the examples are unzipped. When you open the example's project, make sure you upgrade the project and solution in Visual Studios 2012 ("One-way upgrade"). Then in the project add a reference to the LJDotNet.dll .NET dll in the driver folder. This part is mentioned in the README.txt. Note that you may want to copy this dll to a common and easily accessible directory and add the reference to that directory as that is where the built program will search for it.


The examples were built in an older version of Visual Studios and do not account for a default 64-bit build. If you are running the examples on a 64-bit version of Windows, it defaults to a 64-bit build (Any CPU) and cannot use the 32-bit U12 driver installed by the installer. Either go to the "Configuration Manager" and add a new x86 Platform for a 32-bit build, or install the 64-bit U12 driver:




Copy the dll to the \windows\system32 directory.


I tested the above and got the examples running with no issues in Visual Studios 2012 Express and VB .NET.

#5 optics22000

  • Members
  • 3 posts

Posted 14 August 2013 - 04:50 PM

Thanks for the tips.  I did as you suggested and tried an example which works.  Step 1 completed.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users