DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

"Find" "ChnFind"-method cant use "<" in this example

English:
Hi all,
I'm new here but cant find a topic that looks my problem.
 
Im scripting in VBS at the moment.
My script searches for outliners and copy them to an new .txt document.
Basicly it work great with ">". But when I use "<" to compare the measurement-data with the limit
find returns "0" as answer. That means "nothing found".
Here a sample about my problem:
 Do 'While (ChannelNr < finalcount)

    ChannelNr =  ChannelNr+1
    laengemax =  ChnLength(Ch("[" & ChannelNr & "]/I_" & pruefling &"\15"))      
    var       =  msgboxdisp ("ChannelNr =" & ChannelNr & vbCrlf & "ChnLength: =" & laengemax,"MB_OK", "MsgTypeInformation",0,2)
    intMyResult1   =  1

    '
Hilfe für Schleifen-EXIT
    uebergabecount
=  1
    uebergabefind  
=  1
    uebergabefind  
=  chnFind("Ch(""[" & ChannelNr & "]/I_" & pruefling & "\15"") < " & iunten   , 1)
                     
   
Do while uebergabefind <> 0

        morefail1      
=  intMyResult1+1
        intMyResult1    
=  chnFind("Ch(""[" & ChannelNr & "]/I_" & pruefling & "\15"") < " & iunten , morefail1 )
       
if morefail1    =  0 then AutoQuit
       
if morefail1    =  laengemax then AutoQuit

        pastefail1      
=  CHV(intmyresult1,"[" & ChannelNr & "]/I_" & pruefling & "\15")
        timefail1      
=  CHV(intmyresult1,"[" & ChannelNr & "]/Time")
        intMyHandle1    
=  TextFileOpen((MyFolders(0) & "Fehlerprotokoll.txt"), eTextFileAttributeWrite )
        intMyText1      
=  TextfileWriteLn(intMyHandle1,  "Zeitstempel:  " & timefail1 & "  Fehler für I < Grenzwert.   I=" & pastefail1 & "  !" )
                           
TextFileClose(intMyHandle1)
                 
       
'Hilfe für Schleifen-EXIT
        uebergabecount  =  uebergabefind+1
        uebergabefind   =  Find("Ch(""[" & ChannelNr & "]/I_" & pruefling & "\15"") < " & iunten , uebergabecount )
                     
    loop '
Grenzwert1

loop
Until  (ChannelNr  =  finalcount)'Channel
 

 
 
If anyone has an Idea, please inform me (=
 
Thanks a lot.
sincerely Michael
 
0 Kudos
Message 1 of 3
(4,063 Views)

Hi MichGer,

 

could you please supply some more information on your environment?

 

- Which version and edition do you use?

- Which operating system?

 

It would be very helpful, if you posted an example that is executable in order to reproduce the behaviour.

 

Thanks in advance.

 

Martin

 

0 Kudos
Message 2 of 3
(4,022 Views)

Hi again,

 

Yea I use VER 14.0.0

 

And my Operatingsystem is WIN 7

 

 

0 Kudos
Message 3 of 3
(3,920 Views)