Some RedRat customers use LabView and so need to integrate RedRat code and devices with their LabView setup. We do not have LabView here at RedRat Ltd, so are not able to provide full support for it, but can provide some information based on the experience of several customers.
The first step is to obtain the core RedRat .NET code – RedRat.dll – from our SDK page or via NuGet.
Once this is loaded into LabView, there is a class called OutputUtil which has been designed to work in a LabView environment. OutputUtil can be used to output either signals or macros and the diagram below shows an example of how to output a signal using a RedRat3:
This is used to identify which RedRat device to use. This can be found (or set) using the RedRat Device Manager application. An alternative is to use the PrintFoundRedRats function – see below.
outputNumber (optional)
To use a single output port on an irNetBox or RedRat-X the port number should be given here.
outputPower (optional)
The output power for the chosen port, ranges from 1 to 100. If no output power is given then the default power for the device is used.
databaseFileName
The file containing all the IR data to be used in the LabView application. This is read once when the first IR signal is output.
deviceName
The name of the IR dataset (device) in the IR file.
signalName
The name of the IR signal from the dataset.
doNetworkLookup (optional)
To use an irNetBox or a RedRat-X that is connected to your network, a network search needs to be requested so set this parameter to ‘true’.
Output Macro Parameters
outputName (optional)
The RedRat device to use for each signal in the macro. This is useful if a device is not specified in the file containing the macro data.
outputNumber (optional)
The output port to use for the macro if using an irNetBox or RedRat-X.
outputPower (optional)
The output power for the chosen port, ranges from 1 to 100. If no output power is given then the default power for the device is used.
macroFileName
The file containing the macro data. This is read once when the first macro is output.
macroName
The name of the macro in the macro file.
doNetworkLookup (optional)
Request a network search if using an irNetBox or a RedRat-X connected to your network.
Printing Out RedRat Device Names
As an alternative to finding the device name using the RedRat Device Manager, it can be done using the RRUtil.PrintFoundRedRats function:
Complete Example
This code was developed by Scott Dobbins for use with a RedRat-X to send IR commands at a max rate of 5/sec with all delays at zero. Many thanks to Scott for making it available, and if you have any questions Scott can be contacted by email - scott.dobbins1@gmail.com.