01-10-2007 09:35 AM
I don’t normally ask for others to problem-solve a VI for me, but I have hit an impasse on this relatively simple VI. Seemingly randomly, the program, while running, will cause Windows to freeze. There is no reaction from the keyboard, the mouse, CTRL-ALT-DEL, etc. I must do a hard-reboot in order to do anything.
Moreover, due to the nature of the “crash,” I have a difficult time using highlight execution, etc to find the problem. I therefore ask that if anyone has a few minutes, if you could look over the block diagram to see if there is anything that might cause a memory allocation error or something that would be powerful enough to cause Windows to freeze. I know there are others who have had somewhat similar troubles, but they don't seem to be quite the same thing.
A few stats:
.exe
of the same program.Event Type: Warning
Event Source: EventSystem
Event Category: (54)
Event ID: 4353
Date: 1/10/2007
Time: 8:54:23 AM
User: N/A
Computer: RSNDZZ062003188
Description:
The COM+ Event System attempted to fire the EventObjectChange::ChangedSubscription event but received a bad return
code. HRESULT w s 80040201.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp
Event Type: Information
Event Source: NI Variable Engine
Event Category: None
Event ID: 0
Date:1/9/2007
Time: 10:29:10 AM
User: NT AUTHORITY\SYSTEM
Computer: RSNDZZ062003188
Description:
The description for Event ID ( 0 ) in Source ( NI Variable Engine ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:
NI Variable Engine started.
Executable: C:\Program Files\National Instruments\Shared\Tagger\tagsrv.exe
Plug In Path: C:\Program Files\National Instruments\Shared\Tagger\
Plug Ins: LogosRTServer, NI OPC Server Plugin., LogosRTClient.
There is no informaion on error 4353 on Microsoft's website (following the link above). I thank you for your eyes and your time, and look forward to any suggestions you might have to solve the problem.
/Robert
01-10-2007 11:43 AM
01-10-2007 11:44 AM
01-10-2007 01:02 PM
I am not sure why it is "freezing up" but you have three event structures firing off of the same event (stop, restart, running samples) and they are all set to lock the front panel. This cannot be done. This will cause the program to hang the way that you have the code structured.
You should only have one event structure and use some type of producer consumer architecture. the way you have everything coded up now it will not be easy to maintain the code or perform general maintenance on it.
01-10-2007 02:49 PM
@Jhoskins wrote:
I am not sure why it is "freezing up" but you have three event structures firing off of the same event (stop, restart, running samples) and they are all set to lock the front panel. This cannot be done. This will cause the program to hang the way that you have the code structured.
Of course it can be done! There should be no problem having multiple event structures as you did here. Even with lock front panel enabled. All you events are in seperate loops and all events do relatively simple short tasks. And all exit under the same condition.
One problem might be the upper loop, for example "if Read Detector Current" inside the subVI takes forever for some reason.
A few tips for the upper loop. You might want to handle errors, e.g. exit on error. Also, you should wire the error and Visa resource across in all event cases. Currently, the VISA resource is always invalid after exiting the upper inner loop, thus the VISA resource that you openend will never be closed! This might be the real problem.
(Sorry, I don't use VISA so others might have more specific recommendations).
01-10-2007 03:26 PM
Yes it can be done. but should you do it.
Also this VI may be corrupt. It seems that I cannot delete any of the controls or indicators without changing them to a constant first. Anyone else have this problem.
Wierd.
01-10-2007 03:30 PM
01-10-2007 04:08 PM
01-11-2007 06:42 AM
johnsold wrote:
Robert,
I have no idea whether Windows freezes because of this, but it is generally not a good idea to have multiple event structures in a VI, especially as you have used them, looking at the same events while executing in parallel loops. Read the help file on event structures.
Use a notifier or queue to tell the other loops that a "halt" event has occurred.
You also do not need the flat sequence structure. The dataflow of the error clusters and queue refnums will provide the same sequencing. The local variables can be replaced with wires (and maybe a shift register).
Lynn
altenbach wrote:
I don't have your VISA hardware, so I cannot test. Except for the scary color scheme, I cannot see anything "seriously" wrong on your diagram. 😉Just curious, why is "Responsivity (A/W)" type EXT, causing all these coercions???If you take all the VISA stuff out and substitute simulated data, do you still get the same problem?
altenbach wrote:
Jhoskins wrote:
I am not sure why it is "freezing up" but you have three event structures firing off of the same event (stop, restart, running samples) and they are all set to lock the front panel. This cannot be done. This will cause the program to hang the way that you have the code structured.
Of course it can be done! There should be no problem having multiple event structures as you did here. Even with lock front panel enabled. All you events are in seperate loops and all events do relatively simple short tasks. And all exit under the same condition.
One problem might be the upper loop, for example "if Read Detector Current" inside the subVI takes forever for some reason.
A few tips for the upper loop. You might want to handle errors, e.g. exit on error. Also, you should wire the error and Visa resource across in all event cases. Currently, the VISA resource is always invalid after exiting the upper inner loop, thus the VISA resource that you openend will never be closed! This might be the real problem.
(Sorry, I don't use VISA so others might have more specific recommendations).
01-11-2007 10:47 AM