In this tutorial, we will be running a PXI Digital IO GX5292 board in real-time compare mode through DIOEasy and examining some of its functionality.
Create the pattern we will use in DIOEasy as follows:
1. Open DIOEasy.
2. Create a new file with the following settings:
- File Type: DIO (DIOEasy File Menu)
- Board Type: GX5290 (DIOEasy File Properties - General tab)
- Num. Of Boards: 1 (DIOEasy File Properties - General tab)
- Num. Of Steps: 1024 (DIOEasy File Properties - General tab)
- Operating Mode: Real Time Compare (DIOEasy File Properties - General tab)
- Clock Delay (ns): 0.00 (DIOEasy File Properties - Setup tab)
- Strobe Delay (ns): 0.00 (DIOEasy File Properties - Setup tab)
3. Set Channels 0 through 15 to output
- Select Channel 0 through Channel 15
- From the menu bar, select Fill -> Direction…
4. Fill Channels 0 through 15 with a walking one pattern
- While Channels 0 through 15 are still highlighted, select Fill -> Shift / Rotate…
- In the dialog that pops up, change the Type from ‘Shift’ to ‘Rotate’
5. Create the expected pattern for Channel 16 through 31
- Select Channel 16 through 31.
- From the menu bar, select Fill -> Shift / Rotate…
- In the dialog that pops up, change the Type from ‘Shift’ to ‘Rotate’
6. Add HALT command to the end of the pattern
- Click on the last step of your pattern (step 1023)
- Hit Alt+Enter to open the command properties window.
- Change the command for this step from NOP to HALT
7. Insert error in Channel 0
- Click Channel 0 to highlight the entire channel
- From the menu bar, select Fill -> Value…
- Select to fill the channel with all 0s and click Overwrite!
8. Save this file as “RTCError.dio”
The image above depicts the DIO file created. When executed, it will output a walking one pattern on J1 channels 0 through 15 while reading J1 channels 16 through 31 as input. Externally, the first sixteen channels will need to be wired to the second sixteen channels (channel 0 wired to channel 16, channel 1 wired to channel 17, and so on) to achieve a loopback. We are expecting to see the same walking one pattern on channels 16 through 31 as we output on channels 0 through 15. Since we want to observe some errors, we have intentionally set all steps in channel 0 to LOW. This will generate 64 errors (1 error every 16 steps).
Run the Pattern using GTDIO Panel:
1. Launch the GTDIO Panel from DIOEasy using the shortcut (F10).
2. Initialize the driver for the board.
3. Load and run the RTCError.dio pattern
- Change the vector from 'File' to 'Window' and click 'Execute'
- After the pattern is loaded to the DIO, click 'Arm!', then click 'Trig!'
4. View the resultant pattern.
- Change the vector from 'Load' to 'Show' and click 'Execute'
- In the dialog box that pops up, select the option 'Load into New Window'
A result pattern will be loaded into DIOEasy. Whenever discrepancies are found between the expected results and the actual results, the column containing the error will be shaded as shown below:
Masking / Unmasking:
If there is a channel or number of steps that you do not want to check for errors, the real time compare input mask can be used to enable/disable the compare engine.
1. Mask steps 0 through 15
- Highlight steps 0 through 15.
- From the menu bar, select Fill -> Real Time Compare Input Mask
2. Run the Pattern using the GTDIO Panel
In the result pattern below, you can see that the error that was masked does not appear shaded because it was not analyzed.
Real Time Compare Error Logging Modes
When your DIO is operating in Real Time Compare mode, you can set stop conditions. In DIOEasy, hit CTRL+R or use the menu bar to open the File-> Properties dialog window. Click on the Real Time Compare tab. By default, it is set up to not stop for any special condition. By changing the 'Failures count:' to 10 and clicking Set, we indicate that the pattern should stop running if ten errors are encountered during execution. You can use this properties window to set the DIO to stop execution if a certain data value is encountered or when the program counter reaches a specified value.
|
Keywords
|
DIOEasy, Real Time Compare, GTDIO, Comparison, Pattern, GX5292, Tutorial, Example, PXI
|