Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
acp13

Junior Member
Registered:
Posts: 2
Reply with quote  #1 
Hi, 
I'm also having issues with updated Matlab versions and Monkeylogic talking to electrophysiology systems like Plexon, as was addressed in this topic:
http://forums.monkeylogic.org/post/interfacing-with-parallel-port-7844531?pid=1290269046

I was wondering about getting around the parallel port issue while awaiting any new software updates by using the digital output from the NIDAQ board to send a strobed digital word to Plexon?  I know NIDAQ (PCI-6229) can do that, but the question is if anyone can direct me to any information on how Monkeylogic could send the Behavioral Codes via the NIDAQ?  It currently assigns a port to the Behavioral Codes variable, but could Monkeylogic be reprogrammed to use all 8 channels of the second NIDAQ port to send a word, for example?

I  can currently send out TTL pulses per NIDAQ channel which Plexon can read as single-bit events and the timing can be recorded, as was done below, but I'd like the functionality of sending Behavioral codes.
http://forums.monkeylogic.org/post/temporal-instability-in-ttl-signals-7739212?highlight=strobe

Thanks!


0
Andy Mitz

Junior Member
Registered:
Posts: 8
Reply with quote  #2 
I don't know if I fully understand your question.  We use the digital outputs of the PCI-6229 for event codes often with no problem.  By the 2nd NIDAQ port, do you mean the second NIDAQ card or do you mean the second connector on the PCI-6229.  If you mean the 2nd connector of the 6229, the answer is YES.  That is how we do it.  Here is the setup we use most often.  As a reminder, if you are using two PCI-6229 boards, you need DUPLICATION on and you need to make sure you know which board is the primary MonkeyLogic board.  (Maybe Jaewon or someone else can reprogram the way MonkeyLogic displays NI-DAQ boards on the GUI, because they both are given the exact same name.  That is useless.)

Connector 0

8 bits of digital output from PORT 0, BITS 0-7
16 bits of digital input from PORT 1, BITS 0-15


Connector 1

15 to 23 bits of event code, plus one strobe bit.  PORT 0, BITS 8-n and n+1
Example:   16 bit word plus strobe:   BITS 8-23 event codes, BIT 24 strobe

I build what I call "Digital Expansion Boxes" to use Connector 1 for event codes. They have a NI CB-68LPR screw terminal board and a DB25S connector.  The NI
cable from Connector 1 is the DB25S is wired to match the commercial data acquisition system.  I have spreadsheets and/or schematics for TDT (RZ-2), Ripple, and Plexon.






0
acp13

Junior Member
Registered:
Posts: 2
Reply with quote  #3 
Hi, 
Thank you very much for your response! Your instructions are exactly what I was hoping to get on how to get the NIDAQ output so that Plexon can read the digital strobed word. We were stuck with where it was all happening via outdated parallel ports.  I will check that duplication is on and that the board is the primary MonkeyLogic board. The rest sounds fairly straightforward.  I've already been able to wire the input to the Plexon system for digital inputs.
Thank you!
ACP
0
Edward

Administrator
Registered:
Posts: 260
Reply with quote  #4 
Also, NI cards have two types of digital I/O ports.

Type 1: works like a serial port, where each bit is activated independently. 
Type 2: a collection of 8, or even 16 bits, are activated in parallel. 

So in type 1 you can NOT code:
TTL = 0111;
toggleObject(TTL);

You would need to code:
TTL = 0001;
toggleObject(TTL);
TTL = 0010;
toggleObject(TTL);
TTL = 0100;
toggleObject(TTL);

With each success call to toggleObject you would append an additional bit. You would also need to toggleObject again to turn of those bits.

While in type 2 you can code ;
TTL = 0111;
toggleObject(TTL);

and then 
TTL = 0000;
toggleObject(TTL);
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #5 
acp13,

Do you know that you can choose multiple lines when you have 'Behavioral Codes' assigned in MonkeyLogic? If you choose multiple lines, you can send out a word, instead of a single bit TTL. (This has nothing to do with board duplication, by the way.) Monkeylogic does not need to be reprogrammed for this. You can choose any port in any board shown up in the MonkeyLogic GUI.
0
zdavis

Junior Member
Registered:
Posts: 11
Reply with quote  #6 
I'm trying to select multiple lines when assigning 'Behavioral Codes' in the ML menu, however when I click on assign after selecting my board and port, I don't get a pop-up listing the lines I wish to use to send digital words. Instead I get a list of the ports. However, I can assign a line on the same port to the code strobe, and I can test the individual lines to check that they're sending signals correctly through the ML menu.

Is there something special I have to do to select among the lines on a port for the behavioral codes?
0
Jaewon

Administrator
Registered:
Posts: 971
Reply with quote  #7 
That is the problem that I found previously and I guess it has never been fixed.

http://forums.monkeylogic.org/post/errors-in-the-current-ml-package-7752047

I patched the code myself. I will post what you need to modify in the above thread.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.