Newbie, trying to get generic serial port working?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
gary uk
Member
Posts: 21
Joined: Tue Dec 02, 2003 9:53 am

Newbie, trying to get generic serial port working?

Post by gary uk »

Hi,



I have read all info on the generic serial port in the help section, but can't get it to do anything?



As an example

-----------------

If the characters GB are received on the serial port, i then want to open NOTEPAD.exe



Any ideas? as this is all a bit confusing, BUT it looks to a very good piece of software!



Regards,





Gary
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Gary,



Here's roughly what you need to do. If you need more detail on any of the steps, let me know.
  1. Create a Generic Serial Hardware Interface (you've probably already done this).
  2. Select the COM port that the RS232 equipment is connected to.
  3. Create a new Hardware Definition for the equipment commands.
  4. Enter the Command Configuration and setup the Port settings and also any Commands that are to be sent to the equipment.
  5. Enable the Hardware Interface. Check the error log for any errors.
  6. Create a new Device Definition. The Device Definition will provide the 'Device' abstraction for the equipment that is used throughout HouseBot. Do this from the main menu (Settings/Configure Generic Serial Port Devices).
  7. Create a new Device and be sure to give it at least one Property. The Properties that you use depend on the features of the equipment. Essentially, you will map the various values for the Properties into serial commands setup in the Hardware Interface. If you're just interested in receiving data, add a dummy Property (this is a bug that I just fixed).
  8. Exit the Device Definition configuration and restart HouseBot.
  9. Create a new Device (File/New Device...) using the Device Definition that you just created. It will appear in the list of Devices.
  10. When it is added, you will see the Properties that you added, plus a Received Data Property.
  11. Enable the Device and make sure it is mapped to the Generic Serial Hardware Interface.
  12. By clicking on the Properties, you can map Property Values to any of the 'Commands' configured in the Hardware Interface. This is not really needed if you are just wanting to receive data.
  13. You can test the data reception by sending data from the equipment. The Received Data value should change to reflect the data that has been received.
  14. When that is working, you're most of the way there. All you will need to do now is to...
  15. Add an Execute Program Device and set it up to start NotePad. Be sure to enable the Device.
  16. Create a Task that has a condition on the Received Data Property where it is Equal to GB.
  17. Add an action to the Task to set the Execute Program property of the Execute Program Device to Yes.
It sounds a bit convoluted, but the configuration usability suffers due to the flexibility options. I'm always trying to improve it, but it still has a ways to go. As you become more familiar with the basics of Devices, Properties, and Hardware Interfaces, it all begins to clear up quickly.



Good luck,

Scott
Post Reply