Have you ever wanted a way to easily program indicators, such as a stack light, to notify when the Speedway Revolution reader has lost Ethernet connection, is inventorying tags and/or reading tags, or is even functioning (perhaps power unplugged)? How about setting a pulsed duration of the GPO event (i.e. reading and/or encoding tags on a conveyor belt)?
If so, then Advanced GPO functionality is what you are looking for!
You can control the advanced GPO feature of Speedway Revolution readers using this custom parameter.
- When set to Normal (default) the GPO is set via the regular LLRP SET_READER_CONFIG message.
- When set to Pulsed, the GPO changes state based on the SET_READER_CONFIG message, and will change to the opposite state after GPOPulseDurationMSec milliseconds.
- When set to "Reader_Operational_Status‟, "LLRP_Connection_Status", "Reader_Inventory_Status‟, "Network_Connection_Status‟ or "Reader_Inventory_Tags_Status‟ the GPO status acts like a Boolean value.
- When high (true, 1), the corresponding status is true, meaning the reader is operating, has a LLRP connection, is inventorying, has a network connection or tags are being singulated (respectively).
- When low (false, 0), the opposite is the case.
The following code sample shows how to configure advanced GPO using the LLRP Toolkit (LTK). The method below creates a SET_READER_CONFIG message on the reader that allows for "Reader_Operational_Status‟, "LLRP_Connection_Status", "Reader_Inventory_Status‟, "Network_Connection_Status‟ or "Reader_Inventory_Tags_Status‟ property to be enabled.
Be sure to send the message: msg.AddCustomParameter(GPO) and to do error checking/handling using MSG_SET_READER_CONFIG_RESPONSE.
private void button4_Click(object sender, EventArgs e) { if (btnOpen.Text == "Close") { MSG_SET_READER_CONFIG msg = new MSG_SET_READER_CONFIG(); PARAM_ImpinjAdvancedGPOConfiguration GPO = new PARAM_ImpinjAdvancedGPOConfiguration(); GPO.GPOPortNum = 1; GPO.GPOMode = new ENUM_ImpinjAdvancedGPOMode(); if (rbNormal.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Normal; } else if (rbLLRP.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.LLRP_Connection_Status; } else if (rbPulsed.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Pulsed; GPO.GPOPulseDurationMSec = 2000; } else if (rbInventory.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Reader_Inventory_Status; } else if (rbOperatioinal.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Reader_Operational_Status; } else if (rbITS.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Reader_Inventory_Tags_Status; } else if (rbNCS.Checked == true) { GPO.GPOMode = ENUM_ImpinjAdvancedGPOMode.Network_Connection_Status; } else MessageBox.Show("Error setting GPO Mode"); msg.AddCustomParameter(GPO); MSG_SET_READER_CONFIG_RESPONSE rsp = reader.SET_READER_CONFIG(msg, out msg_err, 12000); if (rsp != null) { textBox2.Text = rsp.ToString(); } else if (msg_err != null) { textBox2.Text = rsp.ToString(); } else textBox2.Text = "Commmand time out!"; } else MessageBox.Show("Please Open Reader and continue"); }
If you are using Java here is some XML and java code that will pulse GPO 1. Also, please note that the XML SET_READER_CONFIG portion could be used by C, C#, or C++.
- First send the following XML to configure the reader:
<?xml version="1.0"?>
<SET_READER_CONFIG MessageID="0" xmlns:Impinj="http://developer.impinj.com/ltk/schema/encoding/xml/1.18"
xmlns="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0">
<ResetToFactoryDefault>false</ResetToFactoryDefault>
<ImpinjAdvancedGPOConfiguration xmlns="http://developer.impinj.com/ltk/schema/encoding/xml/1.18">
<GPOPortNum>1</GPOPortNum>
<GPOMode>Pulsed</GPOMode>
<GPOPulseDurationMSec>2000</GPOPulseDurationMSec>
</ImpinjAdvancedGPOConfiguration>
</SET_READER_CONFIG>
- Use the following java to pulse the GPO 1:
SET_READER_CONFIG msg = new SET_READER_CONFIG(); GPOWriteData GPOWriteData = new GPOWriteData(); GPOWriteData.setGPOData(new Bit(true)); GPOWriteData.setGPOPortNumber(new UnsignedShort(1)); msg.addToGPOWriteDataList(GPOWriteData); msg.setMessageID(getUniqueMessageID()); msg.setResetToFactoryDefault(new Bit(false)); LLRPMessage response = connection.transact(msg, 12000);
Here is a video showing Advanced GPO in action!
Comments
Article is closed for comments.