12-10-2010 05:42 AM
When the app is running, and you first click this control, it takes 2-5 seconds to respond and populate the list for the first time.
Therefore, I want to auto populate the first time the application is loaded. Can I do this?
Solved! Go to Solution.
12-10-2010 07:21 AM
Before allowing user to click & select the VISA resource name, first use the "VISA find resource" in your programm to do the same & then allow or prompt user to select resource.
Since when EXE loads, it will execute the FIND VI first & will inform Labview about available resources.
12-10-2010 07:21 AM - edited 12-10-2010 07:21 AM
Kudos are welcomed.:-)
12-10-2010 07:57 AM - edited 12-10-2010 07:59 AM
I have found that VI, but it outputs an array of strings; how do I update the control with that? Or is this not needed
EDIT: Well I found I dont need to do anything with the output, it works fine 🙂 Thank you!!
12-10-2010 09:20 AM
Well I have to come back to the original question: the find VISA sub vi works only when not building an executable.
Running the exe gives the same 2-10sec freeze when clicked for the first time
02-24-2011 09:10 AM
Hey _Faust,
I was just curious to know if you found a solution for this problem.
I also wanted to revive this thread to see if anyone else can help.
I've had the same problem on many applications (EXE) and haven't found a fix.
Regards,
James
02-24-2011 09:13 AM
The best way to handle this is to use a regular dropdown control, such as a combobox, rather than the VISA resource control. You then populate the dropdown at the beginning of your program with the output of Find Resource.
02-24-2011 12:19 PM
I will try this, thanks for the input
02-27-2011 03:25 PM
_Faust,
I haven't found any method to accelerate LV finding the resources.
IMHO, I think this long delay is a LV bug that needs addressing.
However, I'm using smercurio_fc's suggestion of populating a Combo box. I use a parallel loop to allow for other program function and interaction while the VISA Find resource.vi takes its sweet time updating the list of available ports. Just thought I'd share how I update the control to prevent user delays and confusion.
Regards,
James
01-04-2013 09:58 AM
Hi,
I'm joining in here since the thread addresses delay problems when using VISA resources.
I would like to share my experience when using VISA on real-time targets.
The hardware I use is a cRIO NI-9074 with two NI-9870 (4 x RS232 each) and one NI-9871 (4 x RS485). These modules are used in scan mode to avoid excessive port programming in FPGA.
My first problem was that the twelve COM ports of the NI-9870/9871 modules did not show up in the list of available VISA resources when placing a VISA resource control on the front panel or a VISA resource constant on the block diagram. However, the workaround using "VISA Find Resources" seemed to work fine. When starting the real-time program from the development machine, the list was populated and by indexing the list I was able to use the port.
BUT: When building an RT executable from this VI, deploying it to the RT target and setting it as startup, nothing happened. It took me some time to find out, that there has to be a significant delay (in my case about 10 s) before calling the VISA Find Resources function. Otherwise it will not give the correct output. By some reasons, the ports do not seem to be available when the RT startup application begins to run. I tried to play with the delay and found out that the resource list would be empty when calling the VISA Find Resources function almost immediately on startup, after a few seconds it would return the ports of the first NI-9870, after seven seconds the ports of two modules, and after about ten seconds all ports would be available.
I would appreciate if somebody could tell me what happens since it was quite a pain in the ass to solve this issue.
Best regards,
Karsten