06-26-2019 10:19 AM
Is it possible to implement a channel for a custom device which will have an array data type?
Solved! Go to Solution.
06-27-2019 01:36 AM - edited 06-27-2019 01:37 AM
Hi,
the only supported data type for NIVS channel is DBL (scalar). You can however store additional data in whatever format as a custom channel (or in general "item") property. This property is used to store an additional item/page/channel context, most frequently some configuration data.
If you array is going to be reasonably big and fixed sized, you can create for it a special section page, which will be a top-level item of your array. This section itself won't hold an array data but can look like it do so (from the configuration point of view) and it simply creates a collection of sub-sections (or sub-channels) for each dimension (or array element) of your "virtual" array. So basically you need to disassemble your array for scalar channels...
06-27-2019 03:16 PM
@okubik wrote:
Hi,
the only supported data type for NIVS channel is DBL (scalar). You can however store additional data in whatever format as a custom channel (or in general "item") property. This property is used to store an additional item/page/channel context, most frequently some configuration data.
The custom device manual (2010) mentions that item property are to be use for only
"one-time basis"
Essentially, I'd like to have two devices communicate in fixed size array but yet I won't be sure how much arrays I would need.
06-28-2019 02:55 AM
Then simply create a RT FIFOs to transfer data directly between the processes (CD instances) with low latency.
06-28-2019 03:23 AM
Here is a simple example. I used the default Async CD template and I customized the config initialization and main page as well as RT Driver.