03-13-2007 12:15 AM
03-13-2007 11:10 AM
This is an interesting way to use the Digital Waveform Editor. But I see why you want to do this, since it is hard to create a user interface in labVIEW that allows users to edit digital data.
For your first question. No there is not a way to modify the menus of the Digital Waveform Editor.
When using the Digital Waveform Editor, why use an ASCII file? The Dig. Wfm. Editor allows saving and reading to an NI-HWS file. Then in your labVIEW VI you can use the NI-HWS api to read/write the data as a true LabVIEW digital waveform. By using HWS files, you could get around having to go through the ASCII export/import wizards in the Dig. Wfm. Editor, rather it is just a file open or a file save. Also, by switching to HWS files, you could change your app a little so that it monitors an HWS file that is saved to disk and open in the Dig. Wfm. Editor. What this would mean is that whenever the user saves data from the Dig. Wfm. Editor to that HWS file, your app could notice that change (using the modified date of the file) and automataically read the waveform again.
I quess what I'm saying is that in your VI, you could add a filepath control for the user to select a new or existing HWS file. In your VI, you then create that HWS file and fill it with some default data that has the sizes that you want. Then request that your users launch the DWE and open that same HWS file. You can then monitor the file's modification date on disk to see when the user has hit Save in the Dig. Wfm. Editor. If you see the mod date change, re-read the HWS file.
Let me know if this is something that will work for you.
Another option you could consider in LV 7.1 (if not using the Dig. Wfm. Editor) is to use LabVIEW's digital table control rather than the string table. The Digital Table is a specific control for digital data, and would be an easy way to have the user type in values for the data.
-Jared
03-14-2007 03:14 AM
Hi Jared,
Thank you for Ur quick reply. My Que should ve been " I DONT want the user to view the entire Menu of the DWE ", instead of what had appeared in my original post. Anyway, thank you for Ur correct interpretation of my problem.
My application does not deal with any of the NI H/W. I mean to say that we dont ve the HWS-using components. Ours is purely ATEs developed indigeneously for IC testing purposes. All are modules developed in-house by our team of H/W R&D Engineers.
Its a general purpose ATE S/W suite, meaning a total Test Creation, Edition & Production running S/W with Report generation happening on the background simultaneously. (Yet, we dont use the Report Gen toolkit for the purpose. )
Our purpose of integrarion DWE is that we ve digital modules in our H/W, that need to be fed with 0s,1s or Zs, for that we wish to use DWE instead of the Table in the VIs above.
I knew I can use the Digital Table instead of Str Table, but the primary problem is that the values entered in rows becomes columns when transported & viewed in the Digital Grapf indicator. So, I need to transpose everytime behind...
Secondly, the values entered get into the 8-4-2-1 format, which is Rt-to-Lt, instead of the normal Lt-to-Rt fashion as we write. So, the user will definitely get confused on seeing the Table n Graph simultaneously.
These are the main drawbacks with the LV Digital table. Moreover, the Digital Wavefrom grapf cant be used as a control to draw siganals alike the DWE.
So, pl suggest some work-arounds to achieve these things.
03-14-2007 10:33 AM
03-15-2007 06:42 AM
Hi Jared,
My colleague n I ve developed thus far with the idea U gave me y'day.
The problem is when I incerase the samples from the intialized 100, the XScroll comes into picture. Now, if I click on the Digi Graph to change values, I'm not able to get the exact X&Y co-ordinates. It points to diff points each time I click. Only the Signal co-ordinate is coming correctly.
I ve attached the new VI.
Can U run n debug n tell me a solution to this problem. Also, I'm not familiar with most of the properties of the Digi Graph.
LV 7.1 help tells very little about them, in particular, what do ActivePlot, Digital Transition Location, etc., mention & all kinda things alike... and what re the values to be passed to them... (like in Str Table ActiveCell = -2,-2 means all of the Table).
Please help me out further n farther...
03-15-2007 07:17 AM
Forgot to say that NOT to put Auto-scaling for X.axis. Use the scrollbar only.
One more issue, can U see a black line running along thro' the scrollbar ?
I was doing some changes n debugging. I put to visible n invisible the scrollbar. Suddenly at ont point it appeared with that blacck line in it. I was condused why it was so, but didnt sit to analyze it...
Waiting for Ur reply...
03-15-2007 09:46 AM
03-15-2007 10:35 AM - edited 03-15-2007 10:35 AM
OK, I've cleaned up some things for you. There were a couple of things that needed to be modified now that you want to use an X scrollbar.
The scale specs need to account for the X-scales constantly changing scale min and max. Also, I modfied the code for how you were toggeling a bit. The code you had was very complex and can be done much easier. I put remarks in your code where I changed things.
Good luck.
Message Edited by JaredW on 03-15-2007 10:36 AM
03-17-2007 04:48 AM
03-19-2007 10:28 AM
I will take a look at your VI later today. Until then, I do have some quick suggestions you may want to try. I do remember when I was using the digital graph in LabVIEW 7.1 that there were a number of issues related to panning and zooming of the digital graph. In LabVIEW 8.2, the digital waveform graph has been cleaned up alot. In fact, I just quickly tried your rev3 VI in LabVIEW 8.2 and the bad scrolling behavior is gone.
If upgrading to LV 8.2 is not really an option, I would recommend that you stop using the built in scrollbar of the digital graph, and implement your own using a slider control. Doing this is pretty straight foward. Just set the Min and Max of the slider to be 0 and Max # Samples minus 100 viewable samples respectively. Then on a value change event from the slider, update the graph's min X scale value to be the value of the slider, and the max value to be the value of the slider plus 100 viewable samples.
Try implementing this to get around your X scrolling issues.
For your question about why I accounted for the borders in your code. Most controls in LabVIEW have a 3-D border around it. When you use the property nodes to get the XY position of the control, the value you get is the top left position of the 3-D border. So if you really wanted the top left position of the inner part of the control, you must add to the XY values the number of pixels of the border. You can't get the border size from labVIEW, so you just have to use trial and error to find those sizes.
For the graph, the plot area is the actual graphing area inside of the 3-D recessed frame. In your code, I used the X and Y scales' positions and sizes to try and get the XY position of the Plot Area. Just using the XY position I get from the graph's property node does not work because it is the XY position of the recessed 3-D frame of the graph. I also needed the Plot Area's width and height. I again use the X and Y scales width and height for these values. However the X-scale's width is a little longer than the plot area since the min and max values, when displayed, are a little before and a little after the plot area's boundaries. So your code has to account for this as well. In LabVIEW 8.2, a new property node for the graph was added that allows you to get the actual plot area's bounds. Therefore much of this code in 7.1 would not be needed in 8.2.
For your last question about graph properties, I think you are asking about "active plot" not "actual plot". The active plot property is an index into the plot you wish to change specific properties of. So if you wanted to change the first plot's color from the default to purple, you would first have to set the active plot property to 0 in the first parameter of your property node. Then in the next parameters of your property node you can set the values for plot zero.
The property called "Plot Transition" is used to change where the rising or falling edge will be drawn whithin one sample on the graph. I don't beleive the default for this property was well chosen in LabVIEW 7.1. Most people will want the edge transition to be drawn on the timestamps of when they occurred. To accomplish this in LabVIEW, you must reset all of the Plot's Tranisiton Locations to be the third option (not sure what is is called). To visually see this in LabVIEW, on your digital graph, make the plot legend visible and right click on it to see the list of properties for a plot. You'll see transition location as the fourth item in the right click pop-up of the plot legend.
-Jared