04-09-2009 02:00 PM
04-09-2009 02:14 PM
No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No. No.
Use the subVIs I changed and attached earlier. You are still equating a failing result with an error.
04-09-2009 02:29 PM
04-09-2009 03:01 PM
I dont know if you know how to do this or not, but I want my program to do exactly like LabVIEW does when the DaQ is not powered or connected to the computer. A pop up message comes on the screen saying this:
Error -201003 occurred at DAQmx Create Channel (DO-Digital Output).vi:3
Possible reason(s):
Measurements: Device cannot be accessed. Possible causes:
Device is no longer present in the system.
Device is not powered.
Device is powered, but was temporarily without power.
Device is damaged.
Ensure the device is properly connected and powered. Turn the computer off and on again. If you suspect that the device is damaged, contact National Instruments at ni.com/support.
Device Specified: cDAQ1Mod5
Task Name: _unnamedTask<17>
I am going to use the error handler subVI template, ive never done anything with pop up messages so I am going to try and search that and maybe you have some suggestions for me.
04-09-2009 03:09 PM
04-09-2009 03:12 PM
04-09-2009 03:18 PM
Dennis says: "The automatic error handling is basically the same as what we have been discussing. When any type of error is detected, you get a popup that describes the error code and error message. There is probably a way to use automatic error handling in an exe but it's not something I've ever tried as it is too simplistic in many cases."
cmhand says: "Im and idiot"
so I am an idiot but I am still a little confused on how this pop up works. I have everything wired up the way you've shown me and all I have left is my very last frame which is my error frame. I have the subVI error handler template but I dont know if thats necessary because it has the no error frame which I dont think I need because if my program goes to that subVI theres most likely an error. What actually gets put in the error frame of the subVI. I have my string of what I want to say in the pop up, do I just use that simple error handler box??
04-09-2009 03:22 PM - edited 04-09-2009 03:28 PM
Here's the earlier discussions.
What you have to do is pass the error cluster from frame to frame with a shift register. I don't think I did that in the last image but I did one of them. In the error state, all you have to do is wire the error cluster up to one of the error handler VIs. It's easy to test. Create a new VI and place an error cluster control on the front panel. On the block diagram, wire it to one of the error handler VIs. go to the front panel and click on the 'status' button to show a red 'x'. Enter the same error code you provided earlier. Run the VI.
04-09-2009 03:25 PM
04-09-2009 03:57 PM
Well thanks a lot for all your help, I got my program running and its working how I want it! The executable no longer runs if the DAQ isnt hooked up and my error message pops up! Thanks again man!