Using Open Ephys Interface


I’m looking for tips on using the MWorks Open Ephys Interface component to transfer spike events to MWorks.

I’m using the Event Broadcaster plugin in the Open Ephys GUI to stream spike and TTL events, but MWorks doesn’t seem to receive them. I’m not getting any error messages, just “No Open Ephys clock sync received after xxx seconds” messages.

Should the Event Broadcaster be set to “Raw Binary”, “Header Only”, or “Header/JSON”? I’ve tried all 3, but it would help if I knew which was the intended format. Using a python script I’ve been able to successfully subscribe to the event stream and verify that the expected sync and spike events are, in fact, being generated by the Event Broadcaster for the Header/JSON format.

Other than that, I’m sort of at a loss, since I’m not getting a specific error message.


Here’s my mwel test script, taken from [this discussion] (MWorks: Discussion). For testing, both the Open Ephy GUI and MWorks Server are running on the same machine.

var sync = 0
var clock_offset = 0
var spike = 0 (exclude_from_data_file = YES)
var done = 0

datapixx datapixx (
   update_interval = 5ms
    analog_input_data_interval = 1ms
    enable_dout_vsync_mode = NO
    ) {
    datapixx_word_output (
        bit_numbers = 0,2
        value = sync
open_ephys_interface oe (
    hostname = 'localhost'
    port = 5557
    sync = sync
    sync_channels = 1,2
    clock_offset = clock_offset
    spikes = spike

protocol 'New Protocol' {
    task 'New Task System' {
        state 'Begin State System' {
            sync = 0
            done = 0
            start_device_io (datapixx)
            start_device_io (oe)
            goto ('Send Sync')
        state 'Send Sync' {
            sync = (sync + 1) % 4
            start_timer (
                timer = MyTimer
                duration = 1
                duration_units = s
            goto (
                target = 'Exit State System'
                when = done
            timer_expired (
                target = 'Send Sync'
                timer = MyTimer
        state 'Exit State System' {
            stop_device_io (oe)
            stop_device_io (datapixx)
            yield ()

Hi Mark,

I’m pretty sure MWorks’ Open Ephys interface has fallen badly out of date with the Open Ephys software. Specifically, I think the “raw binary” event format, which MWorks uses, has changed significantly. The fact that no MWorks users have brought this up until now makes me think that either (1) the folks who use the OE interface are still using an older version of the OE software, or (2) no one uses the OE interface any more.

While I could probably update MWorks’ OE interface to work with the latest software, it would be some time before I could get to it, as my to-do list is already very full.

Chris Stawarz

Hi Chris,

Thanks, that’s helpful to know. Sounds like I should try to achieve our goals using a conduit to python instead.