Moderated by: slychiu |
Author | Post | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
dcrera Comfort Installers
|
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 |
|||||||||
admin Administrator
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
admin Administrator
|
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 |
|||||||||
dcrera Comfort Installers
|
Can I have a schematic for this ? Please !! Thanks |
|||||||||
admin Administrator
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
ident Administrator
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
John W UCM Pi Users
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
John W UCM Pi Users
|
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 |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
John W UCM Pi Users
|
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 |
|||||||||
dcrera Comfort Installers
|
Hi John, Let me try sending to the serial port on my PC, that might show what's coming thru Thanks |
|||||||||
dcrera Comfort Installers
|
Hi I am talking serial Syntax is : SendToSerial(1, tohex("03H") .. "LI1234" .. tohex("0DH")) Thanks |
|||||||||
John W UCM Pi Users
|
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. |
|||||||||
dcrera Comfort Installers
|
Hi John, Yes, it is working. Thanks for the assistance Cheers |
|||||||||
dcrera Comfort Installers
|
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 |
|||||||||
slychiu Administrator
|
We have used this circuit before, there seems to be nothing wrong with it In what way it is not working, do you get any characters displayed on the computer at all? |
|||||||||
dcrera Comfort Installers
|
Hi Comfort reports no response from UCM. Thanks |
|||||||||
admin Administrator
|
I have added comments to the original diagramThis 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 Check the diagram and the pinouts carefully (by reading the pin numbers on the back of the connector) as well as make sure the correct gender of the connectors is used, ie Male to UCM, Male to the 3rd party device and Female to the PC as shown in the diagram and check the cable itself fore short and open circuits I am sure you will discover the error in the cable or connection Last edited on Monday Apr 20th, 2009 04:46 am by admin |
|||||||||
dcrera Comfort Installers
|
Thanks, will feedback. |
|||||||||
dcrera Comfort Installers
|
Hi Admin I made a serial connection box that can accept comms from either the third party device or from PC to UCM using a 2 x 3 wafer switch using pins 3,2 and 5. The connection from the third party device communicates with the UCM from both ports if swapped around and switched but the PC to UCM has no comms. Do I need more wires connected to the PC to UCM ? Thanks Last edited on Friday May 8th, 2009 04:14 am by dcrera |
|||||||||
ident Administrator
|
The circuit shown in the earlier post was for monitoring the data sent from two devices, a UCM and another serial device using a switch The switch connects either of the two devices' transmit pin to the PC Receive pin on Rs232 (ie Pin 2 on the Female DB9) There is no connection from the PC Transmit pin to the 2 devices If you need to send data the other way you will need to connect another switch which will connect pin 3 to the selected device, but this must at the same time disconnect the other device. It is easier to just connect individual cables when needed |