Keysight 34461A DMM Measurement Plugin (Refactor of 34401 DMM example) - #697
Keysight 34461A DMM Measurement Plugin (Refactor of 34401 DMM example) #697MIpetrov-NI wants to merge 1 commit into
Conversation
…efactored from the existing keysight 34401A DMM Measurement plugin example. I've documented the process for refactoring existing examples to eb compatible with different 3rd party drivers. In this instance, I tested implementing the 3446X driver on an Agilent 34461A DMM in InstrumentStudio. Signed-off-by: Milena Petrovic <milena.petrovic@emerson.com>
jasonmreding
left a comment
There was a problem hiding this comment.
The session factory implementation needs to be revisited. I'm not sure what the motivation is for using local driver sessions rather than grpc-device sessions, but the factory implementation should reflect that choice. At the very least, the factory should throw errors for things that are not intended to work. There are also some bad linkage issues and copy/paste artifacts that need to be corrected to avoid confusion when looking at the code.
There was a problem hiding this comment.
Is it intentional that you are using "Keysight34401A_DMM" as the instrument type here? Or if this copy/paste error from the 34401 project? I'm guessing this is an oversight as it doesn't match the id declared in the .pinmap file added as part of this PR. Make sure you update the VI icon as well.
There was a problem hiding this comment.
Why does this have a hard code constant for the session rather than using the session in input terminal? If this works for the existing 34401 example I don't understand why it won't work here.
There was a problem hiding this comment.
The diagram could be cleaned up a little so wires aren't running right to left.
There was a problem hiding this comment.
The Measurement Todo comment needs some cleaning up. A lot of the comments do not make sense to me and there are some grammatical issues as well.
There was a problem hiding this comment.
It might be nice to move this as a member of the Session Factory.lvclass so that it can be called from Get Instrument Type ID.vi rather than duplicating the logic and the MeasurementTodo labels.
There was a problem hiding this comment.
If you do not want to use grpc-device server, then you should return empty string for both the provided interface and service class outputs. That will indicate to the framework that it should not try to resolve through the discovery service to find the remote address for the server. Instead, it will be up to your factory implementation to return native VISA sessions instead of grpc enabled driver sessions. This will allow you to use the refnum passed into Close MeasurementLink Session.vi rather than using a hard code value in a local constant.
There was a problem hiding this comment.
If you want to use local/native VISA sessions with this instrument, the factory should be updated to produce local/native sessions rather than grpc-device sessions. Your measurement logic would then use the factory APIs to create sessions like all of the other examples rather than adding custom logic to the measurement to create local driver sessions outside of the factory APIs.
There was a problem hiding this comment.
We could also look into adding a Boolean input to the API for the user to indicate whether they want to create local driver sessions vs. grpc-device sessions.




What does this Pull Request accomplish?
High-level description of the changes in this pull request:
Why should this Pull Request be merged?
Justification for why this contribution should be part of the project:
What testing has been done?
What testing has been done to ensure this submission meets requirements: