PDA

View Full Version : ReceiveResponse with serial device



DCulver
September 5th, 2006, 10:30 AM
I'm real close to getting this lua file to work for a Sunfire Theater Grand III pre-pro. What I'm having trouble with is something in the ReceiveResponse code causing errors in the lua console.

I don't need response from the Sunfire, just the ability to send commands. I get a message in the lua console of "ERROR: No response from last command" when I have "serial.Classes.Simple.ReceiveResponse(self, data, code)", or a "Response pending" message with serial queued.

If someone in the know could take a look at this file and help me troubleshoot, I'd appreciate it.

Thanks,

Promixis
September 5th, 2006, 12:24 PM
Dennis,

Just add this line

code = serial.zerobits (code,serial.NORESPONSETIMEOUT)

before this line

serial.Classes.Simple.ReceiveResponse(self, data, code) -- must call the parent's ReceiveResponse


do you have a link to the protocol?

DCulver
September 5th, 2006, 04:51 PM
Thanks Mike,

That appears to have fixed the error messages. I'll run with this for a few days & see how it works. As I stated earlier, at this point I'm only interested in sending commands, although down the road I might want to set this up to receive feedback & trigger events. Here's the link to Sunfire protocol & commands.

http://www.sunfire.com/downloads/Sunfire%20TGIII-Ultimate%20Receiver%20RS232%20commands%201-8-04.pdf

Promixis
September 5th, 2006, 06:58 PM
good.

looks like a fairly straight forward protocol to add feedback.