Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ahamilos

Junior Member
Registered:
Posts: 7
Reply with quote  #1 

Hi all,

I'm using a digital output to turn on an LED. When I toggle the TTL to 'Status' 'on,' it seems monkeylogic issues a very short pulse. When I hook up the output to an oscilloscope, I see a very brief spike. 

How do I get the TTL to sustain its output?

I have set my TTL to Port 1, Line 1, am sure it's using the right DAQ, and call it from my code like this:

toggleobject(start_clock_LED_TTL, 'Status', 'on'); % turn on start clock LED.

user_text('Start Counting - Clock started');

0
ahamilos

Junior Member
Registered:
Posts: 7
Reply with quote  #2 
Note: I also have tested my goodmonkey function - it also is making very short digital output pulses even when I set up goodmonkey to have ridiculously long pulses:

goodmonkey(8000, 'NumReward', 3, 'PauseTime', 3000, 'TriggerVal', 5);

results in a very quick flashing of a test LED


Note that when I test the Ni-DAQ in the I/O screen panel, the square pulse looks perfect on the oscilloscope and in the LED


0
ahamilos

Junior Member
Registered:
Posts: 7
Reply with quote  #3 
SOLUTION:

The problem is that my program was sampling continuously from Port 1 for a lever-press. It looks like the digital outputs for cues and reward must come out of a different port - now it works perfectly! Hope this helps someone else debug [smile]
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.