Using the CX One Version 3 Data Trace Function
-
Upload
ed-caranay -
Category
Documents
-
view
129 -
download
2
Transcript of Using the CX One Version 3 Data Trace Function
OMRON White Paper
Using the CX One Version 3 PLC Data Trace tool
with an Omron CS / CJ / CP1 PLC
Rev 2.01
9/16/2008
Jay Hughes
Section 1: Functional Description
The Omron PLC Data Trace is a function that allows the user to view PLC data as a
function of either time or consecutive PLC scan cycles. This data can be traced to a
resolution of 10ms if a time base is used (1 ms if a CJ2 is used), or every PLC scan if
PLC scan based sampling is used. This function uses a dedicated memory area on the
PLC to store traced data, and present it back to CX Programmer, or if an NS is used, the
data can be viewed on the NS. The Data Trace can trace bits and channels and of data,
including 1, 2, and 4 channel wide data values, depending on the data type selected for
each data point. The number of channels and bits that can be traced simultaneously is a
function of the PLC processor type that is being used.
The Data Trace tool in CX One version 3 is an updated version of the previous Data
Trace tool, with many changes and enhancements.
Think of the PLC Data Trace function as a ‘mini oscilloscope’ built into the PLC. This
can be an extremely powerful function for machine debug and startup!
Note: When using CX One Version 3.x Data Trace tool with C and CV PLCs (CQM1,
C200HX, CVM1 etc), the older style Data Trace tool as found in CX One Version 2.x is
used. This document focuses on the new style Data Trace tool for CS / CJ / CP1 PLCs.
Section 2: Launching the Data Trace tool
Connect to the PLC using CX Programmer, and select PLC, Data Trace from the menus.
Section 3: Configuring the Data Trace tool
In the PLC Data Trace tool, click on the Configure Trace icon as shown below.
Note: Those items circled in blue are only available for CJ2 PLCs.
3.1 Configuring a trigger event.
The Data Trace tool streams the bits and channels that the user will configure through a
large buffer in the PLC. The user can configure an event (bit or channel based) to start to
record this data. This is the trigger. The trigger can be the rising edge of a bit, the
trailing edge of a bit, or a channel that equals a certain value. In a CJ2, there are
additional channel operations that can be used for triggering, such as less than, not equal
to, etc.
Bit Trigger
Word (channel) Trigger
Trigger Conditions by PLC
CJ1/CS1/CP1 CJ2
Bit, Rising Edge OK OK
Bit, Trailing Edge OK OK
Channel, Equal OK OK
Channel, Not Equal Not Available OK
Channel, Greater Than Not Available OK
Channel, Less Than Not Available OK
Channel, Equal or Greater Than Not Available OK
Channel, Equal or Less Than Not Available OK
3.2 Configuring a Sample Delay
The Delay field makes the Data Trace an extremely powerful tool. This configures a
delay of x number of samples between the trigger event and the start of the recording of
data. If this value is set to 50, the PLC will delay 50 samples after the trigger event
before the data is recorded. This value can be negative. A value of -50 will start
recording data prior to the trigger event. This is possible because of the streaming of
data through the PLC buffer. This negative delay can be used to capture data that leads
up to the trigger event. The slider bar or the data entry window can be used to set the
trigger delay. The ability to use a negative delay is one of the most powerful features of
the Data Trace function!
Negative Delay
Positive Delay
3.3 Configuring Sampling
The user can configure the data sampling interval for the data trace. This can be time
based, cyclic (each PLC scan cycle), or based on a ladder instruction (TRSM).
For low speed applications, a fixed interval (10 ms minimum, 1 ms minimum for CJ2)
will allow the user to trace for a longer period of time, with lower resolution.
For high speed applications, Once Per Cycle is a good choice to sample the data at the
end of every PLC scan. This is the setting that the user will use most often. If high speed
input resolution is desired, configure the Input Filtering for the PLC input points to 0.
This is done through the Settings window in CX Programmer.
For interrupt driven applications, the ladder instruction (TRSM) method may be
desirable. The programmer would insert a TRSM instruction at each point in the ladder
program where a sample of the data should be taken.
Fixed Interval Sampling
Cyclic Sampling
TRSM Instruction Sampling
3.4 Configuring Channels and Bits to be traced
To configure which items in the PLC should be traced, select the Trace Objects tab. The
user can add channels and bits to trace by double clicking in an Address cell, and then
typing or browsing for a data point. Data points can also be added to the list via drag and
drop from the ladder diagram or the symbol table. The Symbol, Data Type, and
Comment are automatically transferred from the Global Symbol table (but not any local
symbol tables).
Click OK to close the Data Trace Configuration window when finished adding items to
trace.
3.5 Additional Configuration Options
Auto Repeat allows the Data Trace tool to automatically trigger the same trace
repeatedly (up to the number of times specified). So, the above example would run a data
trace 2 times in a row, uploading each trace after it has completed.
Number (No) of Trace Samples: This CJ2 exclusive feature allows the user to select
the number of samples to be taken per trace, as opposed to simply filling up the available
buffer space as a normal Data Trace would do. In the above example, 100 data samples
would be taken at the specified sampling interval, and then the Data Trace would be
complete.
Continuous Trace: This CJ2 exclusive feature allows data to be logged to CSV files on
the PC to trace for long periods of time.
Number of Samples: This is the number of samples that will be saved per .csv file.
Maximum Time Span: How long the Continuous trace will run.
Note: Not all sampled data may be read by the PC if very short (under 5 ms) sampling
times are specified for Continuous Trace. Consult the manual for the CX Programmer
(catalog number W466) for more details on this topic.
Section 4: Saving a Data Trace Configuration
New to the Data Trace tool in CX One V3.x is the ability to save the configuration
information for a Data Trace (the trigger, sampling interval, delay, data points to sample,
etc).
When configuring a trace, the Import and Export buttons can be used to load (Import) and
save (Export) the Data Trace configuration, thus allowing the user to have multiple
configurations for tracing different debugging or troubleshooting situations.
Section 5: Executing a Trace
To execute a PLC Data trace, click on the Execute Trace / Time Chart as shown below.
The current status can be seen at the bottom of the data trace window.
To allow the data trace to trigger naturally, do nothing. The software will automatically
upload the trace when it is complete.
To trigger manually from the software, click on the Trigger the Trace/ Time Chart as
shown below. This will manually trigger the recording of the data with any user set
sample delay.
Once a trace has completed, the Data Trace tool will automatically upload the traced data.
If the trace was stopped manually using the (red) Stop button, then the trace data can be
manually uploaded using the (blue) Read Trace Data button.
The Data Trace can also be executed from the configuration window by selecting
‘Transfer (PC to PLC) when the ‘Start Executing Automatically After Transfer (PC to
PLC)’ option is selected.
Section 6: Understanding a PLC Data Trace
Note: The Data Trace Tool has been configured with the options shown below, and
custom color setup for documentation clarity.
6.1 Overview
The Data Trace shows the traced data with the Channel data in the upper window and the
Bit data in the lower window, with the legend shown below. Each item can be shown or
hidden using the ‘Show’ selection. This allows the comparison of different data points
while reducing the clutter of other data points.
6.2 Cursor Position
The vertical cursor can be used to see the data at a single point in time for each data
point. The values of each trace item at the slider bar position can be seen in the legend in
the column ‘Cursor 1’. If the cursor is not visible, it can be enabled using the (purple) ‘$’
icon.
The Data Trace tool also has the ability to measure the difference between 2 samples of
the same data point. To use this function, select the ‘Measure Difference’ icon (blue dual
arrow) to enable 2 cursors. Position the 2 cursors along the data trace, and the legend
will show the difference between the 2 samples for each data point. The difference will
appear in the ‘Difference’ column in the legend.
6.3 Zoom and Scale
The Zoom and Scale buttons can be used to adjust the horizontal and vertical scales. The
Zoom feature affects the X axis (samples) and the scale feature affects the Y axis (value).
The Zoom Select button can be used to highlight a region of interest in either the channel
or bit trace data. Click on the Zoom Select icon (square around the ‘+’) and then
highlight the region of interest. To cancel the zoom, click on the Zoom Unselect icon
(square around the ‘-‘).
The number of samples per grid division can be entered manually for both the X and Y
axis. Shown below are examples of 1 sample per grid division and 10 samples per grid
division.
For the X axis:
For the Y axis
Each data point on the Y axis can be adjusted individually. In the legend, choose which
data point to adjust by clicking on the ‘Select’ box for that data point. Once a data point
is selected, the numeric value between grid marks can be entered as shown.
Each trace item can be dragged up and down in the display window to allow superimpose
it on the other data points. Click on a line to select it, and then drag it up or down.
The same shifting can also be accomplished using the green up and down arrows as
shown. These arrows are only visible when a channel data point is ‘selected’.
Units of measure (degrees, speed, level, etc) can also be added to the display for each
channel data point by adding the unit of measure in the box shown above. The unit will
be shown for the ‘selected’ data point.
Section 7: CJ2 exclusive Data Trace functions
Following is a list of Data Trace features exclusive to the CJ2 PLC.
1. When using a CJ2 PLC, additional memory from the EM memory area can be
allocated for using with Data Trace. Configure this option through the PLC / Memory
Allocation / EM Memory Settings menus. The PLC will start in the specified EM bank,
and use all banks after the specified bank for this function.
2. When using a CJ2 PLC, the Data Trace can be configured to run automatically when
the PLC starts running, including upon powerup. This can be configured in the Data
Trace Configuration.
3. The number of data points that can be traced has been expanded for the CJ2 to allow
tracing of up to 31 bits and 16 channels of data.
4. Functions that are exclusive to the CJ2 that have been previously described in this
document include
a. Continuous Trace
b. 1 ms Time Based Sampling (was 10ms on CS / CJ / CP1)
c. Specification of the number of samples to be taken
d. Additional channel triggering options (not equal, less than, etc)
Section 8: Tips for using Data Trace
If a trigger bit is not already in the ladder, add one that is relevant to the application. The
trigger does not need to be a physical input point on the PLC. It can be an internal bit, or
a channel reaching a certain value.
To aid in visualizing the trace, add the trigger bit or channel to the data that is being
traced.
The user can start a data trace, disconnect with CX Programmer, walk away from the
PLC, and come back later and upload the trace. The PC with CX Programmer does not
need to stay attached to the PLC while the trace is running, unless a continuous trace is
being used.