Innovative Integration
 
Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Block mode streaming with AD16 modules

 
Post new topic   Reply to topic    II Support Forum Index -> ChicoPlus
View previous topic :: View next topic  
Author Message
dunsworth



Joined: 20 Aug 2008
Posts: 4
Location: Edinburgh, Scotland

PostPosted: Wed Aug 20, 2008 11:54 pm    Post subject: Block mode streaming with AD16 modules Reply with quote

I am attempting to use block mode streaming using two AD16 modules in a C++ .NET application using the Caliente DLL.

Everything works fine when I specify a power of two number of ADC's but I find that the buffered data coming from the ChicoPlus board cycles through the channels when a non power of two number of ADC's is selected. This makes it impossible to accurately retreive the data for a specified channel pair.

I can work around this issue but can I confirm that this is normal behaviour? Is there any way without using the Channeliser to stream 5 channels (3 ADC's) say?

All help appreciated.
Back to top
View user's profile Send private message
jhenderson
Site Admin


Joined: 07 Mar 2006
Posts: 2254
Location: So. Cal. USA

PostPosted: Thu Aug 21, 2008 7:43 am    Post subject: AD16 with ChicoPlus Reply with quote

The AD16 module stacks pairs of 16-bit A/Ds onto an internal 32-bit bus which is reach by ChicoPlus during each sequencer instruction fetch. As a consequence, only pairs of A/Ds may be enabled for streaming.
_________________
phpbb1
Back to top
View user's profile Send private message Visit poster's website
gmiller



Joined: 07 Mar 2006
Posts: 105
Location: Simi Valley, CA.

PostPosted: Thu Aug 21, 2008 8:12 am    Post subject: AD16 with ChicoPlus Reply with quote

In order to increase speeds along the PCI bus all A/D readings on this card are in pairs. When you enable any one of the paired A/D the other is also enabled. The data in block mode with have the 32 bit pair in the transfer. You can throw out the unneeded data or just let it reside in the block.

If you specify an odd number of channels you will still pick up the pair. If you specify only channel 0, channel 2, channel 4, you will actually get 6 channels of data in the block. The same is true for 1,3,5.

If all channels are in order say channel 0,1,2, you will still get channel 3 but this is the only extra channel you will see.

By adding channels of DIO or FIFO port you will also get another 32 bits for each in the block as if they were another channel pair for each peripheral.

Respectfully Gary
Back to top
View user's profile Send private message Visit poster's website
dunsworth



Joined: 20 Aug 2008
Posts: 4
Location: Edinburgh, Scotland

PostPosted: Thu Aug 21, 2008 8:16 am    Post subject: Reply with quote

Sorry, I think you misunderstood my question due to my misuse of the term ADC.

I know that only channel pairs may be used but I am finding that I can only retreive data when a power of two number of channel pairs are specified.

I use the following code to enable/disable a channel pair:
Code:
rc = IICali_SetIntegerProperty( hModule[m], "AdcPair00Stream", used );


If I enable a non power of two number of channel pairs (such as 3) the channel data in the block input buffer cycle, making it impossible to extract the correct channels data at each event. This does not happen when power of two number of channel pairs are activated. The documentation states that I can select any subset of channel pairs I wish so I assume I'm missing something here.
Back to top
View user's profile Send private message
dunsworth



Joined: 20 Aug 2008
Posts: 4
Location: Edinburgh, Scotland

PostPosted: Thu Aug 21, 2008 8:50 am    Post subject: Reply with quote

I have attached a diagram to help illustrate the buffer cycling problem.

TIA.
Back to top
View user's profile Send private message
jhenderson
Site Admin


Joined: 07 Mar 2006
Posts: 2254
Location: So. Cal. USA

PostPosted: Thu Aug 21, 2008 9:40 am    Post subject: Power-of-two buffer sizes Reply with quote

Since the Pool buffers must always be sized as a power-of-two number of bytes under Armada, the number of enabled device pairs must also be even or else events (acquisitions from all enabled device pairs) will span buffer boundaries. I suspect that is what you're seeing.
_________________
phpbb1
Back to top
View user's profile Send private message Visit poster's website
dunsworth



Joined: 20 Aug 2008
Posts: 4
Location: Edinburgh, Scotland

PostPosted: Thu Aug 21, 2008 11:18 am    Post subject: Reply with quote

I could maybe understand Jim if the device pairs had to be even, but not powers of two. It is a fairly serious shortcoming when you have two AD16 modules, as I can have 8 channel pairs and 16 channel pairs but nothing in between.
Back to top
View user's profile Send private message
jhenderson
Site Admin


Joined: 07 Mar 2006
Posts: 2254
Location: So. Cal. USA

PostPosted: Thu Aug 21, 2008 7:16 pm    Post subject: Device count Reply with quote

I apologize, I didn't properly synthesize my response. What I meant to say is that the tally of enabled device pairs divided by four should be evenly divisible into the buffer size. Typically, this allows device counts of 1, 2, 4, 8, and 16 to fit evenly into a buffer.

If you can't live with this restriction, you must use the channel merging components or aggregate the events using custom code.

_________________
phpbb1
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    II Support Forum Index -> ChicoPlus (GMT - 8 Hours)
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

© Copyright 2006-2012 Innovative Integration
Powered by phpBB © 2001, 2002 phpBB Group
Based on iCGstation v1.0 Template By Ray © 2003, 2004 iOptional