Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
SeanC

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

Hi, 

I'm posting to get some advice about how to trigger a pump which has multiple independent juice lines. In some circumstances I would want to trigger individual lines, and in others a combination. For instance, I would like to have a code which could do the following:

goodmonkey([DurationLine1 DurationLine2 DurationLine3 DurationLine4])

e.g. 
goodmonkey([1000 0 0 0]) Turn line one on for 1000ms
goodmonkey([1000 1000 0 0]) Turn line one and two on for 1000ms

The pump has been wired into 4 of the digital output lines of the NI card. We originally planned that separate digital outputs would control each channel. We thought we could assign each of these to the 'TTL' in the monkeylogic I/O menu. But i'm struggling to know where to start in writing monkeylogic code to trigger the lines.

Does anyone have any suggestions?

Thanks

Sean

0
Jaewon

Administrator
Registered:
Posts: 708
Reply with quote  #2 
I guess you can use the TTL, as you thought. You need to assign each line to different TTL objects and turn them on/off with the toggleobject command.

FYI, NIMH ML can do this easily. You don't get to control the duration of each reward individually, but can trigger one line at a time or multiple lines together, like the following.

goodmonkey(1000,'juiceline',1);
goodmonkey(1000,'juiceline',[1 2]);
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.