Code Comments
Programming Forum and web based access to our favorite programming groups.See creating user defined error codes in the help for labview.
Post Follow-up to this messageImho, checking of instrument errors belongs in the recomended Prefix Error Query VI (where prefix is the instrument model). You should get the latest copy of the templates, guidelines, etc. from <A href="http://www.ni.com/devzone/idnet/development.htm">here</A>. Do not put any range checking in the driver VIs themselves. The instrument itself should be able to determine if a value is out of range and the driver should be calling the error query function. You limit the driver by using LabVIEW for things likerange checking. As an example, say you've a power supplu model A with a max current of 5 amps. Someone tries to program it for 6 amps and the instrument should put a message in it's error queue that is read and the programmer fixes his program. Now, model B of the same supply is released and it has a max current of 7 amps. If you had limited the current range in your driver, the driver would not be useable for the new model supply. If you follow the guidelines, you'll have a much better chance that your instrument driver will be accepted by NI if that's your ultimate goal.
Post Follow-up to this messageImho, checking of instrument errors belongs in the recomended Prefix Error Query VI (where prefix is the instrument model). You should get the latest copy of the templates, guidelines, etc. from <A href="http://www.ni.com/devzone/idnet/development.htm">here</A>. Do not put any range checking in the driver VIs themselves. The instrument itself should be able to determine if a value is out of range and the driver should be calling the error query function. You limit the driver by using LabVIEW for things likerange checking. As an example, say you've a power supplu model A with a max current of 5 amps. Someone tries to program it for 6 amps and the instrument should put a message in it's error queue that is read and the programmer fixes his program. Now, model B of the same supply is released and it has a max current of 7 amps. If you had limited the current range in your driver, the driver would not be useable for the new model supply. If you follow the guidelines, you'll have a much better chance that your instrument driver will be accepted by NI if that's your ultimate goal.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.