cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

ChnPatternFind question

Hello,

 

I'm experimenting with ChnPatternfind  and using the example in the help file to apply a signal pattern from a channel of values and applying it to overall dataset and it works really well.

 

I have attached a picture showing the result.

 

When I apply the principles of this to my own data and own data and signal pattern the result is less accurate.  I basically get a lot of results that seems to be matching to very low level noise in the data rather than the overall pattern.  

 

The 3rd attachment shows my signal on the top and pattern i would like to look for.

 

I suspect the problem is with parameters but i'm not understanding how to set them.

 

Any help is really appreciated.

Regards

Nick

 

0 Kudos
Mensagem 1 de 9
3.758Exibições

Hello Nick,

Is your question about the Pattern find dialog box or the function ChnEventPatternFind?
If it is the latter; had you seen this: Command: ChnEventPatternFind - DIAdem 2017 Help?


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Mensagem 2 de 9
3.725Exibições

Hello ikaiser,

 

It is the ChnEventPatternFind,     I has since found this function in the analysis section of diadem and tinkered about with it to produce what I need, athough I have no idea what each of the parameters mean though.

 

eg Call ChnEventPatternFind("[1]/Time",oSignalChn, oPatternChn,0,1,0.62,"/Ign-Fault-1-Occurence")

the 0,1,0.62 parameters 

 

Thanks for your help

Nick

0 Kudos
Mensagem 3 de 9
3.715Exibições

Hello Nick,

had you seen the help page on the function? It's built-in into DIAdem, but also available online, e.g. here: Command: ChnEventPatternFind - DIAdem 2017 Help. I found this help entry helpful to understand the function.

 

In your case

  • "[1]/Time" is the x data (Note: In case your Signal Channel contains a waveform, this data is not needed),
  • oSignalChn is the y data of signal you are looking for,
  • oPatternChn is the pattern you are looking for
  • 0 is the maximum offset in x direction. Play around with different values here to understand how it changes the search result in your case! (Note: This is not a 0..1 range. You can use the full range of the channel x data.)
  • 1 defines if DIAdem is allowed to use a y-offset (0/1).
  • 0.62 is the maximum deviation, I assume in y direction. Not a range of 0..1, but 0..big number. Do some testing with your signal here as well so you get a feeling for the number you need.
  • "/Ign-Fault-1-Occurence" is the channel DIAdem copies result waveforms to, in case you specify a channel here. This for sure helps to understand where DIAdem found a hit.

Does this help you?


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Mensagem 4 de 9
3.705Exibições

Hi There,

 

Very helpful,  thank you.

 

Since posting this is have used the patternfind function in the analysis section,  this allows me to adjust each setting interactively to get what I am looking for  This somehow  creates a channel and adds it to the data portal,  but when I record it and run it from a script I don't get the channel.  Any suggestion how to return the found channels via a script?

 

regards

Nick

0 Kudos
Mensagem 5 de 9
3.699Exibições

Hi Nick,

 

The ChnEventPatternFind() function in DIAdem works just like all the other ChnEvent...() functions.  It returns a 2D array of information about the N Events determined.  You can then use other commands like ChnEventCount() and ChnEventCopyValues() to process those Events, either one at a time or all at once.

 

OPTION EXPLICIT
Dim RawGroup, FoundGroup, RawXChannel, RawYChannel, Events
Dim PatternYChannel, FoundXChannel, FoundYChannel
Set RawGroup = Data.Root.ChannelGroups(1)
Set RawXChannel = RawGroup.Channels("Time")
Set RawYChannel = RawGroup.Channels("Revs")
Set PatternYChannel = RawGroup.Channels("CopyYRevs")
IF Data.Root.ChannelGroups.Exists("Pattern Search") THEN
  Call Data.Root.ChannelGroups.Remove("Pattern Search")
END IF
Set FoundGroup = Data.Root.ChannelGroups.Add("Pattern Search")
Set FoundXChannel = FoundGroup.Channels.Add("Found X", DataTypeChnFloat64)
Set FoundYChannel = FoundGroup.Channels.Add("Found Y", DataTypeChnFloat64)
Events = ChnEventPatternFind(RawXChannel, RawYChannel, PatternYChannel,0,0,2)
Call ChnEventCopyValues(RawXChannel, RawYChannel, FoundXChannel, FoundYChannel, Events, 1)
MsgBox "Exported Event 1 of " & ChnEventCount(Events) 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Mensagem 6 de 9
3.692Exibições

Thanks Brad,

 

That works really well. 

 

Also when I used the patternfind from the analysis bar it also creates a channel for occurrence and the value can be set (in my case I set it to 1) ,  this is quite useful as it puts a frame around the occurrence as well as identifying the pattern,  is there a parameter I need to set to use this from a script?

 

Thanks

Nick

0 Kudos
Mensagem 7 de 9
3.685Exibições

Hi Nick,

 

Again, the answer is the same for all ChnEvent...() functions, of which the pattern search is one.  You need to invoke a command to export a True/False status channel from the Events array-- in this case use the "ChnEventCreateStatusChn()" command:

 

Dim RawGroup, FoundGroup, RawXChannel, RawYChannel, Events
Dim PatternYChannel, FoundXChannel, FoundYChannel, EvtChannel
Set RawGroup = Data.Root.ChannelGroups(1)
Set RawXChannel = RawGroup.Channels("Time")
Set RawYChannel = RawGroup.Channels("Revs")
Set PatternYChannel = RawGroup.Channels("CopyYRevs")
Set EvtChannel = RawGroup.Channels.Add("Event Status", DataTypeChnFloat64)
IF Data.Root.ChannelGroups.Exists("Pattern Search") THEN
  Call Data.Root.ChannelGroups.Remove("Pattern Search")
END IF
Set FoundGroup = Data.Root.ChannelGroups.Add("Pattern Search")
Set FoundXChannel = FoundGroup.Channels.Add("Found X", DataTypeChnFloat64)
Set FoundYChannel = FoundGroup.Channels.Add("Found Y", DataTypeChnFloat64)
Events = ChnEventPatternFind(RawXChannel, RawYChannel, PatternYChannel,0,0,2)
Call ChnEventCreateStatusChn(EvtChannel, Events, RawYChannel, 0, 1)
'Call ChnEventCreateFilteredChn(RawYChannel, Events, ChnEventFalseChn, ChnEventTrueChn)
'Call ChnEventCopyValues(RawXChannel, RawYChannel, FoundXChannel, FoundYChannel, Events, 1)
MsgBox "Exported Event 1 of " & ChnEventCount(Events) 

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Mensagem 8 de 9
3.676Exibições

Hi Brad,

 

As expected , it worked really well.  

 

Thank you

Nick

0 Kudos
Mensagem 9 de 9
3.674Exibições