Moving Daqfactory To Windows 7 From Xp


Recommended Posts

In view of the recent discussions about termination of support for XP I decided to move my programs to a Windows 7 environment from XP where they are running happily at the moment. I moved across DAQFactory (Trial edition to start with) and transferred my ctl file and Persist file. Installed the Labjack drivers, connected the U3 and data was being received. However, I was unable to get any of the Reset routines I had created to run. I attach the ctl file for interest. Below is a typical reset routine that I use that when triggered reset the value.

 

1.dailyDry_BulbMax = -10
2.dailyDry_BulbMin = 20
3.dailyGrassBMin = 80
4.dailyBlackBulbMax = -20
5.dailyBlackBulbMin = 30
6.dailyConcreteMin = 30
 
I wonder if you could give me some advice as to why they may not function in Windows 7 Ultimate? Hopefully, I will not have to re write everything again. I am sure it will be something simple but I really would value your help.
 
Thanks
 
Mike

LabjackWeather2.ctl

Link to comment
Share on other sites

I'm guessing that your startup sequence never ran, or more likely it failed on the include() because the path to your LabJack driver is different on the new machine.  You don't have any error handling in place, so an alert would show and the sequence would stop.  But then your variable declarations would never be reached either.

Link to comment
Share on other sites

Thank you for your quick reply. Indeed the startup sequence never ran and thus the variables were not declared. I have changed the path to the Labjack driver for the new machine, but it still does not run. I suspect I may be pointing at the wrong one. Which driver should I point at please?

 

Thanks

 

Mike

Link to comment
Share on other sites

I am not getting any error message at all . The program works fine apart from not running the Startup and thus not declaring the variables. I have changed the code to

 

include("C:\Program Files (x86)\LabJack\Drivers\64bit\LabJackUD.lib)

 

but that seems to make no difference either. I wonder if I write a dummy program from scratch if that will tell me which way to go? Really not certain here at all.

 

Mike

Link to comment
Share on other sites

include() isn't for lib files.  Its solely used to load the header file to bring in constants.  You need to point it to a .h file just like you did in the document you posted.  Make sure you can find the labjackud.h file in the specified location.  If it still doesn't work, put a breakpoint at the first line of the startup and step through the code until it fails.

Link to comment
Share on other sites

OK. Thank you started slowly going through that sequence and finding problems later on, away from the drivers on ePut. Seems there is a lot of work to be done to make it work. I will let you know the outcome eventually when I have sorted it.

 

Thank you for your guidance.

 

Mike

Link to comment
Share on other sites

If you look at DAQFactory examples from labjack.com you should see the following at the beginning of the startup sequence in each:

 

using("device.labjack.")
try
   include("c:\program files (x86)\labjack\drivers\labjackud.h")
catch()
   include("c:\program files\labjack\drivers\labjackud.h")
endcatch
Link to comment
Share on other sites

There shouldn't be changes required on the DAQFactory for a switch between OS's.  If there are problems, its really most likely due to changes in the LabJackUD, specificially the header file.  Also, I don't know if LabJack compiled up 64 bit drivers, but you have to use 32 bit versions with DAQFactory.

Link to comment
Share on other sites

Sorry for the delay but work gets in the way of things at times. I am finding no errors when running  debugging program on it. I included your new code above as well with no change. Re downloaded the Labjack Drivers and installed them, and also tried copying across the drivers from the XP machine in case. all to no avail. Currently I am getting an error of C1000 channel or function not found. I have incidentally checked the channel number for the Labjack using their software and it is on channel 0. Manually changed the route in Startup to point at the Labjack h driver. Nothing has changed at all. Is there a file I need to carry across which will include the variables I state in the Startup sequence?

 

Thanks

 

Mike

Link to comment
Share on other sites

The message occurs when I press the View/ Command/Alert buttons and is read at the bottom of the screen. I have just tried to reproduce it again and I now get

 

03/09/14 21:55:43.015

Channel Error Timing = 1.00, Offset = 0.00: D0050:00:0016 LabJack Device #0 error: Request made on pin not properly configured for analog/digital

03/09/14 21:55:43.021

Channel Error Timing = 1.00, Offset = 0.00: D0050:00:0002 LabJack Device #0 error: Invalid channel number

 
 
I checked the channel number earlier for the Labjack U3 and it is indeed on channel 0!
 
Thanks
 
Mike
Link to comment
Share on other sites

The problem is that you have counters on channels 0 and 1, but you also have A to D channels on 0 and 1.  The LabJack U3 shares these pins, so its one or the other.  If you are using the two counters, your A to D channels have to start at 2.

Link to comment
Share on other sites

i thought that is what I set up. I will re check. Strangely though the whole thing has started working perfectly since my last mail. not sure why as nothing changed other than what I have already mentioned. It works and I am happy, so it must be you have a magic wand somewhere.

 

My grateful thanks to you for your patient support and help.

 

Mike

Link to comment
Share on other sites

It may have to do with the pin configuration at the time of start.  Also remember that not all error messages are actually of concern.  Some may appear at startup but then not appear again.  For example, pin configuration problems.  You may get a pin config error, but then DAQFactory will change the configuration and that will be the end of the error.  With errors associated with channels like yours, the ones of concern are the ones that repeat every channel read, so you get error after error.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.