DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic change in all pages of the report

Yes, it seems that the XY-Relations are not correctly set. I will get in contact with R&D.

0 Kudos
Message 31 of 35
(628 Views)

where can that be? by me while writing the code or by a normal file before evaluation?
here is the code for low pass filter :

Set ChnResult = ChnFiltCalc("[1]/Zeit 1 - Standardmessrate", "[1]/a-5-3 X", "/Filter-a-5-3 X", "IIR", "Bessel", "Low pass", 2, 25, 0, 0, 1.2, 25, "Hamming", False, False)


And still looking for the code for the event, as I said, I used it 15 times for 15 channels:

 

Call Data.Root.ChannelGroups.Add("Ereignisse -Filter-a-5-3 X ", 3).Activate()

ChnEventList1 = ChnEventDetectionWindow("Zeit 1 - Standardmessrate", "Filter-a-5-3 X", 0.5, 100, 0, 0)
ChnEventList1 = ChnEventFilter(ChnEventList1, "Peaks", 0.08, "Value")
ChnEventList2 = ChnEventDetectionWindow("Zeit 1 - Standardmessrate", "Filter-a-5-3 X", -0.8, -100, 0, 0)
ChnEventList2 = ChnEventFilter(ChnEventList2, "Peaks", 0.08, "Value")
ChnEventResultList = ChnEventOperationOR(ChnEventList1, ChnEventList2)

ChnEventList1 = ChnEventResultList
Call ChnEventCreateXYChannels("Zeit 1 - Standardmessrate", "Filter-a-5-3 X", ChnEventList1)

 

You mean I have to tune in a code for the xy axis for the events?

0 Kudos
Message 32 of 35
(624 Views)

Unfortunately, it didn't quite work, as mentioned, it's about the length of each event that appears.
I limited it in the report for 12 events for each channel.
if i write code in the script for each events then it shows an error if the events don't appear.
In the picture, for example, for the channel (Filter-a-5-3 Y) there are only 6 events after the evaluation, so there is an error on line 83 because 7 events are not defined.
It seems difficult to solve the problem like this. Hopefully there is a possibility to define the problem without code for xy axis in events! maybe change something in this code directly to define the yx axis for each event.

Wasim90_0-1657032080750.png

 

0 Kudos
Message 33 of 35
(619 Views)

Yes, of course have different measurement results different numbers of event matches. Here is the way I would solve that:

 

dim oResGroup, oResGroupChns, iNoOfMatches, iLoop

set oResGroup     = Data.Root.ChannelGroups.Add("Ereignisse -Filter-a-5-3 Y")
set oResGroupChns = oResGroup.Channels
call oResGroup.Activate

ChnEventList1 = ChnEventDetectionWindow("Zeit 1 - Standardmessrate", "Filter-a-5-3 Y", 0.3, 100, 0, 0)
ChnEventList1 = ChnEventFilter(ChnEventList1, "Peaks", 0.008, "Value")
ChnEventList2 = ChnEventDetectionWindow("Zeit 1 - Standardmessrate", "Filter-a-5-3 Y", -0.3, -100, 0, 0)
ChnEventList2 = ChnEventFilter(ChnEventList2, "Peaks", 0.008, "Value")
ChnEventResultList = ChnEventOperationOR(ChnEventList1, ChnEventList2)

iNoOfMatches = ChnEventCount(ChnEventResultList)
msgbox iNoOfMatches
Call ChnEventCreateXYChannels("Zeit 1 - Standardmessrate", "Filter-a-5-3 Y", ChnEventResultList)

for iLoop = 1 to (iNoOfMatches * 2) step 2
  oResGroupChns(iLoop).XRelation     = Nothing
  oResGroupChns(iLoop + 1).XRelation = oResGroupChns(iLoop)
next
0 Kudos
Message 34 of 35
(612 Views)

Hi Walter,
Thank you very much
I don't understand the code here very well.

 

for iLoop = 1 to (iNoOfMatches * 2) step 2
  oResGroupChns(iLoop).XRelation     = Nothing
  oResGroupChns(iLoop + 1).XRelation = oResGroupChns(iLoop)
next


Can you please explain it according to the example?

Best regards

0 Kudos
Message 35 of 35
(601 Views)