Jump to content

Looking for a starting point in VISA driver development


whitenoiz

Recommended Posts

Hi everyone,

 

so we have a device for measurement & signal generation and want to make it accessible through VISA say by Ethernet / USB / Serial. Other than the VISA driver template and the SCPI parser that must be implemented on the device, does anyone offer a good starting point on how to make a device talk VISA and maybe even get it certified by NI?

 

Thanks in advance

Link to comment

Hi everyone,

 

so we have a device for measurement & signal generation and want to make it accessible through VISA say by Ethernet / USB / Serial. Other than the VISA driver template and the SCPI parser that must be implemented on the device, does anyone offer a good starting point on how to make a device talk VISA and maybe even get it certified by NI?

 

Thanks in advance

 

Well the SCPI parser is beyond any resources that NI would be able to help with. But if it is about the instrument driver itself you should probably contact the instrument driver developer group at NI here. They can give you more information as to the requirements to get your driver certified and added to the instrument driver library as well as resources about recommended practices in such a driver to ease the process of certification.

  • Like 1
Link to comment
  • 1 month later...

So I heard back from instrument.drivers@ni.com and I think it should be ok to post their reply here in the forum for everyone to read. Some of the suggestions may even be up for discussion, such as the recommendation to go about and use the 2014 Revision (what about backwards compatibility?)

 

So again, thanks for the suggestion to contact them.

 

==============================================================

 

Yes, the best starting point would be the Instrument Driver Guidelines and the Templates, but use the 2014 Revision.  If you do not have 2014, we have saved them templates back to LabVIEW 8.2
You might try using the Instrument Driver Development Studio for your development http://sine.ni.com/nips/cds/view/p/lang/en/nid/211922.  Again, make sure you have the latest templates above.

Make sure review the LabVIEW Settings to use before working on API VIs/Driver
Front Panel: Should all be the same color for consistency
Front Panel: Select Modern 3D style for controls and indictors
Block Diagram: Enable Use transparent name labels.
Block Diagram: Disable automatic error handling in new VIs.
Block Diagram: Disable Place front panel terminals as icons.
Do not Maximize Front Panels or Block Diagrams

The items below usually come up in reviews, when either templates are not followed or Guidelines are not followed:
- Avoid using one command per VI, check template on how to combine commands. Minimize redundant parameters.
- Avoid combining Configure, Action-Status, and Data subVIs in high-level API VIs; these should only be combined in examples
- All VIs, controls, indicators should include documentation and it is recommend to include at least one comment on the block diagram.  
- Use meaningful names (no symbols and Capitalize first letter) and avoid abbreviations unless they are known by users worldwide.
- Document what the VI/control is expected to do and always start the sentence describing what the VI will do with a verb.
- Document any restrictions for using the VI/control, such as whether a certain mode prohibits using the VI/control or if the VI/control cannot be used with a particular instrument model.
- Avoid using Boolean controls if values are not opposite states, the command usually has 0 or 1 or True or False as part of the command (Use the vertical slide switch for Boolean controls).
- Avoid using strings as controls (generally numeric and/or text ring controls are used in API) you can use file path control or timestamp control instead a string control
- Use Text Ring for values that do not have two clear states
- Include "%.;" as part of the format string to convert floating point numbers when using functions like Format Into String or Array to Spreadsheet String.
- Wire a False Constant from the Boolean palette to the Use System Decimal Point terminal of the Number To Exponential String and Number To Fractional String functions.
- Use a Select function, not a Case Structure, to select between two wire options.
- Use Scan From String and Format Into String as often as possible for string manipulation. Other string handling functions, such as Pick Line and Append True/False String, are good string manipulation functions to use.
- Use the Concatenate Strings function sparingly and only if you cannot find a more appropriate string function
- Design the block diagram so it follows the left-to-right, top-to-bottom model of data flow. Use consistent writing style in the VI and throughout the instrument driver.
- Do not use save options that remove or password-protect the block diagram (if you do we cannot certify the driver).
- Use "4-2-2-4 or the 5-3-3-5 connector pane terminal pattern"
- Avoid using all text as icons, but icons should be meaningful and not randomly selected
- Make the VISA resource name a Required input for ALL VIs.

Testing

- Make sure all VIs and Examples (at least two) are tested and documented with a meaningful name.

- Test all combinations of options on front panel

- Test with all supported interfaces implemented in the driver. 

- If there are any issues or other notes helpful to user it should be documented in the Readme.

For certification a programmer or User manual that contains commands should be submitted along with the driver in order to do the certification review.

Hope that helps.

Best Regards,
National Instruments - Instrument Drivers/IVI Group
instrument.drivers@ni.com

Link to comment

I remember using a VI Analyzer plug-in years ago to validate my driver. I'm not sure if that is now included with VI Analyzer or maybe its in the Driver Design Studio.

 

The first thing an NI employee would likely do after receiving a driver for validation would be to test it against the requirements above using VI Analyzer.

 

No sense submitting a driver for certification if it can't pass the automated test...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.