From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-19-2018 04:07 PM
Hi
I have a VI that communicates with MG17 motors using activeX controls. All the nodes are wired to error clusters. We sometimes have communication issues with the motors, but instead of generating an error in the Error Out cluster, LabVIEW itself throws an error. This is frustrating as after I close the window, LabVIEW keeps running the program with "no error" in the output wire, which necessarily makes it run into more errors in the same way. This makes it impossible to handle the error in the VI itself, and when incorporated into larger VI's, the only way to recover it to shutdown LabVIEW from the task manager and restart. Any ideas? I attach the code we use. Initializemotors calls TLMotorStartCtrl and TL error.
Thanks!
Solved! Go to Solution.
01-19-2018 04:23 PM
It's been a while since I used this code but I think if you run the function "EnableEventDlg" and set it to False for every motor it'll stop the popups.
I think we also set it up where we either registered for error events and then checked for that occurring regularly, or we set up the MG17Logger object and checked it for Error entries in the log.
01-19-2018 04:36 PM
Worked! Thanks!
10-25-2018 11:31 AM
Greetings Kyle and Ronen!
Would you please elaborate how you were able to access the EnableEventDlg method? I need to disable it so that the eventlog doesn't pop up but I can't seem to find this method in the MG17Logger or MG17System ActiveX?
10-25-2018 01:25 PM
The version of the ActiveX control I used is not the most recent version, so this may be different now, but it's on a "per motor" basis, not the system in general:
1. Add the ActiveX control to the front panel (use this guide, page 18 if needed)
2. Using the terminal on the block diagram that corresponds to the control, create a property node to write the serial number to ("HWSerialNum")
3. Create an invoke node for the StartCtrl function
4. Create an invoke node for the EnableEventDlg function and wire a False constant to the input
5. Repeat for each motor you have
6. Do everything else in your program
10-25-2018 02:30 PM
Thanks for your prompt reply. I am not seeing the EnableEventDlg method for either MG17Logger or MG17System controls. According to the APT Server help file, this method should be a part of MG17System control.
I was able to find the method as part of MG17Motor control so can do your steps 2-4 if the program finds a connected motor. Wanted to disable the EventDialog even if there was no motor found at startup. But for now, this will work. Thanks again.