Home AMX User Forum AMX Technical Discussion

Projector code translator

Neophyte hack here. We've inherited a legacy system with a "Brand C" control processor. Of course the original source code is gone with the wind, so I've opted to create a code translator using an NI700. I'll receive the old projector strings from the processor into port 1, and translate to the new strings to be sent on port 2. I used to work with buffers on Axcess systems back in the day, but sadly have not done any in Netlinx and it seems to be a bit different. Here's what I have so far. Any help would be appreciated.
Thanks. Brian

Comments

  • data.text may not contain the complete control string, it is just the "snapshot" that triggered the execution of the data event. This may result into to be not complete, and so the
    proj_buffer = "" may erase the buffer before a complete control string is found.

    Find attached a very basic parsing in NetLinx style.
    Working with a buffer prevents data loss/incomplete.
    The WHILE keeps the parsing of the buffer active as long as a control string end is found (in this example a simple $0D). Depending on the old protocol, the routine must modified for another string end, or maybe it can be made more reliable by checking for a start and end sequence.

  • If the original programming depends on feedback from the projector, (ie. warming, cooling, on, off, input) you could also have to make a translator for that. If the old projector was a unit with a lamp that had a cooldown for say 3 minutes, where the new one is a laser with a cooldown of 15 seconds and the programmer build timeouts based on that in the original programming, you probably have to. Things can get a bit complicated.

  • Yeah, I hope there's not a bunch of feedback that would keep the rest of the system from running properly, because the new projector is only going to be getting On, Off, and source select. At best, this is just a stop-gap anyway, because the existing system is all old-school analog. Budget issues and all. . .Unfortunately, the job site is two hours away, so I won't know what's going on until I get there.

  • Marc Scheibein, many thanks for the code sample. Seems to work great on the bench. Will see how it does in the field. Much obliged!
    Brian

Sign In or Register to comment.