Home
User-Configurable (U-CON) Driver Help
Contents
1. Write Data Copy Buffer Write Character 003 Read Commands gt H MMDDYYHHMMSS MMDDYYHHMMSSASC Hi MMDDYYHHMMSSASCHEX Write Commands gt 0 Oh in SIn Read Write Character 004 Conditional Commands Nro Update Tag MN y Write Tai N Processing Commands MMDDYYYY TIME Insert Function Block TIMEASC Refresh Validation Cut Ctrl X Copy Ctrl C Delete Del Properties For users without a mouse individual commands can be selected from the Edit submenus with alt character combinations Item View Updating the OPC Server with the Device Profile Once all of the groups tags and transactions have been defined the device profile must be sent to the server This is initiated by clicking on the Update Server icon or by selecting File Update Server from the main menu The Transaction Editor also provides a chance upon its closing LA Device profile User Configura y Globa I J 54 ESPE rr Cato Update Server After the device profile has been transferred the Transaction Editor will shut itself down and the driver will automatically initiate the OPC server s auto tag database generation function All of the tags that have been defined will instantly appear in the OPC server project Note At this point the changes have not been saved to file Click File Save to save Remember to save the OPC server pr
2. If preceded in same block by transparent header data Custom 5 8 bit This is a variation of the LRC 8 bit check sum type Here control characters 0x00 0x1F are not included in the summation Custom 6 8 bit This is a variation of the SUM 8 bit check sum type Here the raw data is assumed to be in lower case ASCII Hex format 0 9 a f Each pair of ASCII Hex characters is converted to a byte value and summed modulus OxFF Users will typically want to select the Byte from 2 ASCII Hex chars lower case hh device data format so that the resulting byte value is placed in lower case ASCII Hex format Custom 7 16 bit The C code used to calculate this custom check sum is as follows Word CheckSumCustom_7 Byte pData int nLength www kepware com User Configurable U CON Driver Help C CRC and checksum calculation Use including checksum void CheckSumCustom_7 unsigned char MessageOut 28 unsigned char i Word wCRCNChkSum 0 MessageOut 26 OxFF for i 0 i lt 26 i MessageOut 26 CRC_Byte MessageOut 26 MessageOut i MessageOut 27 0 for i 0 i lt 27 i MessageOut 27 MessageOut i wCRCNChkSum MessageOut 26 wCRCNChkSum lt 8 wCRCNChkSum MessageOut 27 return wCRCNChkSum CRC algorithm unsigned char CRC_Byte unsigned char Seed unsigned char Data unsigned char j for j 0 j lt 8 j if Data Seed amp
3. New Tag Group x Cancel Her Name Group_1 Cancel Help The only user defined property that a tag group has is its name Although a valid default name is generated when first creating a new group it can be changed to any valid name Valid names must start with a letter or digit consist of only letters digits and underscores be less than 32 characters long and be unique to the parent item A tag group name may not be the same as a tag block at the same level since the server treats blocks as groups The group s name can be changed at any time during the editing session Groups may be nested up to three levels deep Tag Blocks Tag blocks are a special type of group used by the Transaction Editor to contain all tags that can be updated by a common read or unsolicited transaction The transaction common to all tags in the block is attached to the block item in the editor s item view This common transaction should contain an Update Tag command for each tag in the group Block tags with Read and Write client access permission will each have their own Write transaction A tag on group folder icon in the Transaction Editor represents tag blocks only The server represents tag blocks with the normal group folder icon A tag block item can be added to the device or a tag group Tag blocks may be added using the main menu the selected item s pop up menu or the toolbar Existing blocks can be edited by selecting it then clicking Pr
4. Continue Command The Continue command is one of several conditional actions available under the five test commands Test String Test Character Test Device ID Test Bit Within Byte and Test Check Sum Continue tells the driver to do nothing as a result of the test and to proceed to the next command in the transaction The Continue command has no user defined properties Control Serial Line Command The Control Serial Line command allows for manual control of the RTS and DTR lines To add a Control Serial Line command right click on the desired step in the Transaction View and then select Write Commands Control Serial Line from the resulting pop up menu Alternatively click Edit New Write Command and then select Control Serial Line from the main menu Important This command should be used with caution Before setting the RTS or DTR line high or low be sure to set the line s default setting before the start of any transaction Set the line back to default when the transaction completes and whenever there is a failure Control Serial Line command properties x Line RTS Request To Send Cancel C DTR Data Terminal Ready Help J Check to Assert and uncheck to De Assert Description m Descriptions of the parameters are as follows e Line These options specify the type of line Options include RTS or DTR Users must select only one at a time After completing this dialog window for one line
5. Write Check Sum Command The Write Check Sum command tells the driver to compute a check sum reformat it if needed and append the result to the write buffer There are several choices for common check sum types and device data formats To add a Write Check Sum command right click on the desired step in the Transaction View and then select Write Commands Write Check Sum from the resulting pop up menu Alternatively select Edit New Write Command Write Check Sum from the main menu Write Check Sum command properties x m Data destination K C Read buffer Cancel dl Help C Scratch buffer fi C Global buffer fi Type caca 6 16 bit Reflected y Format 16 bit Intel lo hi Me Format properties Start bytes from frame start End bytes from current frame end 0 jo Description _ ooo Descriptions of the parameters are as follows Data Destination This parameter specifies the destination Options include Read buffer Write buffer Scratch buffer and Global buffer If the Scratch or Global buffer options are selected users must also specify the buffer index Note If there are not enough bytes of data in the buffer the command will be aborted and the transaction will fail An error message will also be placed in the OPC server s Event Log Check Sum Type This drop down menu provides a complete list of supported algorithms For more information refer t
6. 02 022 eee ee ee cee eee cece eee ee eee 104 Unable to write to lt address gt on device lt device name gt 2 22 22 eee eee 104 User Configurable U CON Driver Error Messages 2200 02 cece eee eee cece cece eee eee 105 RX buffer overflow Stop characters not received _ 0 0 2 22 c eee eee ee eee eee eee 105 RX buffer overflow Full variable length frame could not be received 2 2 2 2222 2 22 106 Unable to locate Transaction Editor executable file 2 00 0020202 106 Copy Buffer command failed for address lt address transaction gt lt source destination gt buffer bounds A wee A tn ee ee ee eee oe ee dee eee 106 Failed to load the global file sr renatas ne a a a eee ee ce eee ee cece nc 106 Go To command failed for address lt address transaction gt label not found 2 2 2 2 2 107 Mod Byte command failed for address lt address transaction gt write buffer bounds 107 Test Character command failed for address lt address transaction gt source buffer bounds 107 www kepware com User Configurable U CON Driver Help 5 Test Check Sum command failed for address lt address transaction gt read buffer bounds 107 Test Check Sum command failed for address lt address transaction gt data conversion 108 Test Device ID command failed for address lt address transaction gt read buffer bounds
7. User Configurable U CON Driver Help Ascii Integer format properties x J Fixed length String length fi Cancel Help dl Spaces 020 Pad type m Parse termination method IV Parse to next delimiter if present Delimiter 044 Ox2C ba Read up to f bytes from frame end 2 Since value 3 does not precede a comma it must have a different termination method Two equally good options exist here users can choose to parse to the next delimiter where this time the delimiter would be the end ETX character Or users could leave the Parse to next delimiter box unchecked and specify Read up to 1 byte from frame end 3 Next define the block read transaction The first set of commands in the transaction will build the read request in the write buffer The details of the request are not important for this example Following these commands will be a Transmit command to send the write buffer to the device 4 Next define a Read Response command to gather the response and store it in the read buffer In this example users do not know how many bytes to expect but they do know that the response will end with the ETX character The command properties will look as shown below Read Response command properties x m Termination method K Wait for number of bytes Cancel Wait for stop characters Help di Number of bytes ASCII characters Stop characters 0x00 a lt NUL gt 003
8. byCS byTemp return byCS y Custom 2 8 bit This is a variation of the LRC 8 bit check sum type binary complement of the modulus OxFF sum of all bytes This can be expressed as byCS bySum or byCS OxFF bySum where byCS is the result and bySum is the modulus OxFF sum of all bytes Custom 3 16 bit This is a variation of the CRC 16 16 bit check sum type Here the sum is initialized to 0x0000 instead of OxFFFF as it is in CRC 16 16 bit Reflected Custom 4 16 bit This is a variation of the CRC 16 16 bit check sum type Here the sum is initialized to 0x0000 instead of OxFFFF as it is in CRC 16 Also this check sum method searches the frame for a start sequence and end sequence DLE characters are used for data transparency When using this check sum method make sure that the whole frame is included in the calculation range This driver will search for the start and end sequence within the frame If the end points are not located a check sum of 0x00 0x00 will be used The check sum calculation begins after lt DLE gt lt SOH gt or lt DLE gt lt STX gt The characters of the start sequence are not included in the calculation The calculation ends after lt DLE gt lt ETB gt lt DLE gt lt ETX gt or lt DLE gt lt ENQ gt The DLE characters in the end sequence are not included in the calculation ELTON CU T ELITE IO E ELIO IN ET If not preceded in same block by transparent header data
9. Character This drop down menu specifies the character for which to search Any ASCII character in the range of 0x00 to OxFF may be specified Search for character in ASCII Hex format This option specifies whether the data is in ASCII or ASCII Hex format For example a comma in ASCII format will be a single byte with value 0x2C A comma in ASCII Hex format will be two bytes with values 0x32 2 0x43 C The default setting is unchecked Note When searching for a character in ASCII Hex format users must make sure that the search starts from the first byte of a string of ASCIT Hex characters or an even number of bytes preceding them The Move Buffer Pointer command may need to be used in order to initialize the pointer Goto on failure This parameter specifies a label that execution should proceed to if the specified characters are not found This parameter is optional If no label is specified the buffer pointer will be left unchanged on seek failure and the driver will execute the next command in the transaction If a label is specified but not found on seek failure the current transaction will be aborted The Transaction Editor will warn users of this condition For more information refer to Label Command Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction
10. Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application www kepware com User Configurable U CON Driver Help 83 For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII integer and ASCII real formats the pad characters are added as needed to the right For example if the string length was set to 4 and a value of ABC is to be written to the device the driver will create a string consisting of the characters ABC in Unicode form followed by one pad character There are many options for pad characters spaces 0x00 0x20 zeros 0x00 0x30 and NULL 0x00 0x00 The pad character option applies to writes only the driver can read any valid ASCII string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0
11. The command has no user defined properties To add a Clear RX Buffer command right click on the desired step in the Transaction View and then select Processing Commands Clear RX Buffer from the resulting pop up menu Alternatively click Edit New Processing Command and then select Clear RX Buffer from the main menu Notes 1 The Clear RX Buffer command does not clear the COM buffer It only clears the data that has been read by a Read Response Command 2 The RX buffer is automatically cleared before each Read Response command is processed Clear TX Buffer Command The Clear TX Buffer command tells the driver to set all bytes in the transmit buffer to 0x00 and the current length of the write frame to 0 The command has no user defined properties To add a Clear TX Buffer command right click on the desired step in the Transaction View and then select Processing Commands Clear TX Buffer from the resulting pop up menu Alternatively click Edit New Processing Command and then select Clear TX Buffer from the main menu Note The TX buffer is automatically cleared at the beginning of each transaction and after each Transmit and Read Response command www kepware com 30 User Configurable U CON Driver Help Close Port Command The Close Port command tells the driver to close the COM port associated with the current transaction The port will be reopened automatically the next time something is written out of that port The
12. This is different from a scratch buffer which is associated with only one device Important Global buffers should be used with caution because they are associated with all devices for all channels To exchange device specific information e g to make device specific changes use scratch buffers TT Note For instructions on initializing a global buffer refer to Initialize Buffers Rolling Buffer Rolling buffers are similar to scratch buffers but differ in that writes append data rather than replace it Rolling buffers can be used to exchange information between transactions defined for that device Data cannot be copied to a rolling buffer associated with a different device Data stored in a rolling buffer will exist as long as the OPC server project is running or until the rolling buffer is overwritten in a transaction Each device has an associated Rolling Buffer When updating a tag from arolling buffer be aware that the value used will be the last value stored in the buffer Depending on how the transaction is defined this data may not necessarily represent the current state of a device If no data has been stored in the rolling buffer at the time the Update Tag command is executed the tag will be given a value of zero See Also Update Tag Command Initialize Buffers A preset value for any scratch buffer and or global buffer can be defined The buffers will be loaded with these preset values on driver startup To define buffer pr
13. User Configurable U CON Driver Help 105 1 The serial connection between the device and the host PC is broken 2 Thecommunication parameters for the serial connection are incorrect 3 The named device may have been assigned an incorrect Network ID Solution 1 Verify the cabling between the PC and the device 2 Verify that the specified communication parameters match those of the device 3 Verify that the Network ID given to the named device matches that of the actual device User Configurable U CON Driver Error Messages The following messages may be generated Click on the link for a description of the message RX buffer overflow Stop characters not received RX buffer overflow Full variable length frame could not be received Unable to locate Transaction Editor executable file Copy Buffer command failed for address lt address transaction gt lt source destination gt buffer bounds Failed to load the global file Go To command failed for address lt address transaction gt label not found Mod Byte command failed for address lt address transaction gt write buffer bounds Test Character command failed for address lt address transaction gt source buffer bounds Test Check Sum command failed for address lt address transaction gt read buffer bounds Test Check Sum command failed for address lt address transaction gt data conversion Test Device ID command failed for address lt address transaction
14. groupings and transactions and may be password protected For more information refer to Password Protection As shown in the image below the left pane shows the Item View and the right pane shows the Transaction View E Device profile User Configurable Driver File Edit View Tools Help DS a d x _Global Step Command Value Format Description IM Devicel Write DeviceID 8 bitIntel hi Register_1 Write Character 003 0x03 C lt ETX gt Read register command code far Register_2 Write Character 000 0x00 lt NUL gt Address high A Register_3 Write Character 107 06B k Address low Read Write Character 000 0x00 lt NUL gt Number of points high Write Write Character 001 001 A lt SOH gt Number of points low Bi Register 4 Write Check S CRC 16 16 bit egister_ Transmit N A Register_5 Read Response N A Register_6 10 TestCheckSum CRC 16 16 bit 11 UpdateTag Register 3 Transaction View 1 2 3 4 5 6 oon Item View The Item View displays the hierarchy of OPC items attached to a particular device The fundamental item type is the tag Associated with each tag are one or more transactions represented by to and from arrow icons These transactions can be for solicited Reads Solicited Writes or Unsolicited Reads and are created automatically whenever a tag is defined Tags may be attached to the device p
15. it is still possible for certain poorly defined configurations to cause a driver failure For this reason development work should be completed on an isolated system when possible and the project should be tested thoroughly before going live Users should also save work frequently www kepware com 14 User Configurable U CON Driver Help Password Protection Device profiles have the option of being password protected which prevents unauthorized users from launching the Transaction Editor and examining or modifying the profile Each device profile can have its own password Note This feature is not the same as the OPC Server s User Manager tool 1 To enable password protection for a device open the Device Properties and then select the Transaction Editor tab Device Properties General Sean Mode Timing Auto Demotion Transaction Editor Unsolicited Message Wait Time Launch Transaction Editor Regenerate Tag Database 2 If the device does not have a password associated with it the Add Password button will be enabled To invoke the Add Password dialog click this button www kepware com User Configurable U CON Driver Help 15 Password on Confirm A 3 In Password specify the desired password Passwords are not case sensitive and may be up to 15 characters long 4 In Confirm retype the password Once finished click OK Note The server project must be saved after a password has bee
16. lt address gt on device lt device name gt Device lt device name gt is not responding Error Type Serious Possible Cause 1 Theserial connection between the device and the host PC is broken 2 The communication parameters for the serial connection are incorrect 3 The named device may have been assigned an incorrect Network ID 4 Oneor more transactions are not configured properly 5 Theresponse from the device took longer to receive than the amount of time specified in the Request Timeout device setting Solution 1 Verify the cabling between the PC and the device Verify that the specified communication parameters match those of the device Verify that the Network ID given to the named device matches that of the actual device we oN Check that all Read Response command properties are correct A very common cause for Device not responding errors from this driver is a Read Response command set to wait for more bytes that the device actually sends It may also be necessary to place a pause command at the end of transactions that write to the device but do not get a response In such cases the device may need a short period of time to process the write before it will accept the next request from the driver 5 Increase the Request Timeout setting so that the entire response can be handled Unable to write to lt address gt on device lt device name gt Error Type Serious Possible Cause www kepware com
17. 0x03 C lt ETx gt 001 0x01 A lt SOH gt Add gt gt 002 0x02 B lt STX gt 003 0x03 C lt ETx gt 004 0x04 D lt EOT gt lt lt Bemove 005 0x05 E lt ENQ gt m Description Read up to ETX IV Clear RX buffer before read M Log timeout errors www kepware com User Configurable U CON Driver Help 95 5 Once the response has been received and copied into the read buffer commands must be added to parse the data and send the result to the appropriate tag The Update Tag command does just that There must be an Update Tag command for each tag in the block For Tag_1 users know the data starts at byte 2 in the read buffer The device data format defined for Tag_1 tells the driver to parse up to the next comma The command properties for Tag_1 will look as shown below Update Tag command properties x Iag OK Tag 1 zl Cancel m Data source Read Buffer Help rl C Scratch Buffer C Event Counter J Data starts at current buffer pointer Data start byte Description Update tag 1 from byte 2 6 Users cannot predict what byte the data for Tag_2 will start on because of the variable length ASCII values but they do know value 2 will follow the first comma in the frame This is where buffer pointers come into play The objective is to move the read buffer pointer to the start of value 2 This is done in two steps the first of which is accomplished with
18. 6 bit strings the String length must be specified As its name suggests this sets the total number of characters one byte per character prior to conversion that will be written to or read from the device A minus sign counts as one character The number of bytes sent over the wire is equal to three fourths the String length e For fixed length ASCII integer packed 6 bit strings the Pad type must also be specified Pad characters are used to fill out the string for integer values that do not require the full string length For example if the string length was set to 4 and a value of 12 is to be written to the device the driver will create a string consisting of two pad characters followed by 1 then 2 There are many options for pad characters spaces 0x20 and zeros 0x30 The pad character option applies to writes only the driver can read any valid ASCII integer packed 6 bit string of the specified length For variable length ASCII integer packed 6 bit data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This is accomplished by specifying an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame ROUND OFF When writing values that require more characters than allotted by String length the driver will write the largest positive or smallest negative value that can be expresse
19. ASCII character a Start bytes from frame start sl I 3 Description poe Descriptions of the parameters are as follows Add Remove escape characters This parameter is used to add or remove escape characters To add escape characters as needed to the specified section of an outgoing frame select Add escape characters To remove escape characters from the specified section of a received frame select Remove escape characters Once the escape characters have been removed from a received frame data values may be parsed by subsequent calls to the Update Tag command Data buffer This parameter specifies the buffer in which the frame that will be processed by this command is stored The Handle Escape Characters operation is done in place If choosing the Scratch or Global Buffer option specify the buffer index in the box to the right ASCII characters and Control characters These parameters specifies the control characters by selecting entries in the ASCII characters box and then clicking Add gt gt If multiple control characters are selected they will be processed independently they will not be added or removed as a sequence Users may select up to five control characters although multiple Handle Escape Characters commands can be included in the transactions for protocols that require more Escape character This parameter specifies either Duplicate control character or Selected ASCII character Start
20. Client The server s Diagnostic Window and the Quick Client application are indispensable tools for debugging transactions The Diagnostic Window shows users exactly what was sent and received by the driver during a transaction Common errors such as a Read Response command configured to receive an incorrect number of bytes or an incorrect device data format selection are apparent with the Diagnostic Window The Quick Client is www kepware com User Configurable U CON Driver Help 93 tightly integrated with the server so that users invoke a powerful test client with all of the tags automatically loaded with one click With the Quick Client users can manually control the execution of each transaction Follow the instructions below for the recommended method of debugging a new transaction Note that the server project should be saved after each edit session 1 Double click on the desired channel in the server and make sure that the Enable diagnostics box is checked 2 Next click on the Quick Client icon on the server s toolbar 3 Disable all tags in the Quick Client except for the ones in the _System and _ Statistics groups By doing this the Diagnostic Window will not fill up with data from transactions that users are not interested in Note If users have a lot of tags it may be easier to launch the Quick Client directly from Windows instead of from the server This way users can manually add the tags they want to test an
21. Close Port command has no user defined properties To add a Close Port command right click on the desired step in the Transaction View and then select Write Commands Close Port from the resulting pop up menu Alternatively click Edit New Write Command and then select Close Port from the main menu Compare Buffer Command The Compare Buffer command tells the driver to compare specified sections of bytes in two buffers Various actions can be taken depending on the result of that comparison To add a Compare Buffer command right click on the desired step in the Transaction View and then select Conditional Commands Compare Buffer Alternatively click Edit New Conditional Command and then select Compare Buffer from the main menu www kepware com User Configurable U CON Driver Help 31 Compare Buffer command parameters q x Buffer 4 C White buffe C Scratch buffer fi Help C Global buffer f o o a 1x a Use Current Buffer Position Start byte zz Buffer B C Read buffer Write buffer C Scratch buffer E Global buffer 1 E I Use Current Buffer Position Start byte 1 Number of bytes to compare pee True action Continue Action properties False action Invalidate Tag x Action properties Description _ aa Descriptions of the parameters are as follows Buffer A and Buffer B The Read buffer Write buffer Scratch buffer
22. Command Value Format Description m Solicited 1 Write Character 001 0x01 A lt SOH gt Default Write Character 002 0x02 B lt STX gt MMDDYYHHMMSS oll la Write Commands MMDDYYHHMMSSASC 4 Copy Buffer 1 8 MMDDYYHHMMSSASCHEX 3 Write Character 00 Read Commands i Read 6 Write Character 004 Conditional Commands gt E 7 Update Tag MN i Write Tmi N Processing Commands MMDDYYYY 4 6 TIME Insert Function Block TIMEASC Refresh Validation Cut Ctrl X Copy Ctrl C Delete Del Properties Note If the mouse pointer is on a blank portion of the Transaction View when right clicking the new command will be added to the end of the list If right clicking on an existing command step anew command will be inserted at that step Item View 3 If the command has properties that must be specified a dialog will be invoked before the new command is inserted into the transaction step list 4 Toedit an existing command double click on it Alternatively select it and then click Properties 5 To define other transactions that require similar command sequences simply select and copy the commands of one transaction and paste them into the other Write Commands Write Device ID Command Gets the Device ID set in the server s Device Properties reformats it if needed and then places the result on the Write buffer Write Event Counter Command Appends the value of the eve
23. Data Length Notes O ASCII Integer ddd F V D Integer values encoded as ASCII strings See Also Format ASCII Integer ASCII Integer Hex hhh F V D Integer values encoded as ASCII hex strings See Also Format ASCII HEX Integer ASCII Real F V D Real or floating point values encoded as ASCII strings ddd dddE ddd See Also Format ASCII Real ASCII String ccc F V D Strings encoded as ASCII characters See Also Format ASCII String ASCII Multi Bit Integer The 8 bits in a byte value are represented as a string of 8 ASCII XXXXXXXX 0 or 1 characters See Also Format ASCII Multi bit Integer ASCII String Alternating F V D Strings encoded as ASCII characters where each of the characters Byte OcOc is preceded by a character containing O zero For example the string TEST will be 0x00 0x54 0x00 0x45 0x00 0x53 0x00 0x54 in this format See Also Format Alternating Byte ASCII String ASCII Hex String From F V D Nibbles encoded as ASCII hex strings Nibbles hh hh hh See Also Format ASCII Hex String From Nibbles Unicode String F V D Strings encoded in the Unicode format ulu2u3u4 See Also Format Unicode String Unicode String with Lo Hi F V D Strings encoded in the Unicode format with the order reversed Byte Order Lo Hi Least significant byte first u2u1u4u3 See Also Format Unicode LoHi String Byte from 2 Offset Nibble The value is represented as two ASCII characters with values chars low nibb
24. Parse termination method di J Parse to next delimiter if present Delimiter 000 lt NUL Read up to bytes from frame end The Fixed length check box determines if the string data is fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length ASCII hex integer strings the String length must be specified As its name suggests this sets the total number of characters one byte per character that will be written to or read from the device A minus sign counts as one character For fixed length ASCII hex integer strings the Pad type must be specified Pad characters are used to fill out the string for integer values that do not require the full string length For example if the string length was set to 4 and a value of 12 is to be written to the device the driver will create a string consisting of two pad characters followed by 1 then 2 There are many options for pad characters spaces 0x20 zeros 0x30 and NULL 0x00 The pad character option applies to writes only the driver can read any valid ASCII integer string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one
25. Test Character command properties x Test value K 000 0 00 lt NUL gt Cancel m Data source dl Read buffer Help C White buffer C Scratch buffer C Global buffer 1 kb i M Use Current Buffer Position Position 1 True action Continue Action properties False action Invalidate Tag Action properties Description ES Descriptions of the parameters are as follows Test value This drop down menu provides the complete list of characters that may be added The choices are listed with the decimal value followed by the hex equivalent and may be followed by the keyboard equivalent and mnemonic if applicable Users may drop the list and select an item from it or take advantage of the auto complete feature which is used to type in a decimal or hex value in 0x format or a character and the indicated item will be selected from the list automatically To clear the entry press Delete or Backspace on the keyboard Data Source This parameter specifies the data source The Test value may be compared with characters in the Read buffer Write buffer Scratch buffer or Global buffer If either the Scratch or Global buffer options are selected the buffer index must also be specified In addition to the data source buffer the Position within that buffer must also be specified This is the 1 based index of the character to be parsed from the buffer True action Thi
26. View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later See Also Moving the Buffer Pointer Important Use care with scratch and global buffer pointers Unlike the read and write buffer pointers scratch and global buffer pointers are not automatically reset at the start of each transaction www kepware com User Configurable U CON Driver Help Set Event Counter Command The Set Event Counter command is used to reset the value for the event counter of the current transaction To add a Set Event Counter command right click on the desired step in the Transaction View and then select New Processing Commands Set Event Counter from the resulting pop up menu Alternatively select Edit New Processing Command Set Event Counter from the main menu Set Event Counter command properties OK Description __ Set event counter to K Cancel I Set block event counter Help Descriptions of the parameters are as follows Set event counter to This parameter specifies a number to which the event counter of the current transaction will be reset Set block event counter The Set Event Counter command can reset the event counter of the transaction in which the command is used or the counter of the read unsolicited transaction of its parent block Event counters are typically used in tag blocks where one or more tags are updated from received d
27. a Seek Character command This command is used to move the pointer to the first comma in the frame Seek Character command properties x m Data source K Read Buffer Cancel Write Buffer dili Help C Scratch Buffer Character 044 0x2C ing Search for character in ASCII Hex format Goto on failure pu Description Seek first comma 7 If there was some question of where the delimiter will be found users can specify a Go To on failure Label to handle the situation www kepware com 96 User Configurable U CON Driver Help 8 Next move the pointer past the comma to the first byte of value 2 This is done using a Move Buffer Pointer command In this case users should perform a relative move one byte from the current position Move Buffer Pointer command properties El Data source K Cancel C White Buffer Help dl C Scratch Buffer m Move type Relative C Absolute Number of bytes pts Description Skip over comma 9 If users expected values to be separated by a comma space then they would have entered 2 in Number of bytes Now the read buffer pointer points to the first byte of value 2 The Update Tag command for Tag_2 should appear as shown below Update Tag command properties x Tao OK Tag 2 Cancel m Data source Read Buffer Help dii C Scratch Buffer E C Event Counter IV Data s
28. button the dialog should appear as shown below www kepware com User Configurable U CON Driver Help ASCII Multi Bit Integer format proj x Start bit p Cancel Number of bits Help 3 The Start bit control sets the index of the first bit that the driver will read from or write to As is standard practice the least significant bit LSB is referred to as bit index 0 and the most significant bit MSB has a bitindex of 7 The Number of bits control sets how many bits to read or write starting at the start bit index If a value is to be written that exceeds the maximum value that the can be represented by the specified number of bits then all of the specified bits will be set to one All bits other than those specified by this format will be set to zero in writes If this format is used with a Boolean data type then all specified bits are set to one if the write value is non zero If wishing to set a number of bits in a predefined byte preserving the state of the other bits use another device data format and the Modify Byte command Read Example Say the device returns 11001010 and this format specifies a start bit of 3 and number of bits of 4 The value returned to the tag is 9 decimal 1001 binary Write Example Say a value of 1 is to be written and this format specifies a start bit of 3 and number of bits of 2 The value sent to the device will be 00001000 If a value of 3 or greater is to be written usin
29. bytes from frame start This parameter specifies the position of the first byte relative to the start of the frame of data to be processed by this command The byte positions are addressed using a 1 based index For example specify O to include the first byte specify 1 to skip the first byte and so forth www kepware com User Configurable U CON Driver Help End bytes from current frame end This parameter specifies the position of the last byte relative to the end of the frame of data to be processed by this command The byte positions are address using a 1 based index For example specify 0 to include the last byte specify 1 to process up to but not including the last byte and so forth Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Descriptions are optional but can be very helpful when reviewing the transaction definition later Insert Function Block Use the Insert Function Block command to include the commands that were defined in a previously defined function block of a Read Write or Unsolicited transaction For more information refer to Function Blocks To add an Insert Function Block command right click on the desired step in the Transaction View and then select Insert Function Block from the resulting pop up menu Alternatively select Edit Insert Function Block from the main menu Insert Function Block xi Function block My d
30. can be connected to a single channel as long as they can all use the same protocol and driver 2 Next specify the various communication parameters such as baud rate parity number of data bits and so forth that will be required by the devices 3 In Unsolicited Mode specify the type of mode in which the device will run When unchecked the device will run in normal mode In normal mode the driver will request data from each device periodically up to 100 or more times per second per tag It will ignore all data that is not in response to a request In unsolicited mode the driver will not request data from the device instead it will wait for data to come in from the device The default setting is unchecked For more information refer to Unsolicited Communications below Mode if devices connected to this channel will be sending unsolicited data check the box below and specify unsolicited mode parameters 1000 E www kepware com User Configurable U CON Driver Help 11 4 If Unsolicited Mode was selected the Receive Timeout Dead Time and Key Length parameters will be available Before configuring these settings users should note how the driver handles unsolicited data For more information refer to Unsolicited Communications below Descriptions of the parameters are as follows Receive timeout This parameter specifies the amount of time that the driver should wait to receive the full unsolicit
31. drop down menu provides a list of the available format options For more information refer to Device Data Formats Format Properties This button will become enabled if the selected format has properties that must be set Use Current Buffer Position When checked the current position for the specified buffer will be used in the test This parameter overrides the Start Byte parameter Start Byte This value tells the driver where in the read buffer the Device ID begins This number is a 1 based index The number of bytes parsed is based on the format specification True action This parameter specifies what actions will occur if the Parsed ID is the same as the correct value False action This parameter specifies what actions will occur if the IDs do not agree Action properties This button will be activated for actions that require additional properties to be set Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Test Frame Length Command The Test Frame Length command tells the driver to compare the length of the received frame with a test value Various actions can be taken depending on the result of that comparison This command is especially useful when the incoming frame was received based on a sequence of stop characters To a
32. encoded as ASCII packed 6 bit characters See Also Format ASCII Real packed 6 bit When a floating point value is written to this format clamping will be applied to both the positive and negative directions If the value written is less than 3 402823466e 38 then the value will be clamped to 3 402823466e 38 If the value written is greater than 3 402823466e 38 then the value will be clamped to 3 402823466e 38 When a Signaling NaN is written it will be converted to a Quiet NaN ASCII Hex Formats Format bata Length noes SSS NIBBLE from 1 ASCII Hex 1 char h Word from 4 ASCII Hex chars LC BS hh hh DWORD from 8 ASCII Hex chars hh hh hh hh ASCII Hex String hh hh hh Bit O from 2 ASCII Hex chars hh Bit 1 from 2 ASCII Hex chars hh Bit 2 from 2 ASCII Hex chars hh Bit 3 from 2 ASCII Hex chars hh Bit 4 from 2 ASCII Hex chars hh Bit 5 from 2 ASCII Hex chars hh Bit 6 from 2 ASCII Hex chars hh Bit 7 from 2 ASCII Hex chars hh ASCII coded IEEE float hh hh hh hh Example The value 10 0x0A would be sent as a single ASCII Hex character A 0x41 Example The value 26 0x1A would be sent as two ASCII Hex characters 1A 0x31 0x41 Example The value 26 0x1A would be sent as two lower case ASCII Hex characters 1a 0x31 0x61 Example The value 4666 0x123A would be sent as four ASCII Hex characters 123A 0x31 0x32 0x33 0x41 Example T
33. if the strings are not the same Action properties This button will be activated if the specified action requires that additional properties be defined Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Transmit Command The Transmit command tells the driver to output the contents of the write buffer The Transmit command has no user defined properties To add a Transmit command right click on the desired step in the Transaction View and select Write Commands Transmit from the resulting pop up menu Alternatively select Edit New Write Command Transmit from the main menu Transmit Byte Command The Transmit Byte command tells the driver to output a single byte from the write buffer Only the byte transmitted is removed from the buffer any other bytes will remain in the write buffer The Transmit Byte command has no user defined properties To add a Transmit Byte command right click on the desired step in the Transaction View and then select Write Commands Transmit Byte from the resulting pop up menu Alternatively click Edit New Write Command Transmit Byte from the main menu Note The write buffer is not cleared after a transmit byte command Update Tag Command The Update Tag command tells the driver to parse the data value from
34. of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF can be chosen Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame ROUND OFF When writing values that require more characters than allotted by String length the driver will write the largest positive or smallest negative value that can be expressed in the allotted space For example if string length is set to 4 then writing 12345 results in the string FFFF and writing 1234 results in the string FFFF Format ASCII Multi Bit Integer The ASCII Multi Bit Integer device data format option reads or writes a specified number of bit characters represented in an ASCII multi bit integer An ASCII multi bit integer is an 8 character long string where each character can be either 0 or 1 This format option requires the user to specify two Format Properties the start bit and number of bits For example when a format of ASCII Multi Bit Integer xxxxxxxx is selected the Format Properties button in the tag dialog will become enabled After clicking this
35. or Global buffer may be compared When selecting the Scratch or Global buffer options users must also specify the buffer indexes data source buffers and the Start Byte within each buffer Start byte This parameter specifies the 1 based index of the first character to be parsed from the buffer Use Current Buffer Position When checked the current position for the specified buffer will be used in the test Number of bytes to compare This control specifies the total number of bytes to compare from each buffer True Action This parameter specifies the action that will occur if the parse bytes from Buffer A equal the parsed bytes from Buffer B False Action This parameter specifies the action that will occur if the bytes do not agree www kepware com 32 User Configurable U CON Driver Help Action properties If the specified action requires that additional properties be defined this button will become activated Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very useful when reviewing the transaction definition later Note The TX buffer is automatically cleared at the beginning of each transaction and after each Transmit and Read Response command Following any of these conditions the TX buffer must be copied to either a scratch buffer or a global buffer before being used in a comparison
36. osa foo fosa jz ez foraj 5 foss for oss es fos e 23 oac ss m eo ose o2 osc es force h s1 oso j fs oso ha fom r gt 62 p ose _ s oe 63 ET fos 7 jor pa www kepware com 90 User Configurable U CON Driver Help www kepware com User Configurable U CON Driver Help 91 Tips and Tricks For more information select a link from the list below Bit Fields Using the Modify Byte and Copy Buffer Commands Branching Using the conditional Go To Label and End Commands Dealing with Echoes Debugging Using the Diagnostic Window and Quick Client Delimited Lists Moving the Buffer Pointer Scanner Applications Slowing Things Down Using the Pause Command Transferring Data Between Transactions Using Scratch Buffers Bit Fields Using the Modify Byte and Copy Buffer Commands For efficiency sometimes protocols pack several device settings into a single byte sometimes called a bit field For example consider a process control device that has four outputs RO R1 R2 and R3 Each of these outputs can operate in either alarm mode or proportional control mode It is typical for such devices to allow the mode of all four outputs to be read using a single command that returns all four settings in a single byte bit field For example bit O may represent output RO bit 1 represents R1 and so forth If a bit is O then the output is in alarm mode and if the bit is 1 the output is in prop
37. parsing delimited lists of variables For more information refer to Delimited Lists To add a Move Buffer Pointer command right click on the desired step in the Transaction View and then select Processing Commands Move Buffer Pointer from the resulting pop up menu Alternatively select Edit New Processing Command Move Buffer Pointer from the main menu See Also Buffer Pointers and Update Tag www kepware com User Configurable U CON Driver Help ar x m Data source K Cancel Write buffer C Scratch buffer fi 4 C Global buffer i dili Help Move type Relative Backward Absolute Number of bytes Description Descriptions of the parameters are as follows Data source These options specify the data source Options include Read buffer Write buffer Scratch buffer or Global buffer If selecting the Scratch or Global buffer option users must also specify the buffer index in the box to the right Move type This parameter specifies the type of move Options include Relative and Absolute The default setting is Relative Descriptions of the options are as follows Relative This move is a specified number of bytes from the current pointer position Absolute This move places the buffer pointer at the specified byte position where the first byte is number 1 and so forth Backward When checked the pointer will move backward The default setting is
38. regular transaction Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later See Also Event Counters and Set Event Counter Command Write String Command The Write String command tells the driver to append a string of ASCII characters to the write buffer read buffer scratch buffers or global buffer Only printable characters such as letters number and punctuation marks may be used To add a control character or some other non printable character use the Write Character command To add a Write String command right click on the desired step in the Transaction View and then select Write Commands Write String from the resulting pop up menu Alternatively select Edit New Write Command Write String from the main menu The dialog should appear as shown below www kepware com 62 User Configurable U CON Driver Help Write String command properties x Value K Cancel Data destination Help C Read buffer di write buffer C Scratch buffer C Global buffer fi bl Format fasci String ccc x Description Descriptions of the parameters are as follows Value This parameter appends a series of characters to be appended to the buffer The string may be of any length A NULL terminator will not be a
39. sent as an ASCII string including separators and delimiters With the example shown for Binary Data above if the Date delimiter is set to the Time delimiter is set to and the separating delimiter is set to lt space gt the value would be sent as 30 39 2D 31 31 2D 30 39 20 30 32 3A 31 35 3A 35 30 ASCII Hex Data When selected the binary data will be sent so that each hex byte s nibble is sent as a printable ASCII character With the example shown for Binary Data above with no separators or delimiters selected the value would be sent as 30 39 30 42 30 39 30 32 30 46 33 32 The remaining options in the dialog box can be used to further refine the date format Date Delimited When checked delimiters will be included in the date value Use the Date Delimiter drop down menu to select the delimiter character The default setting is None Time Delimited When checked delimiters will be included in the time value Use the Time Delimiter drop down menu to select the delimiter character The default setting is None Separating Delimiter When checked a separating delimiter will be included in the date or date time value Use the Separating Delimiter drop down menu to select the delimiter character The default setting is None Year Prefix This parameter is used to specify a 99 year range Users can manually type the range or use the slider to resolve date time data to the correct millennium For example if the year pre
40. sl lt lt Remove Cancel Help www kepware com 64 User Configurable U CON Driver Help To define the transaction key simply double click on the desired ASCII character in the left ASCII characters box or select it and click Add gt The key character sequence will appear in the right Key characters box If a mistake is made the lt Remove button can be used to remove selected items in key characters box The number of characters that must be entered was set when the channel was defined All unsolicited transaction associated with a given channel must have the same key length See Also Configuration Note In the case of multiple unsolicited devices on a single channel the Device ID must be hard coded into the transaction key Therefore the Device ID as set in the server s device property page has no bearing on how incoming data is sorted out to the various tags Make sure that the IDs configured in the physical devices match the corresponding fields in the transaction keys at all times In cases where the protocol does not lend itself to use of such keys this driver can still be used A scanner that sends packets starting with the raw data values would be an example In these cases the transaction key length must be set to zero This will force the driver to use the first unsolicited transaction defined on the channel to interpret all incoming packets Because of this there should be only one device on the channel Furthermo
41. the frame DLE acts as an escape character and must be interpreted in the context of what follows In the example above the value 4099 would be encoded as DLE DLE ETX The receiving application would then interpret all doubled DLE characters as a single data byte with the value 0x10 The Handle Escape Characters command allows the User Configurable U CON Driver to add escape characters to outgoing frames and to remove them from received frames To add a Handle Escape Characters command right click on the desired step in the Transaction View and then select Processing Commands Handle Escape Characters from the resulting pop up menu Alternatively select Edit New Processing Command Handle Escape Characters from the main menu See Also Transaction View www kepware com User Configurable U CON Driver Help Handle Escape Characters xi Add Remove escape characters greceeescenceessacenscsssessnecescsncensenssasensensens Add escape characters a to Cancel C Remove escape characters Help di m Data buffer Read buffer C Write buffer C Scratch buffer i C Global buffer fi 7 ASCII characters Control characters a lt NUL gt 001 0x01 A lt SOH gt Add gt gt B C lt ET gt D lt EOT gt lt lt Remove E y esla 002 0x02 lt STX gt lt END gt h 003 0x03 004 0x04 005 0x05 gt m Escape character Duplicate control character C Selected
42. the write buffer Solution This command can only operate on bytes placed on the write buffer prior to the execution of this command Make sure that the byte position setting is within this range of bytes See Also Mod Byte Command Test Character command failed for address lt address transaction gt source buffer bounds Error Type Serious Possible Cause The Position property of the Test Character command is not within the current bounds of the source buffer Solution This command can only operate on bytes received by the last Read Response command when the data source is specified as the read buffer Make sure that the position value is not larger than the number of bytes received See Also Read Response Command Test Character Command Test Check Sum command failed for address lt address transaction gt read buffer bounds Error Type Serious Possible Cause The start byte or number of bytes properties of the Test Check Sum command are incorrect and have caused to driver to attempt to access non existent read buffer elements Solution This command can only operate on bytes received by the last Read Response command Make sure that the sum of start byte and number of bytes does not exceed the number of bytes received www kepware com 108 User Configurable U CON Driver Help See Also Read Response Command Test Check Sum Test Check Sum command failed for address lt address transaction gt dat
43. variety of ways depending on the data type For more information refer to Device Data Formats www kepware com 100 User Configurable U CON Driver Help Address Descriptions The User Configurable U CON Driver does not use the tag address in the usual manner Normally a driver knows how to interpret an address string specified by the user and build read and write requests accordingly This is not possible with the User Configurable U CON Driver since it was not developed for a specific device It is up to the user to properly encode an address in each transaction defined in the driver profile In many devices a command code is sufficient in others a command code and memory location are required to access a given piece of data The User Configurable U CON Driver uses the address to describe the path relationship between the tag and device as defined in the Transaction Editor Group dot tag notation is used Example An address of Group_ 1 Registers Register_1 means the tag Register_1 is in the group Registers which is in a group called Group_1 Group_1 is attached to the device Thus a user can manually add a tag to the server so long as it was previously defined with the Transaction Editor and the path is known However this is generally not necessary since the Transaction Editor automatically invokes the server s auto tag database generation feature www kepware com User Configurable U CON Driver H
44. write buffer scratch buffer and global buffer each have an individual associated buffer pointer The pointer is used to store the index or position of a byte in the associated buffer Pointers can be moved to different bytes by using the Seek Character and Move Buffer Pointer commands The Update Tag command has an option where data for a tag can be parsed starting at the current buffer pointer position Buffer pointers are necessary when processing delimited lists For an example refer to Tips and Tricks Delimited Lists For convenience the read and write buffers are automatically reset to the first byte position at the start of each transaction Since a major use of scratch and global buffers is to exchange data between transactions scratch buffer pointers and global buffer pointers are not reset Because of this use care with relative moves of scratch and global buffer pointers www kepware com User Configurable U CON Driver Help 25 Transaction Validation The Transaction Editor performs a cursory inspection of the transaction after each edit is applied Obvious errors are flagged with a yellow warning icon Device profile User Configurable Driver File Edit Yiew Tools Help i ed k aT Tex G Im Devicel E f TestTag01 2 Read Response N A 2 Read 3 Update Tag Tag_1 E Write Ready If Verbose Transaction Validation mode located under the Transaction Editor s Tools option is select
45. writes only the driver can read any valid ASCII hexadecimal string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command Either of the following can be used for variable length ASCII data Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF may be chosen The driver will search for this character as ASCII hexadecimal data For example the two bytes 0x00 0x20 would be considered a space character Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame www kepware com User Configurable U CON Driver Help Format ASCII Integer The ASCII integer device data format option allows the user to specify how ASCII integer data should be formatted For example when a format of ASCII Integer ddd is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below ASCII Integer format properties xil String length fi Cancel Pad t
46. 1 0 Seed 0x18 Seed gt 1 Seed 0x80 else Seed gt 1 Data gt 1 return Seed Caution If using a variable length data format this custom check sum command requires an extra byte position for the CRC byte in the check sum field Therefore while setting up this check sum in the Transaction Editor users must specify double the data length in the check sum data length field Custom 8 16 bit This is a variation of the SUM 8 bit check sum type where the output is 2 bytes 0x30 high nibble of sum 0x30 low nibble of sum For example the 8 bit sum of the frame 1B 43 30 31 is OxBF Thus the Custom 8 check sum of this frame would be 3B 3F Custom 9 8 bit Takes the modulus 255 sum of data bytes and bitwise ORs the result with 0x80 For example set the most significant bit to 1 Custom 10 16 bit 16 bit version of LRC Takes the modulus OxFFFF sum of the data bytes and returns the 2 s complement of result Custom 11 8 bit This is a variation of the XOR 8 bit check sum With this Custom 11 the intermediate result of each XOR operation is rotated left by 1 bit Custom 12 8 bit This is a variation on the Sum 8 bit check sum Input data is assumed to be in ASCII Hex The data is converted to hex before the sum which is then subtracted from OxFF Custom 13 8 bit www kepware com User Configurable U CON Driver Help 89 This is a variation on the Sum 8 bit
47. 108 Test Device ID command failed for address lt address transaction gt data conversion 108 Test String command failed for address lt address transaction gt source buffer bounds 108 Update Tag command failed for address lt address transaction gt lt read scratch event counter gt buffer bounds E crosse aa a a a ack tok ete tae ea eae Mens eset 109 Write Character command failed for address lt address transaction gt destination buffer bounds 109 Write Check Sum command failed for address lt address transaction gt write buffer bounds 109 Write Check Sum command failed for address lt address transaction gt data conversion 110 Write Data command failed for address lt address transaction gt write buffer bounds 110 Write Data command failed for address lt address transaction gt data conversion 110 Write Device ID command failed for address lt address transaction gt write buffer bounds 110 Write Device ID command failed for address lt address transaction gt data conversion 111 Write String command failed for address lt address transaction gt destination buffer bounds 111 Tag update for address lt address gt failed due to data conversion error _ 2 22 2 2 20 111 Unsolicited message receive timeout o oococcccccccccccoccnocn cee cee cee eee eee cece ences 111 Unsolicited m
48. C 16 16 bit Reflected Cyclical Redundancy Check using X 16 X 15 X 2 1 generator polynomial Commonly used in MODBUS protocol CRC 16 INIT1 16 bit Reflected Same as CRC 16 16 bit except that the initialization 1 CRC 32 32 bit Cyclic Redundancy Check using x 32 x 26 x423 x422 xX 16 x512 x411 x410 X48 X47 X45 X44 x42 x41 1 generator polynomial Modbus CRC 32 version www kepware com s6 User Configurable U CON Driver Help CRC 32 32 bit Reflected Same as CRC 32 32 bit except it uses reflected polynomial LRC 8 bit Longitudinal Redundancy Check two s complement of modulus OxFF sum of all bytes LRC ASCII 8 bit Like LRC but for ASCII Hex data Pairs of bytes assumed to be ASCII Hex values are converted to their binary equivalent before being added to the modulus OxFF sum MLEN 8 bit Adds the number of bytes in the message The check sum is 8 bit MLEN 16 bit Same as MLEN 8 bit except the check sum is stored in 16 bit For example if a message is received that has 4 bytes MLEN 16 bit would be 4 and it would be stored in a 16 bit field as 0x00 0x04 or 0x04 0x00 depending on the format Hi Lo or Lo Hi MLEN_INCL 8 bit Adds the number of bytes in the message including itself which is 1 byte long 8 bit For example if a message is received that has 4 bytes then MLEN_INCL would be4 1 5 MLEN_INCL 16 bit Same as MLEN_INCL 8 bit except the che
49. GO TO COMMANG MAA A BE ie ate Se ue IOS Al oo dei ae ele Saal 34 Handle Escape Characters Command cc 35 Insert Function Blois za 37 www kepware com User Configurable U CON Driver Help 3 Invalidate Tag Command _ A a ec ce ee ce ee cee ee cence eee eee 37 Label Gommana A at alee lal A 37 Log Event Gommianad 22 242 E cocos yeh tgceehsacdded ad sensei E dicas es ceesen 38 Modify Byte Command oo eee ccc cor 39 Move Buffer Pointer lt lt 0 7 s2ccantadeascesed ge aidcece Sle dagee send iaedoc acta tits a 40 Pause CommanG a tot 41 Read Response Command 0 2 0 ee ce ce eee ee ce cee ee cee eee e eee eee 42 seek Character Command di 44 Seek String Command 225 2 5 5 224s ii ede ee ra 45 Set Event Counter COMA ita 47 Test Bit within Byte Command 2 2 cece cece cece eee ee cence eee errre 47 Test Character Command Jo roaa ee doves vei deeteces oben uduedsce detda tte at dt 49 Test Check Sum Command si ecclesia eel IES ears ie oe he he ne dees 50 Test Device ID Commana v 22 OA Oo eed ia i at 51 Test Frame Length Command 2 222 eee ce ce cee cee eee cece cece cece eee e eens 52 TLest String Commande T ee hee sae Nhs eee ee tse nee esos beeen setae te 53 TFANSMIt Gommand AAA telnet aa com pe ine er E EE S AE EEE 55 Transmit Byte Command icon 55 Update Tag Command jos 4 sccid6 3 52 et 22 sag alse le Sloe eae 22 Road lod oe ae on eek ia Hehe 55 Write Character Command iia a cece ada 57 Write C
50. ID high digit Device ID low digit data data data data M O B Device ID high digit Device ID low digit data data M where each character is surrounded with square brackets for notational clarity If the two devices are configured as device 01 and 02 we have four possible message types that could be received on this channel A 0 1 data data data data M 0 B 0 1 data data M 6 A 0 2 data data data data M 0 B 0 2 data data M To process all four possible message types we need to define a channel using the User Configurable U CON Driver in unsolicited mode Next we need to add two devices to that channel The transaction editor must be used to create two tags for each device one tag for the A messages and another for the B messages Each of these tags will be created with an unsolicited transaction that must be defined by the user The complete definition of an unsolicited transaction consists of two things the transaction key and the series of commands that are required to receive and process the message We will consider the transaction keys first For this hypothetical protocol we need to look at the first four bytes of an incoming message to know which transaction should be used to process it Thus the four transaction keys need to be assigned as DEVICE TAG KEY 01 A A01 01 B B01 02 A A02 02 B B02 If we made our keys only three charac
51. LM aie age he eats oad hldeoid falas 22 Scratch BUS ccoo dd aad de Ss oe eed cede ta hel Sees 23 Global Buffers ws AEE tee A E le SSL OIL eS hte eB 23 ROMIMG Buffer co dt e ie Sl ola teh e dad Baan deat tk 23 Initialize Butters sisser ee rtorras 23 Event Counters coset cide chet sonede Se n a a hd Shi Litede td eal a a Scooc het ceeds 24 BUfPEr POINECKS 000 coccion asa de dees sang nieces da WN wea eae 24 Transaction Validation 2 2 2 0 2c c cece cece cece cence cece ec eeeeeee ce eecceeeeeeeeeeeseeeeeenenees 25 Transaction Comman dS 22 0 2 ust de ilo ea he eat ea Lesa e A oo ha 25 Add Comment Command 2 2 2 2 cece ee nnn eee nnn n eee e cence ee eeenes 28 Cache Write Valuie Command prenesenia S ot cel ie et eee et ei lo EEE e 29 Clear Rolling Buffer Command 2 00 22 2 c eee eee ee ee eee ee eee ee eee cece eee eee 29 Clear RX Buffer Command 22 222222 ce ee ee ee ce eee eee cece cece eee eee ee 29 Clear TX Buffer Command 2 022222 eee ee ce eee ee cece ee eee cece cece eee e ee 29 Close Port Command 2 2 cece ene eee enn nee eee nen e nee e eee anan 30 Compare Buffer COMME teed 30 Continue Command A A ee ES 32 Control Serial Line Command occ 32 Copy Buffer Command 0 2 222 c eee eee ee eee ee eee ee ee ee cee eee cece cece eee eee eeee 32 Deactivate Tag Command 22 2 or si poe cardiac atat dey sae use kedaseca ae a a S paea 34 End Command ii sss el le ee oe os erie re ee et 34
52. Launch Transaction Editor Device Properties General Sean Mode Timing Auto Demotion Transaction Editor Unsolicited Message Wait Time tsm barea pessa loot Add Password Launch Transaction Editor Regenerate Tag Database Notes www kepware com User Configurable U CON Driver Help 13 1 The device profile may be password protected For more information refer to Password Protection 2 The Transaction Editor can be used to construct groups of tags and transaction command sequences Its user defined profile is shown below r 2 Device profile User Configurable Driver File Edit View Tools Os on Help E Global Step Command Value Format Description E fm Devicel 1 WriteDeviceID 8 bit Intel hi 4 Registers 2 Write Character 003 0x03 C lt ETX gt Read register command code Register_1 3 Write Character 000 0x00 lt NUL gt Address high H E Register_2 4 Write Character 107 0x6B k Address low A 4 Register 3 5 Write Charact 000 0x00 lt NUL gt 2 Read Waite 8 Transmit N A H Register_4 9 ReadResponse N A Register_5 10 TestCheckSum CRC 16 16 bit m Register_6 11 Update Tag Register_3 Once a device profile has been created the tag and transaction definitions can be sent to the server by clicking Update Server on the toolbar or main menu If the Tra
53. Receive the byte 0x01 would cause a tag with Bit 0 format take a value of 1 or TRUE Tags with any other bit format would take a value of 0 or FALSE Example Write the value 1 or any other non zero value would result in the byte 0x01 being sent if Bit O format 0x02 if Bit 1 format and so forth 1 2 0r 4 When reading a whole 8 16 or 32 bit integer is received from the device The equivalent integer value of a subset of the bits within this data is then passed to the tag When writing a whole 8 16 or 32 bit integer is sent to the device The specified bits will be set to the binary equivalent of the write value with all other bits set to zero If the write value exceeds the maximum value that can be represented by the specified number of bits the specified bits will all be set to one For Boolean data types all specified bits are set to one if the write value is non zero with all other bits being a zero See Also Format Multi Bit Integer When a floating point value is written to this format clamping will be applied to both the positive and negative directions If the value written is less than 3 402823466e 38 then the value will be clamped to www kepware com User Configurable U CON Driver Help 3 402823466e 38 If the value written is greater than 3 402823466e 38 then the value will be clamped to 3 402823466e 38 When a Signaling NaN is written it will be converted to a Quiet NaN ASCII Formats Format
54. Start Bit is 1 and Number of Bits is 2 The table below displays what the byte value would be after this command is executed for various write values initial Byte Value Write Value Final Byte Value E CI 10110000 10110010 10110100 Example 2 ASCII Hex Data For this example Byte Position points to the first of 2 ASCII hex characters in the write buffer with an initial value of B6 The Start Bit is 1 and Number of Bits is 2 The table below shows what the value would be after this command is executed for various write values The actual ASCII Hex data in the transmit buffer is in quotes and the binary equivalent is in parentheses initial valus write Value rial Value O B6 10110110 oo feo B6 10110110 B2 10110040 B6 10110110 BA 10110100 B6 10110110 B6 10110110 Move Buffer Pointer Each buffer has its own independent pointer that can be used to reference a particular byte in data processing commands such as Update Tag The Move Buffer Pointer command tells the driver to change the current position of one of the buffer pointers Pointers can be moved forward or backward The read and write buffer pointers are automatically reset to 1 at the start of each transaction Scratch and global buffer pointers do not get reset automatically The pointer position will not be changed if the specified move would place it beyond the current data content of the buffer This command is especially useful for
55. Sum command cannot be included in the calculation Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Write Data Command The Write Data command tells the driver to get the write value sent down from the client application convert it to the specified device data format and then do any of the following Append the write buffer with the result e Store the result in a scratch buffer The scratch buffer will be cleared first e Store the result in a global buffer The global buffer will be cleared first Alternatively any combination of the actions listed above To add a Write Data command right click on the desired step in the Transaction View and then select Write Commands Write Data from the resulting pop up menu Alternatively select Edit New Write Command Write Data from the main menu See Also Device Data Formats Write Data command parameters 1 x Data destination K IV mm Cancel I Scratch buffer i ied Help Global buffer Description dili Descriptions of the parameters are as follows e Write buffer This check box tells the driver to append the write buffer with the formatted write value The default setting is checked To place the formatted write value in a scratch or global buffer c
56. Sum command properties E E xi Type CRC 16 16 bit Reflected Format 16 bit Intel lo hi y Help Format properties o o a I7 a Start bytes from frame start End bytes from frame end Start at Current Position End at Current Position i Result offset p S p y O True action Continue Action properties False action Invalidate Tag Action properties Description iii Descriptions of the parameters are as follows Type This drop down menu provides the complete list of supported check sum algorithms For more information on the check sum options refer to Check Sum Descriptions Format This drop down menu provides the format options available for the selected check sum type The Format Properties button will be enabled if the selected format has properties that must be set The appropriate format configuration dialog will be displayed when the button is clicked Note For more information on formats refer to Device Data Formats www kepware com User Configurable U CON Driver Help 51 Start bytes from frame start and End bytes from frame end These parameters tell the driver what bytes to include in the check sum calculation The start value is given as a number of bytes from the beginning of the received frame The end value is given as a number of bytes from the end of received frame Generally the check sum value will immediately follow the last
57. Time Short Date MM DD YYYY Short Date MM DD YY Short Date DD MM YYYY Short Date DD MM YY Short Date YY MM DD Short Date YYYY MM DD Time HH MM SS Standard DD MM YY hh mm ss Standard DD MM YYYY hh mm ss Standard MM DD YY hh mm ss Standard MM DD YYYY hh mm ss Standard YY MM DD hh mm ss Standard YYYY MM DD hh mm ss Note The length of the formats are variable See Also Format Date Time LEGEND h ASCII Hex digit 0 to F d ASCII decimal digit 0 to 9 x ASCII binary digit 0 or 1 c ASCII character LO Low Word lo Low byte in a Word HI High Word hi High byte in a Word 0 low binary bit 1 high binary bit Optional sign or F Fixed data length support V Variable data length support D Delimited list support See Also Delimited Lists www kepware com User Configurable U CON Driver Help Dynamic ASCII Formatting Many ASCII devices utilize a formatting scheme where values are represented by a fixed number of ASCII digits and a format character No decimal point or sign characters are used Instead the format character determines decimal placement and sign For example a device may represent the value 12 3 as 0123D where D means multiply the transmitted integer value 123 in this case by 0 1 The format character is dynamic meaning that it could be different for each read and write transaction depending on the data value The Use Dyn
58. User Configurable U CON Driver Help 2015 Kepware Inc 2 User Configurable U CON Driver Help Table of Contents Table of Contents 92202200222 ce nsec eeeees 2 User Configurable U CON Driver Help 0 020222 c cece eee ccc cece eee eee eeeee eee eens 6 OVER VIG W A ed i case heh ge ASS E EA ate he NS th tee a tle eain eS 28 LiL 6 DEMO Mode 2002 cuzas ce salons and tool Peel Nana 7 DEVICE SU p iyi eee dea ee ee deen dez 8 Modem Setup 2 2 2 2 2 c cece cece ee cece ccc eee eee eee cece eee cece cece cece eeeeeeeeeeeeseeeee 8 Unsolicited Message Wait Time 0 0 0 2 occ 0000000000000000 0000000000000000 ceteeeceeeeeees 9 Driver Configuration 1 2 2 0 2 2 coc cece cece ccc ccecccceecccceecccceecceeetcceeeseceeers 10 Step One Defining a Server Channel 2 0 2 0 22 0222 cece cece ec eee cece cece ccc eeeecceeeeeees 10 Step Two Defining a Server Device 2 0022 cece cece ee cece cece ee cee cece eeeeceeeeeeees 12 Step Three Defining a Device Profile 1 0 2 0 0 2 o cece c cece cece cceeccccececececccececccccecereeeees 12 Step Four Testing and Debugging the Configuration 2 0222 22 eee eee eee eee eee eee 13 PassWwordiProtecti n 2 22 25 bon doses la o oeste as cede dedi deed 14 Transaction Editor coito dalla 17 AA A A A E A A A E LS E ies het 20 TAG SPOUPS ee cerca oo e a LE gk ul ona EUA cde a 21 Tag Blocks do a ET A tee el tae ise des eo 21 a AA
59. a conversion Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is used make sure all necessary format characters are present in the table See Also Dynamic ASCII Formatting Test Device ID command failed for address lt address transaction gt read buffer bounds Error Type Serious Possible Cause The start byte property of the Test Device ID command is incorrect and has caused to driver to attempt to access non existent read buffer elements Solution This command can only operate on bytes received by the last Read Response command Make sure that the start byte value does not exceed the number of bytes received See Also Test Device ID Read Response Command Test Device ID command failed for address lt address transaction gt data conversion Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is used make sure all necessary format characters are present in the table See Also Dynamic ASCII Formatting Test String command failed for address lt address transaction gt source buffer bounds Error Type Serious Possible Cause www kepware com User Configurable U CON Driver Help 109 The data source buf
60. a given character in the specified buffer The search will begin at the current buffer pointer position The buffer pointer position will be relocated to the next instance of the specified character if the character is found If the character is not found the pointer will not be changed An optional Go To label may be executed on failure For more information refer to Buffer Pointers Note This command is especially useful for parsing delimited lists of variables For more information refer to Delimited Lists To add a Seek Character command right click on the desired step in the Transaction View and then select Processing Commands Seek Character from the resulting pop up menu Alternatively select Edit New Processing Command Seek Character from the main menu www kepware com User Configurable U CON Driver Help as Seek Character command properties i x m Data source K gecvvesceceeovensveceesoesves Read buffer Cancel di White buffer Help Scratch buffer f C Global buffer i 4 Character 044 0x2C bd I Search for character in ASCII Hex format Goto on failure pae ooo o Description Descriptions of the parameters are as follows Data source This parameter specifies the data source Options include Read buffer Write buffer Scratch buffer or Global buffer If the Scratch or Global buffer options are selected the buffer index must also be specified
61. a read buffer scratch buffer global buffer cache the transaction s event counter or the rolling buffer It then reformats as needed and updates the tag value accordingly To add an Update Tag command right click on the desired step in the Transaction View and then select Read Commands Update Tag Alternatively select Edit New Read Command Update Tag from the main menu Note If the transaction belongs to a tag block member the tag must be selected to update from the Tag drop list Otherwise the transaction s parent tag will be selected automatically www kepware com 56 User Configurable U CON Driver Help xi Tag K Tagl Cancel m Data source Help dll Scratch buffer 1 C Global buffer Event counter C Rolling buffer C Cache Data starts at current buffer pointer Data start byte y Description ee Descriptions of the parameters are as follows Data Source This parameter specifies the data source Options include Read Buffer default Scratch Buffer Global Buffer Cache Event Counter or Rolling Buffer If the scratch or global buffer option is selected users must specify which buffer index using the spin control to the right of the radio button If no data has been stored in the scratch or global buffer when this command is executed the tag value will be set to zero or a null string If the event counter option is selected the tag will be updated with the t
62. alidation 25 Transaction View 18 Transferring 91 Transferring Data Between Transactions 91 Transferring Data Between Transactions Using Scratch Buffers 98 Transmit Byte Command 55 Transmit Command 55 True 51 www kepware com User Configurable U CON Driver Help 120 U U CON User Configurable Driver 6 17 U CON User Configurable Driver Device Driver Error Messages 105 Unable to create serial I O thread 104 Unable to locate Transaction Editor executable file 106 Unable to save password protected device profile in XML format 113 Unable to set comm parameters on COMn 103 Unable to write tag gt address gt on device gt device name gt 104 Unsolicited message dead time expired 112 Unsolicited message receive timeout 111 Unsolicited Message Wait Time 9 Unsolicited Transaction Keys 62 Unsolicited Transactions 62 UnsolicitedPcktRcvdOnTime 9 Update Server 19 64 Update Tag Command 55 Update Tag command failed for address gt address transaction gt gt read scratch gt buffer bounds 109 Updating the Server 64 User Configurable Driver Help 6 Ww Word 99 Write Buffer 34 Write Character Command 57 Write Character command failed for address gt address transaction gt destination buffer bounds 109 Write Check Sum Command 58 Write Check Sum command failed for address gt address transaction gt data conversion 110 Write Check Sum command failed for address gt address transaction gt write
63. amic ASCII Format Table device data format option tells the driver to use this type of formatting By clicking on the Format Properties button on the tag dialog the following dialog will come up Dynamic ASCII Format properties Digits right of decimal to write x Cancel dii Edit Format T able Help got paa In this dialog users can specify how many digits to the right of the decimal point should be used when writing to the device Most devices that utilize this type of formatting zero digits are expected for integer types and a specific non zero number is expected for real types For example the value 1 2 could possibly be represented as 12004 0120B or 0012C where A means multiply by 0 001 B 0 01 and C 0 1 However the device may only accept 0012C for a particular register In this case users would set the number of digits to right of decimal to 1 to force the driver to choose the C format In general if the device is expecting an integer this value should be 0 When attempting a read the value has no significance The driver simply parses the format character from the read buffer looks up its corresponding multiplier and then converts the data digits accordingly In order for this option to work the user must also define a table of format characters and their corresponding multipliers Such a table must be defined for each device that uses this format option To edit the table click on the Edit Format Table button o
64. and Label commands A typical use of the end command is to prevent the driver from executing steps in a transaction that should only be executed as the result of a conditional command with a Go To For more information refer to Branching Using the conditional Go To Label and End Commands This command has no user defined properties To add an End command right click on the desired step in the Transaction View and then select Processing Commands End from the resulting pop up menu Alternatively select Edit New Processing Command End from the main menu Go To Command The Go To command tells the driver to search for the specified Label command in the current transaction and proceed from there For more information refer to Branching Using the conditional Go To Label and End Commands To add a Go To command right click on the desired step in the Transaction View and then select Processing Commands Go To from the resulting pop up menu Alternatively select Edit New Processing Command Go To from the main menu x Check Sum Error Cancel Description Help Handle check sum error Descriptions of the parameters are as follows Label This parameter identifies the Label command for which the driver will search upon encountering this command If the Label command is not found an error message will be logged and the transaction will terminate Description This parameter specifies notations that will be displ
65. annot be anticipated then this box should be unchecked www kepware com User Configurable U CON Driver Help For fixed length strings the String length must be set The number entered here sets the total number of characters one byte per character that will be written to or read from the device Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII integer and ASCII real formats the pad characters are added as needed to the right For example if the string length was set to4 anda value of ABC is to be written to the device the driver will create a string consisting of the characters ABC followed by one pad character There are many options for pad characters spaces 0x20 zeros 0x30 and NULL 0x00 The pad character option applies to writes only the driver can read any valid ASCII string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as
66. are selected users must also specify the buffer index Note If there are not enough bytes of data in the buffer the command will be aborted and the transaction will fail An error message will also be placed in the OPC server s Event Log Format This drop down menu is used to define the device data format in which the ID will be written If the selected format has properties that must be set the Format Properties button will become enabled For a complete discussion of available formats refer to Device Data Formats Description This parameter is used to enter notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Note Although users may hard code a Device ID using Write Character or Write String commands those Device IDs would not be dynamic If a Write Device ID command is used in all of the transactions changing a Device ID is as simple as bringing up the server s Device Properties and changing the ID The change will automatically take effect in all transactions associated with the device Write Event Counter Command The Write Event Counter command tells the driver to append the value of the event counter to the write buffer This makes it possible to use the event count value as a Transaction ID in serial communication packets To add a Write Event Counter command simply right click on t
67. as ASCII hexadecimal data For example the two bytes 0x32 0x30 would be considered a space character Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame Format Date Time The Date device data format option allows the user to specify how date or date time data will be formatted When Date is selected the Format Properties button in the tag dialog will become enabled Click Format Properties to display the Date Format Properties dialog box as shown below Date Format properties i x Date Data Format Binary Data Cancel C ASCII Data Help dl ASCII Hex Data Date Delimited Date Delimiter fono 000 lt NUL gt Y Time Delimited Time Delimiter fono 0x00 NUL Separating delimiter Separating Delimiter ono 000 i lt NUL gt Year Prefs iso to 2063 1300s 1 2000s Follows by AMVPM First select the Date Data Format The default setting is Binary Data Options are as follows Binary Data When selected the date value will be sent as a binary value For example if no separators or delimiters are selected and the Date Time format is set to Standard MM DD YY hh mm ss the value www kepware com User Configurable U CON Driver Help 35 09 11 09 02 15 50 would be sent as 09 0B 09 02 OF 32 ASCII Data When selected the date value will be
68. at lt format gt is invalid XML Loading Error Range exceeds source buffer size of lt max buffer size gt bytes for a lt command gt XML loading error The number of unsolicited transaction keys exceeds the set key length lt key length gt Error Type Serious Possible Cause 1 The key length is incorrect 2 There are extra unsolicited transaction keys in the XML Solution 1 Verify that the key length is valid 2 Verify that the keys are valid Note The project will not load XML loading error The two buffers of a lt command gt are the same The buffers must be unique Error Type www kepware com 114 User Configurable U CON Driver Help Serious Possible Cause A buffer is being used twice in a single command Solution Verify that the buffers are unique Note The project will not load XML loading error The string lt string gt entered for a Write String command with format lt format gt is invalid Error Type Serious Possible Cause 1 Invalid ASCII Hex String from Nibble string 2 Invalid ASCII String packed 6 bit string Solution 1 For ASCII Hex String from Nibble string only hex characters 0 9 and A F are allowed in the string The string must be an even number of characters 2 For ASCII String packed 6 bit string the string must consist of characters supported in the ASCII Packed 6 bit table The string length must be a multiple of four No
69. at bytes are included in that count The driver will try to receive bytes up to the end of the Frame Length field and then calculate how many more bytes to expect after that www kepware com as User Configurable U CON Driver Help Data length start position This parameter specifies the 1 based byte position of the first byte in the Data Length field Data length format This parameter specifies the format options available for the Data Length field String length This parameter specifies the total number of characters in the Data Length field Data start position This parameter specifies the 1 based byte position of the first data byte to include in the count This will often be the first byte after the Data Length field For example if the protocol has the filed length at byte 6 followed by the data then the Data Start Position would be byte 7 Number of trailing bytes This parameter specifies the number of bytes that the driver should expect after the indicated number of data bytes has been received This might be used to handle cases where the check sum bytes are not included in the Data Length Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Clear RX buffer before read When checked this option disables the command s defaul
70. ata and another tag is updated from the block s read or unsolicited transaction s event counter When unchecked the counter of the transaction in which the command is used will be reset to the number that was entered When checked the counter of the read unsolicited transaction of the parent block will be reset Note This option should be checked when the Set Event Counter Command is used in the event counter tag s write transaction In the example shown below the tag is within a parent block Block_1 Set block event counter should be checked so that the event counter of Block_1 s unsolicited transaction will be reset that is the counter of the parent block transaction is reset Device profile User Config File Edit view Tools Help C mm fia tin Ss Y o qm Devicel qa Block_1 E Tag Write Unsolicited Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later See Also Event Counters and Write Event Counter Command Test Bit within Byte Command The Test Bit within Byte command tells the driver to parse a bit within a specified byte from the read or write buffer or one of the scratch or global buffers and compare the bit value with a test value Various actions can be taken depending on the result of that compar
71. atures users demand from other drivers are available to the custom driver projects These features include full OPC 1 0 and 2 0 compliance DDE support tag browsing automatic tag database generation diagnostics and Event Logging The server may also be configured to run as a Windows NT XP service The server s Ethernet Encapsulation feature is supported and may be used in solicited or unsolicited mode This feature is used to communicate with serial devices connected to a terminal server such as the Digi One RealPort or the Lantronix CoBox over an Ethernet network It also is used to develop driver profiles for native Ethernet devices Like any other serial driver for the server custom driver projects will have modem support communication port configuration and standard error handling features with configurable retries and timeouts Furthermore the server s built in diagnostics display is used to easily diagnose communications problems during driver profile development The User Configurable U CON Driver is based upon the same technology found in every other driver available for the server With the User Configurable U CON Driver users get all of the benefits of a true multi threaded 32 bit environment without the need to learn the intricacies of Microsoft Windows development System Requirements Operating System Windows NT Windows XP recommended www kepware com User Configurable U CON Driver Help Intel Pentium Class Processo
72. aximum of 64 characters Add Comments a Insert your comments below Max 64 chars Note To insert a blank line in the Transaction View leave the Add Comments dialog field blank and simply click OK Cache Write Value Command The Cache Write Value command tells the driver to cache the value entered in a Write Data command It has no user defined properties To add a Cache Write Value command right click on the desired step in the Transaction View and then select Write Commands Cache Write Value Alternatively click Edit New Write Command Then select Cache Write Value from the main menu Caution This command should be used for devices that are Write Only Clear Rolling Buffer Command The Clear Rolling Buffer command tells the driver to set all bytes in the rolling buffer to 0x00 and the length of the received frame to 0 The command has no user defined properties To add a Clear Rolling Buffer command right click on the desired step in the Transaction View and then select Processing Commands Clear Rolling Buffer from the resulting pop up menu Alternatively click Edit New Processing Command Clear Rolling Buffer from the main menu Caution Itis the user s responsibility to call the Clear Rolling Buffer Command Failure to do so could result in buffer overflows Clear RX Buffer Command The Clear RX Buffer command tells the driver to set all bytes in the read buffer to 0x00 and the length of the received frame to 0
73. ayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later www kepware com User Configurable U CON Driver Help 35 Note Go To commands should be used with caution It is possible to set up infinite loops that will cause the driver to become stuck in a transaction A simple example of an infinite loop is as follows 1 Label Jump to here 2 GoTo Jumpto here It may be necessary to terminate the server in this event by pressing the Ctrl Alt Del key combination Make sure that any transaction that uses a Go To command will always terminate either by running to the last defined command step or to an End command Handle Escape Characters Command The Handle Escape Characters command is used to provide data transparency as required by some binary protocols Some protocols assign a special meaning to certain character sequences For example the end of a variable length frame may be indicated by the sequence DLE ETX 0x10 0x03 A potential problem would exist if the data value 4099 0x1003 must be transmitted in one of these frames The receiving application would not know whether these two bytes were part of the data payload or indicate the end of the frame This type of ambiguity would typically be resolved or made transparent by doubling all occurrences of the DLE character within the data portion of the frame Throughout
74. be enabled An ASCII character from 0x00 to OxFF can be chosen Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame ROUND OFF When writing values that require more characters than allotted by String length the driver will write the largest positive or smallest negative value that can be expressed in the allotted space For example if string length is set to 6 and the precision is set to 2 then writing 1234 567 results in the string 999 99 and writing 123 456 results in the string 99 99 Format ASCII String The ASCII String device data format option allows the user to specify how string data should be formatted When a format of ASCIT String ccc is selected in the tag dialog for example the Format Properties button will become enabled After clicking this button the dialog should appear as shown below ASCII String format properties x String length fi Cancel Pad type Spaces 0x20 v Help Parse termination method dili _ Parse to next delimiter if present Delimiter 000 2 lt NUL Read up to f bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction c
75. ble U CON Driver Help Seek Character Command 44 Seek Character command failed for address lt address transaction gt label not found 112 Seek String Command 45 Serial Communications 101 102 Set Event Counter Command 47 Short 99 Slowing Things Down Using the Pause Command 98 Start 33 74 Step Four Testing and Debugging the Configuration 13 Step One Defining a Server Channel 10 Step Three Defining a Device Profile 12 Step Two Defining a Server Device 12 String 99 System 6 T Tag Blocks 21 Tag Groups 21 Tag update for address lt address gt failed due to data conversion error 111 Tags 20 Test Bit within Byte Command 47 Test Character 49 Test Character Command 49 Test Character command failed for address lt address transaction gt source buffer bounds 107 Test Check Sum Command 50 Test Check Sum command failed for address lt address transaction gt data conversion 108 Test Check Sum command failed for address lt address transaction gt read buffer bounds 107 Test Device ID Command 51 Test Device ID command failed for address gt address transaction gt data conversion 108 Test Device ID command failed for address gt address transaction gt read buffer bounds 108 Test Frame Length Command 52 Test String Command 53 Test String command failed for address lt address transaction gt source buffer bounds 108 Tips and Tricks 91 Transaction Commands 25 Transaction Editor 6 17 Transaction V
76. buffer bounds 109 Write Data Command 59 Write Data command failed for address gt address transaction gt data conversion 110 Write Data command failed for address gt address transaction gt write buffer bounds 110 Write Device ID Command 59 Write Device ID command failed for address gt address transaction gt data conversion 111 Write Device ID command failed for address lt address transaction gt write buffer bounds 110 Write Event Counter Command 60 Write String Command 61 Write String command failed for address gt address transaction gt destination buffer bounds 111 X XML loading error Range exceeds source buffer size of lt max buffer size gt bytes for a lt command gt 114 XML loading error The number of unsolicited transaction keys exceeds the set key length lt key length gt 113 www kepware com 121 User Configurable U CON Driver Help XML loading error The string lt string gt entered for a Write String command with format lt format gt is invalid 114 XML loading error The two buffers of a lt command gt are the same The buffers must be unique 113 www kepware com
77. byte included in the calculation but not necessarily Note The end value here has a different meaning than in the Write Check Sum command In this case it is defined relative to the frame end to allow for processing of variable length frames For more information refer to Write Check Sum Command Start at Current Position When checked the check sum calculation will begin at the current read buffer position This parameter overrides the Start bytes from frame start parameter End at Current Position When checked the check sum calculation will complete at the current read buffer position This parameter overrides the End bytes from frame end parameter Result offset This parameter indicates how many bytes are between the last byte included in the calculation and the check sum value True action This parameter specifies what actions will occur if the received check sum is the same as the calculated value False action This parameter specifies what actions will occur if the check sum values do not agree Action properties This button will be activated for actions that require additional properties to be set Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Example Test the check sum in a received frame with the following stru
78. byte order of the integer data as read from or written to the device The quantity will be represented by one or more of the bits within this integer The Start bit control sets the index of the first bit of interest with the integer As is standard practice the least significant bit LSB is referred to as bit index 0 The Number of bits control sets how many bits are within the integer starting at the start bit index Read example Say we have a device that measures an analog quantity which can range in value from 1 to 63 This value is reported by the device as the first 6 bits in a byte The seventh bit in this byte indicates the status of the associated sensor and the remaining bit is not used We could create a tag block with a value tag using this Multi Bit Integer format and a status tag using one of the single bit within byte formats Both tags could be updated from a single block read transaction For the value tag set the Raw data format to 8 bit Intel Start bit to 0 and Number of bits to 6 If the device returned 01100111 the value tag would then be updated with a value of 39 binary 100111 Write example Assume we have a tag using this format with Raw data format set to 8 bit Intel Start bit set to 3 and Number of bits set to 2 If a value of 1 is written to the tag the device will receive the byte 00001000 If a value of 3 or greater is written the device will receive the byte 00011000 Boolean Data types T
79. ce will determine the mode Some devices are designed to work in unsolicited mode such as scanners and scales whereas others only supply data when it is requested such as most controllers and PLCs Once the driver s channel mode is set it cannot be changed any driver configuration beyond this point will likely be incompatible with the new mode of operation Upon receiving an unsolicited message the driver must determine what user defined transaction should be used to interpret the message To make this possible users must associate each transaction definition with some property unique to messages of a given type For example a device could report changes in input 1 as INO1xxxx where xxxx is a 4 byte value and changes in input 2 as INO2xxxx In this case INO1 would tell the driver to use one transaction that updates an Input_1 Tag and INO2 would tell it to use another transaction that updates an Input_2 Tag The driver can look up the appropriate transaction using the first four bytes of any message from this particular device as keys If the protocol does not allow the use of such keys it is still possible to use this driver by specifying a Key Length of 0 www kepware com 12 User Configurable U CON Driver Help Important Users must not mix devices that send unsolicited data with those that do not on the same channel It is necessary to segregate all devices that issue unsolicited data to one or more channels that are specifically fo
80. check sum It sums the bytes and subtracts the sum from zero Custom 14 8 bit This is determined by subtracting the valid hex numbers and the ASCII values of non valid hex numbers from 0x00 and swapping the Hi and Low nibbles Custom 15 8 bit This performs an 8 bit CRC on one data byte using the CRC polynomial x 7 x 3 1 Custom 16 8 bit Sums all bytes inverts all bits truncates the result to one byte then adds 1 This supports communication with Emerald Processor Industrial Indexing Systems ASCII Character Table Dec Hex ASCII key Dec Hex ASCII pes Hex ASCIT bee Hex ASCII o ooo mur ama 32 020 space oa oao o os foso _ 53 poa fe foi ja or ost fa 34 o2 es oaz e os osz b 3 Joes e er oas e o9 foss e 36 oza s es oaa b 100 oxea fa 37 os feo oas E mor foss fe e oos ack e 38 oes a 70 oas o2 foss 39_ o27 r oar a 103 oxs7 o e oos es arn a0 o B oo m n fa oes D r oas fr ros foso fi a2 02A a3 028 aa oc re oac fros oxsc gt 13 OxOD CR Ctrl M 45 0x2D 77 0x4D M 109 0x6D m oe 78 oe w ro fos fa a7 oe s oa o ur oxeF_ o a8 oso o feo oso m2 oo jp 49_foxst_ 1 fer fosi jo ns joor ja so osz 2 e2 osz R ma or f 51 03 52 osa fja fea osa r us ova t 5 035 sa oss 6 fes ose v us fors vw 55 037 se oss fe es ose x 120 ors x 57 os 9 ss oso y Mr for y se
81. cifies the number of milliseconds that the driver will wait before processing the next command Any value between 10 and 1000 milliseconds can be selected in increments of 10 Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Caution The Pause command should not be used with Unsolicited UDP Read Response Command The Read Response command tells the driver to receive data from the device and place itin the read buffer The driver will continue to wait for data until either the user specified termination criteria has been met or the device Timeout Period has elapsed To add a Read Response command right click on the desired step in the Transaction View and then select Read Commands Read Response from the resulting pop up menu Alternatively select Edit New Read Command Read Response from the main menu www kepware com User Configurable U CON Driver Help az Read Response command properties x Frame type K Frame has known length Cancel m Frame has known length Help Number of bytes fi m Frame is terminated by stop characters dili ASCII characters Stop characters 001 002 003 004 005 m Frame contains data length field Data length start position fi Data length format 8 bit Inte
82. ck sum is stored in 16 bit For example if a message of 4 bytes is received MLEN_INCL 16 bit would be 4 2 6 MLEN_INCL 16 bit would be stored as 0x00 0x06 or 0x06 0x00 depending on the format Hi Lo or Lo Hi SUM 7 bit Adds the least 7 bits from each byte The check sum is 8 bit SUM 8 bit Modulus OxFF sum of all bytes SUM 16 bit Modulus OxFFFF sum of all bytes Sum of Hi Lo Word Data 16 bit Modulus OxFFFF sum of all words Words are read in 16 bit Motorola hi lo format XOR 8 bit Bit wise exclusive OR of all bytes CRC Reflected When reflected polynomials are used the CRC is computed by processing data from the least significant bit to the most significant bit Reflected or reciprocal polynomials are reversed For example if the regular polynomial is x 16 x 15 x 2 1 0x8005 which in binary is 1000 0000 0000 0101 then the reflected polynomial will be 1010 0000 0000 0001 x 16 x 154 x 134 1 Custom 1 8 bit The C code used to calculate this custom check sum is as follows Byte CheckSumCustom_1 Byte pData int nLength Byte byCS OxFF for int nByte 0 nByte lt nLength nByte Byte byTemp pData nByte byCS byCS byTemp byTemp byCs www kepware com User Configurable U CON Driver Help byTemp byTemp gt 3 amp 0x1F byCS byCS byTemp byTemp byTemp gt 3 amp Ox1F byCS byCS byTemp byTemp byCs byTemp byTemp lt 5 byCS
83. command that triggers the transmission of the request to the device aRead Response command which waits for the expected response from the device and an Update Tag command which parses and reformats the desired data from the response and updates the tag s value A Read response may also employ other commands including conditionals as the application dictates Write transactions normally consist of a series of Write commands that build up a Write request string a Transmit command and possibly a Read response and Update Tag command One of the Write commands will almost always be a Write Data command that takes the desired Write value from the client application and reformats it as required by the device Unsolicited transactions are related to Read transactions except that the first executable command must be a Read Response command Each unsolicited transaction must also have a Transaction Key defined which will help the driver recognize what transaction should process a given message When the driver is in unsolicited mode it can only have Write and unsolicited transactions In normal mode it can only have Read and Write transactions For more information on unsolicited transactions refer to Unsolicited Transactions Transaction Editor Normally a driver is developed for a specific device type or family of closely related devices The various transaction steps are programmed directly into the driver which allows users to simply select a dr
84. cture SOH Data 1 Data 2 Data N ETX BCC This frame contains an unknown number of data bytes but has an ETX byte to mark the end of the data The BCC is a single byte XOR check sum that includes just the data bytes not the SOH and ETX characters To test the BCC byte users would configure a test check sum command to use the following parameter Sing Test Device ID Command The Test Device 1D command tells the driver to get the Device ID set in the server s Device Properties reformat it if needed and compare the result with the Device ID value in the read buffer Various actions can be taken depending on the result of that comparison This command is useful for detecting communication and physical device configuration errors To add a Test Device ID command right click on the desired step in the Transaction View and then select Conditional Commands Test Device ID from the resulting pop up menu Alternatively select Edit New Conditional Command Test Device ID from the main menu www kepware com 52 User Configurable U CON Driver Help Test Device ID command properties gy x Format K 8 bit Intel hi Cancel Format properties Help dl Start byte Use Current Buffer Position y True action Continue Action properties False action Invalidate Tag Action properties Description Descriptions of the parameters are as follows Format This
85. d the current position for the specified buffer will be used in the test This parameter overrides the Start Byte parameter True Action This parameter specifies the action that will occur if the parsed bit within byte is the same as the test value e False Action This parameter specifies the action that will occur when the values do not agree Action properties This button will be activated for actions that require additional properties to be defined Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can be very helpful when reviewing the transaction definition later www kepware com User Configurable U CON Driver Help 49 Test Character Command The Test Character command tells the driver to parse a character byte from the read or write buffer a scratch or a global buffer and compare the character byte with a test value Various actions can be taken depending on the result of that comparison This command is useful for detecting communication errors in read transactions or for issuing different commands based on a write value in write transactions To add a Test Character command right click on the desired step in the Transaction View and then select Conditional Commands Test Character from the resulting pop up menu Alternatively select Edit New Conditional Command Test Character from the main menu
86. d also specify when they are tested 4 Return to the server and right click on the channel Select the Diagnostics item to bring up the Diagnostics Window Then return to the Quick Client and right click on the tag to which the transaction belongs 5 Issue a read or write request depending on what type of transaction is being tested The Diagnostic Window will show users the bytes the driver sent to the device and any response Note For more information refer to the Diagnostic Window help topic in the OPC Server s help documentation Important If a change must be made to the transaction users must disconnect the Quick Client from the server before invoking the Transaction Editor 6 Next minimize the Quick Client and perform the edits Close the dialog only in order to disable the tags again 7 After all changes have been made users can bring the previous instance of the Quick Client back up and reconnect The tags should not all need to be disabled again 8 Check the transaction as before by issuing an asynchronous read or write Delimited Lists Many protocols provide data for multiple values in a list format generally providing a separate tag for each value In these cases it makes sense to create a Tag Block A tag block will have a single common read transaction that can be used to read data for all its member tags in a single shot This read transaction will contain a number of Update Tag commands one for each of it
87. d any valid ASCII packed 6 bit string of the specified length For variable length ASCII packed 6 bit string data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This is accomplished by specifying an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame Note Due to packing ASCII packed 6 bit data uses a reduced ASCII packed 6 bit Character Table Attempting to use characters not in the ASCII packed 6 bit Character Table will result in data conversion failures AAA Format Multi Bit Integer The Multi Bit Integer device data format option is used to associate the tag with a subset of bits in a longer integer value which is read from or written to the hardware The tag s data type will determine how the integer equivalent of these bits will be communicated to or from the client application For example when a format of Multi Bit Integer is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below Multi Bit Integer format properties xj Raw data format 16 bit Motorola hi lo y Cancel Start bit Help te Number of bits 3 www kepware com s2 User Configurable U CON Driver Help The Raw data format control can be used to specify the length and
88. d in the allotted space For example if string length is set to 4 then writing 12345 results in the string 9999 and writing 1234 results in the string 999 Note Due to packing ASCII packed 6 bit data uses a reduced ASCII packed 6 bit Character Table Attempting to use characters not in the ASCIT packed 6 bit Character Table will result in data conversion failures pa Format ASCII Real Packed 6 Bit The ASCII Real Packed 6 Bit device data format option can be used to specify how ASCII Real data should be formatted For example when a format of ASCII Real packed 6 bit ddd dddE ddd is selected the www kepware com so User Configurable U CON Driver Help Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below ASCII Real packed 6 bit format properties Xx m Precision formatting Precision il J Use decimal comma in place of decimal point Cancel di Help V Fixed length String length 4 Pad type Spaces 0x20 hd Parse termination method Read up to bytes from frame end Precision sets the number of digits to the right of the decimal point The precision property applies to writes only the driver can read any valid ASCIT real packed 6 bit value of the specified length When checked Use decimal comma in place of decimal point allows a comma to be used as a decimal The Fixed lengt
89. dd a Test Frame Length command right click on the desired step in the Transaction View and then select Conditional Commands Test Frame Length from the resulting pop up menu Alternatively select Edit New Conditional Command Test Frame Length from the main menu www kepware com User Configurable U CON Driver Help 53 Test Frame Length command properties x Enter Frame Length fi True action Cancel dil Action properties False action Invalidate Tag Action properties Description Descriptions of the parameters are as follows Enter Frame Length This parameter specifies the value that will be tested against True action This parameter specifies what actions will occur if the received frame length is the same as the entered frame length value False action This parameter specifies what the driver should do if the comparison fails Action properties This button will be activated for actions that require additional properties to be set Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Test String Command The Test String command tells the driver to parse a string from a buffer and compare it with a test value Various actions can be taken depending on the result of that comparison This command is u
90. definition later See Also Moving the Buffer Pointer Important Use care with scratch and global buffer pointers Unlike the read and write buffer pointers scratch and global buffer pointers are not automatically reset at the start of each transaction Seek String Command Each buffer has its own independent pointer that can be used to reference a particular byte in data processing commands such as the Update Tag command The Seek String command tells the driver to search for a given string in the specified buffer The search will begin at the current buffer pointer position If the string is found the buffer pointer position will be relocated to the first character in the next instance of the specified character If the string is not found the pointer will not be changed An optional Go To label may be executed on failure See Also Buffer Pointers and Update Tag Command www kepware com as User Configurable U CON Driver Help To add a Seek String command right click on the desired step in the Transaction View and then select Processing Commands Seek String from the resulting pop up menu Alternatively select Edit New Processing Command Seek String from the main menu Seek String command properties x m Data source K Read buffer Cancel C White buffer Help C Scratch buffer fi a C Global buffer fi E String Format fasci String ccc y V Case sensitive dl Goto on failure
91. der in which they appear www kepware com User Configurable U CON Driver Help 23 Scratch Buffers Each device has 256 scratch buffers associated with it These buffers can be used to exchange information between transactions defined for that device Data cannot be copied to a scratch buffer associated with a different device Data stored in a scratch buffer will exist as long as the OPC server project is running or until the scratch buffer is overwritten in a transaction See Also Global Buffers When updating a tag from a scratch buffer be aware that the value used will be the last value stored in the buffer Depending on how the transaction is defined this data may not necessarily represent the current state of a device If no data has been stored in the scratch buffer at the time the Update Tag command is executed the tag will be given a value of zero See Also Update Tag Command No special measures are taken when a Copy Buffer Command is executed when the buffer in question has not yet been initialized If there is no data in the buffer no bytes will be copied Notes 1 For more information and examples of how to use scratch buffers refer to Tips and Tricks 2 For instructions on how to initialize a scratch buffer refer to Initialize Buffers Global Buffers Global buffers can be used to exchange information among devices There are 256 global buffers Each global buffer is associated with all devices under every channel
92. device however they are added to strings read from the device and passed to the client application For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII integer and ASCII real formats the pad characters are added as needed to the right For example if the string length was set to 4 and a value of ABC is to be written to the device the driver will create a string consisting of the characters ABC in Unicode form followed by one pad character There are many options for pad characters spaces 0x20 0x00 zeros 0x30 0x00 and NULL 0x00 0x00 The pad character option applies to writes only the driver can read any valid ASCII string of the specified length www kepware com s4 User Configurable U CON Driver Help For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF may be chosen The driver will search for this character
93. e Serious Possible Cause The combination of start byte and number of bytes properties of the Copy Buffer command have caused to driver to attempt to access non existent source buffer elements Solution Make sure that the Copy Buffer command property settings are correct and that the source buffer contains valid data when the offending Copy Buffer command is executed Failed to load the global file Error Type Serious Possible Cause Driver was unable to create or open a temporary file used to transfer function block data between driver and Transaction Editor The file may have become corrupted or was removed while driver was running Solution Restart the server and retry the last edits with the Transaction Editor Note Contact Technical Support if error occurs again www kepware com User Configurable U CON Driver Help 107 Go To command failed for address lt address transaction gt label not found Error Type Serious Possible Cause The specified label does not exist in the present transaction Solution Make sure the transaction has a Label command of exactly the same name as that of the Go To command s label property Labels are case sensitive See Also Label Command Go To Command Mod Byte command failed for address lt address transaction gt write buffer bounds Error Type Serious Possible Cause The byte position property of the Mod Byte command is not within the current bounds of
94. eature All of the new tags and groups will instantly appear on the server Any tags and groups removed during the transaction edit session will be removed from the server At this point the Transaction Editor will shut itself down To resume communication reconnect the client application to the device www kepware com User Configurable U CON Driver Help 65 Device Data Formats The User Configurable U CON Driver offers a large set of device data format options which describe how data values will be transmitted between the driver and the device This should not be confused with the data type which describes the binary format of data as transmitted between the client and server applications The device and protocol determine the device data format Care should be taken to choose a compatible tag data type The combination of data type and format determines the range of values that can be transmitted Truncation errors are possible with many combinations Binary Formats ASCII Formats ASCII Hex Formats Date Time Legend Binary Formats Format Bata Length Notes OOCOC CSSC C C 73STtStS d Ox0A O E bytes 0x02 0x01 AE bytes 0x01 0x02 a Lolo three bytes 0x01 0x02 0x03 nomma n HIlo HIhi as four bytes 0x04 0x03 0x02 0x01 inom totong HIlo HIhi LOlo LOhi as four bytes 0x02 0x01 0x04 0x03 4 Example The value 16909060 0x01020304 would be encoded LOhi LOlo as four bytes 0x01 0x02 0x03 0x04 32 bit Motorola wo
95. ed a message box with a brief explanation of the problem will be shown For the example above the message would look a shown below User Configurable Driver x A Must write something before transmit in step 1 It should be emphasized that the Transaction Editor will only look for the most obvious problems The absence of warnings is not a guarantee that the transaction definition will work For more information on diagnosing problems refer to Tips and Tricks Debugging Transaction Commands Each transaction must be defined so that the driver knows how to exchange data with a device To do so users create a list of commands that the driver should execute during a transaction There are commands for requesting strings to be sent to the device receiving and storing devices responses validating responses parsing data from responses converting data formats updating tag values and so forth Defining a Transaction 1 Tostart select the desired transaction in the Transaction Editor s Item View Any currently defined steps will be shown in the Transaction View 2 Next add a command by right clicking on the Transaction View Alternatively use the Edit menu www kepware com 26 User Configurable U CON Driver Help a Device profile User Configurable Driver File Edit View Tools Help D m 3 Global
96. ed make sure all necessary format characters are present in the table See Also Dynamic ASCII Formatting Write Data command failed for address lt address transaction gt write buffer bounds Error Type Serious Possible Cause The command caused the driver to attempt to write past the maximum write buffer limit of 8192 bytes Solution 1 The write buffer should be of ample size for all but the most unusual circumstance Ensure that the byte count of the message being constructed is less than 8192 bytes If itis examine the command properties in the offending transaction The most common cause of this sort of error is an incorrect Start Byte End Byte or Number of Bytes value 2 Make sure that the number of bytes written by a Write Data command are considered This is set by the tag s device data format specification Write Data command failed for address lt address transaction gt data conversion Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is used make sure all necessary format characters are present in the table See Also Dynamic ASCII Formatting Write Device ID command failed for address lt address transaction gt write buffer bounds Error Type Serious www kepware com User Configurable U CON Driver Help 111 Possible Cause The command ca
97. ed Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF can be chosen The driver will search for this character as ASCII hexadecimal data For example the two bytes 0x32 0x30 would be considered a space character Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame Format ASCII Hex String From Nibbles The ASCII Hex String From Nibbles device data format option allows the user to specify how string data should be formatted For example when a format of ASCII Hex String From Nibbles hh hh hh is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below ASCII Hex String From Nibbles format properties x String length 2 Cancel Help m Parse termination method dil 7 Parse to next delimiter if present Delimiter as ASCII character 000 lt NUL Read up to f bytes from frame end The Fixed length check box determines if string data is fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length strings the String length must a
98. ed length ASCII real strings the String length must be specified As its name suggests this sets the total number of characters one byte per character that will be written to or read from the device The decimal point and possible minus sign each count as one character For fixed length ASCII real strings the Pad type must also be specified Pad characters are used to fill out the left hand side of the string for real values that do not require the full string length Zeros are added as needed to fill out the specified precision For example if the string length was set to 8 and the precision was set to 3 and a value of 12 3 is to be written to the device the driver will create a string consisting of two pad characters followed by 12 300 There are many options for pad characters spaces 0x20 zeros 0x30 and NULL 0x00 The pad character option applies to writes only the driver can read any valid ASCII real string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will
99. ed message If a full message has not been received by this time either due to a hardware problem or an incorrectly defined Read Response command the driver will assume that the next received character is the start of another message The default setting is 1000 This parameter is only available in Unsolicited Mode Dead time This parameter allows the driver to re synchronize itself with the devices after receiving a message with an unknown key Ifa message is unrecognizable the driver will not know where that message ends and the next one begins The driver allows the entire unrecognized message to come in and will then wait for a period of time This dead time must be enough so that it is safe to assume that the next byte received is the beginning of another message Reasonable values depend upon the target device and should be as small as possible but longer than the typical time between bytes in a message The time between bytes in a message is approximately 8000 baud rate in milliseconds The default setting is 1000 milliseconds This parameter is only available in Unsolicited Mode Note Because the dead time starts each time a byte is received users should not define too large a value The driver will see individual messages as a single unrecognizable stream Key length This parameter specifies the amount of characters to use as transaction keys These characters must be the first characters in a message The protocols used on a g
100. eger 81 Format Properties 73 75 Format Unicode String 82 Format UnicodeLoHi String 83 Framing 103 Function Blocks 22 37 G Global buffer 23 54 GoTo 28 Go To Command 34 User Configurable U CON Driver Help Go To command failed for address lt address transaction gt label not found 107 H Handle Escape Characters Command 35 36 Initialize Buffers 23 Insert Function Block 37 Insert Function Block command failed for address lt address transaction gt Invalid FB 113 Invalidate Tag 37 Invalidate Tag Command 37 L Label Command 34 37 LBCD 99 Log Event Command 38 Long 99 LSB 75 Mask 103 Missing address 101 www kepware com User Configurable U CON Driver Help 118 Mod Byte command failed for address lt address transaction gt write buffer bounds 107 Modem Setup 8 Modify Byte Command 39 Move Buffer Pointer Command 40 Move Pointer command failed for address lt address transaction gt 112 Moving the Buffer Pointer 97 MSB 75 Network 8 104 Network ID 104 NULL 76 Number 74 O Overrun 103 Overview 6 P Parity 103 Password Protection 14 Pause Command 41 Q Query receive 62 R Read Buffer 33 Read Resonse Command 42 Rolling Buffer 23 RX buffer overflow Full variable length frame could not be received 106 RX buffer overflow Stop characters not received 105 S Scanner Applications 97 Scratch Buffer 23 32 www kepware com 119 User Configura
101. elp 101 Error Descriptions The following categories of messages may be generated Click on the link for a list of messages Address Validation Serial Communications Device Status Messages U CON User Configurable Driver Error Messages XML Errors Address Validation The following messages may be generated Click on the link for a description of the message Missing address Device address lt address gt contains a syntax error Address lt address gt is out of range for the specified device or register Device address lt address gt is not supported by model lt model name gt Data Type lt type gt is not valid for device address lt address gt Device address lt address gt is read only Array support is not available for the specified address lt address gt Missing address Error Type Warning Possible Cause A tag address that has been specified statically has no length Solution Re enter the address in the client application Device address lt address gt contains a syntax error Error Type Warning Possible Cause A tag address that has been specified statically contains one or more invalid characters Solution Re enter the address in the client application Address lt address gt is out of range for the specified device or register Error Type Warning Possible Cause A tag address that has been specified statically references a location that is beyond the range of supported locatio
102. erial parameters and make any necessary changes Communications error on lt channel name gt lt error mask gt Error Type Warning Error Mask Definitions B Hardware break detected F Framing error E I O error O Character buffer overrun R RX buffer overrun P Received byte parity error T TX buffer full Possible Cause 1 The serial connection between the device and the host PC is bad 2 The communication parameters for the serial connection are incorrect 3 There is a noise source disrupting communications somewhere in the cabling path between the PC and the device Solution www kepware com 104 User Configurable U CON Driver Help 1 Verify the cabling between the PC and the device 2 Verify that the specified communication parameters match those of the device 3 Reroute cabling to avoid sources of electrical interference such as motors generators or high voltage lines Unable to create serial I O thread Error Type Warning Possible Cause The OPC Server process has no more resources available to create new threads Solution Remember that each tag group takes up a thread and that the typical limit for a single process is about 2000 threads Reduce the number of tag groups in the project Device Status Messages The following messages may be generated Click on the link for a description of the message Device lt device name gt is not responding Unable to write to
103. esets follow the instructions below 1 Click Edit Initialize Scratch and Global Buffers or click on the toolbar icon as shown below Device profile User Configurable Driver File Edit Yiew Tools Help Doe a 2 Go a oa EA _Global E m Device Initialize buffers a Group_1 2 The buffer initialization dialog should appear as shown below www kepware com 24 User Configurable U CON Driver Help Initialize Scratch and Global Buffers Buffer ASCII characters OK Scratch buffer f1 x Cancel dd C Global buffer I A Save i Help m Display mode Hex hh hh bh 5 C ASCII cce Selected buffer will contain this data on startup jor 31 32 33 Descriptions of the parameters are as follows Buffer This parameter is used to specify the buffer for which a preset will be defined Display mode This parameter is used to specify how the preset data to be displayed in the edit box at the bottom of the dialog In Hex mode the hexadecimal value of each byte is displayed When editing each byte value must be entered as 2 hex digits 1 9 A F with a space separating each byte If wishing to preset a buffer with an ASCII string users will find it easier to work in ASCII mode where each data byte is displayed as the equivalent ASCII character Users will not be able to view or edit preset data that contains non printable characters in ASCII mode ASCII cha
104. essage dead time expired 2 2 ee cee cee cee cece eee eeee 112 Move Pointer command failed for address lt address transaction gt 2 0 2 022202 2 2 2222 112 Seek Character command failed for address lt address transaction gt label not found 112 Insert Function Block command failed for address lt address transaction gt Invalid FB 113 Unable to save password protected device profile in XML format 2 2 0 2 2220 2 22 113 AMIE GFORS 22 aaal cages eA O O 113 XML loading error The number of unsolicited transaction keys exceeds the set key length lt key Er ARA sous i honk Nee ences A NA 113 XML loading error The two buffers of a lt command gt are the same The buffers must be unique 113 XML loading error The string lt string gt entered for a Write String command with format lt format gt is invalide con 2 Js vos A O RN 114 XML loading error Range exceeds source buffer size of lt max buffer size gt bytes for a lt command gt 114 www kepware com 6 User Configurable U CON Driver Help User Configurable U CON Driver Help Help version 1 111 CONTENTS Overview What is the User Configurable U CON Driver Device Setup How do I configure a device for use with the User Configurable U CON Driver Driver Configuration How do I configure the User Configurable U CON Driver for use with a particular device Transaction Editor How do I use t
105. est but requires the driver to send back the acknowledgment code 0x06 If the error code is 0x01 the device failed to process the request In the example transaction the error code is examined the tag is updated and the acknowledgment is sent if the read request succeeds If it fails the request is repeated If it fails a second time the tag is invalidated and requests are stopped STEP COMMAND COMMAND PARAMS DESCRIPTION Write String Place read request string in TX buffer 2 Transmie Sendtnerequest B Read Response Wait for t 0x0D Get response from device Test Character Position ACK receipt of good data or retry Test n ee 0x00 www kepware com 92 User Configurable U CON Driver Help TRUE action Go To Good FALSE action Continue Log Event Retrying AB1 command Post message to server s Event Log Transmit Ps Send the last command again Read Response Wait for terminator Ox0D Get response from device Test Character Position ACK receipt of good data or invalidate tag and give Test Character 0x00 up TRUE action Go To Good FALSE action Invalidate Tag CTI A DIENTE Tag This tag Prransmit_ ______ Sendacknowledgment_ id Note Steps 10 13 are executed only when the device returns an error code of 0x00 success Dealing with Echoes Some devices operate in echo mode which is when every byte sent to it is echoed back Unless told otherwise the User Configurable U CON Driver wi
106. et output mode command string in the TX buffer Somewhere in that command string users will need to place the output mode bit field Users get this by issuing a Copy Buffer command that will copy the current settings from the RX buffer to the TX buffer Next users need to modify bit O of this byte to set the mode of output RO The Modify Byte function does just that It will take the value to be written to the device and modify a bit or set of bits in the specified byte accordingly In this case users can use it to modify bit O of the byte by specifying the bit mask 00000001 Writing O to the Mode_RO tag then results in bit O being set to 0 setting RO to alarm mode Writing 1 results in bit O being set to 1 setting RO to proportional control mode All other bits remain unchanged and therefore outputs R1 R2 and R3 remain in the same mode Branching Using the conditional Go To Label and End Commands The User Configurable U CON Driver is used to create transactions that branch off and execute different sets of commands depending on the data received from a device Error handling is the most common use for branching If data is judged to be good one set of commands will be executed if it is judged to be bad another set of commands will be executed In the example below the device is sent a read request of some sort The device will return an error code of 0x00 or 0x01 If the error code is 0x00 the device successfully processed the read requ
107. ett a icatiee 81 Format Unicode String record srta sto il id catas tds 82 Format UnicodeLoHi String ooccccccccccccccnc cece ce cee cee r raaro or rnern ennnen 83 Form t Date Time 2 230 cbs a elt take A betes Lo id ll tt 84 www kepware com 4 User Configurable U CON Driver Help Check Sum Description Susi A fede e eats ie ad Se et ee ene owe 85 ASCII Character Table voice id 89 ASCII Character Table Packed 6 Bit 0000000000000000000000 cee eee eect cece cece eeeeeeee 89 Tips ANG THI CKS 2 2 orar bt divine Wg canicas 91 Bit Fields Using the Modify Byte and Copy Buffer Commands 222 22222 00eee eee 91 Branching Using the conditional Go To Label and End Commands 222200000 91 Dealing WithiBChOeGS ic 22 ei bn o weet a ee ah ia 92 Debugging Using the Diagnostic Window and Quick Client 22000 002 c eee eee eee eee 92 Delimited Fists oc occ ocho gS en CG Cae Se a ed eet da ee 93 Moving the Buffer Pointer 0 2 000022 c cece e cece cece cece cece ee eee eee cece eeeeeeeeeeees 97 Scanner Applications ceca Lo etal eee SIN as SU Ca eh epee a dee tod hi ote det 97 Slowing Things Down Using the Pause Command 22 2202 98 Transferring Data Between Transactions Using Scratch Buffers 222 222 222 98 Data Types DeSCription ii tdi 98 Address Descriptions 1 2 20 2200 c cece nce ccceeececcccceettecceceeeeeees 100 Error Descripti
108. fer does not currently contain enough characters to perform the string comparison described in a Test String command Solution Verify that the transaction has been properly configured and that the driver is receiving the data as expected See Also Test String Command Update Tag command failed for address lt address transaction gt lt read scratch event counter gt buffer bounds Error Type Serious Possible Cause The combination of data start byte property of the Update Tag command and tag data size have caused to driver to attempt to access non existent source buffer elements Solution This command can only operate on bytes received by the last Read Response command previously stored in a Scratch buffer or global buffer or the 16 bit values stored in event counter buffers Make sure the sum of data start byte and the data length 2 for word 4 for float and so forth does not exceed the number of bytes in the source buffer See Also Update Tag Read Response Command Scratch Buffer Global Buffer Event Counter Write Character command failed for address lt address transaction gt destination buffer bounds Error Type Serious Possible Cause The command caused the driver to attempt to write past the maximum destination buffer limit of 8192 bytes Solution 1 The destination buffer should be of ample size for all but the most unusual circumstance Ensure that the byte count of the message being con
109. figurable U CON Driver can be used to represent a tag s data as any one of the basic types described below Choose a data type that is recognized by the client application and will accommodate the expected range of data values www kepware com User Configurable U CON Driver Help 99 Data Type Single bit Byte Unsigned 8 bit value bit O is the low bit bit 7 is the high bit Char Signed 8 bit value bit O is the low bit bit 6 is the high bit bit 7 is the sign bit Word Unsigned 16 bit value bit O is the low bit bit 15 is the high bit Short Signed 16 bit value bit O is the low bit bit 14 is the high bit bit 15 is the sign bit DWord Unsigned 32 bit value bit O is the low bit bit 31 is the high bit Long Signed 32 bit value bit O is the low bit bit 30 is the high bit bit 31 is the sign bit BCD Two byte packed BCD Value range is 0 9999 Behavior is undefined for values beyond this range Four byte packed BCD Value range is 0 99999999 Behavior is undefined for values beyond this range 32 bit floating point value The driver interprets two consecutive 16 bit registers as a floating point value by making the second register the high word and the first register the low word 64 bit floating point value Zero terminated character array Note Data Type refers to the representation of data values that the server and client applications exchange Data exchanged between the server and a device can be formatted in a wide
110. fix range is set to 1970 to 2069 year values between 00 and 69 would resolve to 2000 and 2069 Year values between 70 and 99 would resolve to 1970 and 1999 This setting is only enabled for date time formats that contain 1 byte binary years 2 character ASCII years or 2 byte Hex ASCII years Check the Followed by AM PM box in order to have the value be followed by AM or PM The default setting is unchecked Check Sum Descriptions The User Configurable U CON Driver offers a variety of check sum options Here is a brief description of each Custom check sums can be created for a small fee For more information refer to Technical Support 2 s Complemented sum 8 bit The check sum is the 2 s complement of the data received The check sum is 8 bit 2 s Complemented sum 16 bit Same as 2 s Complemented sum 8 bit except the check sum is 16 bit CRC CCITT 16 bit Cyclical Redundancy Check using X 16 X 12 X 5 1 generator polynomial Commonly used in XMODEM protocol CRC CCITT INITO 16 bit Reflected in out Same as CRC CCITT 16 bit except input and output bytes are reflected and CRC is initialized to 0 CRC CCITT INIT OxFFFF Same as CRC CCITT 16 bit except that the initialization OXxFFFF CRC CCITT INIT OxFFFF 16 bit Reflected Same as CRC CCITT 16 bit except input and output bytes are reflected and CRC is initialized to OXFFFF CRC 16 16 bit For more information refer to Custom 3 16 bit CR
111. g length must be set The number entered sets the total number of characters two bytes per character that will be written to or read from the device Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII strings each pad character is encoded as two ASCII Hex bytes For example if the string length was set to 8 and Spaces was chosen as the pad type writing the string ABC would cause the driver to send eight bytes 0x34 0x31 0x34 0x32 www kepware com User Configurable U CON Driver Help 0x34 0x33 0x32 0x30 There are many options for pad characters spaces 0x32 0x30 zeros 0x33 0x30 and NULL 0x30 0x30 The pad character option applies to writes only the driver can read any valid ASCII Hex string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimit
112. g the same Format Properties then the value sent to the device will be 00011000 Format ASCII Real The ASCII Real device data format option allows the user to specify how ASCII Real data should be formatted For example when a format of ASCII Real ddd dddE ddd is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below ASCII Real format properties ES m Precision formatting OK Precision il a Cancel J Use decimal comma in place of decimal point E Help IV Fixed length String lenath fi Pad type Spaces 0x20 X Parse termination method F Parse to next delimiter if present Delimiter lt NUL gt Read up to fi bytes from frame end www kepware com User Configurable U CON Driver Help Precision sets the number of digits to the right of the decimal point The precision property applies to writes only the driver can read any valid ASCII real value of the specified length When Use decimal comma in place of decimal point is checked a comma will be used as the decimal separator The Fixed length check box determines if string data is fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of astring returned froma read transaction cannot be anticipated then this box should be unchecked For fix
113. gt read buffer bounds Test Device ID command failed for address lt address transaction gt data conversion Test String command failed for address lt address transaction source buffer bounds Update Tag command failed for address lt address transaction gt lt read scratch event counter gt buffer bounds Write Character command failed for address lt address transaction gt destination buffer bounds Write Check Sum command failed for address lt address transaction gt write buffer bounds Write Check Sum command failed for address lt address transaction gt data conversion Write Data command failed for address lt address transaction gt write buffer bounds Write Data command failed for address lt address transaction gt data conversion Write Device ID command failed for address lt address transaction gt write buffer bounds Write Device ID command failed for address lt address transaction gt data conversion Write String command failed for address lt address transaction gt destination buffer bounds Tag update for address lt address gt failed due to data conversion error Unsolicited message receive timeout Unsolicited message dead time expired Move Pointer command failed for address lt address transaction gt Seek Character command failed for address lt address transaction gt label not found Insert Function Block command failed for address lt address transaction gt Invalid FB Unable to
114. h check box determines whether the string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length ASCII real packed 6 bit strings the String length must be specified As its name suggests this sets the total number of characters one byte per character prior to conversion that will be written to or read from the device The decimal point and possible minus sign each count as one character The number of bytes sent over the wire is equal to three fourths the string length For fixed length ASCII real packed 6 bit strings the Pad type must also be specified Pad characters are used to fill out the left hand side of the string for real values that do not require the full string length Zeros are added as needed to fill out the specified precision For example if the string length is set to 8 the precision is set to 3 and a value of 12 3 is to be written to the device the driver will create a string consisting of two pad characters followed by 12 300 There are many options for pad characters spaces 0x20 and zeros 0x30 The pad character option applies to writes only the driver can read any valid ASCII real packed 6 bit string of the specified length For variable length ASCII real packed 6 bit data the driver must have
115. h the transaction s event counter value These tags must belong toa tag block The client application will see the event counter tag change each time an item is scanned Note Event counter values are stored in 32 bit buffers All tags updated from event counters must be configured with 32 bit 16 bit or 8 bit Intel Lo Hi device data format Slowing Things Down Using the Pause Command Users may encounter devices that are not capable of operating at the same speed as the server In these cases Pause commands can be added to the transactions to slow things up In the example below the device requires a short pause between each character in the read request AB1 STEP COMMAND COMMAND PARAMS DESCRIPTION G Write character Jar CO CIN A ETE fs___ Pause_____ Time S0ms Wait before sending next character C E A COCSCSOSCSCSC C S CN CIN A ESTETICA e Pause ___ Time 50ms Wait before sending next character A A nT TAS TT Note Omitting the Transmit commands in steps 2 and 5 would not produce the desired effect In that case the User Configurable U CON Driver would slowly build up the TX buffer internally and then send all three characters in the usual rapid succession Transferring Data Between Transactions Using Scratch Buffers Some protocols require that a special type of Device Identifier be used in all requests This Identifier can be read directly from the device using a special command A read transactio
116. he User Configurable U CON Driver s Transaction Editor to create a profile for a particular device Tips and Tricks Where can I see some example solutions to common driver profile development problems Data Types Description What data types does the User Configurable U CON Driver support Address Descriptions How do I reference a data location in a device using the User Configurable U CON Driver Error Descriptions What error messages are produced the User Configurable U CON Driver Overview The User Configurable U CON Driver provides an easy and reliable way to connect User Configurable U CON Ethernet and Serial Devices to OPC Client applications including HMI SCADA Historian MES ERP and countless custom applications While other drivers are designed specifically for use with a single device type or a small family of closely related devices the User Configurable U CON Driver can be programmed to work with a very wide variety of serial and Ethernet devices Driver profiles are created using the integrated Transaction Editor Transaction elements are selected from context aware menus thus eliminating the need to learn scripting languages and greatly reducing the possibility of errors Features The User Configurable U CON Driver is completely integrated with the server Custom drivers can be developed debugged and run from the server itself Such tight integration with the server ensures that all of the important fe
117. he above examples assume the tag s data type is one of the integer types Byte Char Word and so forth Boolean tags behave a bit differently On reads if any of the specified bits is set the tag will receive a value of TRUE All of the specified bits will be set if TRUE is written and all bits will be cleared if FALSE is written Format Unicode String The Unicode String device data format option allows the user to specify how string data should be formatted For example when Unicode String u1u2u3u4 is selected the Format Properties button in the tag_ dialog will become enabled Click Format Properties to display the Unicode String Format Properties dialog box as shown below Unicode String format properties x IV Fixed length String length fi Cancel Pad type Spaces 0x00 0x20 v Help Parse termination method dila 7 Parse to next delimiter if present Delimiter Read up to bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length strings the String length must be set The number entered here sets the total number of characters two bytes per character that will be written to or read from the device
118. he desired step in the Transaction View and then select Write Commands Write Event Counter from the resulting pop up menu Alternatively select Edit New Write Command Write Event Counter from the main menu www kepware com User Configurable U CON Driver Help 61 Write Event Counter command properties i x Data destination K C Read buffer Cancel Help dil C Scratch buffer fi C Global buffer fi Format 8 bit Intel hi ye Format properties F Write block event counter Description m Descriptions of the parameters are as follows Data Destination This parameter specifies the data destination Options include Read buffer Write buffer Scratch buffer and Global buffer If the Scratch or Global buffer options are selected users must also specify the buffer index Note If there are not enough bytes of data in the buffer the command will be aborted and the transaction will fail An error message will also be placed in the OPC server s Event Log Format This drop down menu defines the format of the Event Counter If the selected format has properties that must be set the Format Properties button will become enabled For a complete discussion of available formats refer to Device Data Formats Write block event counter This checkbox should be selected if the event counter is from a block transaction It should be left unchecked if the event counter is from a
119. he value 4666 0x123A would be sent as four lower case ASCII Hex characters with bytes swapped 3a12 0x33 0x61 0x31 0x32 Example The value 305419898 0x1234567A would be sent as eight ASCII Hex characters 1234567A 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x41 Strings encoded as ASCII Hex values Example The string AB12 would be sent as eight ASCII Hex characters AB12 0x34 0x31 0x34 0x32 0x30 0x31 0x30 0x32 See Also Format ASCII Hex String When reading two ASCII Hex values are received from the device They are converted to a Byte and the state 0 or 1 of the specified bit is sent to the tag When writing the specified bit in a Byte is set if the write value is non zero all other bits will be zero The Byte is converted to 2 ASCII Hex characters and sent to the device Example Receive the bytes 0x30 0x31 the binary value 0x01 would cause a tag with Bit 0 format take a value of 1 or TRUE Tags with any other bit format would take a value of 0 or FALSE Example Write the value 1 or any other non zero value would result in the bytes 0x30 0x31 the binary value 0x01 being sent if Bit O format 0x30 0x32 the binary value 0x02 if Bit 1 format and so forth This format option is provided for devices that encode each nibble of a 32 bit IEEE float value as an ASCII Hex character Example The binary representation of 1 0 is Ox3F800000 This value would be encoded as an 8 character string 3F800000 www
120. heck SUM Command sil ia ds Sacto et 58 Write Data Command 245 o Dd 59 Write Device ID Command adscrit ioeie ee ose Syed Jo eek eee add 59 Write Event Counter Command 1 0 ccc cece eee ee ee eee ee ee cece ence eee e eee ee eens 60 Write String Command 22 0 eee cee cee eee eee cee ence eeeeeeees 61 Unsolicited Transactions 000 0 c cece ccc cece eee nro 62 Updating the Server ir ected haces hoy A Beet As ese fade eed 64 Device Data Formats nine 65 Dynamic ASCI Formatting E Oi hh slo A Stele suse ha Dates 70 Format Alternating Byte ASCII String 02 0000 eee cee cence cece eens 72 Format ASCII Integer 2 0 cece cee ce cee ee cee eee cence cece e cence eee eeee 73 Format ASCII HEX Integer o 2 22 lee cee eee ee cee cee cee cee cece eee eee 73 Format ASCII Multi Bit Integer 0 222 A ee cee cee ee ee cece eens 74 FormatASCILRealy a ini ot li Sel helt PP al ed eal hee Set Sa id SALE te ates 75 Format ASCIUStHiNgG use caca a ad dats st bans Geen 76 Format ASCII Hex String occ cee cee eee eee eee eee cece cence eeeeeeees 77 Format ASCII Hex String From Nibbles 0 00 0 oe cece cee cee cece eee eee eee 78 Format ASCII Integer Packed 6 Bit 0 22 lel ce ce ce cee ee cece eee 79 Format ASCII Real Packed 6 Bit 0 00 00 ole cc cee cee cee cece cece cece ee eee 79 Format ASCII String Packed 6 Bit 0 2 0 cee ce cee cee cece cece ee eee 80 Format Multi Bitunteger 2 02 0 srta
121. ified The Start position is the 1 based index of the first character to be parsed from the buffer The number of characters parsed from the buffer will be the number of characters specified in the Test Value If the buffer does not contain the required number of characters the transaction will fail and an error message will be posted in the server s Event Log Use Current Buffer Source When checked the current position for the specified buffer will be used in the test This parameter overrides the Start Byte parameter Search whole string When checked the entire string will be tested or searched This option ignores the value in the Start Position so that the whole string is tested for a string that matches the Test Value Format This drop down menu specifies the string format Options include ASCII String ASCII Hex String Alternating Byte ASCII Unicode String Unicode String with Lo Hi Byte Order ASCII Hex String From Nibbles and ASCII String packed 6 bit The default setting is ASCII String www kepware com User Configurable U CON Driver Help 55 Case sensitive When checked the string comparison will be case sensitive When unchecked the string comparison will not be case sensitive The default setting is checked True Action This parameter specifies the action that will occur if the string parsed from the buffer is the same as the Test value False Action This parameter specifies the action that will occur
122. ines special handling of specific escape characters For example adds duplicate escape characters to Writes and removes duplicates from Reads Serial Line Control Commands Control Serial Line Command Controls the RTS and DTR lines to assert de assert the line manually Edit Menu Commands Insert Function Block Command Inserts a previously defined function block into a Read Write or Unsolicited transaction See Also Function Block Add Comment Command The Add Comment command can be used to insert a comment or a blank line in the Transaction View For example the image below shows a blank line inserted above Step 3 Device profile User Configurable Driver File Edit view Tools Help De e alo amp m TEELE Step Command Value Format Description Solicited GB Default E MMDDYYHHN o Write Character 001 0x01 A Write Character 016 0x10 P DAPR UNE MMDDYYHHY Write Data Standard MM 2 Read Copy Buffer 1 end of data gt Write Character 003 0x03 C To add an Add Comment command right click on the desired step in the Transaction View and then select Processing Commands Add Comment from the pop up menu Alternatively select Edit Add Comment www kepware com User Configurable U CON Driver Help 29 from the main menu The comment or blank line will be inserted above the current step in the Transaction View Comment lines have a m
123. ion Check the transaction definition Make sure the label specified in the Seek Character command has been defined in that transaction www kepware com User Configurable U CON Driver Help 113 Insert Function Block command failed for address lt address transaction gt Invalid FB Error Type Serious Possible Cause The function block inserted into the specified transaction may have since been deleted or renamed Solution Use the Transaction Editor to recreate the function block if necessary or to correct the name of the function block referenced in the transaction Unable to save password protected device profile in XML format Error Type Serious Possible Cause The device profile of one or more devices is password protected Solution The purpose of the password is to restrict unauthorized users from viewing and editing a device profile Saving a project as XML will expose the information Thus save the project as an opf file or remove all passwords in order to save as an XML file See Also Transaction Editor XML Errors The following messages may be generated Click on the link for a description of the message XML Loading Error The number of unsolicited transaction keys exceeds the set key length lt key length gt XML Loading Error The two buffers of a lt command gt are the same The buffers must be unique XML Loading Error The string lt string gt entered for a Write String command with form
124. is intended for use in a read transaction only If an Invalidate Tag command is included in a write transaction it will have no effect on the quality of the tag Label Command The Label command is used in conjunction with the Go To command It does nothing other than serve as a target for Go To commands For more information refer to Branching Using the conditional Go To Label and End Commands www kepware com 38 User Configurable U CON Driver Help To add a Label command right click on the desired step in the Transaction View and then select Processing Commands Label from the resulting pop up menu Alternatively select Edit New Processing Command Label from the main menu Label command properties xi Label Check Sum Error Cancel Description Help Begin check sum error procedure Descriptions of the parameters are as follows Label This parameter specifies the identifier for which Go To commands can search Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Note The Transaction Editor will not allow duplicate labels to be created in a transaction Log Event Command The Log Event command tells the driver to send a message to the server s Event Log To add a Log Event command right click on the desired step in
125. ison This command is useful for detecting communication errors in read transactions or for issuing different commands based on a write value in write transactions www kepware com as User Configurable U CON Driver Help To add a Test Bit within Byte command right click on the desired step in the Transaction View and then select Conditional Commands Test Bit within Byte from the resulting pop up menu Alternatively select Edit New Conditional Command Test Bit within Byte from the main menu Test Bit Within Byte command properties xj Test value K E o o ooo O OM m Data source Read buffer Help Cancel dl White buffer Scratch buffer i C Global buffer 1 M Use Current Buffer Position Byte Position 1 Bit Position 0 True action Continue Action properties False action Invalidate Tag we Action properties Description Descriptions of the parameters are as follows Test Value This parameter specifies O or 1 The test value will be compared with a bit within byte in the data source Data Source This parameter specifies the data source Options include Read buffer Write buffer Scratch buffer or Global buffer The Byte Position and Bit Position within that buffer must also be specified Note If either the Scratch or Global buffer options are selected the buffer index must also be specified Use Current Buffer Position When checke
126. it can be accessed again to select the other line e Check to Assert and uncheck to De Assert When checked the line will be asserted When unchecked the line will be de asserted e Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Copy Buffer Command The Copy Buffer command tells the driver to copy a number of bytes from one buffer to another buffer Bytes copied to the read write or rolling buffers are placed after any data currently in that buffer Scratch buffers and global buffers are flushed before new data is placed in them www kepware com User Configurable U CON Driver Help 33 This command is normally used in conjunction with a Modify Byte command to construct a bit field or to store off data from a Read Response that will be used in subsequent transactions When using this command users should be aware that the selected source buffer will have valid data For more information refer to Tips and Tricks To add a Copy Buffer command right click on the desired step in the Transaction View and then select Write Commands Copy Buffer from the resulting pop up menu Alternatively select Edit New Write Command Copy Buffer from the main menu Copy Buffer command parameters x m Data source K Cancel White buffer C Scra
127. iven channel must be such that keys of the same length can uniquely identify all possible messages The key length may be between 0 and 32 characters The default setting is 0 This parameter is only available in Unsolicited Mode The driver can still be used even if the protocol does not permit the use of transaction keys An example would be a scanner that sends packets starting with the raw data values In these cases the transaction key length must be set to zero This forces the driver to use the first unsolicited transaction defined on the channel to interpret all incoming packets Because of this there should be only one device on the channel Furthermore that device should have a single block tag or a single non block tag defined That tag or tag block may be placed in a group Note For more information on unsolicited transactions and transaction keys refer to Unsolicited Transactions Log unsolicited message timeouts This setting is useful when diagnosing communications problems When checked a message will be placed in the Event Log each time that the Receive Timeout period expires while receiving an unsolicited message Such events may be caused by data delays due to network traffic or gateway devices incorrectly configured transactions or Pause commands in the transactions The default setting is unchecked 5 Once the parameters have been specified click Next 6 Then click Finish Unsolicited Communications The devi
128. iver and go The User Configurable U CON Driver fills the need for a non specific driver that can be used to communicate with a large number of devices for which targeted drivers have not yet been developed It is up to the user to define the transactions necessary to communicate with the device This work is done using the integrated Transaction Editor application The Transaction Editor is the integrated development environment of the User Configurable U CON Driver It provides an easy and intuitive means for configuring the driver Tags groupings of tags and transactions are constructed using contextual pop up menus This graphical user interface approach eliminates the need to learn a driver programming or scripting language and provides a degree of error prevention All that is needed is an understanding of the particular device protocol in question In the OPC server main window right click on the desired device and then select Properties Select the Transaction Editor tab then click Launch Transaction Editor The dialog should appear as shown below 5 Device Properties General Scan Mode Timing Auto Demotion Transaction Editor Unsolicited Message Wait Time Launch Transaction Editor Regenerate Tag Database www kepware com 1s User Configurable U CON Driver Help In the Transaction Editor main window a Device Profile can be both created and modified A Device Profile refers to tags
129. kepware com User Configurable U CON Driver Help 69 This value would be sent as eight ASCII Hex characters 3F800000 0x33 0x46 0x38 0x30 0x30 0x30 0x30 0x30 This format is not to be confused with ASCII Real described above which would send this value as a 3 character string 1 0 ASCII coded IEEE float This is the same as ASCII Coded IEEE float except lower case LC ASCII hex characters are used hh hh hh hh Example The value 1 0 0x3F800000 would be sent as 3f800000 0x33 0x66 0x38 0x30 0x30 0x30 0x30 0x30 ASCII coded IEEE float This is the same as ASCII Coded IEEE float except the byte order Rev is reversed hh hh hh hh Example The value 1 0 0x3F800000 would be sent as 0000803F 0x30 0x30 0x30 0x30 0x38 0x30 0x33 0x46 ASCII coded IEEE float This is the same as above except lower case ASCII hex characters LC Rev are used and the byte order is reversed hh hh hh hh Example The value 1 0 0x3F800000 would be sent as 0000803f 0x30 0x30 0x30 0x30 0x38 0x30 0x33 0x66 When a floating point value is written to this format clamping will be applied to both the positive and negative directions If the value written is less than 3 402823466e 38 then the value will be clamped to 3 402823466e 38 If the value written is greater than 3 402823466e 38 then the value will be clamped to 3 402823466e 38 When a Signaling NaN is written it will be converted to a Quiet NaN Date
130. l hi String length 1 Data start position Number of trailing bytes jo Description pee o oo V Clear RX buffer before read V Log timeout errors Descriptions of the parameters are as follows Frame type This parameter specifies the frame type which is distinguished by its receive termination method This tells the driver when the last byte of the message has been received Options include Frame has known length Frame is terminated by stop characters and Frame contains data length field Descriptions of the options are as follows Frame has known length When selected users must enter a value in Number of bytes for which the driver should wait The amount of time that the driver will wait for the specified number of bytes is set in the server s Device Properties under Request Timeout If the request times out the driver will execute the transaction again up to the number of attempts that was specified Any bytes in excess to that value specified will be ignored Frame is terminated by stop characters When selected users must define the character sequence that will mark the end of a response using the ASCII characters box and the gt gt button The driver will wait until the specified stop character sequence is received or the request times out whichever occurs first Frame contains data length field When selected users must specify where in the frame the Data Length field is located and wh
131. l z Cancel Description Help Descriptions of the parameters are as follows Function block This drop down list is used to select from the previously defined function blocks Description This parameter specifies a notation that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Important Use caution when including Go To and Label commands in function blocks as infinite loops can be created When a Go To command is executed the driver will scan all commands in the current Read Write or Unsolicited transaction from top to bottom looking for a matching Label Commands in function blocks referenced in the transaction will be scanned in the order in which they appear Invalidate Tag Command The Invalidate Tag command tells the driver to set the tag s data quality to bad This command has no user defined properties To add an Invalidate Tag command right click on the desired step in the Transaction View and then select Processing Commands Invalidate Tag from the resulting pop up menu Alternatively select Edit New Processing Command Invalidate Tag from the main menu Notes 1 An Invalidate Tag command does not end a transaction To terminate the transaction when the tag is invalidated place an End command immediately after the Invalidate Tag command 2 The Invalidate Tag command
132. laced in tag groups represented by plain folder icons or in tag blocks represented by folders with tags A tag block is a special kind of group where all the contained tags are updated at once with a single Read or unsolicited transaction common to the block Block Reads are much more efficient than the functionally equivalent series of individual Reads and should be used whenever possible When a transaction is selected in the item view the Transaction View displays the currently defined sequence of commands that are to take place When something other than a transaction is selected in the item view the Transaction View is blank The Edit Option at the top of the screen includes options for adding items as well as options to cut paste delete or show the selected item s properties The menu options commonly used are also represented on the toolbar for quick access Adding and Modifying Transactions in the Transaction View Right click in the Transaction View to invoke a submenu that provides access to all the available transaction commands The dialog should appear as shown below www kepware com User Configurable U CON Driver Help 19 Device profile User Configurable Driver File Edit View Tools Help D m 3 Global Step Command Value Format Description ff Solicited 1 Write Character 001 0x01 A lt SOH gt Default Write Character 002 0x02 B lt STX gt
133. le 0x30 high nibble 0x40 Example The value 168 0xA8 is represented as the characters 8J Low nibble 0x08 0x08 0x30 0x38 8 High nibble 0x0A Ox0A 0x40 0x4A J Float from 8 Offset Nibble The value is represented as an IEEE float with reversed byte chars order where each byte is encoded using the Byte from 2 Offset Nibble chars format described above Example The value 1 23456 which is 0x3F9E0610 in normal IEEE form and 0x10069E3F in reversed byte order form would be encoded as the characters OA6 gt I C Low nibble of first byte 0x00 0x00 0x30 0x30 0 High nibble of first byte 0x01 0x01 0x40 0x41 A The other three bytes are encoded in a similar manner Use dynamic ASCII V This format option is provided for devices that represent values as format table a fixed number of ASCII digits and a format character that specifies the decimal placement and sign To use this option the user must define a table of format characters See Also Dynamic ASCII Formatting 2 ASCII String packed 6 F V Strings encoded as ASCII packed 6 bit characters bit cccc See Also Format ASCII String packed 6 bit www kepware com bit dddd ASCII Real packed 6 bit ddd dddE ddd 68 User Configurable U CON Driver Help ASCII Integer packed 6 Strings encoded as ASCII packed 6 bit characters See Also Format ASCII Integer packed 6 bit Strings
134. lick the Scratch buffer or Global buffer checkbox The buffer index is selected with the spin control to the right of the check box The scratch or global buffer chosen will be cleared before the formatted write value is stored Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Write Device ID Command The Write Device ID command tells the driver to get the ID number set in the server s Device Properties reformat it if needed and append the result to the write buffer To add a Write Device ID command right click on the desired step in the Transaction View and then select Write Commands Write Device ID from the resulting pop up menu Alternatively select Edit New Write Command Write Device ID from the main menu www kepware com 60 User Configurable U CON Driver Help Write Device ID command properties x Data destination K C Read buffer Cancel Help dl Scratch buffer i C Global buffer fI Format 8 bit Intel hi y Format properties Description e Descriptions of the parameters are as follows Data Destination This parameter specifies the data destination Options include Read buffer Write buffer Scratch buffer and Global buffer If the Scratch or Global buffer options
135. lished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF can be chosen Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame ROUND OFF When writing values that require more characters than allotted by String length the driver will write the largest positive or smallest negative value that can be expressed in the allotted space For example if string length is set to 4 then writing 12345 results in the string 9999 and writing 1234 results in the string 999 Format ASCII HEX Integer The ASCII Hex Integer device data format option allows the user to specify how ASCII hex integer data should be formatted For example when a format of ASCII Hex Integer hhh is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below www kepware com User Configurable U CON Driver Help ASCII Hex Integer format properties x String length fi as ASCII Hex Bytes Cancel Pad type Spaces 0x20 v Help
136. ll ignore such echoes It is usually perfectly okay to ignore these echoes However some devices will not accept the next byte sent to it until it has sent back the previous character To make sure that the driver and device remain in sync in these cases users must process each echoed byte For example if the command string AB1 needs to be sent to such a device it should then send a nine character response A transaction would need to be created like as is shown below COMMAND STEP COMMAND PARAMS DESCRIPTION 1 Write A Place A in TX buffer Character 2 Transmit femme OOO Response character Character 5 resi Send the Read Wait for 1 Wait for echoed B Response character 7 Write 1 Place 1 in TX buffer Character B rasm faer Read Wait for 10 Wait for echoed 1 and nine character command response Response characters 10 Update Tag This tag Parse response accounting for echoed 1 at the beginning of the RX buffer and update tag Note The reason some devices echo is to provide a means of error checking To actually perform such error checking a Test Character command will need to be included after each Read Response command to make sure that the returned character is what it is supposed to be If itis not users could Go To an error handling section of the transaction Keep in mind that additional transaction commands will decrease the performance of the driver Debugging Using the Diagnostic Window and Quick
137. ll start where it was left after the last interaction with the buffer Users should always move the buffer to byte 1 before starting anything with those Scratch or Global buffers Important Users should be careful when changing the position of the buffer pointer A buffer bounds error will occur if the buffer pointer is moved past the beginning or end of the buffer Scanner Applications Transaction event counters can be especially useful in scanner applications Typically scanners will issue a notification each time an item is scanned they are not usually designed to be polled The U CON can be www kepware com 98 User Configurable U CON Driver Help configured to receive and process this sort of data with an unsolicited transaction The primary function of this transaction would be to parse the data of interest from a message and update a tag with it This simple design works fine unless it is possible for the same item or code to be scanned multiple times The client will get no indication that multiple scans have occurred All it knows is that the tag s value has not changed since the last timestamp To get around this issue event counters were introduced into the U CON Each time an item is scanned the unsolicited transaction that was defined for that scanner will be triggered and its event counter incremented Users should update two tags in the transaction one with the data parsed from the unsolicited message and the other wit
138. lso be set The number entered sets the total number of bytes one byte per two characters that will be written to or read from the device Only even lengths are allowed Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application For fixed length strings when writing through a client the driver adds pad character 0 0x30 at the end of the string up to the set length For example if the string length was set to 8 writing the string ABC would cause the driver to send four bytes 0xAB 0xCO 0x00 0x00 for a driver recreated string ABCO0000 The pad character option applies to writes only the driver can read any valid ASCII Hex string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomplished in one of two ways e Specify a delimiter character Check the Parse to next delimiter if present box if the end of the tag s data will be marked by a known character as would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF can be chosen www kepware com User Configurable U CON Driver Help Give an end point relative to the frame end The Read up to
139. mand Instructs the driver to compare two buffers Executes different commands depending on the result Processing Commands Clear Rolling Buffer Command Sets all bytes in the rolling buffer to 0x00 and the length of the received frame to 0 Clear RX Buffer Command Sets all bytes in the Read buffer to 0x00 and the length of the received frame to 0 Clear TX Buffer Command Sets all bytes in the transmit butter to 0x00 and the current length of the Write frame to 0 Set Event Counter Command www kepware com 28 User Configurable U CON Driver Help Sets the event counter of the current transaction to any valid number specified Deactivate Tag Command Deactivates the tag The transaction will not be executed again End Command Terminates the transaction Go To Command Processes the commands following the specified label command Invalidate Tag Command Sets the tag s data as invalid Client will report bad quality for tag data Label Command Marks a transaction step for Go To commands Add Comment Command Inserts a comment or a blank line in the Transaction Editor Log Event Command Writes a message in the server s Event Log Seek Character Command Instructs the driver to search for a given character in a specified buffer Move Buffer Pointer Command Instructs the driver to change the current position of one of the buffer pointers Pointers can be moved forward or backward Handle Escape Characters Command Def
140. mmand 32 www kepware com User Configurable U CON Driver Help 116 Copy Buffer 39 Copy Buffer Command 32 Copy Buffer command failed for address lt address transaction gt lt source destination gt buffer bounds 106 D Data type lt type gt is not valid for device address lt address gt 102 Data Types Description 98 Deactivate Tag Command 34 Dealing with Echoes 92 Debugging Using the Diagnostic Window and Quick Client 92 Delimited Lists 93 Demo Mode 7 Device lt device name gt is not responding 104 Device address lt address gt contains asyntax error 101 Device address lt address gt is not supported by model lt model name gt 101 Device address lt address gt is read only 102 Device Data Formats 65 Device ID 8 26 Device Profile 18 Device Setup 8 Device Status Messages 104 DWord 99 Dynamic Ascii Formatting 70 End Command 34 Error Descriptions 101 Error opening COMn 103 Event Counters 24 F Failed to load the global file 106 False 50 51 Fixed 73 Float 99 Format Alternating Byte ASCII String 72 Format ASCII Hex Integer 73 Format ASCII Hex String 77 Format ASCII Hex String From Nibbles 78 Format ASCII Integer 73 Format ASCII Integer Packed 6 Bit 79 Format ASCII Multi Bit Integer 74 www kepware com 117 Format ASCII Real 75 Format ASCII Real Packed 6 Bit 79 Format ASCII String 76 Format ASCII String Packed 6 Bit 80 Format Date Time 84 Format Multi Bit Int
141. mmand type in the Transaction View Although descriptions are optional they can be very helpful when reviewing the transaction definition later Unsolicited Transactions An unsolicited transaction is a set of commands that is to be carried out when the driver receives a particular type of unsolicited message The driver will ignore unsolicited data unless it is configured to be in unsolicited mode Unlike with normal query receive transactions the driver does not have the benefit of knowing ahead of time what device and tag it is dealing with Instead the driver must determine from the message itself what device it came from and what tag the data should be sent to To facilitate this the user must define unsolicited transaction keys Unsolicited Transaction Keys An unsolicited transaction key is a series of ASCII characters or binary bytes that match the first few characters of the message type the transaction is intended for It is the user s responsibility to ensure that there is a one to www kepware com User Configurable U CON Driver Help 63 one relationship between all of the transaction keys and all of the possible message types associated with a given channel For example assume two devices are on a channel dedicated to unsolicited communication Further assume that these devices use the same simple protocol Suppose our hypothetical protocol has two possible unsolicited message types of the form A Device
142. n added 5 Next click Log In to enter the password Password Ea 6 Once finished click OK 7 Tolog out click Log Out www kepware com 16 User Configurable U CON Driver Help 8 Tochange or remove a password click Change Password Change Password Current password pa Cancel Hew password Confirm new 9 Users will be required to enter the current password and the new password twice To disable password protection simply leave New password and Confirm new blank Passwords are not case sensitive and may be up to 15 characters long Users must save the server project after a password is changed 10 Tolaunch the Transaction Editor click Launch Transaction Editor This button will be disabled if password protection for the device has been enabled and a user has not successfully logged in 11 To automatically generate the tags that are configured in the Transaction Editor without launching it click Regenerate Tag Database The button will be enabled when there is a runtime connection and disabled when there is not 12 Once finished click OK www kepware com User Configurable U CON Driver Help Transaction Editor A transaction is a list of simple actions needed to Read data from or Write data to a device Transactions come in three varieties Read Write and unsolicited Read transactions normally consist of a series of Write commands that build up a Read request string a Transmit
143. n could be defined to issue this Get Device Identifier command and store the returned value in a scratch buffer All other transactions defined for that device could copy this value from the scratch buffer to the write buffer The client application would have to make sure that the Get Device Identifier tag be read before any other read or write transaction takes place Scratch buffers can also be used in Write Only tags The User Configurable U CON Driver does not support Write Only tags as such but a tag can be created with both read and write transactions where only the write transaction makes a request of the physical device If the read transaction is empty the client will report bad data quality for that tag A better situation would be for the read transaction to return the last value written to the device To do this select both the Write buffer and a Scratch buffer in the write transaction s Write Data command In the read transaction simply use an Update Tag command with the data source being the scratch buffer Keep in mind that this is not a value just read from the device it is the last value written to the device If an Update Tag command is executed before any data has been saved in the scratch buffer the tag value will be set to zero Important Unlike a scratch buffer which is associated with one device only a global buffer is associated with multiple devices and should be used with caution Data Types Description The User Con
144. ng with devices with slow turnaround times and in cases where network load is a concern Configuring a delay for a device will affect communications with all other devices on the channel As such it is recommended that any device that requires an inter request delay be segregated to a separate channel if possible Users may set the inter request delay from 0 to 300000 milliseconds 5 minutes The default setting of O disables this feature See Also Defining a Server Channel Cable Connections Cable connections depend on the specific device being used Modem Setup This driver supports modem functionality For more information please refer to the topic Modem Support in the OPC Server Help documentation www kepware com User Configurable U CON Driver Help 9 Unsolicited Message Wait Time This dialog is used to specify the amount of time that the device will wait for an unsolicited message Unsolicited Message Wait Time emine the amount of time ms the device wait for unsolicited message before ing the _UnsolicitedPcktRevdOn Time em tag Wait Time 1000 ms Description of the parameter is as follows Wait Time This parameter specifies the amount of time that the device will wait for unsolicited messages before the _UnsolicitedPcktRcvdOnTime system tag is set to 1 The _ UnsolicitedPcktRcvdOnTime Tag which is displayed by the client application indicates whether an unsolicited message has been received f
145. ns for the device Solution Verify the address is correct if itis not re enter it in the client application Device address lt address gt is not supported by model lt model name gt Error Type Warning Possible Cause www kepware com 102 User Configurable U CON Driver Help A tag address that has been specified statically references a location that is valid for the communications protocol but not supported by the target device Solution Verify that the address is correct if it is not re enter it in the client application Verify that the selected model name for the device is correct Data type lt type gt is not valid for device address lt address gt Error Type Warning Possible Cause A tag address that has been specified statically has been assigned an invalid data type Solution Modify the requested data type in the client application Device address lt address gt is read only Error Type Warning Possible Cause A tag address that has been specified statically has a requested access mode that is not compatible with what the device supports for that address Solution Change the access mode in the client application Array support is not available for the specified address lt address gt Error Type Warning Possible Cause A tag address that has been specified statically contains an array reference for an address type that doesn t support arrays Solution Re enter the addre
146. nsaction Editor is closed users will be given the chance to update the server The tags and groups previously defined with the Transaction Editor will automatically be generated in the server Remember the changes have not been saved to file at this point save the server project every time one of the device profiles is edited Device profiles are an extension of the standard server project and are saved as part of the server project file opf At this point the driver project may be used Once a driver profile has been created and loaded the User Configurable U CON Driver should work just like any other driver plug in for the server Changes may be made to the profile at any time by disconnecting all client applications and then invoking the Transaction Editor from Device Properties Remember to save the project in between edit sessions See Also Transaction Editor Step Four Testing and Debugging the Configuration Once a device profile has been created using the Transaction Editor it should be tested To do so first connect the devices and client application and ensure that the data can be read and written correctly If there are any problems refer to the server s built in Diagnostic Window which can bea very useful tool in debugging the profile For more information on debugging refer to Tips and Tricks Caution Although the User Configurable U CON Driver s runtime processor makes every reasonable effort to trap error conditions
147. nt counter to the Write buffer which makes it possible to use the event count value as a Transaction ID in serial communication packets Write Character Command Places a specified character on the Write buffer Write String Command Places the specified string of characters on the Write buffer Write Data Command Gets the Write value sent down from the client reformats it if needed and then places the result on the Write buffer Write Check Sum Command Computes the check sum reformats it if needed and then places the result on the Write buffer Close Port Command Closes the COM port associated with the current transaction Copy Buffer Command Copies a portion of the Read buffer to the Write buffer Modify Byte Command www kepware com User Configurable U CON Driver Help Sets one or more bits in a byte that was previously placed on the buffer using the Write value sent down from the client This is used to modify a byte in the Read Write or Scratch buffer Pause Command Delays the execution of next command Control Serial Line Controls the RTS and DTR lines to assert de assert the line manually Transmit Command Sends the contents of the Write buffer to the devices attached to the channel Cache Write Value Command Caches the value written in the client Read Commands Read Response Stores incoming data in Read buffer Update Tag Command Parses data from the Read buffer reformats it if needed and then u
148. o Check Sum Descriptions Format This drop down menu defines the format of the selected check sum type If the selected format has properties that must be set the Format Properties button will become enabled For a complete discussion of available formats refer to Device Data Formats All check sum calculations are performed over a range of bytes in a message frame The Start and End fields tell the driver what bytes to include in the calculation The start value is given as a number of bytes from the beginning of the frame The end value is given as a number of bytes from the current end of the frame that is the last byte placed on the write frame before the Write Check Sum command is processed The end value has a slightly different meaning than in the Test Check Sum command The Start and End values will almost always be zero For example suppose the transaction consists of a Write String command followed by a Write Check Sum and a Transmit Suppose the string is 0123456789ABC and users need to compute a check sum over all of the characters in the string and place the result after the C In this case both the Start and End values would have to be zero Or if the check sum calculation needs to go from the 1 to 9 inclusively then the Start value must be 1 and the End value must be 3 www kepware com User Configurable U CON Driver Help 59 Any additional characters added to the frame by commands placed after the Write Check
149. oject after each edit session Further Information Click on any of the following links to learn more about the main help pages for the Transaction Editor Tags Tag Groups Tag Blocks Function Blocks Scratch Buffers Global Buffers Rolling Buffers Initialize Buffers Event Counters Buffer Pointers Transaction Validation Transaction Commands www kepware com 20 User Configurable U CON Driver Help Unsolicited Transactions Updating the Server Device Data Formats Check Sum Descriptions ASCII Character Table Tags A tag item can be added to the device a tag group or a tag block A tag can be added using the main menu an item s pop up menu or the toolbar To edit an existing tag users can either double click on it or select it and then access Properties from the main menu Alternatively users can utilize the tag s pop up menu or the toolbar The dialog should appear as shown below Tag properties x m Identification Name Register_1 E ancel Description Help m Data properties EN Data type word y 5l Format properties Data length 2 Client access posdAMtite z The Name must be set first If the tag is new the driver will offer a valid default name that can be changed to any valid name Valid names must start with a letter or digit consist of only letters digits and underscores be less than 32 characters long and be unique to the parent device grou
150. ons 2 3053 25 ings onde Shee li dea deta Sole a Ba nf 101 Address Validation a eee eee ee eeeeee 101 MISSING addFESS A Ae E ala il te AAS PCOS EB Leth lod Sal elie BEI SS el eee a 101 Device address lt address gt contains a syntax error 0 22 ee ec ee eee eee ee 101 Address lt address gt is out of range for the specified device or register 2 2 2 2 2 101 Device address lt address gt is not supported by model lt model name gt 2 2 22 2222 101 Data type lt type gt is not valid for device address lt address gt 0 00 2c eee eee eee 102 Device address lt address gt is read only 0 2 ee ce ee eee cece eee cece eee 102 Array support is not available for the specified address lt address gt 0 0 2 22 eee eee eee eee 102 Serial COMMUNICATIONS cesiones lis peed door fs Seek 102 COMnm does Not exist a A do 102 Erroropening COMn 2222 00 8 eee os Se A La a Ede Aedes 103 COMn is in use by another application 1 0 0 ccc ee cee ccc ce eee cnn 103 Unable to set comm parameters on COMN 22 l eee ce cee cee cee eee eee eee ee eee 103 Communications error on lt channel name gt lt error Mask gt 2 e eee eee eee eee cece ee eee 103 Unable to create serial O thr ead 2 te 220s hosed A A ue cee See vide Peles deen Sei Se ee 104 Device Status Messages oia ea A ee eee eee eee eens 104 Device lt device name gt is not responding
151. operties from the main menu the pop up menu or the toolbar Tag Block properties x Canca tHe Name K Block_1 Cancel Help www kepware com 22 User Configurable U CON Driver Help The only user defined property that a tag block has is its name Although a valid default name is generated when first creating a new block it can be changed to any valid name Valid names must start with a letter or digit consist of only letters digits and underscores be less than 32 characters long and be unique to the parent item A tag block name may not be the same as a tag group at the same level since the server treats blocks as groups The block s name can be changed at any time during an editing session Groups and blocks may be nested up to three levels deep Function Blocks Function blocks can be used to define a series of commands that can be shared by any number of transactions thus making projects more compact and easier to maintain Function blocks reside in the U CON global data store and may be referenced by any device on any U CON channel To create a Function Block follow the instructions below 1 Invoke the Transaction Editor for any device on a U CON channel Select the _ Global item 2 Next select New Function Block from the Edit menu or toolbar Device profile User Configurable Driver File Edit Yiew Tools Help NECE Char New Function Block Corr Note The Function Block dialog sho
152. or a given device within the amount of time specified The default setting is 1000 milliseconds Determining the _UnsolicitedPcktRcvdOnTime Tag s Status In the client application locate the _UnsolicitedPcktRcvdOnTime tag s Value field Ifthe Value field displays O the message was received within the Wait Time amount If the Value field displays 1 the message was not received within the Wait Time amount Note For solicited communications the _UnsolicitedPcktRcvdOnTime Tag will always display 1 It can be ignored www kepware com 10 User Configurable U CON Driver Help Driver Configuration There are four steps required to configure the User Configurable U CON Driver Users must define a server channel define a server device define a device profile and then test and debug the configuration Although the first two steps are relatively simple the final two steps will most likely require a significant amount of effort and attention For more information on a specific step select a link from the list below Step One Defining a Server Channel Step Two Defining a Server Device Step Three Defining a Device Profile Step Four Testing and Debugging the Configuration See Also Password Protection Step One Defining a Server Channel 1 Tostart create a new server project and then create a new channel In Device Driver select User Configurable U CON Driver from the list of installed drivers Note Many devices
153. ortional mode Likewise the mode of all four outputs is usually set with a single command that takes a bit field as an argument To read the mode of each output users should create a tag block with four tags Mode_RO Mode_R1 Mode_R2 and Mode_R3 These tags should have Read Write access and have a data type of Boolean The device data formats should be Bit O from byte 00000001 for Mode_RO Bit 1 from byte 00000010 for Mode_R1 and so forth The block read transaction must issue the appropriate read command and then update all four tags All four of the update tag commands must have the same data start position which points to the byte containing the output mode settings Setting the mode of a single output requires a bit more work Since our hypothetical set output mode function takes a bit field that sets the mode of all four outputs users need to know what mode the other three outputs are in This way users can construct the bit field used in the set output mode command such that all other outputs are unchanged For example to be able to set the mode of output RO users define the write transaction attached to the Mode_RO tag The first thing that must occur in this transaction is to issue the get output mode command string and receive the response The current output mode settings are encoded somewhere in the RX buffer and are available to users for the remainder of the transaction After this read response users need to construct the s
154. osaecssciito nod String length 2 Cancel dil Pad type Spaces 0x00 0x20 v Help Parse termination method Parse to next delimiter if present Delimiter 000 0x00 Read up to bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length strings the String length must be set The number entered sets the total number of characters two bytes per character that will be written to or read from the device Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII strings each pad character is encoded as two ASCII bytes high byte 0 For example if the string length was set to 8 and Spaces was chosen as the pad type writing the string ABC would cause the driver to send 0x00 0x41 0x00 0x42 0x00 0x43 0x00 0x20 There are many options for pad characters spaces 0x00 0x20 zeros 0x00 0x30 and NULL 0x00 0x00 The pad character option applies to
155. p 4 byte packed BCD reversed Bit O from byte 00000001 Bit 1 from byte 00000010 Bit 2 from byte 00000100 Bit 3 from byte 00001000 Bit 4 from byte 00010000 Bit 5 from byte 00100000 Bit 6 from byte 01000000 Bit 7 from byte 10000000 Multi Bit Integer User Configurable U CON Driver Help Example The value 1234 would be encoded as two bytes 0x12 0x34 Similar to 2 byte packed BCD but in byte swapped order Example The value 1234 would be encoded as two bytes 0x34 0x12 Integers between 0 99999999 are encoded as Binary Coded Digits data Behavior is undefined for values beyond this range Example The value 12345678 would be encoded as four bytes 0x12 0x34 0x56 0x78 Similar to 4 byte packed BCD but in byte swapped order Example The value 12345678 would be encoded as four bytes 0x34 0x12 0x78 0x56 Similar to 4 byte packed BCD but in word swapped order Example The value 12345678 would be encoded as four bytes 0x56 0x78 0x12 0x34 4 Similar to 4 byte packed BCD but with bytes in reverse order word and byte swap Example The value 12345678 would be encoded as four bytes 0x78 0x56 0x34 0x12 When reading a whole byte is received from the device The state 0 or 1 of the specified bit is then passed to the tag When writing a whole byte is sent to the device The specified bit is set if the write value is non zero all other bits will be zero Example
156. p or tag block e The Description is an optional string that will be displayed along with the tag in the server It serves no function other than to provide the user additional information about the tag The Data Type is the representation of the data when it is exchanged between the server and client applications The User Configurable U CON Driver allows any one of the basic data types to be chosen although the one that best suits the expected range of data values should be chosen The Format Property determines the representation of the data as it is exchanged between the server and device Some formats such as ASCII Integer ASCII Real and ASCII String require additional properties to be set When this is the case the Format Properties button will be enabled The format determines how many data bytes will be transferred between the server and device and is shown for reference below the Format Properties button Note Whenever the format selection is changed the user defined Format Properties if any will be reset to default values appropriate for the format Always check these settings when available For more information on formats refer to Device Data Formats By default a tag is set with Read Write access although it can be changed to Read Only by using the drop list box at the bottom of the dialog The tag will be created with all necessary transactions Users must however define the sequence of commands necessary to carr
157. pdates the tag value accordingly Conditional Commands Continue Command Tells the driver to do nothing as a result of the test and proceed to the next command in the transaction The Continue command has no user defined properties Note The Continue command is one of several conditional actions available under the five test commands Test String Test Character Test Device ID Test Bit Within Byte Test Check Sum and Test Frame Length Test Device ID Command Gets the Device ID set in the server s Device Properties reformats it if needed and then compares it with the Device ID in Read buffer Executes different commands depending on the result Test Character Command Compares a character in the Read or Write buffer with a specified character Executes different commands depending on the result Test Bit within Byte Command Compares a bit within a specified byte from the Read or Write buffer and compares it with a set value Various actions can be taken depending on the result of the comparison Test Check Sum Command Computes the check sum on portion of Read buffer reformats it if needed and then compares it with the check sum in Read buffer Executes different commands depending on the result Test String Command Instructs the driver to parse a string from a buffer and compare it with a test value Test Frame Length Command Instructs the driver to compare the length of the received frame with a test value Compare Buffer Com
158. pee ooo Description Descriptions of the parameters are as follows Data Source This parameter specifies the data source Options include Read buffer Write buffer Scratch buffer or Global buffer If the Scratch or Global buffer options are selected the buffer index must also be specified The default setting is Read buffer String This parameter specifies the String that will be searched Any ASCII characters can be specified Format This drop down menu specifies the string format Options include ASCII String ASCII Hex String Alternating Byte ASCII Unicode String and Unicode String with Lo Hi Byte Order The default setting is ASCII String Case sensitive When checked the string comparison will be case sensitive When unchecked the string comparison will not be case sensitive The default setting is checked Goto on failure This parameter specifies a label that execution should proceed to if the specified characters are not found This parameter is optional If no label is specified the buffer pointer will be left unchanged on seek failure and the driver will execute the next command in the transaction If a label is specified but not found on seek failure the current transaction will be aborted The Transaction Editor will warn users of this condition For more information refer to Label Command Description This parameter specifies notations that will be displayed next to the command type in the Transaction
159. quivalent and mnemonic when applicable Users may drop the list and select an item from it They can also take advantage of the auto complete feature The auto complete feature is used to type in a decimal hex value in 0x format or character and the indicated item will be selected from the list automatically The entry can be cleared by pressing Delete or Backspace on the keyboard Data destination This parameter specifies the data destination Options include Read buffer Write buffer Scratch buffer or Global buffer If the Scratch or Global buffer options are selected users must also specify the buffer index in the box to the right If there are not enough bytes of data in the buffer this command will be aborted the transaction will fail and an error message will be placed in the OPC server s Event Log Note Data will be appended to TX and RX buffers but not scratch or global buffers To append data to the current contents of a scratch or global buffer copy that data to either the RX or TX buffer append that buffer and then copy the contents back to the scratch or global buffer For more information refer to Copy Buffer Command Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later www kepware com 58 User Configurable U CON Driver Help
160. r 200 MHz minimum 400 MHz or better recommended Memory 32 MB minimum 64 MB or better recommended Recommended For Driver Development VGA monitor Mouse Protocol Requirements It is recommended that users have a basic understanding of device communications because developing a driver profile requires access to the target device s protocol documentation Engineering Services Custom enhancements and driver configuration services are available For more information contact Technical Support Demo Mode An unlicensed copy of this driver may be used for evaluation purposes If a profile is being edited while the demo period expires a chance will be given to save the changes made to the work Any new tags or tag groups created since the last time the server was updated will not be visible in the server at this point Save the server project The next time the project is opened the new tags and groups will appear www kepware com s User Configurable U CON Driver Help Device Setup Supported Devices The User Configurable U CON Driver can be configured to work with a wide range of serial devices Supported Models NumericID StringID Communication Protocol Most protocols can be accommodated Supported Communication Parameters Baud Rate 300 600 1200 2400 9600 19200 or 38400 Parity None Even or Odd Data Bits 5 6 7 or 8 Stop Bits 1 or 2 Note Not all devices support the listed configuration
161. r unsolicited communications It is possible to mix protocols on an unsolicited channel as long as the transaction keys are the same length and are unique Users must remember that the channel s mode cannot be changed after it has been defined This precaution is necessary because any transactions that have been defined previously would likely be incompatible with the new mode Note When using Ethernet Encapsulation users must configure its mode of operation to match this setting For more information refer to the server s help documentation Step Two Defining a Server Device Next users must define a device For more information refer to the server s help documentation Note The Device ID will only have meaning if the transactions use the Write Device ID or Test Device ID commands Step Three Defining a Device Profile The User Configurable U CON Driver requires that users define a device profile for each target device A device profile includes a definition of each tag that the driver will serve as well as the sequence of commands necessary to carry out Read and Write requests This work is completed using the Transaction Editor which is the graphical user interface of the User Configurable U CON Driver The Transaction Editor cannot be started if the device is in use Before accessing disconnect all client applications To invoke the Transaction Editor double click on the device and select the Transaction Editor tab Then click
162. r select Edit Dynamic ASCII Format Table from the main menu or device pop up menu The Dynamic ASCII Format Table editor shown below includes a list of formats currently defined for the device Clicking on a table entry will select it double clicking will bring up a dialog that can be used to edit the format item To the left of the format list are three buttons The top one is used to add a new format to the table The middle and bottom ones allow users to edit or delete the selected format item respectively There must bea one to one relationship between each format character and multiplier In addition to the format characters users must specify the number of data characters the device uses and whether the format character will precede or follow the data www kepware com User Configurable U CON Driver Help 71 Dynamic ASCII Format Table 1 0E 00 1 0E 01 067 0x43 C 1 0E 02 Dynamic ASCII Format Character 068 0x44 D www kepware com User Configurable U CON Driver Help Format Alternating Byte ASCII String The Alternating Byte ASCII String device data format option can be used to define the format of string data For example when the Alternating Byte ASCII String 0 c O c format is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below Alternating Byte ASCII String format properties x ED oosacecoc
163. racters This scrolling list includes all data byte values in decimal 0 255 and hexadecimal 00 FF as well as the ASCII character mapped to each value Users may utilize this as a reference Items may be double clicked in order to insert the byte into the preset data field at the bottom of the dialog Selected buffer will contain this data on startup This parameter displays the preset value for the selected buffer It can be edited e Save Clicking this button will save the preset value for the selected buffer without closing the dialog e OK Clicking this button will save the preset value for the selected buffer and close the dialog Event Counters Each transaction configured in the project automatically keeps track of how many times it is executed These numbers are stored in special 32 bit buffers called Event Counters All counter values are initialized to zero when a U CON project is first loaded Counter values can reach 4294967295 at which point they wrap around back to 0 Tags from event counters can also be updated Transaction Event Counters can be especially useful in scanner applications For more information on their usage refer to Scanner Applications Note Event counter values are stored in 32 bit buffers All tags updated from event counters must be configured with 32 bit 16 bit or 8 bit Intel Lo Hi device data format See Also Set Event Counter Command and Update Tag command Buffer Pointers The read buffer
164. ransaction s current event count If the cache option is selected the tag will be updated with the last value written to the tag Data starts at current buffer pointer This option should be checked if data for the selected tag begins at the current pointer position of the selected data source The pointer must have been set prior to the execution of this command with either Move Buffer Pointer or Seek Character commands For more information refer to Buffer Pointers and Delimited Lists Note If unchecked use the Data start byte parameter Data start byte This parameter specifies where the tag s data begins The first byte in the buffer is number 1 Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can be very helpful when reviewing the transaction definition later Note The format of the data to be parsed is taken from the selected tag s definition For example if the device data format 16 bit Intel lo hi was specified for the selected tag the driver will attempt to parse two bytes from the specified source buffer and construct a 16 bit integer value from those bytes The low byte of the integer will be the byte pointed to or given by the Data start byte setting The high byte will be the following byte in the source buffer This integer will then be converted to the tag s data type and stored The stored value will be sent
165. rd Example The value 16909060 0x01020304 would be encoded swap LOhi LOlo HIhi as four bytes 0x03 0x04 0x01 0x02 Hllo 32 bit IEEE float Also known as single precision real Example The value 1 23456 would be encoded as four bytes Ox3F Ox9E 0x06 0x10 32 bit IEEE float byte swap Similar to 32 bit IEEE float but in byte swapped order Example The value 1 23456 would be encoded as four bytes Ox9E Ox3F 0x10 0x06 32 bit IEEE float word Similar to 32 bit IEEE float but in word swapped order swap Example The value 1 23456 would be encoded as four bytes 0x06 0x10 Ox3F Ox9E Similar to 32 bit IEEE float but with bytes in reverse order word and byte swap 32 bit IEEE float reversed Example The value 1 23456 would be encoded as four bytes 0x10 0x06 Ox9E Ox3F 64 bit IEEE float Also known as double precision real Example The value 1 2345559999999999 would be encoded as eight bytes 0x0A 0x4A 0xD1 OxCA OxBD 0xC0 OxF3 Ox3F Integers between 0 99 are encoded as Binary Coded Digits data Behavior is undefined for values beyond this range 1 byte packed BCD Example The value 12 would be encoded as a single byte 0x12 Integers between 0 9999 are encoded as Binary Coded Digits data Behavior is undefined for values beyond this range 2 byte packed BCD www kepware com 2 byte packed BCD byte swap 4 byte packed BCD 4 byte packed BCD byte swap 4 byte packed BCD word swa
166. re that device should have a single block tag or a single non block tag defined That tag or tag block may be placed ina group All tags belonging to an unsolicited channel will have an initial value of zero Client applications will see this initial value until the first unsolicited update for that tag is received by the driver Commands in Unsolicited Transactions Although an unsolicited transaction may start with comments and or insert function block the first executable command must be a Read Response command This is so the driver will know where the end of the current message should be After the Read Response command almost any other command type can be placed However a second Read Response should not be issued in an unsolicited transaction because it would imply that users know what the next message received on the channel will be This is generally a bad assumption when dealing with unsolicited communications See Also Unsolicited Message Wait Time in Device Setup Updating the Server Once all work within the Transaction Editor is finished users must transfer the updates to the server To do so select the Transaction Editor s main menu option File Update Server Alternatively click on the Update Server icon on the toolbar Users will be given a chance to update the server when the Transaction Editor is closed After the server has received the device profile updates it will automatically invoke the tag database generation f
167. roperties in the offending transaction The most common cause of this sort of error is an incorrect Start Byte End Byte or Number of Bytes value 2 Make sure that the number of bytes written by a Write Data command are considered This is set by the tag s device data format specification Tag update for address lt address gt failed due to data conversion error Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is used make sure all necessary format characters are present in the table Unsolicited message receive timeout Error Type Warning www kepware com 112 User Configurable U CON Driver Help Possible Cause The unsolicited mode Receive timeout expired while the channel was receiving a message This could be caused by a delay in part of the message due to network traffic or gateway device the data source or an incorrectly configured transaction Solution Verify that the driver has been configured correctly for the expected messages In particular make sure the Read Response command at the beginning of each unsolicited transaction is set to terminate correctly The use of Pause commands in the unsolicited transactions must be accounted for in the timeout setting If the problem is due to wire time or hardware issues increase the Receive timeout period accordingly The
168. rse termination method Read up to f bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length strings the string length must also be set The number entered sets the total number of characters one byte per character prior to conversion that will be written to or read from the device The number of bytes sent over the wire is equal to three fourths the string length Null characters are not added to the end of strings written to the device however they are added to strings read from the device and passed to the client application For fixed length strings the Pad type must also be specified Pad characters are used to fill out the string for values that do not require the full string length Unlike ASCII integer packed 6 bit and ASCII real packed 6 bit formats the pad characters are added as needed to the right For example if the string length was set to 4 and a value of ABC is to be written to the device the driver will create a string consisting of the characters ABC followed by one pad character There are many options for pad characters spaces 0x20 and zeros 0x30 The pad character option applies to writes only the driver can rea
169. s Device IDs The NumericID model supports Device IDs in the range of 0 to 65535 The StringID model supports Device IDs consisting of any valid string Note Not all devices will recognize the entire range Ethernet Encapsulation This driver supports Ethernet Encapsulation in both solicited and unsolicited modes Ethernet Encapsulation allows the driver to communicate with serial devices attached to an Ethernet network using a terminal server such as the Lantronix DR1 It may be enabled through the Communications dialog in Channel Properties For more information refer to the server s help documentation Flow Control When using an RS232 RS485 converter the type of flow control that is required will depend on the needs of the converter Some converters do not require any flow control whereas others require RTS flow Consult the converter s documentation in order to determine its flow requirements An RS485 converter that provides automatic flow control is recommended Note When using the manufacturer s supplied communications cable it is sometimes necessary to choose a flow control setting of RTS or RTS Always under the Channel Properties Inter Request Delay This option limits how often requests are sent to a device It will override the normal polling frequency of tags associated with the device as well as one shot reads and writes Delays will not be used if the channel is in unsolicited mode This delay can be useful when deali
170. s member tags If the number of bytes of each data field are fixed then parsing the frame is easy Users must specify the data start byte in each Update Tag command and the data length in the tag definition It is more complicated if the length of the data fields is variable in these cases the protocol must provide some sort of delimiter character to mark the end of one field and the beginning of the next The User Configurable U CON Driver driver provides Buffer Pointers and associated command options to aid in parsing delimited lists See Also Tags and Device Data Formats Example For example users expect the response to a read request to be of the form STX value 1 bytes value 2 bytes value 3 bytes ETX where the values are ASCII integers of unknown length and the values could range from 100 to 1000 1 Start by creating a tag block with three tags in it Tag_1 Tag_2 and Tag_3 for values 1 2 and 3 respectively Choose a data type of short for each tag since its range is sufficient to cover the expected range of values Next select the ASCII Integer device data format for each tag For more information refer to Tags and Tag Blocks Some of the specialized options of the ASCII Integer device data format must be used in this case For Tag_1 and Tag_2 choose the Parse to next delimiter format option and then choose the comma 0x2C as the delimiter The Format Properties should appear as shown below www kepware com 94
171. s parameter specifies the action that will occur if the parsed byte is the same as the standard value www kepware com so User Configurable U CON Driver Help Use Current Buffer Position When checked the current position for the specified buffer will be used in the test This parameter overrides the Start Byte parameter False action This parameter specifies the action that will occur and will define what the driver should do if the bytes do not agree Action properties This button will become activated for actions that require additional properties to be defined Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Test Check Sum Command The Test Check Sum command tells the driver to compute the check sum for a range of bytes in the read buffer reformat it if necessary and compare the result with the check sum value in the read buffer Various actions can be taken depending on the result of that comparison This command is useful for detecting communication errors To add a Test Check Sum command right click on the desired step in the Transaction View and select Conditional Commands Test Check Sum from the resulting pop up menu Alternatively select Edit New Conditional Command Test Check Sum from the main menu Test Check
172. save password protected device profile in XML format RX buffer overflow Stop characters not received Error Type Serious Possible Cause The read buffer filled to capacity while waiting for the stop characters specified in the transaction s Read Response command Solution Make sure that the correct stop characters are specified in the Read Response command If the receive frame is of known length use the Wait for Number of Bytes command option instead www kepware com 106 User Configurable U CON Driver Help See Also Read Response Command RX buffer overflow Full variable length frame could not be received Error Type Serious Possible Cause The read buffer filled to capacity while receiving a frame containing a data length field described in the transaction s Read Response command Solution Make sure that the data length start position format and trailing bytes specified in the Read Response command are correct See Also Read Response Command Unable to locate Transaction Editor executable file Error Type Serious Possible Cause The Transaction Editor executable file is not in the expected location Solution Make sure that the Transaction Editor executable UserConfigDrv_GUI_u exe is located in the server s utilities subdirectory Reinstall the driver if not Copy Buffer command failed for address lt address transaction gt lt source destination gt buffer bounds Error Typ
173. se messages can only be seen if the Log unsolicited message timeouts setting is checked See Also Define a Server Channel Read Response Command Pause Command Unsolicited message dead time expired Error Type Warning Possible Cause This is caused when the driver receives an unsolicited message with an unknown key Once the driver has received an unknown key it waits one dead time period for the remainder of the message to come in Solution This is not necessarily a problem unless the driver was expected to process the message that caused this warning If this is the case users should check that the unsolicited transaction keys are properly defined If choosing to ignore messages of this type be aware that the driver will ignore all other incoming data for one dead time period after receiving each unhandled message These messages can only be seen if the Log unsolicited message timeouts setting is checked See Also Unsolicited Transactions Define a Server Channel Move Pointer command failed for address lt address transaction gt Error Type Serious Possible Cause An attempt was made to move a buffer pointer past the current frame bounds Solution Check the transaction definition Seek Character command failed for address lt address transaction gt label not found Error Type Serious Possible Cause The specified character was not found and the given Go to on failure label was not found Solut
174. sed index Start bit This control sets the index of the first bit to modify As is customary bits are numbered such that the least significant bit has index 0 and the most significant bit has index 7 Number of bits This control sets the number of bits that can be modified by this command Format This parameter specifies the data format Options include Binary or ASCII Hex If Binary is selected this command will modify a single byte in the transmit buffer If ASCII Hex is selected two www kepware com 40 User Configurable U CON Driver Help characters assumed to be ASCII Hex 0 9 A F will be taken from the transmit buffer converted to their binary equivalent modified converted back to two ASCII Hex characters and then copied back into the transmit buffer Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Note Bits are changed to zero or one depending on the write value sent down from the client The bits are set to the binary representation of the write value If the write value exceeds the maximum value that can be represented by that number of bits all changeable bits will be set to 1 Example 1 Binary Data For this example Byte Position points to a byte in the write buffer with an initial value of 10110110 The
175. seful for detecting communication errors in read transactions or for issuing different commands based on a write value in write transactions To add a Test String command right click on the desired step in the Transaction View and then select Conditional Commands Test String from the resulting pop up menu Alternatively select Edit New Conditional Command Test String from the main menu www kepware com 54 User Configurable U CON Driver Help Test String command properties J x Test value pe o K Cancel m Data source Read buffer write buffer C Scratch buffer 1 C Global buffer 1 dl Help A Use Current Buffer Position Start position a I Search whole string Format fasci String ccc V Case sensitive True action Continue Action properties False action Invalidate Tag x Action properties Description PX Descriptions of the parameters are as follows Test Value This parameter specifies the value for which the string will be tested This string may be up to 64 characters in length The test value may be compared with characters in the Read buffer Write buffer Global buffer or any Scratch buffer associated with the device If the Scratch or Global buffer options are selected the buffer index must also be specified Note In addition to the data source buffer the Start position within that buffer must also be spec
176. some way of knowing where a tag s data ends when executing an Update Tag command This is accomplished by specifying an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame ROUND OFF When writing values that require more characters than allotted by String length the driver will write the largest positive or smallest negative value that can be expressed in the allotted space For example if string length is set to 6 and the precision is set to 2 then writing 1234 567 results in the string 999 99 and writing 123 456 results in the string 99 99 Note Due to packing ASCII packed 6 bit data uses a reduced ASCII packed 6 bit Character Table Attempting to use characters not in the ASCII packed 6 bit Character Table will result in data conversion failures a Format ASCII String Packed 6 Bit The ASCII String Packed 6 Bit device data format option allows the user to specify how string data should be formatted For example when a format of ASCII String packed 6 bit cccc is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below www kepware com User Configurable U CON Driver Help 81 ASCII String packed 6 bit format properties x oor String lenath E Cancel Pad type Spaces 0x20 y Help dl Pa
177. ss in the client application to remove the array reference or correct the address type Serial Communications The following messages may be generated Click on the link for a description of the message COMn does not exist Error opening COMn COMn is in use by another application Unable to set comm parameters on COMn Communications error on lt channel name gt lt error mask gt Unable to create serial I O thread COMn does not exist Error Type Fatal Possible Cause The specified COM port is not present on the target computer www kepware com User Configurable U CON Driver Help 103 Solution Verify that the proper COM port has been selected in the Channel Properties Error opening COMn Error Type Fatal Possible Cause The specified COM port could not be opened due to an internal hardware or software problem on the target computer Solution Verify that the COM port is functional and may be accessed by other Windows applications COMn is in use by another application Error Type Fatal Possible Cause The serial port assigned to a channel is being used by another application Solution 1 Verify that the correct port has been assigned to the channel 2 Close the other application that is using the requested COM port Unable to set comm parameters on COMn Error Type Fatal Possible Cause The serial parameters for the specified COM port are not valid Solution Verify the s
178. ssumed only the characters explicitly entered will be appended to the buffer Data destination This parameter specifies the destination Options include Read buffer Write buffer Scratch buffer or Global buffer If the Scratch or Global buffer options are selected users must also specify the buffer index in the box to the right Notes 1 If there are not enough bytes of data in the buffer this command will be aborted and the transaction will fail and an error message will be placed in the OPC Server s Event Log 2 Data will be appended to TX and RX buffers but not scratch or global buffers To append data to the current contents of a scratch or global buffer copy that data to either the RX or TX buffer Then append that buffer and copy the contents back to the scratch or global buffer For more information refer to Copy Buffer Command Format This drop down menu specifies the string format Options include ASCII String ASCII Hex String Alternating Byte ASCII Unicode String Unicode String with Lo Hi Byte Order ASCII Hex String From Nibbles and ASCII String packed 6 bit The default setting is ASCII String Note For ASCII Hex String From Nibbles only even numbers of characters are allowed Furthermore only hex characters 0 9 and A F are allowed Characters a f are automatically converted to valid hex A F by the Driver Description This parameter specifies notations that will be displayed next to the co
179. structed is less than 8192 bytes If it is examine the command properties in the offending transaction The most common cause of this sort of error is an incorrect Start Byte End Byte or Number of Bytes value 2 Make sure that the number of bytes written by a Write Data command are considered This is set by the tag s device data format specification Write Check Sum command failed for address lt address transaction gt write buffer bounds Error Type Serious Possible Cause The command caused the driver to attempt to write past the maximum write buffer limit of 8192 bytes Solution 1 The write buffer should be of ample size for all but the most unusual circumstance Ensure that the byte www kepware com 110 User Configurable U CON Driver Help count of the message being constructed is less than 8192 bytes If itis examine the command properties in the offending transaction The most common cause of this sort of error is an incorrect Start Byte End Byte or Number of Bytes value 2 Make sure that the number of bytes written by a Write Data command are considered This is set by the tag s device data format specification Write Check Sum command failed for address lt address transaction gt data conversion Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is us
180. t behavior of automatically clearing the read buffer before it accepts the next incoming byte For example a user needs to receive a frame that contains a variable number of data bytes followed by an ETX byte that marks the end of the data and a check sum byte Such a frame must be received in two steps First the users must issue a read response command configured to wait for an ETX stop character and clear the RX buffer before read This would get every thing except the check sum byte To receive the check sum and append it to the read buffer the user must issue a second read response command configured to wait for a single byte and not clear the RX buffer before read Log timeout errors When checked this option suppresses timeout error logging This is helpful because a device may occasionally produce responses that are shorter than expected such a condition may occur if the device is in an error state or if the protocol allows for headers of non uniform length The driver will timeout when attempting to read these short responses and will place a message to that effect in the server s Event Log Over time these messages can fill up the Event Log and obscure other log entries that may be of more interest Seek Character Command Each buffer has its own independent pointer that can be used to reference a particular byte in data processing commands such as the Update Tag command The Seek Character command tells the driver to search for
181. tarts at current buffer pointer Data start byte J Description Update Tag_2 from current pointer position 10 To parse value 3 issue another Seek Character Mover Buffer Pointer and Update Tag sequence just like what was done for Tag_2 The full read transaction should appear as shown below www kepware com User Configurable U CON Driver Help 7 Device profile User Configurable Driver loj x File Edit view Tools Help Dejna Mm Onor BBX M Devicel Step Command Value Format Description 7 E Block_1 1 Write String Read Command Read command yd Read 2 Transmit N A Tag_1 3 Read Response Nia Read up to ETX B Tag_2 4 Update Tag Tag_1 Update tag 1 from byte 2 B Tag_3 5 Seek Character NjA Seek first comma 6 Move Buffer Pointer 1 bytes relative Skip over comma 7 Update Tag Tag_2 Update Tag_2 from current pointer position 8 Seek Character N A Seek second comma 9 Move Buffer Pointer 1 bytes relative Skip over comma 10 Update Tag Tag_3 Update Tag_3 From current pointer position Ready h Moving the Buffer Pointer Many devices send data packets that contain multiple pieces of variable length data delimited with some characters Example A read transaction receives the string 01 0010 1 5 with a start byte of 0x02 and an end byte of 0x03 The transaction places it into the Read Buffer 1 If no other buffer pointer operations have been performed the pointer
182. tch buffer fi 4 C Global buffer fI Help dili C Rolling buffer Start byte fi I Copy to end Number of bytes to copy pees Data destination C Read buffer Write buffer C Scratch buffer fi C Global buffer fi 4 C Rolling buffer Description a Descriptions of the parameters are as follows Data source These options specify the data source Options include Read buffer Write buffer Scratch buffer Global buffer or Rolling Buffer Note If either the scratch or global buffer is selected the buffer index must be specified If there are not enough bytes of data in the buffer this command will be aborted and the transaction will fail An error message will also be placed in the OPC server s Event Log Users should be aware of this when using scratch global or rolling buffers as the data source Start byte This control specifies at what byte in the source buffer to start the copy operation The byte positions are addressed using a 1 based index Copy to end This control tells the driver to copy all of the data from the specified start byte to the last byte of data currently stored in the source buffer Number of bytes to copy This control tells the driver the total number of bytes to copy from the source buffer www kepware com 34 User Configurable U CON Driver Help Data destination This parameter specifies the data destination buffer Options include Read b
183. te The project will not load XML loading error Range exceeds source buffer size of lt max buffer size gt bytes for a lt command gt Error Type Serious Possible Cause The start byte plus the number of bytes exceeds the max buffer size Solution Verify that the sum of the start byte and the number of bytes is less than the max buffer size Note The project will not load www kepware com 115 User Configurable U CON Driver Help Index 1 1 based 33 A Add 49 Add Comment Command 28 Address lt address gt is out of range for the specified device or register 101 Address Descriptions 100 Address Validation 101 Alternating Byte ASCII String 72 Array support is not available for the specified address lt address gt 102 ASCII 74 ASCII Character Table 89 ASCII Character Table Packed 6 Bit 89 ASCII Multi Bit Integer 74 BCD 99 Bit Fields Using the Modify Byte and Copy Buffer Commands 91 Boolean 99 Branching Using the conditional GoTo Label and End Commands 91 Buffer Pointers 24 C Cache Write Value Command 29 Check Sum Descriptions 85 Clear Rolling Buffer Command 29 Clear RX Buffer Command 29 Clear TX Buffer Command 29 Close Port Command 30 Communications error on lt channel name gt lt error mask gt 103 COMn does not exist 102 COMn is in use by another application 103 Compare Buffer Command 30 Configuration 10 51 CONTENTS 6 Continue Command 32 Control Serial Line Co
184. ters long in this example there would be an ambiguous message to transaction relationship The driver would have no way of knowing which device the data came from since this is indicated by the fourth character in the messages If we made one of the keys longer than four bytes it would extend into the variable data portion of some in this case all of the messages Such a key would only be matched by pure coincidence depending on the data value With normal not unsolicited communication it is generally not possible to place devices using different protocols on the same channel It is possible to mix protocols on an unsolicited channel so long as the transaction keys are of the same length and are unique In practice a tag and its unsolicited transaction does not need to be defined for every possible message on a channel The only constraint is that defined tags unsolicited transactions have keys that are specific enough to match only the message types that users want to process To define the unsolicited transaction key bring up the Transaction Editor and double click on the unsolicited transaction item or select the transaction and then select properties from the main menu the transaction s pop up menu or the toolbar The unsolicited transaction key editor should then appear as shown below Unsolicited Transaction properties x ASCII characters Key characters E 064 0x40 Add gt gt 065 0x41 A 048 0x30 0 049 0x31 1
185. the Transaction View and then select Processing Commands Log Event from the resulting pop up menu Alternatively select Edit New Processing Command Log Event from the main menu Log Event command properties x Message Check sum error during Register_24 read Cancel Event type Help Error bd Description A Descriptions of the parameters are as follows Message This parameter specifies the text that the driver will write to the Event Log Options for the special values include lt tag gt lt RBuffer gt and lt WBuffer gt Descriptions of the options are as follows e lt tag gt This will output the value of the tag lt RBuffer gt This will output the data in the read buffer e lt WBuffer gt This will output the data in the write buffer Event Type This parameter specifies the message type icon which will be associated with the message in the Event Log O Error Warning O Information www kepware com User Configurable U CON Driver Help 39 Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Modify Byte Command The Modify Byte command tells the driver to modify a number of bits within a byte in the read buffer write buffer scratch buffer or global buffer without changing the state of
186. the other bits The modified byte must have been placed in the buffer by a previous command in the transaction The modified bits are set to zero or one depending on the write value sent down from the client This command can be used in conjunction with the Copy Buffer command The Copy Buffer and Modify Byte commands are used to change device settings that are represented by bit fields For more information refer to Bit Fields Using the Modify Byte and Copy Buffer Commands To add a Modify Byte command right click on the desired step in the Transaction View and then select Write Commands Modify Byte from the resulting pop up menu Alternatively select Edit Write Commands Modify Byte from the main menu Modify Byte command parameters i x Data source gecscesceccevenconsessscsseg Al ll Cancel White buffer Help Scratch buffer i C Global buffer f 7 aa T a T S a Ae Byte position l Start bit Number of bits mz i Format Binary 1 binary byte C ASCII Hex 2 characters Description Descriptions of the parameters are as follows Data source This parameter specifies the data source Options include Read buffer Write buffer Scratch buffer or Global buffer If scratch or global buffer is chosen the buffer index must also be specified Byte position This control specifies what byte in the buffer will be modified Byte positions are addressed using a 1 ba
187. uffer Write buffer Scratch buffer Global buffer or Rolling buffer Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later Deactivate Tag Command The Deactivate Tag command tells the driver to set the tag s data quality to bad and to perform no more read or writes for that tag It has no user defined properties Once a tag has been deactivated it will stay deactivated The server project must be restarted in order to reactivate a tag as such this command should be used with care To add a Deactivate Tag command right click on the desired step in the Transaction View and then select Processing Commands Deactivate Tag from the resulting pop up menu Alternatively select Edit New Processing Command Deactivate Tag from the main menu Note A Deactivate Tag command does not end the current transaction The tag will remain active until the transaction has completed thus giving users the chance to do any clean up work such as logging a message or writing additional information to the device To terminate the transaction at the time of tag deactivation place an End command immediately after the Deactivate Tag command End Command The End command tells the driver to stop processing the current transaction and is generally used in conjunction with Go To
188. uld appear as shown below Function Block properties y Name Cancel Ho Ix Cancel Description Help Descriptions of the parameters are as follows Name Valid names must start with a letter or digit consist of only letters digits and underscores be less than 32 characters long and be unique Description An optional description of the function block can be entered here 3 Click OK to create the new function block A new function block item will appear under the _Global node item view left pane FBTransaction item will be displayed under the new function block Select the transaction item and enter the function block command in the Transaction View as would be done for any other transaction type For more information refer to Insert Function Block Command Notes 1 Update Tag and Insert Function Block commands cannot be used in a function block Update Tag commands can only be used in Read Write and Unsolicited transactions that are explicitly associated toa particular tag or block of tags Function blocks can not be used within function blocks 2 Becautious when including Go To and Label commands in function blocks as infinite loops can be created When a Go To command is executed the driver will scan all commands in the current Read Write or Unsolicited transaction from top to bottom looking for a matching Label Commands in function blocks referenced in the transaction will be scanned in the or
189. unchecked forward Number of bytes This parameter specifies the number of bytes to advance the pointer in a relative move or the byte position in an absolute move e Description This parameter specifies notations that will be displayed next to the command type in the Transaction View Although descriptions are optional they can also be very helpful when reviewing the transaction definition later See Also Moving the Buffer Pointer Important Use care with scratch and global buffer pointers Unlike the read and write buffer pointers scratch and global buffer pointers are not automatically reset at the start of each transaction Pause Command The Pause command tells the driver to wait a specified period of time before processing the next command which can be invaluable when communicating with slower devices Normally the Pause command is used in multiple Write Character Transmit Pause combinations For more information refer to Slowing Things Down Using the Pause Command To add a Pause command right click on the desired step in the Transaction View and then select Write Commands Pause from the resulting pop up menu Alternatively select Edit New Write Command Pause from the main menu www kepware com az User Configurable U CON Driver Help Pause command parameters x Pause ms OK ig ET Cancel Description Help di Descriptions of the parameters are as follows Pause This parameter spe
190. up to the client application as called Caution The cache option should only be selected for Write Only applications See Also Tags and Device Data Formats www kepware com User Configurable U CON Driver Help Write Character Command The Write Character command tells the driver to append a single byte character to the write read scratch or global buffer The character does not need to be a printable ASCII character such as a letter number or punctuation mark anything with a binary equivalent of O to 255 is acceptable Users that need to write a sequence of printable characters may find it easier to use the Write String command instead To add a Write Character command right click on the desired step in the Transaction View and then select Write Commands Write Character from the resulting pop up menu Alternatively select Edit New Write Command Write Character from the main menu Write Character command properties x Value K 000 0x00 ca lt NUL gt Cancel Data destination C Read buffer Help di Write buffer Scratch buffer i C Global buffer fi Description q Descriptions of the parameters are as follows Value This drop down menu provides a complete list of characters that may be added Each entry in the list provides the ASCII character code in decimal followed by its hex equivalent Some entries may have a third and forth column giving the keyboard e
191. used the driver to attempt to write past the maximum write buffer limit of 8192 bytes Solution 1 The write buffer should be of ample size for all but the most unusual circumstance Ensure that the byte count of the message being constructed is less than 8192 bytes If itis examine the command properties in the offending transaction The most common cause of this sort of error is an incorrect Start Byte End Byte or Number of Bytes value 2 Make sure that the number of bytes written by a Write Data command are considered This is set by the tag s device data format specification Write Device ID command failed for address lt address transaction gt data conversion Error Type Serious Possible Cause A necessary data format conversion failed Solution If the problem is persistent try to find another compatible data format If dynamic ASCII formatting is used make sure all necessary format characters are present in the table See Also Dynamic ASCII Formatting Write String command failed for address lt address transaction gt destination buffer bounds Error Type Serious Possible Cause The command caused the driver to attempt to write past the maximum destination buffer limit of 8192 bytes Solution 1 The destination buffer should be of ample size for all but the most unusual circumstance Ensure that the byte count of the message being constructed is less than 8192 bytes If it is examine the command p
192. will point to 0x02 the first byte This is displayed as Packet 02 Byte 1 in the table below 2 A Seek Character Command searching for a comma would place the read buffer pointer at byte 4 A second identical Seek Character Command which did not move the buffer pointer forward by 1 byte would result in the pointer remaining on byte 4 This is displayed as Packet Byte 4 in the table below 3 A Move Buffer Command relative 1 would place the buffer pointer at byte 5 This is displayed as Packet O Byte 5 in the table below 4 A Move Buffer Command relative 1 with the negative box checked after the Seek Character Command would place the puffer pointer at byte 3 This is displayed as Packet 1 Byte 3 in the table below 5 A Move Buffer Command absolute places the buffer pointer at the absolute byte referenced This differs from the relative movement which adds or subtracts the specified number of bytes to from the current buffer location a A Move Buffer Command absolute 8 would place the buffer pointer on byte 8 regardless of the pointer s current location This is displayed as Packet 0 Byte 8 in the table below b A Move Buffer Command relative 8 on byte 1 would place the buffer pointer on byte 9 This is displayed as Packet Byte 9 in the table below ee eee Note When working with Read and Write buffers the buffer pointer will always start at byte 1 When working with Scratch and Global buffers the buffer pointer wi
193. would be the case in a delimited list of values For more information refer to Tips and Tricks Delimited Lists When this box is checked the Delimiter drop down list will be enabled An ASCII character from 0x00 to OxFF can be chosen Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame See Also Tips and Tricks Delimited Lists Format ASCII Hex String The ASCII Hex String device data format option allows the user to specify how string data should be formatted For example when a format of ASCII Hex String hh hh hh is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below ASCII Hex String format properties e String length 2 as ASCII Hex bytes Cancel Pad type Spaces 0x32 0x30 y Help ddl Parse termination method Parse to next delimiter if present Delimiter as ASCII character 000 2 lt NUL Read up to f bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked e For fixed length strings the Strin
194. x00 to OxFF may be chosen Give an end point relative to the frame end The Read up to xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame Format UnicodeLoHi String The Unicode String device data format option allows the user to specify how string data should be formatted For example when Unicode String with Lo Hi Byte Order u2u1u4u3 is selected the Format Properties button in the tag dialog will become enabled Click Format Properties to display the UnicodeLoHi String Format Properties dialog box as shown below Unicode String Lo Hi Byte order format properties xi IV Fixed length OK String lenath ho Cancel Pad type Spaces 0x20 000 y Help Parse termination method Parse to next delimiter if present Delimiter 000 lt NUL Read up to fi bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked For fixed length strings the String length must be set The number entered here sets the total number of characters two bytes per character that will be written to or read from the device Null characters are not added to the end of strings written to the
195. xxx bytes from frame end box can be used to define the end of a tag s data field relative to the end of a frame For variable length strings when writing through a client the driver adds a single pad character 0 0x30 at the end of the string if the length of the string is odd For example writing the string ABC would cause the driver to send two bytes OxAB OxCO0 for a driver recreated string ABCO Note When writing through a client only hex characters 0 9 and A F are allowed Characters a f are automatically converted to valid hex A F by the driver Format ASCII Integer Packed 6 Bit The ASCII integer packed 6 bit device data format option can be used to specify how ASCII integer data should be formatted For example when a format of ASCII Integer packed 6 bit dddd is selected the Format Properties button in the tag dialog will become enabled After clicking this button the dialog should appear as shown below xi String length 40 Cancel Pad type Spaces 0x20 y Help Parse termination method Read up to fi bytes from frame end The Fixed length check box determines whether the string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked e For fixed length ASCII integer packed
196. y out each transaction The access permission can be at any time during an edit session however when changing from Read Write to Read Only all commands defined for the write transaction will be permanently lost www kepware com User Configurable U CON Driver Help 24 Note Users can create a Write Only tag by selecting Read Write access and leaving the read transaction empty In unsolicited mode tags are created with an unsolicited transaction instead of a Read For more information refer to Unsolicited Transactions Like the server and many OPC Clients the tag dialog can be used to browse the tags currently defined at the selected grouping level duplicate tags and delete tags This is especially useful when creating many similar tags These functions can be accessed through the five buttons below the help button Notes 1 Thetag s properties can be changed at any time during an editing session 2 Event counter values are stored in 32 bit buffers All tags updated from event counters must be configured with 32 bit 16 bit or 8 bit Intel Lo Hi device data format For more information refer to Event Counters Tag Groups Tag groups are provided in order to organize tags A tag group item can be added onto the device or onto another group through the main menu item pop up menu or the toolbar An existing group can be edited by selecting and then clicking Properties from the main menu the group s pop up menu or with the toolbar
197. ype Spaces 0x20 v Help m Parse termination method Parse to next delimiter if present Delimiter Read up to bytes from frame end The Fixed length check box determines whether string data is a fixed or variable length This box must be checked if a device will only accept strings of a given length in write transactions If the length of a string returned from a read transaction cannot be anticipated then this box should be unchecked e For fixed length ASCII integer strings the String length must be specified As its name suggests this sets the total number of characters one byte per character that will be written to or read from the device A minus sign counts as one character For fixed length ASCII integer strings the Pad type must be specified Pad characters are used to fill out the string for integer values that do not require the full string length For example if the string length was set to 4 and a value of 12 is to be written to the device the driver will create a string consisting of two pad characters followed by 1 then 2 There are many options for pad characters spaces 0x20 zeros 0x30 and NULL 0x00 The pad character option applies to writes only the driver can read any valid ASCII integer string of the specified length For variable length ASCII data the driver must have some way of knowing where a tag s data ends when executing an Update Tag command This can be accomp
Download Pdf Manuals
Related Search
Related Contents
Samsung HT-X710 Bruksanvisning Gleaner S Series Catalog Operator control and process monitoring devices Refrigerator - Vandenborre ITEM# 139273 AIR HAMMER KIT USER`S MANUAL Accessing Information, Alert and Alarm Activation Troubleshooting ロックンプレーキ 取扱説明書 Honeywell 10500 User's Manual Logik LPD850 Portable DVD Player User Manual No.169(PDF:1098KB) Copyright © All rights reserved.
Failed to retrieve file