ValveDriverModule()
Description
ValveDriverModule interfaces MATLAB with the Bpod Valve Driver Module. Each valve driver module adds 8 additional solenoid valves to a Bpod State Machine setup.
A ValveDriverModule
object is initialized with the following syntax:
The valve driver module is controlled in 2 ways:
- Setting the
ValveDriverModule
object's fields - Calling the
ValveDriverModule
object's functions (its methods)
Object Fields
- Port
- ArCOM Serial port object
- isOpen
- An 1x8 array of valve states.
- Each valve state is 0 (closed) or 1 (open)
- Setting the array will automatically update the device, opening and closing valves to match isOpen
- An 1x8 array of valve states.
Object functions
- openValve(valveID)
- Opens a valve specified by valveID (range = 1-8)
- closeValve(valveID)
- Closes a valve specified by valveID (range = 1-8)
Cleanup
- Clear the
ValveDriverModule
object with clear: - Clearing the object releases the serial port, so other applications can access it.
- If a
ValveDriverModule
object is created inside a MATLAB function, the object is cleared automatically when the function returns.