PDA

View Full Version : Serial Control using Girder



Ron
October 13th, 2002, 03:55 PM
Maybe you can try some of the plugins.. might just work.

-Ron

Ron
October 13th, 2002, 03:55 PM
We should have an ICQ/IRC/Whatever chat Mark.

-Ron

Ron
October 13th, 2002, 03:55 PM
Hi guys,

Mark and me had a little chat and exchanged some ideas on this new interface and its implemented in Girder 3.0.22pre3. So get that compiler out Mark! :-)

-Ron

Ron
October 13th, 2002, 03:55 PM
Homework what is that ? :-)

Hehehe, I haven't released it yet, i'm working on some little details. I'll try to release the preview and an updated skeleton before I go to bed. So you can work on that plugin.

And about that not seeing your wife, maybe you can write somekind of plugin that reminds you to look up from the monitor :-) and me to do some homework.

-Ron

Ron
October 13th, 2002, 03:55 PM
I'm sorry i didn't mean Girder 3.0.22 pre 3 BUT pre >>>4<<< oops sorry guys.... it'll be uploaded soon...

-Ron

[Edited by RonB on 03-13-2001 at 11:04 PM GMT]

bodziak
October 13th, 2002, 03:55 PM
The idea of creating plugin which utilizing bi-directional RS-232 communications is very good. But please do not forget making your plugin multiport (multi RS) capable.

bodziak
October 13th, 2002, 03:55 PM
Is this plugin allow control girder via modem? Something similar like TCP/IP plugin with telnet terminal as client but via modem.
Eg.
1. Can I send init string to modem ?
2. Make modem wait for connection ?
3. Detect carier detect signal, or ring indicator - is is possible ?
4. Connect then send send comands to girder ?

But this is only idea, I dont realy need it now, but i can be helpfull. Isn't it

bodziak
October 13th, 2002, 03:55 PM
Of course AT commands are still used. Win modems still emulate com partsts like port 3 ,4, 5, etc. For me the only real problem is:
- how to detect connection (CD ,RI line are used)
- how to detect diconnections (CD lost)
- how to data is handled. e.g. data is send to modem buffer but there was disconection.

But for all this reason the following features are required :
1. Bit test - e.g. CD nad RI set to 1 then launch girder command named X, only CD set to 1 then launch girder command named Y,
2. String operations like compare , serch for substring, or mapping shoud be possible
eg. if received ascii string from com part coantins word "CONNNECT*" (eg. CONNECT 19200/V41) then lanunch girder command Z. For mapping i mean that if the are two diferent devices on com3 and com4. device1 send command eg. AD1##4 device2 send command XYZ to plugin the for both commands the same action should be lanuch by girder
2.Command for reset port

Rhis is sill idea. I dont realy need this

Mark F
October 13th, 2002, 03:55 PM
gongman,

What is the format of the messages from the controller? Are they ASCII (printable characters) or binary (0-255)? Are they constant length (packetized)? Do they have a specific last character (CR or LF or NULL)?

For the device you wish to attach, is there any software handshaking (Xon/Xoff) or hardware handshaking (DTR/RTS/DTR/CTS) involved? Does the Ring Indicator play a role? What baud rate, word size, parity, stop bits?

Any other defining characteristics or nuances?

Sorry for the "20-questions". However, as I build my next plugin (utilizing bi-directional RS-232 communications), I'm thinking "generic" or "random" strings sent to and from Girder would be an interesting application. This would allow control of many devices (projectors, scalers, audio equipment, etc.) as well as control from many devices (keypads, external controllers, etc.). The only limitation would be the existance of an elaborate or time sensitive communications protocol.

Mark F
October 13th, 2002, 03:55 PM
Thanks for the encouragement. I had already decided to make it multi-port. I've got 5 RS-232 ports (and a modem) attached to my current PC so I need it myself. :)

Mark F
October 13th, 2002, 03:55 PM
Here is what I am thinking. I am open to other ideas so do not hesitate to contribute. I will give credit if I use your idea.

No limit on the number or names of devices supported. If it looks like a Com port from the perspective of the software (I can open it and set the attributes), I will use it.

Each RS-232 device will have some attributes (physical port name, user defined string, baud rate, word size, parity, stop bits, handshaking) and send/receive message definitions. The message definitions will be "fixed length" (must define the message length, max length = 120 bytes) and "variable length". Variable length messages must define a last character (0x0d) or character combo (0x0a0d) and I will call it a terminal. Multiple terminals can be defined (message ends with 0x0d or 0x0a0d) and terminals can be stripped on receive and/or added on transmit. Each message can be translated to/from hex/ASCII as it is sent/received. The send message definition is independent from the receive message definition (you can use fixed in and variable out, different terminals, etc.).

All of this is stored, per device, in the registry.

As you can see, I am trying to make this flexible. It should accommodate many protocols from simple to some mid-complex. My biggest requirement is in knowing the end of an incoming string when I see one. To satisfy this requirement, I am using length or data value (terminal). Handshaking line state could also be used but I have not thought that out nor had a request for it.

Adding other protocol requirements (headers, embedded message length, CRCs, Check sums, etc.) would be possible. Adding support for a protocol would be more desirable (to me) if the protocol is widely used or is part of a "standard" (like PHAST, XModem or whatever).

If this sounds like I just bit off a large mouth full, I did. However, most of this can be applied to the X10 plug-in I am working on so I see it as a derivative work.

I will let you know when I get a first BETA ready.

[Edited by Mark F on 03-06-2001 at 10:40 AM GMT]

Mark F
October 13th, 2002, 03:55 PM
I haven't used the AT command set for a long time. I don't know if this is possible or not. Do modems still use the AT command set? What about WinModems?

If you can do all you asked via strings sent to the modem, it should work.

Mark F
October 13th, 2002, 03:55 PM
OK. Since this isn't YOUR highest priority, I won't make it MY highest priority either. :) However, some of this (ring and CD events) should be easy so they will probably make it into the code.

The rest of this confused me as I wrote it :) so I'd like to give some definitions:

Command handler - The thing that does work (Girder built in or SW plug in). Where girder passes a HW string.

HW string - the thing a HW plugin gives to Girder. (this is the "learned" string)

The Ring and CD state changes should be doable. They would send seperate HW strings to Girder as their states change. "Ring ON", "Ring OFF", "CD ON", "CD OFF". Making two HW strings execute the same command is easy with a Girder GoTo command. Now that there are registers, state can be saved and interogated for each incoming HW String so the combinations of CD and Ring, ON and OFF should be doable.

Reset port can be added. This will close, open and set up the device driver. Or are you just looking for a "Flush data" function to empty the transmit and receive queues?

I think the substring stuff is not a unique requirement to this HW plugin. Sending all HW strings that start with a specific prefix string ("CONNECT", in this case) to a single command handler would be useful in other situations as well. For example, sending all HW strings that start with "X10" to a single command handler would allow all the X10 based commands from a house controller to be sent to one command handler without needing 25 functions * 16 house codes * 16 device codes = 6400 different commands. The full HW string is available to the command handler through the command structure so parsing more information could be handled inside the command handler.

I'll talk to Ron about this. Great idea, by the way!

[Edited by Mark F on 03-08-2001 at 08:17 AM GMT]

Mark F
October 13th, 2002, 03:55 PM
Ron,

I'm a Geek but not an ALPHA Geek. I don't know how to IRC/ICQ/Whatever. Sorry, I've never had the need and we didn't do that stuff when I was in school 20 years ago. :)

However, I'm really good at downloading and installing new programs. :) If you want to point me toward a tool (simple and free would be nice) you want to use to chat, I'll give it a try.

Bob,

If it rains all weekend (like it is supposed to), I hope to have some basic function for a V1.0 ALPHA/BETA/whatever on Monday. I'm not the best at designing user interfaces so I'll need feedback on function AND form.

I had already thought about your "assign an ASCII string" rather than learn it. I thought that it could be hard to force all the strings you want to "learn" from the connected device, on demand.

Mark F
October 13th, 2002, 03:55 PM
It was good "talking" to you. If you keep adding new functions and interfaces, I'll never see my wife again. ;)

Don't you have homework or something to do? :) :)

I'll start using this tonight. Did you happen to include an update to the interface document? I didn't write down anything we said.

Mark F
October 13th, 2002, 03:55 PM
I just sent you an e-mail. The plugin is in BETA testing. Send me an e-mail (from an account I can reply to) and I'll be happy to send you the plugin. :)

Mark F
October 13th, 2002, 03:55 PM
I am very busy at work. I haven't fixed the latest set of bugs in this and I wouldn't want to release with known problems.

I don't have a target completion date. Sorry.

Mark F
October 13th, 2002, 03:55 PM
The first general release of this plugin was just sent to Ron.

I'd like to thank the BETA testers for all their hard work and patience. Hopefully, I've squashed all those bugs and wierd behaviors.

One warning: This plugin makes extensive use of MFC. As such, you must have the MFC42.dll on your system to use it. Not all Windows '95 machines have this .dll file.

Please post any bug reports or questions through these forums.

Thanks and enjoy.

Gongman
October 13th, 2002, 03:55 PM
Hi all,
Has anybody used Girder with a direct serial connection by passing the IR interface? If so how? I would like to use my home made house controller to send ASCII message to a computer running Girder to run different apps.

Regards

Gongman
October 13th, 2002, 03:55 PM
Anyone in particular? :)


RonB wrote:
Maybe you can try some of the plugins.. might just work.

-Ron

Gongman
October 13th, 2002, 03:55 PM
Great to hear someone is interested. I would think just about anything. I am able to send any kind of string, ASCII, HEX ..... delimited or not. Some of the divices I control now have the following format:
command byte, number of data bytes to follow, data byte(s), checksum. Reply from the controoled device is ACK or NAK. Others have a 2 ascii character string delimited by a <cr> x0D. There are many ways, seeing what I m controlling the simpler the better.

Your idea of generic ascii string is perfect!! :)

For your other questions, no handshaking required, standard PC baudrates with port select,

Put me on your testers list showcontrol@softhome.net.

Regards,

Bob AKA Gongman



[Edited by Gongman on 03-06-2001 at 06:55 PM GMT]

Gongman
October 13th, 2002, 03:55 PM
My reply did not seem to work the first time. Here goes:

Great to hear someone is interested. I would think just about anything. I am able to send any kind of string, ASCII, HEX ..... delimited or not. Some of the divices I control now have the following format:
command byte, number of data bytes to follow, data byte(s), checksum. Reply from the controoled device is ACK or NAK. Others have a 2 ascii character string delimited by a <cr> x0D. There are many ways, seeing what I m controlling the simpler the better.

Your idea of generic ascii string is perfect!! :)

For your other questions, no handshaking required, standard PC baudrates with port select,

Put me on your testers list showcontrol@softhome.net.

Regards,

Bob AKA Gongman

Gongman
October 13th, 2002, 03:55 PM
There are a lot of great ideas here. When I started this thread I was thinking of a very basic but versatile way of doing this. I do a lot of Show Control for themed attractions. Some of the protocols we use re MIDI, MIDI show control, DMX512 and a host of others. The majority being proprietary. So what I was looking at was for someone to emulate how the IR interface worked with Girder but with a serial port. Instead of learning an IR code I would like to learn or (assign) an ASCII string for lets say the Play Button on WinDVD. That way my AMX system could send an ASCII string with a delimiter to my PC and start WinDVD. This basic functionality, for me would be enough for a majority of things that I need to do.

Bob

Gongman
October 13th, 2002, 03:55 PM
Check out www.icq.com install it's easy. My number is 14725978 we could chat. I am ready to test. :)

Your are right learning my be a problem.

Bob


Mark F wrote:
Ron,

I'm a Geek but not an ALPHA Geek. I don't know how to IRC/ICQ/Whatever. Sorry, I've never had the need and we didn't do that stuff when I was in school 20 years ago. :)

However, I'm really good at downloading and installing new programs. :) If you want to point me toward a tool (simple and free would be nice) you want to use to chat, I'll give it a try.

Bob,

If it rains all weekend (like it is supposed to), I hope to have some basic function for a V1.0 ALPHA/BETA/whatever on Monday. I'm not the best at designing user interfaces so I'll need feedback on function AND form.

I had already thought about your "assign an ASCII string" rather than learn it. I thought that it could be hard to force all the strings you want to "learn" from the connected device, on demand.

Gongman
October 13th, 2002, 03:55 PM
Mark,
Just sent you a few emails. Looking good ;) I may have a few system problems, I'll install it at work in the moring.

Bob

Chuckles
October 13th, 2002, 03:55 PM
I just downloaded pre4, where can i find this new serial interface?

indygreg
October 13th, 2002, 03:55 PM
bump!

whatever happened to this. i don't see it on the download page and would love to find a good rs232 plugin.

greg