Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serial Ucm
#11
excuse me for butting in,

it appears something is taking your ascii input string and converting it to hex.
The values you see are the hex values of each of the characters.
e.g. #31# is hex value of the character \'1\'.

Sounds like you have a coding error Smile
Reply
#12
Hi

Yes, that\'s exactly what it is.

I sent serial from other devices before and because it worked I did not care what the string looked like.

In this case I am pulling my hair. If I know what Comfort is expecting, I can work backwards to decode.

Thanks
Reply
#13
can you post the code thats sending this string ?

What language are you programming in, and how do you know the string looks like this ?
e.g. how are you displaying it - debug window, echoing to command line, using a listbox in a dialog, or what ?

I would expect Comfort to receive the text string \"LI1234\" (but without the quotes).
So as a hex byte array it should look like 4c4931323334

If you were to test using a terminal emulator rather than the Comfort panel you should receive and so display \"LI1234\".

What I haven\'t checked is whether what your sending is infact a valid command string Wink

Reply
#14
Hi,

can you post the code thats sending this string ? No, I am using a function that sends serial command from C4

What language are you programming in, and how do you know the string looks like his ? Lua, The string is displayed in the log file.

What I haven\'t checked is whether what your sending is infact a valid command string Wink LI1234 is the signon and is valid

Thanks




 
Reply
#15
Yes of course the code is, doh !

I wouldn\'t trust the log window as that could be doing something daft (could be using the wrong formatting parameters to display the string).
Without seeing the code I can\'t say whether it matches what actually goes out on the 232 port either.

try using a loopback to an rs232 on a computer rather than the comfort panel and use a terminal emulator window (need to configure the port settings to the correct baud etc). Then see what you get. At least your testing what actually goes across the lines this way.

It may be something simple like you have the wrong baud rate, or it may be your code is mangling the string before it sends it down the 232 lines.
Thats what I did anyway when I was messing about. In my case the code was sending 16bit wide chars that the debug window didn\'t show as being a problem.
Reply
#16
Hi John,

Let me try sending to the serial port on my PC, that might show what\'s coming thru

Thanks
Reply
#17
Hi

I am talking serial Cool

Syntax is :

SendToSerial(1, tohex(\"03H\") .. \"LI1234\" .. tohex(\"0DH\"))

Thanks

Big GrinBig Grin

 

 

 
Reply
#18
I see you posted your question on the following forum
http://www.c4forums.com/viewtopic.php?pid=20596

So does that mean it is now working ?

I hope so, as I know very little about Lua, as I don\'t program in it Smile
if its coming out okay in a terminal emulator i can\'t help any further, sorry.
Reply
#19
Hi John,

Yes, it is working.

Thanks for the assistance

Cheers

 

 
Reply
#20
Hi Admin

Please review the schematic for the serial port posted Thursday Mar 12th, 2009 11:44 am

I had someone make one for me and it does not seem to work

Thanks

 

 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)