![]() |
Manually deliver liquid - Printable Version +- Forums (https://sanworks.io/forum) +-- Forum: Bpod (https://sanworks.io/forum/forumdisplay.php?fid=1) +--- Forum: Software (https://sanworks.io/forum/forumdisplay.php?fid=6) +--- Thread: Manually deliver liquid (/showthread.php?tid=953) |
Manually deliver liquid - ccz - 10-03-2020 Hi, We are using Bpod for a 2AFC task. We are using 8 valves attached to a valve module for the central spout, and 2 valves directly attached to the state machine for the lateral spouts. All the spouts deliver liquid. We are wondering if there is a way to manually deliver liquid with a set valve opening time? RE: Manually deliver liquid - Josh - 10-09-2020 Hi CZZ, The valve driver firmware doesn't support timed pulses - so all timing information has to come from the state machine. If you're manually delivering between trials, or while not running a session, you can create a function to do the override: Code: function OverrideValveModule(valveID, valveDuration) To open valve 3 for 0.5s, you'd call it from the command line as: OverrideValveModule(3, 0.5); The situation is a bit more complicated if you want to manually override while a trial is running. You'd add the states above to your state machine description, and trigger them from MATLAB using a soft code as in this example. If you can't have an interruption of the valve-open time, you can link the valve open and close instructions to a global timer as in this example, then step into a state to trigger the global timer and immediately step back to resume the flow of states in your protocol. You can also create a GUI button to trigger the soft code, as we use to manually flash the port lights in the LightChasing example protocol. I hope this helps! -Josh |