moephunk Posted October 25, 2006 Report Share Posted October 25, 2006 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! Quote Link to comment
Michael Aivaliotis Posted October 25, 2006 Report Share Posted October 25, 2006 Your problem is described in detail but honestly there could be a million things wrong. I would look at the notifier. Perhaps you're missing notifications? Try using a queue instead. Quote Link to comment
PJM_labview Posted October 25, 2006 Report Share Posted October 25, 2006 I think we need to see a screenshot of your code. Eventhough you provide a detailed explanation it is hard to say what is happening. PJM Quote Link to comment
Mellroth Posted October 25, 2006 Report Share Posted October 25, 2006 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 Quote Link to comment
moephunk Posted October 25, 2006 Author Report Share Posted October 25, 2006 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! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.