Page 1 of 1
Received Data Property also in HEX format
Posted: Tue Jun 14, 2005 5:42 pm
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.
Posted: Thu Feb 22, 2007 7:37 pm
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.
Posted: Sat Feb 24, 2007 6:59 am
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
Posted: Sun Feb 25, 2007 4:36 pm
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.
Posted: Sun Feb 25, 2007 5:03 pm
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.
Posted: Mon Feb 26, 2007 1:51 pm
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.
Posted: Mon Feb 26, 2007 3:23 pm
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.