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.


Photo

U12 with VB express 2010


  • Please log in to reply
11 replies to this topic

#1 realolman

realolman
  • Members
  • 17 posts

Posted 07 January 2014 - 04:16 AM

I used a u12 several years ago, and I liked it. I  would like now to use it on two computers...  one with VBexpress 2010 and one with VisualStudio 2013.

 

1. will it work on these two computers and software?

 

 

2. I made some pretty elaborate stuff years ago, but I haven't used it since, and have completely forgotten how to get things from the labjack into variables in the program ( and vice versa ) ... I have been searching the web, but so far I  haven't found anything that seems to help. I installed it on the VB express 2010 computer,  and put the item in the toolbox and dragged the little oval onto a form, but now I'm brain dead.

 

I tried to look at a couple examples on the VS2013 computer and it complained that the file was read only and couldn't be modified.

 

if I could just get a few examples of reading / writing to a Digital IO and reading an analog input I'm sure it would quickly come back ...if someone would please point me in the right direction, I would sure appreciate it... thank you

 

 



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 07 January 2014 - 01:48 PM

1. The current U12 software we provide is compatible with Windows XP and newer, and should work with both VBExpress2010 and VisualStudio2013.

 

2. I'm not sure why you are getting the read only error. Perhaps in Windows explorer right-click on the example files, go to properties and uncheck the Read-only attribute and try reopening the project. Also, you may need to use the conversion wizard on your project when going from 2010 to 2013 VisualStudios.

 

If you were using VB .NET, you will need to download the .NET examples, copy the LJDotNet.dll .NET assembly and reference that in your program so you can use the U12 driver in .NET.

 

http://labjack.com/s...examples/dotnet

 

If your application is 64-bits, take a look at the details of the U12 installer as it provides a download for the 64-bit driver:

 

http://labjack.com/support/software

 

In the .NET examples the VBEAnalogIn demonstrates simple analog input usage and VB .NET usage. For simple digital IO look at the EDigitalIn and EDigitalOut functions. For a general programming reference and list of functions the U12 driver provides, take a look at the U12 User's Guide section 4:

 

http://labjack.com/s...2/users-guide/4

 

Other functions like DigitalIO and AISample  provide more advanced usage.



#3 realolman

realolman
  • Members
  • 17 posts

Posted 07 January 2014 - 02:41 PM

thank you  I will look this over  

When I tried to put the example in VS2013, it said it something about it being written with an older  version, and it was going to convert it to something newer, and I would not be able to open it anymore with the older version... then it said the file was read only. 

 

none of the attributes on the file (read only, archive, hidden ) were checked.

 

Course I just got this computer, and I have gone from XP to windows 8.1... so I'm pretty much lost anyway... I'm surprised the letters on the keyboard are still in the same positions ... uh oh  ...I probably shouldn't give them any ideas



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 07 January 2014 - 05:57 PM

So did it become read only in VS2013 during or after the conversion? Make sure the project isn't opened elsewhere making it read only, try converting/opening the project again and see if that helps. After conversion the project isn't backwards compatible with older VS versions, though usually an option to backup the project is available in case you need to go back.



#5 realolman

realolman
  • Members
  • 17 posts

Posted 08 January 2014 - 05:36 PM

for some reason, I can't seem to get the examples to work...  I think I'd just as soon forget them

 

the labjack enumerates.  How do I get it into the toolbox of a project in visual Studio 2013

thank you



#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 January 2014 - 12:31 PM

I haven't used VS2013 and we do not provide anything LabJack related for the toolbox. In general the toolbox should be located on the left of the designer window somewhere. If you can't find it, in older VSs you can make it visible using the View menu. Here are some links to help with VS2013:

 

http://msdn.microsof...y/jj153219.aspx

http://msdn.microsof...y/h8w79z10.aspx



#7 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 January 2014 - 02:06 PM

Looking at your last post again, it looks like I misinterpreted you were having a hard time finding the toolbox in general but the links provided are helpful for learning Visual Studios 2013.

 

As I mentioned, we do not provide a LabJack control or item for the toolbox. I am not sure about your project, but perhaps you made a control/item for the LabJack, or used an existing one and created an event for it whose code performs the U12 calls. For example, a button whose click event code reads an analog input from the U12.



#8 realolman

realolman
  • Members
  • 17 posts

Posted 09 January 2014 - 02:26 PM

Well I guess I must be all wet ... I thought that's how you did it...  Add the labjack to the toolbox and then put it on the form from there, and that made the commands etc available to the project.

 

sorry for being such a dunce ...honest,  I did make some pretty nice things with the U12 before... let me back up and start over .... 

 

 I would like to use my U12 with VS express 2013 and VB express  2010...    Would you please tell me, or point me to specific instructions on  how to go about doing that

 

thank you

 

 



#9 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 January 2014 - 02:57 PM

My first post with .NET and U12 driver documentation provided a place to start for people using C# and VB.NET. The .NET download's README.txt and usage.txt files provide information on using the LJDotNet.dll .NET assembly, and the examples provide example code. With the conversion wizard examples should work with VS 2010, though you will likely need to change the reference to the LJDotNet.dll assembly to the folder you have the dll at. I'm currently downloading VS 2013 to try out the examples and see if I run into the same problems you are.

 

Also, in your project your U12 code may be in a control's event code on your form. Have you tried looking at your form's code to find your U12 code.



#10 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 January 2014 - 03:28 PM

I tried the VBEAnalogIn example in Visual Studios 2013 without a read only problem. I opened the VBEAnalogIn.vbproj project, ran the conversion wizard and the LJDotNet.dll file was referenced in the example download's driver folder by default so that didn't need to be changed. The example ran in 64-bit mode by default on my computer, so I had to download the 64-bit driver and copy that dll to the \Windows\System32 directory. After that the example ran with no issue.

 

I guess another thing you can try is to download the .NET examples, unzip and run the examples in a folder in your user's folder or a folder that doesn't need admin privileges. Perhaps there was a permission issue in where you were trying to run the examples as it ran fine for me in my C:\Users\ME\Downloads\LabJackDotNet folder.



#11 realolman

realolman
  • Members
  • 17 posts

Posted 10 January 2014 - 03:26 PM

I dunno... I wish I could replicate that but I can't ... mine says that this version of visual studio only supports windows store apps



#12 realolman

realolman
  • Members
  • 17 posts

Posted 11 January 2014 - 07:20 AM

I'll tell you what.. this windows 8 and microsoft is about a mess...  I've been doing with this stuff ever since GWBasic and MS Dos 6 ( or whatever it was called )  The fact that you do not have to type every little dot and tittle is a wonderful thing, but they have gone too far.... It's pretty much impossible to tell what you're doing any more

 

I looked closer at things (and it wasn't particularly easy ) and I discovered that I had visual studio for windows, when what I wanted was visual studio for DESKTOP.  You know , I realized there was a  difference from the very beginning, knew which one  I wanted, and somehow I ended up installing the NON desktop thing, and it took me several hours here and on the web to figure out what was going on...  really intuitive, there Microsoft.

 

Anyway, now post rant, I installed the CORRECT visual studio and the VBEAnalog opens right up... thank you for your help, and I look forward to getting back into the I/O business... I liked your U12 very much in the past and I hope to be able to use it again, and some of your newer products as well.... largely because of how well it worked , but also largely because of stuff like this right here... knowledgeable patient support.

 

I thank you and I will study your examples ... (if I can find them again with this stupid OS )




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users