jthienelParticipantjthienel November 18, 2015 at 1:58 pm
Does anyone have a suggestion on how to restart a stuck DLL when using Labview? Problem I am having is when I lose connection to a SA124B, for example during a trace request. I cannot regain control of the analyzer through the DLL.
Second question. Is the serial protocol for the SA124 published anywhere then I could go direct to the USB port and reset the connection to the analyzer with out having to use the DLL.
Any suggestions would be appreciated.
Justin CrooksModeratorJustin Crooks November 20, 2015 at 11:16 am
Have you tried closing the device and re-opening it? If you are using the Spike API, this will likely work. With the older API, I believe there is a SHAPI_CyclePort or similar that should accomplish the same thing.
rmasoParticipantrmaso February 1, 2016 at 12:29 pm
In case anyone else is looking at this type of problem, I implemented a fix as suggested above by Justin.
I was concerned about the accidental disconnection of the device and the USB cable. Using the LabVIEW wrapper VI’s submitted by someone else on this forum, I would monitor the error lines for the 5010 error. When that was detected, it would close the device, wait for the cable to be plugged back in (by repeatedly asking for serial numbers of connected devices), then try the connect and initiate/setup commands again. This works terrifically! The only thing to note is that as written, the VI to close the device only runs when there is no error, so you can’t pass the 5010 error cluster to it as it is currently written. I chose to just pass an error constant to the VI to make it always run.
I tried this method over and over and it ran flawlessly (after working out the above error issue).
I know this is an old thread, but hopefully it’ll help someone somewhere!
Thanks to Justin and Andrew for their help with my program.
You must be logged in to reply to this topic.