NI DAQ digital output

776 views
Skip to first unread message

Kensaku Nomoto

unread,
Apr 14, 2016, 9:42:30 AM4/14/16
to Bonsai Users
Hi everyone,

Is it possible to send a digital output from NI DAQ? I can only see AnalogOutput under sink/NI. Thank you for help!

Best,
Kensaku

goncaloclopes

unread,
Apr 15, 2016, 5:15:28 AM4/15/16
to Bonsai Users
Hi Kensaku and welcome to the forums!

The digital output lines were not added since they were not needed at the time the NI/sinks were designed. It makes sense to add them, though, and I am currently thinking that it might make sense to take the time and rethink a bit the way this integration is done in order to take advantage of the synchronization properties of NI-DAQ tasks.

In the meantime, however, I am attaching an experimental version of the NI-DAQ package so you can give it a try and see if it works for you. This version adds one DigitalOutput sink that takes a boolean value. You simply need to add a digital output channel and register the physical channel name and hopefully it will work.

Let me know if any issues come up. Hope this helps,
Bonsai.NationalInstruments.2.1.0-alpha.nupkg

Kensaku Nomoto

unread,
Apr 15, 2016, 8:28:25 AM4/15/16
to Bonsai Users
Hi Goncalo,

Thank you for a quick response! I got an error (see attached) when I tried to specify a channel to use. Do you know what happened?

Best,
Kensaku
errormessage.png

goncaloclopes

unread,
Apr 15, 2016, 1:05:55 PM4/15/16
to Bonsai Users
Ah, sorry, my mistake!
Here's another version (thanks for debugging, I don't currently have a NI-DAQ so I cannot test it directly!)

Hope this one works.
Bonsai.NationalInstruments.2.1.0-alpha2.nupkg

Kensaku Nomoto

unread,
Apr 16, 2016, 6:17:52 AM4/16/16
to Bonsai Users
It worked perfectly! Thanks a lot, Goncalo!

You might to want to add DigitalInput of National Intruments DAQ in the next update for completeness...

Best,
Kensaku

goncaloclopes

unread,
Apr 17, 2016, 11:30:53 AM4/17/16
to Bonsai Users
Glad to hear that it worked for you :-)

Yes, I intend to add DigitalInput eventually, but I wanted to redesign the module a little bit to allow synchronizing multiple digital and analog inputs and outputs, as it is possible to do with NI-DAQ. This still requires some thinking, but then the module will be able to support the more powerful features of NI-DAQ.

Samuel Walker

unread,
Jun 13, 2018, 12:49:45 PM6/13/18
to Bonsai Users
Is there now a version of the NI-DAQ package that has a DigitalInput node?

Thanks!
Sam

Gonçalo Lopes

unread,
Jun 17, 2018, 6:58:48 AM6/17/18
to Samuel Walker, Bonsai Users
Hi Samuel,

I started updating the DAQmx package last year to support digital signals, but unfortunately I didn't get to finish it. The remaining issue was deciding on a way to do synchronized simultaneous reading of both analog and input channels. I may get back to it later if there is enough interest, but I don't have currently access to a board for testing.

Will post an update here when there is progress.

--
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.
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/a78d9e71-ea75-48b4-b84a-042959878a4b%40googlegroups.com.

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

José Teixeira

unread,
Jul 15, 2019, 10:45:51 AM7/15/19
to Bonsai Users
Hi, Gonçalo and everyone.

Is there any update on this?

Thanks in advance!
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai...@googlegroups.com.

Gonçalo Lopes

unread,
Jul 15, 2019, 11:30:42 AM7/15/19
to José Teixeira, Bonsai Users
Hi José and welcome to the forums,

Unfortunately there is no progress on this at the moment as there was not enough interest and I don’t have access to NI boards myself.

Will post here if there are any developments in the future.


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

Gonçalo Lopes

unread,
Jul 15, 2019, 11:32:25 AM7/15/19
to José Teixeira, Bonsai Users
Is there a reason why using analog channels is not enough? That seemed to be part of the reason for low interest, given NI-DAQ boards have so many analog inputs usually.

José Teixeira

unread,
Jul 15, 2019, 12:11:40 PM7/15/19
to Gonçalo Lopes, Bonsai Users
Thanks for the quick reply, Gonçalo.

We're gonna use hardware that provides a digital signal, so this node would be more adequate. 

This is not a major issue for our purposes and is relatively easy to workaround, I think, it would just be simpler if the node was already there, and that's why I figured I should ask if there were any updates on this thread before committing to alternatives. 

Anyway, thank you for the support. 




Message has been deleted
Message has been deleted
Message has been deleted

Gonçalo Lopes

unread,
Jul 16, 2019, 4:14:09 AM7/16/19
to José Teixeira, Bonsai Users
Actually, I just realized I had an experimental package version lying around that has support for both digital inputs and synchronized analog and digital inputs simultaneously. It's been a while, so I don't know and have no idea of testing if it works or how well it will perform for your purposes.

It seems like it's not possible to upload packages directly as google group attachments anymore, so I've uploaded it to the bonsai community feed. You should be able to find it by going to Tools > Manage Packages, then selecting Bonsai Community on the left hand side. You also need to select "Include Prerelease" from the dropdown directly above the list of packages, as this is an experimental package and won't show up otherwise.

Hope this helps.

Gonçalo Lopes

unread,
Jul 16, 2019, 8:38:29 AM7/16/19
to José Teixeira, Bonsai Users
Hi José,
Don't forget to reply-all so it's easier to keep track of the conversation.

The SynchronizedInput node is highly experimental, so I wouldn't be surprised if things don't really work, as I mentioned this version is an experimental version of an experimental package done almost a year ago, and unfortunately I have no access to boards to try it out at the moment.

Have you tried DigitalInput by itself?

If this doesn't work, I'm afraid you may have to stick to your workarounds for the time being.

On Tue, 16 Jul 2019 at 12:03, José Teixeira <jose.t...@research.fchampalimaud.org> wrote:
Dear Goncalo,

We have tried the node, but there is an error we can't correct and we don't  know what is causing it (see attached).

Thank you for your help!

image.png


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


--
José Teixeira
MsC Student @ Mainen Lab,
Champalimaud Centre for the Unknown,
Lisbon, Portugal

Sarah P

unread,
May 1, 2020, 9:59:07 AM5/1/20
to Bonsai Users
Hi Goncalo,
I submitted a separate post asking whether there is a DAQmx DigitalInput, then I found this discussion. I'd like to add my interest for a NI DigitalInput node! I would really like to sync several of my recording systems and would like to trigger Bonsai with a DigitalInput.

Thank you!
Sarah
Reply all
Reply to author
Forward
0 new messages