LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of DWE in LV

Hi All,
 
I ve integrated the NI Digital Waveform Editor 2.0 in my project as an external application.
The user is required to use only 0's, 1's & Z's - the 3 states. The maximum no of signals can go upto only 16.
 
Till before a month or so, we were using the Table itself in my VIs for the user to input values of 0,1 or Z.
We'll only control any wrong entries with filling 0 as default.
 
Now after the DWE integration, I ve changed the Table Ctl as an Indicator. The waveform created in the DWE, ll be exported to a txt file named as Export.txt thro' the option Export to ASCII in the File menu of the DWE. I read this file in my sub-VI & transpose it & show in the Table.
Similarly while on Edit, I read the current data of 8xSomething or 16xSomething as per its presence in my main Test Condition file (text file sans extension) according to its serial no, & write it to a text file called Import.txt.
 
So when the user launches the DWE for Edit mode, he has to choose the option Import from ASCII from the File menu option in the DWE, to see the particular waveform he has created during the first time creation of that Test Condition file.
 
The problem is I want the user to view the entire Menus given in the DWE. Also, I dont want the user to key in the No of Samples & Signals asked by the DWE.
 
Is there a way to control the Menus ( hide many of the things ) of the DWE,
By ways of scripting or thro' ActiveX ? I ve not used ActiveX in my project yet.
 
If the answer is a stern No, then can I use LV's Digital Waveform Graph (DWG) as a Ctl instead of the Table which I use at present ?
I mean to ask, if it ll be possible for the user to enter 0,1 or Z in the DWG by keyboard ?
 
I'm using LV 7.1. So, there is not Rt Click short-cut menu option also... Smiley Sad
 
I've attached the VIs for both the versions of my work so far.
 
Please go thro' it & give Ur ideas n suggestions.
 
Regards,
- Partha ( CLD until Oct 2024 🙂 )
Message 1 of 12
(4,665 Views)

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

 

Message 2 of 12
(4,660 Views)

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. Smiley Wink)

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... Smiley Mad

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.

- Partha ( CLD until Oct 2024 🙂 )
Message 3 of 12
(4,643 Views)
Well since we cannot modify the menus of the DWE at run-time, it sounds like you would then prefer to have some sort of Digital Waveform Graph Control that the user can modify from within your VI.
 
I wrote a simple VI that shows you how to create a very basic digital editor using the digital graph in LV. This VI demonstrates how you can use the event structure to monitor for mouse clicks. Using the XY coordinates of the mouse down event, you can now calculate the sample/signal that was selected. Having this information allows you to modify that value in your digital data stream, then redraw the new data to the LV graph again. To the user, it looks like a simple DWE written in LV.
 
Since you only want to allow values of 0,1,Z, you could make your code such that a Left Click would toggle a bit to 0, Right Click would create a 1, and maybe shift+left click would fill a Z.
 
I've included the VI. Let us know if this get's you any farther.
Message 4 of 12
(4,632 Views)

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. Smiley Sad

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...

- Partha ( CLD until Oct 2024 🙂 )
Message 5 of 12
(4,617 Views)

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...

- Partha ( CLD until Oct 2024 🙂 )
Message 6 of 12
(4,615 Views)
hi CC,
 
I saw that U re online, back from Ur vacation... ?! Smiley Wink
 
Then, pl jump into the pool to bail me out...  Smiley Sad
 
Everybody knows that U re a master in graphs & tables. Smiley Happy
 
Regards,
- Partha ( CLD until Oct 2024 🙂 )
Message 7 of 12
(4,607 Views)

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

Message 8 of 12
(4,604 Views)
Hi Jared,
 
I ve developed the things U gave the other day. So, I ve released the DWE_rev3 for Ur perusal. Smiley Wink
 
One big thing I want U help me out in getting fixed n solved is the Xscroll movement.
 
I tell the exact procedure for U to follow to test n see the problem for Urself.
 
I ve made the Mouse Move event coding also, to fill the desired values continually for a particular signal upto the point of desire by pressing & holding down the Ctl key, with the help of the ShiftKey function of the Shell32 Dll. The user has to click ( Lt or Rt ) on a particular CH, then by pressing & hol;ding down the Ctl key on that signal, he can fill that value upto the point of desire.
 
Now comes the problem, I'm telling. When U change the No of Samples (literally incerase >100), the Xscroll is made visible. Whenever U increase it to any further, say 200,300,500,etc., there is no problem at all in the No of Samples visibleon the DWE. It is from 0 to 100.
 
But, if U move the Xscroll to the Rt side, till the end, and then decrease the No of Samples, say from 500 to 300 or 200 and suddenly to <100, the Xscroll shows only less samples. If U go furtherclicking on the vacant area on the Xscroll instead of the scroll bar itself, U can produce a lot of diff things irrelevant between the No of Samples field & the points visible on the Xscroll.
 
I think I ve explained the problem clearly. I could not fix it up all thro' y'day, thats why I'm posting it again to U... Smiley Sad
 
I ve attached the VIs for rev3 & the one I'm currently working on (that has got the Xscroll problem fixed to some extent i.e., on the Max side but not on the Min side).
 
Again I reiterate that the problem arises only when U keep on clicking on the vacant area of the Xscroll to move it Rt-to-Lt, instead of clicking on the scroll bar...
 
Please try to simulate the problem on Ur side & kindly provide me with a nice solution.
 
In the VI, I dont understand the thing called "account for border" constant. Pl explain to me a bit more of it.
 
Also, can U pl tell me more of the properties of the Digital Table like Actual Plot & Plot Transition Area and kinda things ?
I looked into the help for these, but they re rather insufficient from a new user of the Digital Table, like me.
 
I can understand the properties of the normal StrTable like Edit Position, Index Values, Active Cell, etc.,
 
Looking for Ur solution...
- Partha ( CLD until Oct 2024 🙂 )
Download All
Message 9 of 12
(4,566 Views)

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

 

Message 10 of 12
(4,530 Views)