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.
03-07-2013 09:20 AM
Hello All,
I am writing an error handler that creates fault log files for all errors and warnings that are generated within a Custom Device. One of the pieces of information that I would like to include in the file is the name of the Custom Device that the error handler is embedded in (because I run several custom devices in the same project). I have been trying various classes of property nodes, and different refnums, but I have not been able to find anything that works. The closest I have gotten is to get the name of the VI that my error handler is embedded in. This of course is of very little use because the Custom Device file naming structure is always the same, (the error handler is always in the RT Driver VI).
If anyone has a method to obtain the Custom Device name from within a Sub VI of the Custom Device, your advice would be greatly appreciated.
Thanks much,
GSinMN
Solved! Go to Solution.
03-07-2013 12:14 PM
you should be able to pass the item reference (U64) of the custom device into the subVI, and then use NI VeriStand - Get Item Data.vi to get the name of the device
03-07-2013 12:49 PM
Hello Stephen,
Thanks for the quick response. I see the VIs you mentioned, but it is unclear to me how to implement them. From what I can see, an Item Reference is for anything contained within the custom device, but it can not refer to the custom device itself. Also, the only options for getting the reference are by already knowing the name of the item, or by the path, both of which would require me to manually enter the name of the item I am trying to obtain automatically. Not sure how to proceed. Please advise. Thanks.
GSinMN
03-07-2013 12:55 PM
the device item reference is passed into the custom device. if you wire that into the VI, you will get the name of the custom device
03-07-2013 01:23 PM
Hello Stephen,
I understand now. Sorry for the confusion. I see now that the item reference you spoke of is already part of the VI, and I just needed to attach to it. I did not need to obtain the item reference with a separate VI.
I implemented as you recommended, and it worked on the first try.
Thanks for your assistance.
GSinMN
03-07-2013 01:24 PM
Hello Stephen,
I understand now. Sorry for the confusion. I see now that the item reference you spoke of is already part of the VI, and I just needed to attach to it. I did not need to obtain the item reference with a separate VI.
I implemented as you recommended, and it worked on the first try.
Thanks for your assistance.
GSinMN