Serial control

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

Serial control

Post by gk606065 »

Hi all , i am trying to send serial data from the housebot to a serial interface , i am able to see the data coming from my device into house bot but i am not able to send a control string back to my device. I want to send the string S_GR,1,100,100 this controls a group id and sets a relay 1 to 100 %.

I have set up and interface and set the write data to the above but it does not seem to be sending the data out.



Regards Newbee :roll:
Circe640
Advanced Member
Posts: 206
Joined: Tue Oct 07, 2003 10:01 am
Location: Columbus, OH
Contact:

Check list to verify

Post by Circe640 »

1)Created serial interface definition ?

2) Added commands to serial interface definition ?

3) Created Serial device with property(ies) ?

4) Mapped property values for serial device property(ies) to commands in serial definition or set up for substitution strings ?
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

cant seem to get a carriage return

Post by gk606065 »

I have set up a serial analyser and hyperterm and for some reason when i am not able to send carriage returns from the software
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Can you give me the exact setup in HouseBot for the serial Command that you are trying to send? Is it Hex or ASCII? Are you using a command terminator?
Scott
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

Here is the write data i have used

Post by gk606065 »

S_GR,1,100,100



after this string i need a carriage return and possibly a line feed I am using ascii as the device i talk to needs asci. i have tried CR and LF but its sends the data as CR LF . When i view a CR from hyper terminal it comes up lower case c over lower case R



thanks
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

sorry scott

Post by gk606065 »

sorry i forgot to tell u that i have not used a terminator. Because i do not no what it does



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

Post by ScottBot »

If your command is setup as an ASCII command, you can't really send the CR LF by typing them in the command and they won't be sent automatically without you telling it to.



The easist thing to do is to use the command terminator for this. Its job is to append the hex terminator specified to each command that is sent. So if your equipment requires that all commands end with CR LF, just enter 0D0A as the command terminator.



Another alternative is to convert the ASCII characters in your command to hex and then use 0D0A as part of the command string.



Checkout the online help for the Generic Serial Hardware Interface. It will give more specifics.
Scott
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

thanks alot ill give that a go tonight

Post by gk606065 »

regards Garry
gk606065
Member
Posts: 6
Joined: Tue Oct 19, 2004 9:44 am

IT WORKS

Post by gk606065 »

Thanks for your help it works now. I turned the data into hex and it worked, i can now interface into HPM I control and control whatever i want to including scenes and input output ir



Thanks again
Post Reply