phpkb Knowledge Base Logo
 
OLDI KB
Online Knowledgebase System  
Knowledge Base Home Knowledge Base Home | Knowledge Base Glossary Glossary
Home > All Categories > eATM Products > eATM (xCoupler) products > Hints: Trigger handshaking (CLX and xCoupler) using trigger handshaking options and the xCoupler ControlLogix Profile
Question Title Hints: Trigger handshaking (CLX and xCoupler) using trigger handshaking options and the xCoupler ControlLogix Profile

Fact       RA56-ESA

Fact       FAQ - xCoupler - Handshaking Example (RESULT TAG and RESULT COUNT TAG)

Fix         Note: The Workbench's online help (the BOOKS icon) provides much of this valuable information.


Fix        

Trigger Handshaking Option#1

RESULT TAG Use --

Only avilable with DATA triggers.

This is an example of ACD example program using RESULT TAG

The keys things to remember are :

  1. The handshaking tag is defined on the TRIGGER EDIT screen in the RESULT TAG field.  It is a DINT tag.
  2. As the PLC programmer, you can use the RESULT TAG as follows:
    1. Set the result tag to a known value. Do not use 0, 7001, or 7003.
    2. Execute the trigger by initiating the data change condition.
    3. Wait for the RESULT TAG to change value.The change indicates that processing of the trigger was completed by the xCoupler module.
    4. Review the RESULT TAG to determine the outcome of the processing. 
      • Possible outcome values are the same as the unsolicited message completion codes (i.e. MSG INSTRUCTIONS):
        • Zero      The execution of the trigger was successful.
        • 7001h    The message could not be delivered to the enterprise system and is saved in a store and forward queue.
        • 7003h    The message could not be delivered because of a system overload or other system failure.
           

This RESULT TAG is different than the RESULT COUNT TAG.

A RESULT COUNT TAG is available with a SELECT trigger.  It is used to store the count(i.e. number) of database records placed into CLX TAGS after the execution of a Select operation. For more information about the RESULT COUNT TAG, click Select.

 



Fix        

Trigger Handshaking Option#2

RESULT COUNT TAG Use --

Only available with triggers with the database action of SELECT.

An SQL Select operation gives you the ability to update controller tags with data from the database.
The data is selected from a database table based on criteria established using a Where clause.

Select also allows you to assign a writeable tag that will be used to store the count of the database records that will be written to the mapped tags when the trigger is executed (i.e. RESULT COUNT TAG).

You can use the value in the RESULT COUNT TAG to determine how many database rows were received from the database and have been written to controller tags. After the trigger executes, the RESULT COUNT TAG could have the following values:

  1. Expected Row Count. The Select operation returned at least as many rows as the value specified in Max Rows, and they were successfully written to the controller tags.
  2. Zero. The Select operation completed successfully. However, no rows were returned.
  3. Less than Expected Row Count. The Select operation returned less than the Expected Row Count (i.e. trigger's MAX ROWS) and these rows were successfully written to controller tags.
  4. -1 value. The negative value was caused by one of the following:
    • An SQL error occurred while executing the Select operation.
    • A NULL value was returned for a mapped controller tag.

The use of the RESULT COUNT TAG is optional. However, the step is recommended as this tag will be the only indicator to the controller program that the values for the bidirectional operation have been written back to the controller tags.

NOTE:

1.     xCoupler only modifies this tag upon completion of the data transfer. Therefore, using the RSLogix program, you could pre-set a value for the tag to a value that is not a possible response from xCoupler (such as -5).

2.     A value in the Max Rows box indicates the maximum number of rows that you want the trigger to handle.

 



Fix        

xCoupler CLX Profile

NOTE:  When the xCoupler module is configured to use the CLX profile, the value of the status and control tags are displayed on the module top level screen of your xCoupler Workbench.

xCoupler communication to the PLC

The xCoupler module provides input communication to the PLC using two status words (the first word is the status of xCoupler and the second word is a free running counter).  

The Status bits provided are Booleans associated with the first status word. The following list describes the xCoupler module status tags.  These status bits allow an action to be taken by the PLC when necessary. For example, if the store and forward or the data loss bit is set, the PLC can initiate alarm processing.

Started   
Indicates all processing on the xCoupler module is active. This is the Running mode that is available from the Workbench. i.e. If the Local:x:I.Started boolean contains a value of 1,the xCoupler module is running. 
 
StartedSuspended
Indicates that all activity on the xCoupler module has stopped. However, any transactions that were in the store and forward queue were processed until all data was delivered. No new data will be sent to store and forward. This is the Suspended mode available from the Workbench. When both Started and StartedSuspended bits are false, the xCoupler module is in a faulted state.
 
StoreForwardActive
Applies only to WebSphere MQ and database transports. In this state, at least one transport has encountered an error connecting to a remote WebSphere MQ queue or database table and is storing the transactions for a later delivery when the remote queue or database is running. The xCoupler module will periodically attempt to re-transmit the transactions. When all the transactions have been sent, StoreForwardActive will clear.
 
StoreForward50
Indicates that at least one transport is in the store and forward queue, and its allocation of space is more than 50 percent full.
 
DataLoss
Indicates that at least one transport is in the store and forward queue, and its allocation of space is full and one or more messages have been discarded. The DataLoss bit is also set when messages are discarded because their time to live limit has expired.
 
Overloaded
Indicates the system is overburdened and data is being lost.  This flag is reset only on power reset.

 

PLC communication to xCoupler

The xCoupler module provides the CmdTrigger and Cmd output words to the controller. Cmd contains the bits that are aliased as the booleans SUSPEND and RESUME.

It requires 2 steps to signal a command to the xCoupler.

  1. First, you will set the Cmd word to the appropriate value.
  2. Then, you will change the value in the CmdTrigger words.  This change signals the xCoupler to execute this command.

For example, using ladder logic, the xCoupler module can be suspended by writing 1 to Cmd(thus setting the SUSPEND alias). Suspend and then modifying the value of CmdTrigger. Changing this value writes the command in Local:x:O.Cmd to the xCoupler module.

 

 

 

Authored by: Laurie Wilson
Click Here to View all the questions in eATM (xCoupler) products category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
Article Information Additional Information
Article Number: 171
Created: 2008-03-03 1:36 PM
Rating No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email this Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
 
 

Powered by Online Development Inc