From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Processes commonly need to read properties that other processes write. Maps contain points, which work like variables that store only the latest value written to them. In other words, point value maps are repositories of information that any process can read and write at run time.
In the example of reading the current operating state of a machine, processes do not require knowledge of every change in operating state that occurs, but rather, only the current state. Point value maps are designed for this use case, where the device software must store a value in memory that readers and writers can access with no flow control.
Description
Map Features:
Examples
The palette for the Point Value Map Library can be found under Addons.
Below is a simple example showig how to write and then read points from a map.
Requirements
Software
Support
Please post comments, feedback and questions in the comments below.
History
Version | Date | Description/Changes |
---|---|---|
1.0.0.2 | March 2016 | Initial Release |
Downloads
Use VI Package Manager (VIPM) to install this library.
Hi.
When would you suggest using this library instead of the alternatives such as the Current Value Table one?
Great question! Functionally, the CVT and Point Value Map (PVM) serve the same purpose, but there are differences between the APIs. The PVM allows for multiple maps to coexist at teh same time while the CVT only has a single map. Having multiple maps allows for more reuse in code since one API could use a unqiuely named map and export the data in the map through an API. This could live alongside another API doing the same thing. The example would be a configuration API that manages configuration could store the data in a map and at the same time an analysis API could store its results in a separate map without the two conflicting. Another big difference between the two are the datatypes that are supported. PVM supports a few basic datatypes (DBL, string, I32) as well as the variant for more advanced tpyes. CVT supports lots of basics types but no advanced ones. So if you have a complex data structure, CVT is not an easy place to store it.
Does that help?
Makes a lot of sense.
Thanks for the detailed explanation Jack.
Where is the custom attribute getter VI? I can set them, but I can't get them.
I like the Point Map solution very well as it fits the type of tag storage I often need (value, timestamp+quality), and is more flexible (than CVT for example) when it comes to creating points on demand.
Due to the use of a more complex data type, the underlying variant-based storage of the point map is a bit slower than it could be though. I modified this hash based solution by crabstew to hold the pointmap data natively, then inserted that into the pointmap solution...and it is 10x faster on my cRIO 9036 target. (If it's ok for everyone involved I could post the joint solution).
Hello,
Great work here. It will save me some time, thank you !
@Mads Is your code available somewhere ?
@Mads
Is it too late to request your PVM solution? - using LV2018. 🙏
JorgeN