For some reason my potentiostat program stops at random time intervals and then starts up again without popping up as an error. However, it switches the values while the experiment is running.
For example, for the first test shown in this document, at 51 minutes it stops and resumes at 51.5 minutes but instead of potential to current to current exponent to ph, it executes potential twice and seems to mess up the order completely.
We think it may be a buffer problem in case structure 1 within the flat sequence structure but are not sure how to fix this. We put probes after each read/error out and there aren't any errors but it just jumbles up our data, for instance VDATA would suddenly read the data of pHData and CDATA would read VData.
If anyone can help me out that would be great! thanks!
You might want to reconsider your program architecture a bit.
It sounds like one of your VISA read or write operations gets out of sync with the instrument. Something like trying to write and read the response to READAUX while the instrument is still sending the response to READI.
Are there instrument drivers available for your GPIB device? I think using a driver would simplify your code considerably.
First, in order to look at the .vi, you need to include every sub.vi that is called as well. Also, you could just post a screenshot for us to get an idea of what's happening. To cover our bases, what version of LabVIEW are you using, what operating system and 32 or 64 bit for each?
I have the NI-GPIB-USB-HS device and have the current driver installed. Do you suggest other ways i can make sure the operations are sent without bothering the other write - read?
I'm currently using LabVIEW 7.0 , and am operating on a 64 bit computer, here is the complete program.
A few suggestions to try out here:
So far as architecture, an event structure should always be inside a while loop and it's usually good practice to avoid multiple nested loops/structures. The floating global variables on the far left need to be forced into some sequence, right now there is no way to tell when they're initialized, this could be causing some of the start/stop and read issues.
A good way to troubleshoot is to put the code in each structure into sub VI's to force execution order and clean it up, and in this way you can have smaller test VI's to walk through step-by-step and isolate the problem. Please include a bit more information about your application in order to suggest more architecture fixes. Also, Potential.vi wasn't included in the .zip.
1. we initialize the voltages, and the time intervals
2. the cell (device) turns on then the voltage is set (case structure 0)
3. Then there is a sequence stack which checks if the voltage needs to be changed -- after it reads the voltage, current then the pH while graphing and storing each value into a text document.
4. After this is done, it turns off and the experiment is finished.
Great, thank you for that, definitely try some of the suggested strategies and let me know how some of those issues are affected.