VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Device Channel with Array Data Type

Solved!
Go to solution

Is it possible to implement a channel for a custom device which will have an array data type?

0 Kudos
Message 1 of 5
(3,789 Views)
Solution
Accepted by topic author James9

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...

CLA, CTA, CLED
Message 2 of 5
(3,767 Views)

@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" read/write. I don't know if anything changed but would it be possible to setup a channel (item) property such that one custom device may write an array to it and the other device would read that same array multiple time? What is the problem with doing so?

 

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.

0 Kudos
Message 3 of 5
(3,746 Views)

Then simply create a RT FIFOs to transfer data directly between the processes (CD instances) with low latency.

CLA, CTA, CLED
0 Kudos
Message 4 of 5
(3,735 Views)

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.

CLA, CTA, CLED
Message 5 of 5
(3,734 Views)