02-06-2013 09:55 PM
Hi,
I’m using diadem to playback my data, including “AI Signal”, “DI Signal”, “Serial Port Data”.
For “AI” and “DI” Signal I can choose the “Display Type-2D Axis System”.
For “Serial Port” the data is in string format, e.g. AA BB AC EF…… I choose “Display Type-Channel Table”
My question is when I use the band cursor to see the detail curve information in “2D Axis System” , all the numeric channel can Zoom in/off together, while the “Serial Port” data is in the channel table, it’s not effected by the cursor, and I can’t get the exact/related "serial port data" in that time slot.
How can I sync the “Channel table” data with cursor?
Can I get the cursor start position and point it to the channel table, or make a SUDialog to display the data in band cursor range?
My application is: 1) Review the AI/DI, Serial Data; 2)Select the interested data pieces; 3) Export the interested data files for report or sth else.
Thanks and waiting for reply.
Xifeng
02-20-2013 12:48 PM
Hi Xifeng,
There is no Automatic connection between the graph cursors and table rows in VIEW. If you are using a "Curve Cursor" in the graph, such that the cursor always "snaps to" the curve, then you can right-click in the table and select the context menu "Goto >> Cursor Position".
If you want to process the X axis range on a variety of channels, then typically you would copy out those row ranges with the DataBlCopy() command.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-25-2013 06:16 AM
Hi Brad,
Thanks for your advice, I have written a script to solve this problem.
1. I use the property “DisplayObj.XBegin” and “DisplayObj.Xend” in “2D Axis System” to get the relative time information in curve page.
Dim X1, X2
X1=view.Sheets(1).ActiveArea.DisplayObj.XBegin
X2=view.Sheets(1).ActiveArea.DisplayObj.XEnd
2. Write a small function to compare X1,X2 with the timestamp in “Serial Port” to allocate the relate data position, then set it as the active cell in “channel table”.
call view.Sheets(2).ActiveArea.DisplayObj.SetActiveCell(AllocatePos,1)
(AllocatePos is the relate data position that I calculated)
3. I customized the tool bar to add a new button, when users click this button, I will execute the script
Call MenuItemAdd("View","7","MenuItem","Sync time info","ScriptStart(""C:\Sync Analot time info to Serial Port.VBS"")")
The solution is kind of awkward, but it did work......
Thanks again, and sorry for my late reply.
Best rergards
XIfeng
03-25-2013 12:38 PM
Hi Guys,
You could retool this solution to use the VIEW-cursor-move event so that no button-click is needed, if you're interested.
Brad Turpin
DIAdem Product Support Engineer
National Instruments