SWTB_Banner_Left_LogoOnly

UCON Quick-Start Guide

clearpixel

SWTB_7Button_BlueLine

UCON Protocol Quick-Start Guide

The UCON Protocol Quick-Start Guide will walk you through the configuration of a Unsolicited Serial protocol for a barcode scanner. While your particular protocol might be quite different from this, this protocol includes steps most protocols will have to make in configuration. Steps for other protocols are also noted in this guide.

Starting a UCON project begins with reviewing your protocol and knowing some things about the communications you will be doing based on this. 

  • Are you using Serial or Ethernet to connect to the device? 
  • Is the connect a solicited or unsolicited message? 
    • Solicited messages are when the UCON will send a message requesting a read or a write.
    • Unsolicited messages are when the device will connect to the PC to start sending messages. 

If you can't tell which it is E-mail us for help.

Once you know if your doing a serial or Ethernet connection and if it's solicited or unsolicited you can begin configuration of the Server. If you have never configured a Channel or Device in the UCON or TOP Server before please refer to our Server Quick-Start Guide. Once you have configured your Channel and Device for your system, right click on the Device you have created and choose Properties. Next click on the Transaction Editor Tab as seen below

The Transaction Editor is where you will configure the UCON with your protocol. All tags for the UCON project will be created and modified through the transaction editor. Do not modify tags outside of the transaction editor as any of these changes will not be passed to the transaction editor and will fail to work with your protocol.

You can also Add a Password to the transaction editor to prevent unwanted changes. We recommend you wait to use this feature till after you have verified communications with your device.

Once you Click on the "Launch Transaction Editor" button you will see the Device profile window open as seen below.

In the example below you can see the Device that was configured is called Device1. Highlight your Device and the three yellow Icons will appear available as in the image below. The first yellow Icon is for creating a group or organizing your project. The second is for creating a block which is a group of tags that work together. The third is for creating a tag under the device to hold information. 

Next highlight the word under the block (either Unsolicited or Read) then Right click in the right window under the word Step and the Options available will drop down as shown to the left.

When doing a Solicited message the first step is normally to Write a Character as part of the first command requesting a read. When doing an Unsolicited message as in this example the first step will be to do a Read Response. The Read Response is used to determine what incoming information makes up a single RX message or packet of information. 

Notes on Commands

When doing a read or write to the device the first step is normally to write special characters or a string using Write Chracter or Write String. This gets put into the TX buffer which gets transmitted by using the Transmit command. When doing a write you will also need to use the Copy Buffer command to move the data your client wrote to the tag. This tag data is in the Write buffer and needs to be copied to the TX buffer. 

The Read Response can be used after the Transmit when waiting for a response to the commands sent. This puts the information coming to the PC port into the RX buffer. Once in the RX buffer you can use the Update Tag command to put data into the tags. You can also use the different Test commands to check the incoming data for expected characters or ID data. 

Using the Log Event command is also helpful for debuging a protocol. By sending specific messages to the Servers Event Log you can be sure what specific actions have or have not taken place when testing your configuration.

As Shown below the Read Response can determine the packet size by the number of bytes of special stop characters. This barcode scanner uses a carriage return and line feed as stop characters. 

Now we need to create a tag to put the incoming string of data into.  Highlight the block on the left again and click on the second yellow icon to create a tag. The first tag we will create we'll call counter. 

This is a special tag that will be used to count each incoming data event. This is done because two scans might hold the same string value and we would need to know that the data has changed. If we only read the data tag in our client an event won't happen to notify our client of a change, but this counter tag value will change every time we get a new read.

In this case we have made it a Long, but you can configure this to read any size number you want it to increment too before going back to 1 again.

The next tag we will create will hold the string value of the data from the Barcode. 

The configuration of this tag will determine how much of the data will be interpreted as information for this tag. If we set the data type to Word, only 4 bytes of information would be seen as belonging to this tag even if the data contained more then 4 bytes of information. 

In this case we don't know how long the String will be in every case, so we have do define it as a variable length string. This is done by clicking on the Format properties button.

For a variable length String we need to make sure the Fixed length box is not checked. 

Since our data ends with a carriage return and line feed there are two ways we can determine the end length of the string. First we can click the Parse to next delimiter and use the carriage return character.  Second we can just change the Read up to: number bytes from frame end to 2 bytes instead of 1. Either method will work for this simple protocol, but for cases where the data contains more than one tag of information you will want to use the Parse to next delimiter if there is one for variable length data.

Once we have these two tags configured we highlight the Unsolicited icon in the tree of the Device profile again. Then right click under the Read Response entry and choose Update tag.

The first tag that we will update is our Counter tag. The tags we create will show up under the drop down to the right. Since this tag is for counting events we select the Event Counter as the Data source. You can add a description to these if you like to help keep track of your protocol configuration.

Next we will right click under the Update tag event and enter another Update tag event. In this case we will now update the Input tag. The input tag's Data Source is the Read Buffer. Once this is done we can close the Device protocol window. It will ask if we want to update the Server and we will click yes, so our work will be saved. This is a good time to save the whole project in the Server by clicking on the file menu and choosing Save As.

Now we can test our protocol by opening the Quick Client with the icon. See the Quick Client information on how to use the Quick Client. It's also a good idea to Right Click on the Channel in the Server, choose properties and enable the diagnostics. The Channel Diagnostics can now be opened by right clicking on the Channel. With both of these open you can now do a scan and test the protocol. The Quick Client should show the value scanned in the Input tag and the Counter tag should increment to 1. The diagnostics should show the RX values returning in White test.

 

 | HOME | OVERVIEW | EXAMPLES | QUICK START | RELATED PRODUCTS | SUPPORT & DOWNLOADS | PRICING & ORDERING

P: 1-888-665-3678 (US-Sales) or 704-849-2773 (Support & International), F: 704-849-6388
148A East Charles Street, Matthews, North Carolina, USA 28105
Copyright Software Toolbox, Inc., 1996-2006, All Rights Reserved Worldwide.