Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Serial Ucm
 Moderated by: slychiu Page:    1  2  Next Page Last Page  
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Thursday Mar 12th, 2009 08:15 am
   PM  Quote  Reply 
1st Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi

I writing a serial driver that interfaces with Comfort.

Is there a way I can see any activitity on Comfort's UCM via Comfigurator or any other software ?

Thanks

 



 Posted: Thursday Mar 12th, 2009 08:46 am
   PM  Quote  Reply 
2nd Post
admin
Administrator


Joined: Saturday Mar 3rd, 2007
Location: Singapore
Posts: 1200
Status: 
Offline

  back to top

In Comfigurator, the Monitor I/O window allows you to see all communications between the PC and the UCM. This includes reports of events etc

The  Comfort Bus Monitor allows all communications on the Comfort Bus to be monitored. If you highlight any line there is a description of the message

What sort of application are you writing



 Posted: Thursday Mar 12th, 2009 09:07 am
   PM  Quote  Reply 
3rd Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi,

The UCM is connected to a third party device which sends serial data to Comfort.

Comfort's UCM therefore has no access to the PC's com port.

Thanks

 



 Posted: Thursday Mar 12th, 2009 09:16 am
   PM  Quote  Reply 
4th Post
admin
Administrator


Joined: Saturday Mar 3rd, 2007
Location: Singapore
Posts: 1200
Status: 
Offline

  back to top

If you need to see the communication between the UCM and the other device you need to connect the serial data lines on pin 2 and 3 to another Rs232 port. You will only be able to see one side of the transmission at a time ie UCM to device or Device to UCM perhaps using a switch



 Posted: Thursday Mar 12th, 2009 09:25 am
   PM  Quote  Reply 
5th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Can I have a schematic for this ? Please !!

Thanks

 



 Posted: Thursday Mar 12th, 2009 09:44 am
   PM  Quote  Reply 
6th Post
admin
Administrator


Joined: Saturday Mar 3rd, 2007
Location: Singapore
Posts: 1200
Status: 
Offline

  back to top

see attached

This is a connection cable between the UCM and another 3rd party serial device assuming that that device has a female DB9 connector just like the UCM
Hence the UCM is connected to the 3rd party device via a Male to Male DB9 connection.  Both UCM and the 3rd party device will Transmit data on pin 2 and Receive Data on Pin 3 (being DCE devices). This is why the pins 2 and 3 on both connectors must be crossed over (2 to 3 and 3 to 2)
The monitoring cable which goes to the PC goes to Pin 2 of the FEMALE DB9 connector which plugs into the PC (which has a Male DB9). The PC being a DTE receives data on Pin 2
Hence the switch will connect the PC receive Pin to the transmit side of either the UCM or the 3rd party device

See this link for a better description  of Rs232 connections http://www.bb-elec.com/bb-elec/literature/tech/faq_rs232_connections_work.pdf


Attachment: Rs232 cable.jpg (Downloaded 89 times)

Last edited on Monday Apr 20th, 2009 04:40 am by admin



 Posted: Thursday Mar 12th, 2009 10:01 am
   PM  Quote  Reply 
7th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi

Is it a problem if I duplicate all pins to a 3 way serial D9 connector project box without a switch ?


In this way Comfort can see all
 

Last edited on Thursday Mar 12th, 2009 10:36 am by dcrera



 Posted: Friday Mar 13th, 2009 03:10 pm
   PM  Quote  Reply 
8th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Is it possible to make a 3 way serial port ie

PC to Device or PC to UCM. Both will not communicate at the same time thou.

Thanks

 



 Posted: Saturday Mar 14th, 2009 06:27 am
   PM  Quote  Reply 
9th Post
ident
Administrator


Joined: Wednesday Aug 9th, 2006
Location: Singapore
Posts: 3493
Status: 
Offline

  back to top

If you connect all the pins together, the transmit pins wil be shorted together and will corrupt the transmission. The switch allows you to monitor each direction but not both at a time. More sophisticated circuits may allow you to see both at a time
Otherwise you can use two Rs232 ports to see both sides using two windows
A useful device called a breakout box is shown here http://www.winfordeng.com/products/brktd9.php useful for experimentation purposes



 Posted: Monday Mar 16th, 2009 05:54 am
   PM  Quote  Reply 
10th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi,

Thanks for the feed back.

When sending a command string to Comfort's UCM eg

LI1234

How is data presented to the UCM or what is representation of LI1234 ?

I am writing a driver and sending LI1234 from a third party control device is represented as $4c$$49$$31$$32$$33$$34$ (which is not recognized by Comfort)

Can you post the UCM's data expectation of the LI1234 so that I can debug.

Thanks

 

 

 

 

 



 Posted: Monday Mar 16th, 2009 12:00 pm
   PM  Quote  Reply 
11th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

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 :)



 Posted: Monday Mar 16th, 2009 12:09 pm
   PM  Quote  Reply 
12th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

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



 Posted: Monday Mar 16th, 2009 12:15 pm
   PM  Quote  Reply 
13th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

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 ;)

Last edited on Monday Mar 16th, 2009 12:26 pm by John W



 Posted: Monday Mar 16th, 2009 12:35 pm
   PM  Quote  Reply 
14th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

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 ;) LI1234 is the signon and is valid

Thanks




 



 Posted: Monday Mar 16th, 2009 12:55 pm
   PM  Quote  Reply 
15th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

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.

Last edited on Monday Mar 16th, 2009 12:56 pm by John W



 Posted: Monday Mar 16th, 2009 01:25 pm
   PM  Quote  Reply 
16th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi John,

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

Thanks



 Posted: Monday Mar 16th, 2009 04:59 pm
   PM  Quote  Reply 
17th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi

I am talking serial :cool:

Syntax is :

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

Thanks

:D:D

 

 

 



 Posted: Monday Mar 16th, 2009 05:15 pm
   PM  Quote  Reply 
18th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

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 :)
if its coming out okay in a terminal emulator i can't help any further, sorry.



 Posted: Tuesday Mar 17th, 2009 04:09 am
   PM  Quote  Reply 
19th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

Hi John,

Yes, it is working.

Thanks for the assistance

Cheers

 

 



 Posted: Friday Apr 17th, 2009 01:37 pm
   PM  Quote  Reply 
20th Post
dcrera
Comfort Installers


Joined: Monday Aug 7th, 2006
Location: Durban, South Africa
Posts: 279
Status: 
Offline

  back to top

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

 

 



 Current time is 09:30 amPage:    1  2  Next Page Last Page  
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems