NationalInstruments AnalogOutput

415 views
Skip to first unread message

Ede Rancz

unread,
Mar 21, 2017, 2:13:12 PM3/21/17
to Bonsai Users
Hi All, 

I am trying to use a NI USB-6008 for outputting an analog signal. I have installed the NI-DAQmx .NET support and the Bonsai.NationalInstruments.2.0.0.-cpt3 package. 
However, when adding an AnalogOutput sink, it keeps staying red and the run fails with "No method overload found for the given arguments". 

The node receives a double input and I have added the output channel in the properties and set sample rate to 150 (the NI documentation call this a static analogue out with 150 S/s update rate). I didn't touch SignalSource so it's empty. 

Any hints? 

cheers
Ede

goncal...@gmail.com

unread,
Mar 21, 2017, 9:07:23 PM3/21/17
to Ede Rancz, Bonsai Users

Hi Ede,

 

Can you attach an example workflow where the problem happens? It will make it easier to diagnose.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/97622dcb-1c06-4c6c-9fcc-8f941bac0758%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

goncal...@gmail.com

unread,
Mar 21, 2017, 9:09:14 PM3/21/17
to Ede Rancz, Bonsai Users

Hi Ede,

 

Can you attach an example workflow where the problem happens? It will make it easier to diagnose.

 

 

 

From: Ede Rancz
Sent: 21 March 2017 18:13
To: Bonsai Users
Subject: [bonsai-users] NationalInstruments AnalogOutput

 

Hi All, 

--

Ede Rancz

unread,
Mar 22, 2017, 9:45:01 AM3/22/17
to goncal...@gmail.com, Bonsai Users
Thanks Goncalo, it’s attached. 

NI_test.bonsai

Gonçalo Lopes

unread,
Mar 23, 2017, 3:28:37 PM3/23/17
to Ede Rancz, Bonsai Users
Hi Ede,

On second thought, I think the AnalogOutput node does not accept double inputs directly. I think it expects a Mat data type (the Bonsai type for multi-channel, multi-sample data). You can create a Mat from a single double value using the Buffer node with a Count parameter of 1.

I don't have correctly a NI-DAQ card with me so I cannot test if the workflow will actually run.

On 22 March 2017 at 13:45, Ede Rancz <eder...@gmail.com> wrote:
Thanks Goncalo, it’s attached. 

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

On 22 Mar 2017, at 01:09, <goncal...@gmail.com> <goncal...@gmail.com> wrote:

Hi Ede,
 
Can you attach an example workflow where the problem happens? It will make it easier to diagnose.
 
 
 
From: Ede Rancz
Sent: 21 March 2017 18:13
To: Bonsai Users
Subject: [bonsai-users] NationalInstruments AnalogOutput
 
Hi All, 
 
I am trying to use a NI USB-6008 for outputting an analog signal. I have installed the NI-DAQmx .NET support and the Bonsai.NationalInstruments.2.0.0.-cpt3 package. 
However, when adding an AnalogOutput sink, it keeps staying red and the run fails with "No method overload found for the given arguments". 
 
The node receives a double input and I have added the output channel in the properties and set sample rate to 150 (the NI documentation call this a static analogue out with 150 S/s update rate). I didn't touch SignalSource so it's empty. 
 
Any hints? 
 
cheers
Ede
 
-- 
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

Ede Rancz

unread,
Jun 1, 2017, 1:00:05 PM6/1/17
to Bonsai Users, eder...@gmail.com
Thanks Goncalo, sorry for the slow reaction, had to order a new board as the USB6008 does not support hardware generated AO. 
I have an USB-6218 now and the Mat data type works, you were right. 
There is however a new error message saying that the selected buffer size is 1, increase it to at least 2 (Status code: -200609). The issue is that it is set to 1000 in the bonsai AnaloguOutput node, so is it possible that it is a Bonsai driver issue? I am using the latest NI drivers.

cheers
Ede

ps I can pop over to SWC with the board any time if that helps


On Thursday, March 23, 2017 at 7:28:37 PM UTC, goncaloclopes wrote:
Hi Ede,

On second thought, I think the AnalogOutput node does not accept double inputs directly. I think it expects a Mat data type (the Bonsai type for multi-channel, multi-sample data). You can create a Mat from a single double value using the Buffer node with a Count parameter of 1.

I don't have correctly a NI-DAQ card with me so I cannot test if the workflow will actually run.
On 22 March 2017 at 13:45, Ede Rancz <eder...@gmail.com> wrote:
Thanks Goncalo, it’s attached. 

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
On 22 Mar 2017, at 01:09, <goncal...@gmail.com> <goncal...@gmail.com> wrote:

Hi Ede,
 
Can you attach an example workflow where the problem happens? It will make it easier to diagnose.
 
 
 
From: Ede Rancz
Sent: 21 March 2017 18:13
To: Bonsai Users
Subject: [bonsai-users] NationalInstruments AnalogOutput
 
Hi All, 
 
I am trying to use a NI USB-6008 for outputting an analog signal. I have installed the NI-DAQmx .NET support and the Bonsai.NationalInstruments.2.0.0.-cpt3 package. 
However, when adding an AnalogOutput sink, it keeps staying red and the run fails with "No method overload found for the given arguments". 
 
The node receives a double input and I have added the output channel in the properties and set sample rate to 150 (the NI documentation call this a static analogue out with 150 S/s update rate). I didn't touch SignalSource so it's empty. 
 
Any hints? 
 
cheers
Ede
 
-- 
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

Gonçalo Lopes

unread,
Jun 14, 2017, 1:28:45 PM6/14/17
to Ede Rancz, Bonsai Users
Hi Ede,

Can you attach the workflow you are using for this so I can take a look at the parameters?

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

Ede Rancz

unread,
Jun 14, 2017, 3:04:36 PM6/14/17
to Bonsai Users, eder...@gmail.com
Here it goes. 
Thanks, Goncalo.
Ede


To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
NI_test.bonsai

Gonçalo Lopes

unread,
Jun 14, 2017, 5:27:11 PM6/14/17
to Ede Rancz, Bonsai Users
Hi Ede,

I think the problem is in the Buffer node before the AnalogOutput. Here you specify that the buffer size is 1, and I believe this is what the NI-DAQ driver is complaining about. Try setting it to a higher number, I guess 2 would be the minimum. Be aware that the higher the number, the higher the latency since the buffer samples have to be accumulated before they are sent out.

The BufferSize in the AnalogOutput indicates more like the internal buffer storage in the NI-DAQ, but it is separate from the size of the individual buffers that you send in, which is specified by the size of the Mat object.

Hope this helps.

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages