Received Data Property also in HEX format

Have an idea for a new feature? Voice your opinion here.
Post Reply
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Received Data Property also in HEX format

Post by Richard Naninck »

The Received Data Property from for example a generic serial device only returns ascii values. It would be a nice feature to also have the ability to return HEX values.

An example would be: ffA0BC3D41

I have a serial device that returns Hex codes and I have to use a script to convert the received data property from ascii to hex.
shoei600
Member
Posts: 6
Joined: Sun Mar 19, 2006 2:26 pm
Location: London, UK

Post by shoei600 »

Hi Richard,
I agree, I have the same problem but I'm not sure I would be able to write the script to deal with it.
Would you be kind enough to provide me with your script? This will also help me learn and start creating my own.
Kind regards,
James.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

http://www.cebotics.com/phpbb2/viewtopic.php?t=855633

This is a link to the scripts section. Download the scripts.zip and look for the PlasmaStatus.vbs script.

Good luck
shoei600
Member
Posts: 6
Joined: Sun Mar 19, 2006 2:26 pm
Location: London, UK

Post by shoei600 »

Hi Richard,
Thanks for those.
I have spent all afternoon learning and I have got it working. This has opened a whole new world of possibilities for me now.
I still have one query though...
I have a Hardware remote pumping in Serial comands to a 'Remote Hardware' device, this is the one that I can see that databytes arriving in. I have another Device called 'Remote' that has the script and with property's. Although it works, it seems long winded, but every time I try and remove the Remote Hardware device and re-assign the 'Received Data' it will not function.
Any ideas?
Kind regards,
James.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

I am not sure if I understand your question, but it appears you are describing the process needed by HouseBot to function properly.

You need a hardware device that actually defines the serial port.
Then you need a device that holds the received data property and maybe even other properties that bind to the hardware device.
You also have a script device that defines the script and you can have properties attached to the script device to handle certain stuff or like I do, have an extra NULL device that holds all properties like status etc.
If this is working for you now, you have gotten a long way already and the longer you fiddle with it, the more sense it starts to make.
shoei600
Member
Posts: 6
Joined: Sun Mar 19, 2006 2:26 pm
Location: London, UK

Post by shoei600 »

Hi Richard,
You have answered my question, which I admit could been written a little more legible. The point is that there are three stages, and I was thinking that it should have been two.
Many thanks for your pointers, the only thing I need to figure out now is how to manage data in both directions through a script and apply some other routines.
Kind regards,
James.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

If in time you need any help in two way comms using scripts, just ask. As an example you can use lots of my scripts because many of them handle two way comms.
Post Reply