Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Sending an RS232 command continuously when button is kept pressed?
This thread has 11 replies. Displaying all posts.
Post 1 made on Monday March 30, 2009 at 18:18
Doberman
Long Time Member
Joined:
Posts:
July 2008
93
Hi,

I am trying to control my A/V receiver's volume by sending the relevant RS232 commands. A sinlge press sends the correct command, but nothing happens when I keep it pressed. The 'repeat' property of the command is currently set to 'send once'.

Any ideas?
Post 2 made on Monday March 30, 2009 at 18:27
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Use schedule after to setup a function call to be done every 250 miliseconds or so

here is an example that should give you the general idea. The On Holdinterval is miliseconds as an integer
RS232VolUp();
onHold = function(){RS232Volup();};
onHoldInterval = 500;

function RS232VolUp() {
// Whatever code you need to do the volume up one time
}
OP | Post 3 made on Monday March 30, 2009 at 20:03
Doberman
Long Time Member
Joined:
Posts:
July 2008
93
Thanks for the prompt reply.

My command is F1 04 39 01 16 F2
but I am not sure how to deal with the command's spaces. Your code has some spaces too, if I am not mistaken.
Post 4 made on Monday March 30, 2009 at 20:05
Kevin Magee
Long Time Member
Joined:
Posts:
November 2006
135
Changed the repeat property from send once to 'wait' and then specify the interval between repeats. You have to experiment with the interval to dictate how fast you want the volume to change.
OP | Post 5 made on Monday March 30, 2009 at 20:35
Doberman
Long Time Member
Joined:
Posts:
July 2008
93
When I tried this yesterday I had a random interval of 0.1s and I had to press the button multiple times in order for it to work. Are you suggesting that there would be a specific 'minimum' interval that would continuously send the command when I keep the button pressed?
Post 6 made on Tuesday March 31, 2009 at 05:19
thoupis
Long Time Member
Joined:
Posts:
August 2007
124
Long Live PEP1 LOL
Post 7 made on Tuesday March 31, 2009 at 14:42
wilbert
Long Time Member
Joined:
Posts:
July 2008
27
This code looks like a Rotel volume control. I programmed these before. Most time I used 0.2 seconds interval, which worked perfect. If it is a different brand, please let me know. Might can help you with other brand.
OP | Post 8 made on Tuesday March 31, 2009 at 17:49
Doberman
Long Time Member
Joined:
Posts:
July 2008
93
It is a Lexicon.
So you just used 0.2s and not any code at all?
Barry's solution is definitely sleek, but I must be typing something wrong when I try it.
OP | Post 9 made on Tuesday March 31, 2009 at 18:21
Doberman
Long Time Member
Joined:
Posts:
July 2008
93
Barry's code does not define the extender's ID and the port used. I suppose he thought I could do that...lol
Post 10 made on Wednesday April 1, 2009 at 01:44
wilbert
Long Time Member
Joined:
Posts:
July 2008
27
On March 31, 2009 at 17:49, Doberman said...
It is a Lexicon.
So you just used 0.2s and not any code at all?
Barry's solution is definitely sleek, but I must be typing something wrong when I try it.

I use the serial command and change the duration. No PS like Barry is doing, which is sleek indeed :). Unfortunately I haven`t been programming a Lexicon before. Most components corntrolled through RS232 should work with anin tervl of 0.2 seconds
Post 11 made on Wednesday April 1, 2009 at 11:43
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,003
I may be stating the obvious here but I did not see mention of this anywhere.

If you have more than one action in a button, it is considered a macro and will not repeat. This includes a delay or other codes. In PEP1, if the end result of linked buttons contains more than one action, a macro is implied as well.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 12 made on Wednesday April 1, 2009 at 23:27
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Sorry about the Prontoscript response. I only work in Prontoscript and do not use extenders at all. I send TCPIP to a PC that handles all of the RS232 and IR heavy lifting with much more control and flexibility than an Extender. I guess when all you understand is a hammer, everything becomes a nail.

In the example I posted the RS232VolUp function would be placed at the activity level and would be as simple as the commands to send an RS232 volume up command using what ever device you are using e.g. an extender.

In my work I use a different and more complex model where all user interactions are queued (placed in FIFO array) and processed when the system is idle (not sending TCPIP and waiting for a response). All TCPIP commands are done asynchronously so the user is never locked out. In this way nothing is ever lost, and debugging is much easier as everything happens with a greater degree of control.


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse