Mworks BNC inputs for rewarding bar pulls

Hi Chris,

We would like to create an mworks training xml for bar pulling where a reward is simply dispensed every time a bar is pulled–nothing needs to be shown on the screen. The bars we have have BNC connectors, so we were considering hooking these up to a battery and have a circuit created/broken each time the bar was pulled such that we could send a TTL pulse to the ITC I believe.

I’m trying to figure out what the xml would look like. My understanding is that I would first define the iochannel with something like:

and then define barSent to set the reward variable when changed? (I believe this triggers the reward, if I use one of our prior RSVP xml files as a starting template.

            <action type="assignment" variable="reward" value="reward_duration" tag="Assignment"></action>

Thanks!

Darren

Hi Darren,

I believe what you outlined is more or less correct. I’m out of the office today (home with a sick kid), but I’ll try to put together a working example tomorrow.

Another option might be to connect the lever directly to an analog input on the ITC, and trigger the reward based on its value. It would be similar to your proposal, in that you’d attach an action to the variable associated with the analog input channel.

Cheers,
Chris

Hi Chris,

Thanks for your feedback. Najib created a working prototype just a few
minutes ago, so I think we’re set for now.

Thanks again,
Darren