01-22-2015 08:39 AM
Hello everyone,
Me and my colleagues have an issue in generating Diadem .tdr reports.
Our script does this sequence of operations:
1)File load
2)Channel operations
3)File save (TDM)
4)Report save (TDR)
The problem is: after the computations, if I load the TDM and then the TDR, very often the curves are in wrong order.
For example: in the report number one I should have, for channel 10SILL****00AC**, in the first YAxis the acceleration, in the second the velocity, in the third the displacement.
Sometimes I find in the first YAxis the displacement, in the second the acceleration, and maybe in the third I find velocity from another channel.
I have tried to use both PicDefByIdent=0 and PicDefByIdent=1 to switch from number-oriented to name-oriented mode, but it doesn't work the same.
Is there a way to force diadem to load always the same channel in the same curve?
Thanks in advance to NI team.
Solved! Go to Solution.
01-22-2015 09:49 AM
Hi Grg86,
if you want to use name oriented channel references in an existing report you have to change the reference string in the layout.
Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item(1).Shape.XChannel.Reference = "[1]/Zeit"
You should find a string "[1]/[1]" and replace it with this sting "[1]/Zeit".
Kind Regards,
Philipp
AE | NI-Germany
01-24-2015 07:15 AM
Just a short note.
I like to set the DIAdem Setting to use the full name option for Channel references. That way when reports/views are done the full name will be in the windows. (using group numbers and channel numbers causes issues when they change over time.)
The attached word doc shows how to set the DIAdem setting in 2014.
Paul
01-26-2015 02:07 AM
Hi paul,
the recommended way to change this settings is the way you've metioned in your last post.
This setting controls all channel references set in future.
To change former references you need to change them manualy or with help of the script (see my first post).
Regards,
Philipp
AE | NI-Germany
01-26-2015 04:03 AM
Yes, it is also my visualization mode
01-26-2015 04:11 AM - edited 01-26-2015 04:14 AM
Many thanks Philip,
now I can switch between the two modes without errors.
My approach is different however:
Call GraphObjOpen("2DAxis1")
Call GraphObjNew("2D-Curve","Curve"+str(CurveCount)) 'Creates a new curve
Call GraphObjOpen("Curve"+str(CurveCount)) 'Opens curve object
D2CAxisPairNo = 1
D2CCHNY =CNo(Test_Number_01_vect(cnt)+"_1"+str(Dummy_Pos_)+"HEAD0000"+ISO_Dummy_Type_+"ACXA") 'Defines y-channel
D2CURVECOLOR ="red"
D2CurveLineType = CurveType(cnt)
Call GraphObjClose("Curve"+str(CurveCount))
Call GraphObjClose("2DAxis1")
I've decided to use only the channel number, in number-oriented mode.
And before saving the .tdm i call a chnrenumber(), so that when I reload it in a second moment, the number and the order of the channels remains the same and I can open the .TDR, having always the correct curves represented.
My problem infact was that when I reloaded the TDM and the TDR, in name oriented mode, Diadem put wrong curves in the graphs. Now, with number oriented mode, writing only channel number in the graphs and saving after channel renumbering, every time I reload TDM and TDR I find the correct curves.