Jump to content

Something very strange....


moephunk

Recommended Posts

Hey everybody,

I've developed a data acquisition application that acquires data through a rs-232 port. The way it works is as follows:

I have one while loop that is only responsible for raw acquisition. It acquired raw data strings (such as: On, pressure, 23.3, 34, 3.4...) Each of these raw strings pass through a comma check to ensure they are in the correct format. If the string passes the check, it is passed out of this while loop through a notifier. I have a count that keeps track of every time a strings passes the check, and it adds one to the count each time this happens. Therefore, if a string doesn't pass, the count won't add one, or if the controller stops outputting data, the count will not increase.

In another while loop, I have a VI that is responsible for parsing each data string. It essentially takes each raw data string and parses it into individual values which are inserted into individual arrays. The index at which each of these values is inserted is obtained from the count in the raw acquisition loop. Here something very strange happens. At random points when the program is running, the parse data VI will stop inserting each of these values into the array, but the count still continues increasing and each individual data element is still being parsed out. I use the probe and can still see each value being parsed out and the count being incremented. But at random points the values will simply not be added to the arrays. The arrays will reach some random size and after that not accept any other values! I have about 15 different arrays that are part of a cluster that goes into a shift register for my parse loop. It's very weird that the count still increments, the values are still being parsed out, but the arrays stop growing at random points (one time it will be at 170, antoher time at 400, another time at 520.....completely random)

Any thoughts on why this would be happening??

Thanks!

Link to comment
I have one while loop that is only responsible for raw acquisition. It acquired raw data strings (such as: On, pressure, 23.3, 34, 3.4...) Each of these raw strings pass through a comma check to ensure they are in the correct format. If the string passes the check, it is passed out of this while loop through a notifier. I have a count that keeps track of every time a strings passes the check, and it adds one to the count each time this happens. Therefore, if a string doesn't pass, the count won't add one, or if the controller stops outputting data, the count will not increase.

If I understand your problem correctly, the loop that receives data from RS232 continues to count, but the reeceiver of the notification stops adding data to the arrays? Could be a problem related to your notifier, have alook at the thread

http://forums.lavag.org/index.php?showtopic=4220

Jimi found out that notifiers can stop working (and eventually cause a hang).

I don't know whether this applies to your program but it is worth checking out.

You should also consider to replace your notifier with a queue, since notifiers are by nature lossy while queues are not.

/J

Link to comment

Hey everybody thanks for the responses. I'm getting some screenshots of my code right now. I just wanted to say that I doubt it's the notifier because I use the probe and still see each new notification come in, and each of these notifications still gets parsed out perfectly normally.

I'll get the code up in a few mins, thanks again!

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.