Triggering Light stack using Biztalk API's

Hi all,

I do have a requirement . I need to trigger the Light stack using Biztalk API , is it possible to do that?

What i need is that ,through code i need to check a real time Tag id with a data store and if it is valid i need to trigger GREEN light and if it is not i need to Trigger "RED"

It would be helpful if u can provide me with a sample code snippet..

Thanks in Advance

Abraham Mathew

[892 byte] By [Abraham] at [2008-1-10]
# 1

You can do this in your event handler if your device' provider supports the following:

  • TagReadEvent OR
  • TagListEvent
  • Port Output Value property on device

Alien readers and provider supports these very well and additionally exposes a handy Vendor-Defined Command: PulseOutput, which turns a specified Digital Output port ON for a specified time period.

Here is an example of how you can do this (actually an excerpt from one of our internal working pilots). You'd just need to identify which port is connected to which light and make related changes for values of the "portName" and time interval:

[RfidEventHandlerMethod]

public void ProcessTagReadEvent (TagReadEvent tagReadEvent)

{

byte[] searchtagidbyte = tagReadEvent.GetId(); // get tag ID

string portName = null;

... search your database for this ID

if (found)

portName = "o1";

else

portName = "o2";

//****OPEN DOOR**** etc.

try

{

VendorSpecificInformation inputParams = new VendorSpecificInformation();

inputParams.Add("Port", portName);

inputParams.Add("TimeInterval", 250);

VendorDefinedParameters vendorParameters = new VendorDefinedParameters();

vendorParameters.InputParameters = inputParams;

using (DeviceConnection dc = new DeviceConnection(tagReadEvent.DeviceName))

{

dc.OpenAdministrationConnection();

dc.ExecuteVendorDefinedCommand(null, "Alien", "PulseOutput", "PulseOutput", null, vendorParameters);

dc.Close();

}

}

catch (Exception Er)

{

myLogger.Log("Error opening door" + Er.ToString() , Level.Error);

}

...

}

Hope this helps,

ValyaS at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk RFID...