DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Formula for finding channel value

Solved!
Go to solution

Hi Patel,

 

This is really a continuation of your other post today.  I sent you back already an edited version of the *.TDV file which plots the limits in VIEW vs. time values instead of vs. array index.  I mentioned in that answer that it looks like the time values from the *.dat file don't work well with the limit channels, but it's also the case that the data values from the *.dat file looked nothing like your desired screenshot.  My conclusion was that you had sent us fake acceleration data.  If things don't clear up on the X-axis with the new *.TDV file I sent, then I need you to tell me what the correct timebase is for the limit data.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 11 of 23
(1,306 Views)

Hi Brad,

 

You are absolutely correct. This is the continuation of my other post. But your .tdv is not working for me.

 

What I want to do exactly is,

Previously We used excel limits as standard and did excel import and made them standard curves. Then I was using my *.Dat files to check whether it fits inside standard curve.

 

This still exists correct for my dat files. But, We are using other TDAS machine to store the sensor values. This Stores the DAT files in other format. (Not the usual R32 and its corresponding DAT file) .

 

I am sending those dat files in attachment. I need to check whether these new DAT files fit inside the curve or not.

 

And I dint not get what really mean, "correct timebase is for the limit data".

 

I am using the same test.vbs, TUV.tdr, TUV.tdv, excel file with the *.stp file and DAT file ,. All in same folder. If you want me to post the same I will post them.

 

Please help me out in getting this.

 

 

0 Kudos
Message 12 of 23
(1,297 Views)

Hi Patel,

 

My *.TDV file doesn't work for me either.  Specifically, the limit channels have 1589 data points in them, whereas the data files you sent each have 18000 data points in them.  This results in the limit profiles appearing at the far left (10%) of the graph and the acceleration data proceeding way past the limit profiles to the right.  I conclude that this means that the limit data was "sampled" at a lower acquisition rate (timebase) and that there is a different time channel not currently loaded that it should be plotted against on the X axis so that the limit profile extends over 100% of the graph from left to right.

 

Another issue is that the shape of the acceleration data is wrong for this limit profile comparison.  The limit profiles rise up sharply at the beginning (10%), maintain roughly constant values in the middle, then dip back down sharply at the end (90%).  The acceleration data is low at the beginning and end alright, but it peaks strongly at about the 20% mark on the X axis and then drops back down at about the 25% mark.  No amount of X or Y scaling will ever make these acceleration curves "fit" between the limit profiles because the data simply have the wrong shape.

 

So I'm asking you if you sent me fake acceleration data, and I'm asking you what new time channel the limit profiles should be plotted against on the X axis.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 13 of 23
(1,288 Views)

Thank you Brad, Sorry for asking a stupid question to fit 18000 data points in 1589 data points. I understand the actual error now..

 

Will get the other sample data to solve this error. Thaks again:)

0 Kudos
Message 14 of 23
(1,270 Views)

Hi Brad,

 

For the same accleration data , I filtered it using CFC 60 and making this filtered acc data to fit inside the limit profile.

 

I could do it manually. Attached is the report obtained after processing it manually.(for filtered acc signal.jpeg is the file name)

 

The same I am doing it through script. But getting an error, which is also attached(script error is the file name).

 

When I on the bookmark and trace i can see that my view,loadlayout is not loading, (i created channel1 and channel2 with channel number 5 and 6) then it goes to next line and gives me error "This operation doesnot work with write protected channels"

 

Channel1  =Time Axis

Channel 2 =Event input

channel 3=Acc

Channel 4 = Filtered signal

Channel 5 = Channel1 with length 18000

Channel 6 = Channel 2 with length 18000

 

I think this is clear. Any other information is required please let me know. How Can i make my script run with these data..

0 Kudos
Message 15 of 23
(1,259 Views)

Hi Patel,

 

Now we're back to your original question, which still has the same answer as several posts back.  The attempt to load the 2 limit channels from the Excel file fails, because the VBScript is looking for them in the same folder as the *.DAT file, yet the Excel file appears to always be in the same folder as the VBScript.  This is easy to fix:

 

Call ExcelImport(AutoActPath & ExcelFileName, ExcelSheetIdx, 0, AutoActPath & StpFileName)

The error you were getting was simply because channels 5 and 6 didn't exist in the Data Portal, because the attempt to load them from the Excel file failed.  It will also fail, by the way, if you have that Excel file open when the VBScript tries to read it (Excel is a very jealous application).

 

I've also made a few modifications to the *.TDV file and the *.TDR file so that they find "Channel 1" and "Channel 2" instead of "Channel1" and "Channel2", which is not how they get imported to the Data Portal.

 

I finally added a few lines to your Test.VBS to auto-zoom into just the corridor fit region-- I hope you approve. 

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 16 of 23
(1,253 Views)

Wow!! This is Great. Thanku Brad.

 

You are correct, I kept my excel sheet open all the time. Now When i close it I am not getting that error.

Instead of auto zoom I have modified the script to convert the time into mili sec.

I have mentioned all the steps at the end of my script. I have done coding to match my inputs inside the script.

 

Please help me in getting these inputs mentioned in the script for the same standard excel values.

 

Thanku,

Rash

0 Kudos
Message 17 of 23
(1,245 Views)

Hi Rash.Patel,

 

I made what I think are your requested changes to the application files.  Now the data before the Deceleration exceeds 1 is removed and the the data after the Deceleration exits the corridor is removed.  I left your rescaling of the Time axis so that Time=0 is the first data point inside the corridor, but I also removed the extra rows in the Time channel at the end.  I left the Acc channel alone.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 18 of 23
(1,242 Views)

Hi Brad,

 

I modified the code a bit. I changed time axis to display in ms and made the chnLegth of (1) = chnLength (5). And Its working as i required it to.

 

I have some questions / doubt regd .tuv and .tdr.

 

How to save *.tdv files? bcoz sday when i was working with VIEW layout to load tuvw.tdv to load channel 1 and 2 it dint work for me. But its working in your script which u sent me. Now when I am trying to rename it to Upper and Lower limit, again not getting. Normally, I go to VIEW, change the channel names and press Ctrl+S. But when i run the script my old .tdv is loading. How can i modify my .tdv?

 

When i change my report to grid system,my Y axis is going to -5 points down, but not retaining in origin. why is it so?

 

BR,

Rash

0 Kudos
Message 19 of 23
(1,238 Views)

Sorry , there are so many files created in my folder with name Test, by mistake I have sent the old file.

 

Please find the modified one in notepad attachment.

0 Kudos
Message 20 of 23
(1,236 Views)