LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Match regular expression error -4600

Solved!
Go to solution

Hi, I'm developping a .vi to parse error codes from a result log file with the Match Regular Expression function.

The input is a string which contains the log file text and the output is an array of clusters and each element of the cluster is a submatch returned by Match Regular Expression.

Basically, I pass the string into a while loop, check for a match and repeat the operation until there are no more matches

 

When I run my vi the first time it works perfectly but if I run it another time the match regular expression throws error -4600 and for some reason the offset past match is -1 which means there is not a single match, which is strange because there was at least one match the first time.

 

Capture d’écran 2024-10-16 013916.png 

I added another Match regular expression block at the beginning to check if there is at least one match and as you can see in the image there is one. But the second Match regular expression block tells there is no match with the exact same input string and regular expression. What is happening?

 

Please try out the attached vi, the text I used is already inside.

 

I use Labview 2020.

0 Kudos
Message 1 of 4
(77 Views)
Solution
Accepted by caenem

The error comes from a negative value for the "offset" input. The feedback node remembers the last value across runs.

 

Either keep the offset in a shift register

 

shift registershift register

 

or initialize the feedback node when the loop starts. Right-click the node and select "Move Initializer One Loop Out" to get the terminal.

 

feedback nodefeedback node

Message 2 of 4
(65 Views)

It worked, thanks a lot for your help.

 

I didn't know the feedback node remembers the last value from the previous run.

0 Kudos
Message 3 of 4
(55 Views)

Hi caenem,

 


@caenem wrote:

I didn't know the feedback node remembers the last value from the previous run.


That's the (main) purpose of shift registers and feedback nodes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(51 Views)