Jump to content

Match Pattern oddness


Ed Dickens

Recommended Posts

I can't figure out what's going here. It' seems to be some sort of memory allocation issue.

The first time I run the attached VI, the Time Stamp converts correctly to a LabVIEW Time Stamp. Subsequent runs without closing the VI result in the Match Pattern function not finding the colon and not converting the time corectly.

If you run it with Highlight Execution on, you'll see the Match Pattern function does not find the first colon and outputs a -1 on the Offset Past Match terminal which stops the loop, as it should after it finds the last colon.

If I close and reopen the VI, it runs correctly the first time, but again incorrectly after that.

We've managed to find two things that will make it run correctly without closing.

If you make either of the array index controls larger, as in able to display a larger number (stretch it to the left) it will again convert correctly once.

What seems to fix it for good is to either remove the "Request Deallocation" function or change it's flag to a False. So this seems to be the root cause of the problem.

We've verified this on two WinXP Pro SP2 PCs running the downloaded version of 8 activated as the Pro version. I saved it back to 7.1 and it works fine there.

I've reported this NI and I'm waiting for a reply.

Ed

Download File:post-47-1130874110.vi

Link to comment
  • 2 weeks later...
The Request Deallocation seems to deallocate the shift register. When you run the vi again, the shift register is not re-allocated properly. I don't think this has anything to do with the match pattern function.

It seems to be a problem with the combination of a shift register and the Match Pattern function. In this modified version using the Scan String for Tokens function, it seems to work OK.

Download File:post-47-1131995591.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.