Page 1 of 1

Send Command To Two Leds simultanously

PostPosted: Thu 5. May 2011, 09:29
by Randallin
Hi Everyone,

I am using the .NET dll.

I want to send a command to LED 1 and LED 2. I use the following code:

irt.send("somecontrol", "somecommand", 0, 4); //For led 1
irt.send("somecontrol", "somecommand", 0, 5); //For led 2

The first command gets executed correctly, but the second command not. From studying the log-files, it seems that the second command is not executed, because the irtrans is busy executing the first command.

I tried adding some latency:
irt.send("somecontrol", "somecommand", 0, 4); //For led 1
Thread.Sleep(50); //below 50 ms is not always working
irt.send("somecontrol", "somecommand", 0, 5); //For led 2

and it works.

The problem is then, that if I then want to send a command to for instance 6 different LEDs, then this delay becomes a little annoying.

So my question is:
Is there way to send a command to for instance two different LEDs, in one, so that they both get executed immediately(or almost immediately)?

Hope you get my question.

Best regards,
Jakob Randa.

Developer at http://www.testroniclabs.com

Re: Send Command To Two Leds simultanously

PostPosted: Thu 5. May 2011, 12:00
by IRTrans
Hi,
regarding your question:

Are you sending via the irserver SW or directly to the device?

In general the call should wait until the Send is complete. Which firmware version does your IRTrans have?
Anyways, it will not be possible to speed things up here as the IRTrans needs to wait until the code has been sent. That will take 50-400ms depending on the IR Code you are sending.

If you want to send the same IR code to multiple outputs you can use the irt.sendmask call. It allows you to define a sendmask (Bit mask) to send the code to multiple outputs.

In case you also need to send different IR codes in a short period of time you should have a look at the IRTrans Multistream device. It has got 16 independent Sending units and can send different codes at the same time over all outputs.

IRTrans

Re: Send Command To Two Leds simultanously

PostPosted: Fri 6. May 2011, 10:24
by Randallin
Hi again,

Thanks for the quick answer.

Are you sending via the irserver SW or directly to the device?
I am sending through the irserver SW.

In general the call should wait until the Send is complete. Which firmware version does your IRTrans have?
E6.05.50

If you want to send the same IR code to multiple outputs you can use the irt.sendmask call. It allows you to define a sendmask (Bit mask) to send the code to multiple outputs.
Interesting, I will try it out.

But basically it comes down to, if the hardware (irtrans) is capable of sending a signal to for instance LEDs, 1, 3 and 5 simultaneously or it is limited to either all LEDs or one single LED at a time

Best Regards,
Jakob.

Re: Send Command To Two Leds simultanously

PostPosted: Fri 6. May 2011, 11:51
by IRTrans
Hi,
the IRTrans Hardware (LAN Controller XL) can send the same IR code to a set of LEDs (e.g. 1,3 and 5). To do that you will need to use the "sendmask" call of the .NET DLL.
However, it will always send the SAME IR Code to the selected ports.

The LAN Controller Multistream can also send different IR codes via all ports at the same time.

IRTrans

Re: Send Command To Two Leds simultanously

PostPosted: Mon 9. May 2011, 06:44
by Randallin
Hi again,

the IRTrans Hardware (LAN Controller XL) can send the same IR code to a set of LEDs (e.g. 1,3 and 5).
Good to know.

To do that you will need to use the "sendmask" call of the .NET DLL.
I tried using it, but could not get it to work. Furthermore I could not find any documentation on this function. Does there exist any documentation on this function somewhere?

Jakob.

Re: Send Command To Two Leds simultanously

PostPosted: Mon 9. May 2011, 11:11
by IRTrans
Hi,
the function is rather new ...

Please show me the syntax you have used.

Furthermore I would need to know the Version of the DLL, irserver and the firmware version of the LAN Controller XL to make sure you versions do support that feature already.

IRTrans

Re: Send Command To Two Leds simultanously

PostPosted: Tue 10. May 2011, 06:41
by Randallin
Hi again,

Firmware: E6.05.50
IrServer : 6.03.09
Dll : 4.0.18.25274

I very recently downloaded these, so they should be very up to date.

Sendmask("Some RemoteControl", "Some Command", 0, ???);

The first three commands is very straightforward. But the last one is a mysterium to me. I cannot get it working.
Thought it would work like a binary mask in C++, but that does not seem to be the case.

So what shall I write if I want to send a signal to LEDs 1, 3 and 5 for instance?

Regards,
Jakob.

Re: Send Command To Two Leds simultanously

PostPosted: Tue 10. May 2011, 11:39
by IRTrans
Hi,
your SW/FW versions should be fine.

Here is the syntax of the call:

public NETWORKSTATUS IRSendMask(string remote, string command, uint busmask, uint ledmask)

That means the bus selection is a bitmask, too. If you have one controller you will need to put a "1" here.

Example:

IRSendMask ("tv","vol+",1,21);

This example will send to the LEDs 1,3 and 5 (values 1,4,16).

IRTrans

Re: Send Command To Two Leds simultanously

PostPosted: Thu 12. May 2011, 07:19
by Randallin
Hi again

Great! It seems to work.

I guess you already know, but some method-comments in the .NET dll would be very useful.

Case closed.

Best regards,
Jakob.