This article introduces the RTSys software, which provides oscilloscope acquisition and analysis tools. These tools can convert system variables and data into graphical displays, facilitating the study of various signal trends and data measurement processes.
An oscilloscope uses data processed internally by a controller to display the data as waveforms, and can display various signals. Therefore, an oscilloscope is an extremely important part of program debugging and execution.
01RTSys IDE Development Environment
RTSys is a domestically developed industrial software IDE launched by ZhengYun. It integrates motion control and machine vision functions, supporting secondary development using RTBasic, RTPLC ladder diagrams, RTHmi, C language, and RTVision machine vision, and supports mixed programming of these four languages. Its advantage lies in its ability to quickly cater to users with different development needs, enabling one-stop development through a single software application and motion controller. For details, click → RTSys: Self-developed, Easy-to-use Motion Control Integrated Development Platform (Part 1), RTSys: Self-developed, Easy-to-use Motion Control Integrated Development Platform (Part 2).
Meanwhile, RTSys software provides tools/functions such as real-time simulation, online tracking, and diagnostics and debugging. This allows users to quickly and in real-time debug programs. RTSys software enables the rapid development of systems for visual positioning, measurement, recognition, detection, and complex motion control of intelligent equipment. The RTSys software development interface is shown in the figure below.
02 Advantages of Positive Motion Technology Oscilloscope
1. Non-physical simulation experiments ensure safety, provide accurate results, and support unlimited repetition for increased efficiency. 2. Multiple display modes include YT, XY, XYZ modes, and a four-channel XYZD display, with flexible 3D perspective switching for comprehensive waveform analysis. 3. Precise cursor positioning and one-click measurement of time intervals allow for quick capture of waveform extreme values, putting analysis under control. 4. A new magnifying glass provides a dynamically updated magnified view for comprehensive detail observation. 5. One-click statistics quickly obtain maximum, minimum, fluctuation, average, and variance values for efficient and convenient data analysis. 6. Comprehensive feature upgrades support waveform display, overlay, loading and saving, searching, comparison, and import/export for a superior user experience. 7. Flexible configuration, customizable parameters, freely designable data sources, customizable observer settings, and personalized waveform color matching meet diverse needs. Today, the oscilloscope has become an indispensable partner for waveform analysis, offering quick and easy setup and effortless waveform observation. Its comprehensive upgrade in functionality and simplified operation process meet both basic needs and advanced analysis requirements, elevating the user experience to a new level. Compared to the old version, the new oscilloscope optimizes the cursor and waveform import/export functions, and adds features such as overlay, loading and saving, searching, and comparing waveforms. We will introduce each of these features in detail below.
03 Oscilloscope Function -- Displaying Waveforms
Waveform display is an important function of oscilloscopes. Oscilloscopes can sample motion data and display it as solid lines, dashed lines, or dots. The oscilloscope display interface is shown below.
I. Highlights of the Oscilloscope Panel
1. Easily adjust the horizontal scale by simply scrolling the mouse; the operation is intuitive and convenient. 2. Four display modes, switchable with a single click, provide comprehensive waveform analysis and insights into signal characteristics. 3. 3D perspective, supporting front, oblique, side, and top views, presenting waveforms from multiple angles for a complete understanding of signal characteristics. 4. Activate follow mode to automatically locate real-time sampling points, with waveform display updated synchronously for seamless dynamic tracking. 5. Zoom in on the view for detailed observation without blind spots. 6. Freely adjust the offset and modify the vertical scale in real time for precise control of signal details. 7. Customize waveform colors for easy differentiation and clear visualization, improving observation efficiency and experience. 8. Intelligent panel prompts include channel data sources, waveform extreme values, and vertical scale information.
II. Panel Button Functions
1. Menu bar settings
1) Channels: The oscilloscope has four types of channels: regular channels 1 to 8, superimposed channels 1 to 4, regular channels 1 to 8 for comparison waveforms, and superimposed channels 1 to 4 for comparison waveforms.
2) Configuration: Configure oscilloscope parameters, viewer settings, and design and import/export data sources.
3) Auxiliary functions: Assist in observing waveforms, including searching for waveforms, comparing waveforms, and importing and exporting waveforms.
4) Help: Displays the mouse operation guide interface, prompting the mouse shortcut operations in each mode.
2. Basic Settings
1) Trigger Mode: Select automatic or manual trigger. Automatic triggering starts immediately after the user clicks the start button; manual triggering requires the user to click the "Manual Trigger" button or wait for the Basic program to trigger the TRIGGER command.
2) Manual trigger: Manually trigger the oscilloscope sampling button.
3) <<: Press to hide the channel name and peak value, only display the channel number.
4) Horizontal scale: In YT mode, it is a one-division scale on the horizontal axis. In XYZ and XYZD modes, it becomes sensitivity, indicating the sensitivity of the left mouse button operation.
5) Number of channels: Set the total number of regular channels to be sampled.
6) 3D Viewpoint: 3D waveform viewing perspective. XYZ mode and XYZD mode are available.
7) Continuous sampling: When enabled, the oscilloscope will continuously sample, continuing to sample even after reaching the maximum number of sampling cycles, until the stop button is pressed and sampling stops; when disabled, sampling stops when the maximum number of sampling cycles is reached.
8) Follow: When Follow is enabled, the horizontal axis will automatically move to the real-time sampling point and follow the waveform display.
9) Magnifying Glass: When the mouse moves over the display area, a magnified view automatically appears in the lower right corner of the mouse cursor. The magnified view refreshes as the mouse moves. Available in YT mode.
3. Display Mode Settings
1) YT mode: Curves showing the changes of different data sources over time, with each channel displaying one waveform.
2) XY mode: The XY plane displays the interpolation composite trajectory of two axes. Two consecutive channels of the same type are grouped together to display one waveform, which is suitable for two-axis interpolation.
3) XYZ Mode: Displays the synthesized trajectory in XYZ three-dimensional space. Select channels sequentially as the X, Y, and Z axes. Three channels of the same type are grouped together to display one waveform. Each type can display at most one waveform, suitable for three-axis interpolation.
4) XYZD Mode: The XYZD four-channel visualization displays the trajectory, where XYZ represents the 3D spatial composite trajectory, and D is the data source displayed as dots. The calculation method is: Dot diameter = Current D value ÷ D reference value × D reference size (Current D value: the size of the data source value at the current position). Parameter modification is located in the "Observer Configuration" window. Select the channels sequentially as the X, Y, Z axis and D value channels. Four channels of the same type are grouped together to display one waveform, with a maximum of one waveform displayed for each type.
Note: XY/XYZ/XYZD mode is not available when the number of channels is less than 2; XYZ/XYZD mode is not available when the number of channels is less than 3; XYZD mode is not available when the number of channels is less than 4.
4. Data source settings
1) Display: Select whether to display the current channel curve.
2) Numbering: Select the data source number to be collected, such as: axis number, digital I/O number, analog I/O number, TABLE number, VR number, MODBUS number, etc. The numbering range is from 0 to the maximum number of axes of the controller, and the number can be entered manually.
3) Data Source: Select the data type to collect. Left-click to manually enter the data type, or click...
Select the type parameter from the drop-down menu. You can set the required parameter type in the "Data Source Design" window.
4) Offset: Set the vertical axis offset of the waveform. Select the offset from the drop-down menu or enter it manually.
5) Vertical scale: One division on the vertical axis. Selecting "auto" indicates automatic scaling, which is available when the oscilloscope is stopped. The scale value changes automatically according to the amplitude of the currently acquired waveform, so that the waveform can be displayed completely on the current oscilloscope interface.
Note: To configure oscilloscope parameters such as axis number, data source, and the oscilloscope's "Parameter Configuration" window, you must stop the oscilloscope before making any settings.
04 Oscilloscope Functions -- Vernier
The vernier can accurately measure horizontal and vertical intervals, including both vertical and horizontal verniers. The vertical vernier measures the amplitude of the waveform in the vertical direction and can be freely moved to any position on the screen; the horizontal vernier measures the time interval between waveforms. An optional attachment function is available, displaying several small circles on the vernier that automatically follow the waveform, enabling quick location of peaks or waveform intersections.
05 Oscilloscope Function -- Overlay Waveform
Oscilloscope waveform overlay is used to analyze and compare the interaction between two signals. It allows any two basic waveforms to be superimposed to create a new waveform, which is then displayed on the oscilloscope panel simultaneously with the original waveform.
The superimposed waveform can be set in "Configuration" - "Parameter Configuration" to set the superimposed channel parameters, and the channel color can be set in "Configuration" - "Observer Configuration".
The superimposed waveform “CH:1+2” is shown below:
06 Oscilloscope Functions -- Load/Save
The oscilloscope's load/save function is used to replace or save waveform data for a specified channel. The difference between this and the import/export function is that the load/save function allows you to specify a channel, while the import/export function imports or exports all waveform data from the oscilloscope.
When loading channel waveforms on an oscilloscope, the number of points per channel is allowed to be inconsistent. If the number of loaded channel points is greater than the currently displayed number, the waveform display is truncated; if the number of loaded channel points is less than the currently displayed number, the waveform display is automatically completed, with the number of points horizontally padded based on the position of the last point. After successful loading, the waveform of the corresponding channel will be overwritten.
07 Oscilloscope Function -- Waveform Search
When users need to observe waveforms within a specified range, the oscilloscope's waveform search function can quickly and efficiently find the required waveform. Available only in YT mode.
The usage method is as follows: "Accessibility" → "Search Waveform" → Select the channel number, enter the amplitude range of the waveform in the Y direction in the "Search Range" field, select the search order, and click the "Find Next" button to observe the waveform. The color of the search channel can be configured in "Configuration" → "Observer Configuration" → "Search".
08 Oscilloscope Functions -- Compare Waveforms
The oscilloscope's waveform comparison function is used to compare two waveform files, supporting comparisons between multi-channel waveforms and the current waveform. The usage is as follows: Go to "Auxiliary Functions" → "Compare Waveforms," click the "Import" button, select the corresponding data file to open, and the imported waveform will be displayed on the oscilloscope. Use the cursor to measure the horizontal time difference between the waveforms to be compared, and set the offset based on the difference for waveform comparison. After setting the offset, press the Enter key on the keyboard, and the oscilloscope waveform will change accordingly. An example is shown below:
1. The original waveform is red, and the comparison waveform is blue. After importing the comparison file, the system automatically obtains the valid range of the comparison waveform. (Note: The valid range refers to the range of points in the waveform within the comparison file, which is always a positive value, but cannot exceed the maximum number of points in the original waveform.)
2. Using the cursor tool, compare the waveforms as needed to obtain the horizontal distance between the original waveform and the comparison waveform, i.e., the difference between the two X cursors.
3. You can set the offset in the "Compare Waveforms" window. After entering the offset, press the Enter key on the keyboard. The waveform will move by the corresponding offset range, and the oscilloscope will display the offset waveform for comparison. The effective range of the comparison waveform will increase/decrease by the number of points corresponding to the offset. (Note: A positive offset value shifts to the right, and a negative offset value shifts to the left.)
09 Oscilloscope Functions -- Import/Export Waveforms
1. Import Waveform: Imports the oscilloscope waveform's parameter information, including: whether it is displayed, its number, data source, offset, vertical scale, and the interval time for each point. Waveforms can only be imported when the oscilloscope is stopped.
2. Waveform Import Method: Click "Import Waveform" in the "Accessibility" menu, select the data file to import, and open it. When the imported file contains parameter information, you can choose whether to import the parameters. If you select "Yes," the current oscilloscope parameters will be overwritten; otherwise, the current oscilloscope parameters will be used. After successful import, the waveform will overwrite the waveform of the corresponding channel.
3. Export Waveform: Exports oscilloscope waveform information. When export parameters are selected in "Parameter Configuration," waveform parameter information is exported, including: whether to display, number, data source, offset, vertical scale, interval time for each point, and waveform data for each channel; otherwise, only the waveform data for each channel is exported. Waveforms can only be exported when the oscilloscope is stopped (comparison channels are not exported).
4. Exporting Waveforms: Click "Export Waveforms" in the "Accessibility" menu, and select a folder to save the oscilloscope waveform data. The exported file with parameters is shown in the figure below.
10. Operating Procedures for Using an Oscilloscope
1. Open the project, set the automatic run task number, connect the controller or simulator, and then open the oscilloscope window (you need to connect to the controller or simulator before operating the oscilloscope window).
2. In the oscilloscope's menu bar, under "Configuration," set the necessary parameters, data source, and observer configuration. Refer to "Oscilloscope Usage Precautions" for parameter settings. It is recommended to set the maximum sampling period to 5000 or higher to prevent data loss due to insufficient sampling. If a large amount of data needs to be sampled or the sampling time is long, you can select "Continuous Acquisition." In this case, the oscilloscope will continue sampling even after reaching the maximum sampling period until the stop button is pressed. (Note: The captured data occupies the TABLE array space.)
3. In the main interface and channel number interface, set the number of channels, data number, and data source, etc. After selecting automatic trigger/manual trigger, click "
"Start button. (Note: When automatic triggering is selected, clicking the start button will immediately trigger the display of waveforms from different data sources. When manual triggering is selected, you need to click the start button...")
After clicking the "Manual Trigger" button or downloading to RAM/ROM, wait for the Basic program to trigger the TRIGGER instruction for successful sampling.
4. Download the program to the controller and run it to observe the waveform. The display mode, horizontal scale, vertical scale, and offset can be adjusted for easier observation of different waveform effects.
11. Oscilloscope Usage Precautions
1. Oscilloscope sampling time calculation
For example: Maximum number of acquisition cycles: 1000; Interval number of cycles: 5
If the system period SERVO_PERIOD=1000, which is a 1ms trajectory planning period, and the interval period number 5 means that a data point is collected every 5ms, a total of 1000 data points are collected, and the collection time is 50s.
2. Calculation of storage space at the end of TABLE data
You can set the location where the captured data is stored in the "Parameter Configuration" window. You can set it to automatically use the end of the TABLE array. At this time, the starting space address will be automatically calculated based on the space occupied by the sampled data.
Calculation method: Sampling data space occupied = number of channels * maximum number of acquisition cycles.
Example: If the controller's TABLE space size is 320000, it samples 4 channels, the maximum number of sampling cycles is 30000, and each sampling point occupies one TABLE, it will occupy 4 * 30000 = 120000 TABLE positions, 320000 - 120000 = 200000. At this time, the starting position of the TABLE is 200000.
The data storage location can also be customized. If the number of channels and the maximum number of acquisition cycles are set as above, the initial TABLE space cannot exceed 200,000; otherwise, the program will fail to run after clicking the "" button. See the image below.
Note: The space occupied by the oscilloscope sampling data should not overlap with the TABLE data area used by the program.
12 Oscilloscope Usage Examples
The following is a three-axis interpolation motion routine, which combines buffer output, corner deceleration and absolute motion center arc drawing functions to achieve a specific trajectory.
·
BASE(0,1,2) ATYPE=1,1,1 'Set pulse axis type UNITS=100,100,100 DPOS=150,100,0 SPEED=50,50,50 'Spindle speed ACCEL=1000,1000,1000 'Spindle acceleration DECEL=1000,1000,1000 SRAMP=100,100,100 'S-curve time 100ms MERGE=ON 'Enable continuous interpolation CORNER_MODE=2,2,2 'Start corner deceleration DECEL_ANGLE=15*(PI/180) 'Set start deceleration angle STOP_ANGLE=180*(PI/180) 'Set end deceleration angle FORCE_SPEED=100 'Active during proportional deceleration TRIGGER 'Automatically trigger the oscilloscope MOVEABS(150,100,0) 'Move axis 0 to 150, axis 1 to 100, axis 2 remains stationary, interpolation motion MOVECIRCABS(100,150,100,100,0) 'Draw a 1/4 circle counterclockwise with a radius of 50, ending at coordinates (100, 150) MOVE_OP(0,ON) 'Wait for the previous motion to complete, output signal to port OUT0 MOVEABS(50,150,0) MOVE_OP(0,OFF) 'Wait for the previous motion to complete, then close the OUT0 port signal MOVEABS(-50,150,0) MOVE_OP(0,ON) MOVEABS(-100,150,0) MOVE_OP(0,OFF) MOVEABS(-100,150,0) MOVECIRCABS(-150,100,-100,100,0) MOVE_OP(0,ON) MOVEABS(-150,50,0) MOVE_OP(0,OFF) MOVEABS(-150,-50,0) MOVE_OP(0,ON) MOVEABS(-150,-100,0) MOVE_OP(0,OFF) MOVEABS(-150,-100,0) MOVECIRCABS(-100,-150,-100,-100,0) MOVE_O P(0,ON)MOVEABS(-50,-150,0)MOVE_OP(0,OFF)MOVEABS(50,-150,0)MOVE_OP(0,ON)MOVEA BS(100,-150,0)MOVE_OP(0,OFF)MOVEABS(100,-150,0)MOVECIRCABS(150,-100,100,-100, 0)MOVE_OP(0,ON)MOVEABS(150,-50,0)MOVE_OP(0,OFF)MOVEABS(150,50,0)MOVE_OP(0,ON )MOVEABS(150,100,0)MOVE_OP(0,OFF)MOVEABS(150,100,20)MOVECIRCABS(100,150,100,1 00,0)MOVE_OP(0,ON)MOVEABS(50,150,20)MOVE_OP(0,OFF)MOVEABS(-50,150,20)MOVE_OP (0,ON)MOVEABS(-100,150,20)MOVE_OP(0,OFF)MOVEABS(-100,150,20)MOVECIRCABS(-150, 100,-100,100,0)MOVE_OP(0,ON)MOVEABS(-150,50,20)MOVE_OP(0,OFF)MOVEABS(-150,-5 0,20)MOVE_OP(0,ON)MOVEABS(-150,-100,20)MOVE_OP(0,OFF)MOVEABS(-150,-100,20)MOV ECIRCABS(-100,-150,-100,-100,0)MOVE_OP(0,ON)MOVEABS(-50,-150,20)MOVE_OP(0,OF F)MOVEABS(50,-150,20)MOVE_OP(0,ON)MOVEABS(100,-150,20)MOVE_OP(0,OFF)MOVEABS(1 00,-150,20)MOVECIRCABS(150,-100,100,-100,0)MOVE_OP(0,ON)MOVEABS(150,-50,20)M OVE_OP(0,OFF)MOVEABS(150,50,20)MOVE_OP(0,ON)MOVEABS(150,100,20)MOVE_OP(0,OFF)
1. Curves showing the DPOS position of axes 0, 1, and 2 over time in YT mode:
2. Two-axis interpolation composite trajectory of axis 0 and axis 1 in XY mode:
3. Synthetic trajectory of three-axis interpolation for axes 0, 1, and 2 in XYZ mode:
4. Four-channel synthesized trajectory in XYZD mode:
This time, we can see the motion control technology more clearly and in greater detail! That concludes our introduction to the functions of the RTSys oscilloscope.
For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.
This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.