C-Bus Forums  

Go Back   C-Bus Forums > C-Bus Products > C-Touch/HomeGate/SchedulePlus/PICED

The C-Bus Community Forums is place where C-Bus users can share information and help others with C-Bus. From time to time you will see Clipsal staff on the forums, but this is not an official support channel. If you really need help contact the official support services of Clipsal. More information about the purpose of this forum is available here.

Reply
 
Thread Tools Display Modes
  #1  
Old 15 Apr 13, 06:07 PM
Nikita.Bagritsevich Nikita.Bagritsevich is offline
New Member
 
Join Date: May 2012
Location: Minsk
Posts: 11
Default Logic control projector using 5500PACA with RS232

Hello,
I had a problem with the code efficiency to control the projector (Panasonic PT-AE8000) using 5500PACA with RS232. Projector must be turned on and off.

Message format for the projector:


Control commands:


My Code:
Code:
{Enter Variable definitions here}
str : string;

{Enter Initialisation code here}
OpenSerial(1, 1, 9600, 8, 1, 0, 0);

{Modules}
once (GetLightingState("Film") = ON) then
begin
Format(str, #02'PON'#03, #13#10);
WriteSerial(1, str);
end;
once (GetLightingState("Film") = OFF) then
begin
Format(str, #02'POF'#03, #13#10);
WriteSerial(1, str);
end;
but the code does not work.
Please do tell me, what am I doing wrong?

Last edited by Nikita.Bagritsevich; 15 Apr 13 at 06:10 PM.
Reply With Quote
  #2  
Old 15 Apr 13, 11:23 PM
Ashley Ashley is offline
Senior Member
 
Join Date: Dec 2005
Location: Adelaide, Australia
Posts: 258
Default

To see if the logic is being triggered, run it in PICED, open the log file (View/Log) and select 'Show Log Serial Messages' under the options tag. You should see the strings being printed.

I noticed you are appending a CRLF to each line which isn't in the command definition and might be upsetting the projector. You could also add a small delay after the command and read back the response to see if the projector is actually receiving anything.

Are you sure the cable is correctly wired? Have you tested it with an RS232 breakout box?

Do you have the 24VAC power supply connected to the PAC to power the RS232 lines?

Have you tried sending commands to the projector via a terminal emulator on a PC etc?

Also, just for information, you don't really need the format step. Just go

WriteSerial(1, #02'PON'#03); etc
Reply With Quote
  #3  
Old 16 Apr 13, 12:03 AM
Nikita.Bagritsevich Nikita.Bagritsevich is offline
New Member
 
Join Date: May 2012
Location: Minsk
Posts: 11
Default

Quote:
Originally Posted by Ashley View Post
Are you sure the cable is correctly wired? Have you tested it with an RS232 breakout box?
yeah sure
Quote:
Originally Posted by Ashley View Post
Do you have the 24VAC power supply connected to the PAC to power the RS232 lines?
can I use 24 VDC power supply instead of 24VAC to power serial lines?
Quote:
Originally Posted by Ashley View Post
Have you tried sending commands to the projector via a terminal emulator on a PC etc?
unfortunately could not test, had no cable
but I'll check it.
Quote:
Originally Posted by Ashley View Post
Also, just for information, you don't really need the format step. Just go
Ok, used the format as a precaution
Does it make sense to check the operation of this message? Using data in HEX.
Code:
WriteSerial(1, #02#50#79#78#03); //on
WriteSerial(1, #02#50#79#70#03); //off

Last edited by Nikita.Bagritsevich; 16 Apr 13 at 12:52 AM.
Reply With Quote
  #4  
Old 16 Apr 13, 09:57 AM
Ashley Ashley is offline
Senior Member
 
Join Date: Dec 2005
Location: Adelaide, Australia
Posts: 258
Default

Quote:
can I use 24 VDC power supply instead of 24VAC to power serial lines?
No, you can't use a 24VDC supply. The AC supply is need to generate the positive and negative rails for the RS232 signals.

Quote:
Does it make sense to check the operation of this message? Using data in HEX.
Not really. It just makes it hard to read! Your existing code is correct.

The other simple test to make sure the PAC is working is just loop back the output. I always keep a turn-around plug handy that just connects the Tx to the Rx lines on the PAC. After your Write statement add a small delay then issue a ReadSerial and check the result. At least then you know the PAC end is working. You can also do this at the other end of the lead that plugs into the projector.
Reply With Quote
  #5  
Old 16 Apr 13, 05:32 PM
Nikita.Bagritsevich Nikita.Bagritsevich is offline
New Member
 
Join Date: May 2012
Location: Minsk
Posts: 11
Default

Ashley,

thanks! for your answer =)
Reply With Quote
  #6  
Old 16 Apr 13, 06:06 PM
rhamer's Avatar
rhamer rhamer is offline
Senior Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 452
Default

I don't know the specifics of the PAC syntax, but it looks to me like you are missing the colon character.

Also as stated, the crlf is not specified, so I don't think that is needed either.

Regards

Rohan
__________________

Makers of the Translink C-Bus Gateway
for the Apple iPad, iPhone and iPod Touch.
Reply With Quote
  #7  
Old 17 Apr 13, 06:02 PM
Nikita.Bagritsevich Nikita.Bagritsevich is offline
New Member
 
Join Date: May 2012
Location: Minsk
Posts: 11
Default

Quote:
Originally Posted by rhamer View Post
I don't know the specifics of the PAC syntax, but it looks to me like you are missing the colon character.
when a command witch does not require parameters to be send, a colon ( : ) is not required
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Current Measurement Newbie General Discussion 15 07 Apr 13 12:13 AM
somfy Busline transmitter RichardC C-Bus Wired and other Hardware 18 18 Dec 12 04:20 AM
Multi-Room Audio/HD video and RS232 control danielh C-Bus Wired and other Hardware 13 01 Jan 11 10:40 PM
Access Media Transport Control in-buit IO variables via LOGIC?! BigBoyVn C-Touch/HomeGate/SchedulePlus/PICED 8 28 May 10 02:53 PM
Toolkit : Logic functions in output units george Quick Tutorials (Read Only) 0 07 Jan 05 11:30 AM


All times are GMT +10.5. The time now is 10:51 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.