12-22-2009 05:15 PM
I have a program that is supposed to take input from a joystick, and output a series of RS-485 signal to control devices. It works fine when I run it on the computer I am programming on, but when I build an installer and put it onto a computer without Labview (other than what the installer puts in), it does not take input from the joystick anymore. It also does not seem to be correctly reporting errors related to the joystick (it should throw an error when I choose an invalid joystick index, and with only 1 joystick, it should be index 0, but for some reason, I can put any number in there, and it is not erroring, despite the fact that no joystick exists at that index after it is queried. Is there some additional installer that I should include when building the installer?
I am currently using Labview 8.2.
Thanks
12-22-2009 07:03 PM
12-23-2009 03:15 AM
The driversfor the joystick are in a seperate dll. Normally, the Application Builder automatically includes them in the data folder. I don't remember the name of that dll. Can you check the data folder that is generated when compiling into an exe, which dll's are present? And check if they will be installed, if you run the installer.
Maybe a search also will give you a hint about the dll's name.
Felix
12-28-2009 05:22 PM
My appologies for the delay in replay, but with the holidays and all...
Anyway, the only DLLs I see in anything that is generated, are NISysInf.dll and customResource0009.dll. Not really sure why it has such a vague name, but that is what was there. As for the RS-485, it is via a USB to RS-485 unit which is installed and working with other RS-485 utilizing programs, including other labview programs, and to go with it I have bundled NI-VISA. Normally it would error if I put it on a comport or joystick that does not exist, but when I put it on a comport with a nonsensical name and joystick index 8, neither seems to complain, and they still do not work correctly with correct values. The part that does not make sense is that it works on the computer I am writing it on correctly, just when I install it from a built installer does it not work (which makes it a pain to debug when uninstall and restarting multiple times to test an attempt to fix it.
The other possible information that I can think of that might help was that this program may have been written in Labview 8.0.1, not the current labview 8.2 that I am using (I am editing some code somebody already wrote in our company, so I do not have all of the information about its development. I'm still rather new to Labview, so I'm not sure how to check if such is so, and if that might be causing the errors.
So to summarize, what would cause no errors to be thrown, when it obviously is not detecting the com port or joystick correctly, and to work only on the development computer fine and not on a fresh comptuer.
12-28-2009 05:54 PM
First, on the pc without LabVIEW, make sure you install MAX so that you can use that to verify that NI-VISA is installed and that the com ports are listed.
Without seeing your code and knowing how you've written your error handler, it's impossible to say why you are not getting any errors reported.
When you created the exe with 8.2, any older VIs would have been converted so the original version is not relevant.
12-29-2009 05:41 PM
I installed MAX and NI-VISA is installed and shows up correctly in MAX. However, no com ports are listed. If I have NI Visa installed, and the windows device drivers are installed, why can it not see them?
As far as I know there are no specific NI drivers available for the USB-to-RS-485 device I'm using, but I have used it before in other programs, and as far as I know, the VISA was supposed to handle that after the windows drivers are in.
12-29-2009 10:57 PM - edited 12-29-2009 10:58 PM
12-30-2009 02:14 PM
It is an ADAM-4561 from Advantech. It does show up in my device manager and shows it mapped to a specific COM port. I was using VISA 4.3 originally.
I did get MAX to show it, apparently it cannot use the runtime only to list them, so I installed the full version of the latest version (4.6). I can now see the COM Port in MAX, however it still does not work correctly in the program. The computer that I am trying to get this working on is running Windows XP.
12-31-2009 04:15 PM
01-04-2010 03:59 PM
1. It does seem to opperate correctly on the development machine.
2. Here's where things get interesting. I made a debuggable exe, put it on the target machine, and it works almost perfectly. The issue I would have been trying to debug was no longer present. I changed it into a normal exe, and it seems to be the same. First and foremost, can you think of any reason why it would not work with an installer, but work just fine as a stand-alone program (With the Labview 8.2 and NI-VISA runtime installed separately)?
It does have one issue. The program will occasionally lock-up, take 100% or at least near maximum CPU (can only see it when control is regained, and you see the program jump to the top of the CPU usage list in the windows task manager, and then it settles down). This does not happen on the development machine either. Nothing particularly special is going on when it freezes. It usually does so when I am moving around the joystick, but it is entirely random about when it starts, and it has happened when I was doing other things (changing selections in combo boxes or switching tabs in the program). I can move the joystick randomly and nothing happens for 20-30 seconds, but eventually it does usually freeze up.
3. Have not tried this yet on the installer version of the program, and am not sure exactly how to.