Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Comport Server and Client

Post any examples or modules that you want to share here

Comport Server and Client

Postby fixstuff555 » Tue Sep 27, 2011 1:44 am

Here is something I was working on this weekend. The intent is to have a Comport tied to a Server on a remote computer. The Client on another computer initiates polls the server by simply incrementing a "heartbeat" counter on its end. The Server end sees that counter trigger and initiates a poll message to a com device tied to the server. This poll command is the capital letter S. Once this letter is seen by a Parallax Propeller on the com port, the Prop responds with a message of this format:

#S,Data1, Data2, etc, Data15,%E

The message is parsed out on the client end, and scaled and formatted to the various sensors hooked up to the Prop CPU. By keeping the server end strictly inputs, any number of clients can connect to the sensors as needed. The idea is to have several (or dozens) of small server/clients talking over ethernet to either a master or several masters in a distributed control scheme. The poll rate is currently limited to about 200ms or so, due to the baud rate, without the polling, the latency can be down to around 50ms or so.

The programs, although simple have a simple GUI that can be copied/examined (saw some interested in more GUIs earlier...) there is also a handy module in there for decoding a string message, which was ported from the GSM example code.

I'll include a generic virtual COM port in my next post which takes this one step further.
Attachments
comport_server_r3.fsm
(14.18 KiB) Downloaded 1503 times
comport_client_r3.fsm
(15.01 KiB) Downloaded 1511 times
fixstuff555
 
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm

Return to User Examples

Who is online

Users browsing this forum: No registered users and 9 guests

cron