Capturing continuous Serial data

Jun 14, 2006 at 7:11pm

Capturing continuous Serial data

Hello,

I am trying to use a dataVideo SE-800 switcher to control a Max patch, but having a lot of trouble capturing the switcher’s data via serial.

The SE-800 sends its current status and listens for commands through its serial port every video field (60th of a second). I am able to read the data coming in just by sending a bang to a serial object, but I need to be able to capture just 21 integer characters at a time starting with 252 and ending with 255. The serial object just sends each individual character out and with one bang I see the status numbers (252, 19 numbers, 255) listed several times over and over.

I have tried using select 252 to catch the beginning of the sequence, but am not sure how to get the next 20 integers after it into a list. I tried thresh with no luck. Any ideas or examples is much appreciated.

Also, when dealing with the serial object Max freezes often with a spinning beachball pointer. I have to restart the computer (G5 PowerMac) in order to get Max/MSP/Jitter to work again. Here is what I have in my serial object:

serial usbserial-FTCAKPL5 57600 8 1 odd

The settings are to match the specs on the SE-800.

I got the FTCAKPL5 with a LaCie drive. I plan to purchase a Keyspan USB-Serial adapter next month (new fiscal year).

Thanks,
Scott Meador

#26416
Jun 14, 2006 at 10:18pm

Quote: ws_meador@yahoo.com wrote on Wed, 14 June 2006 12:11

>
> I have tried using select 252 to catch the beginning of the sequence, but am not sure how to get the next 20 integers after it into a list. I tried thresh with no luck. Any ideas or examples is much appreciated.
>

[zl group 20] perhaps?

mzed

#78973
Jun 15, 2006 at 5:22pm

Thanks mzed!

I had looked at it, but thought it needed a list as input – guess I was wrong because it works… Here is what I have so far:

max v2;
#N vpatcher 45 463 686 956;
#P window setfont “Sans Serif” 9.;
#P number 150 361 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 150 328 50 196617 zl nth 19;
#P toggle 165 43 15 0;
#P newex 165 72 58 196617 metro 600;
#P newex 165 107 312 196617 serial usbserial-FTCAKPL5 57600 8 1 odd;
#P newex 187 199 31 196617 int 1;
#P newex 150 260 40 196617 switch;
#P newex 187 172 58 196617 select 252;
#P newex 150 291 61 196617 zl group 21;
#P connect 3 0 2 0;
#P connect 2 0 0 0;
#P connect 0 0 7 0;
#P connect 7 0 8 0;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 2 1;
#P connect 4 0 1 0;
#P connect 1 0 3 0;
#P pop;

It actually worked for a minute or so and then it gets off track (252 is no longer the first in the list). Is there a way to empty [zl group 21] so it has an empty list without restarting Max?

Thanks again for your help.

–Scott M

#78974

You must be logged in to reply to this topic.