06-03-2010 10:31 AM
06-03-2010 10:33 AM
Lynn is correct, that was a dumb mistake on my part.
Move the VISA close outside the For loop, but keep it inside the case structure.
That should do the trick
06-03-2010 10:33 AM
06-03-2010 10:37 AM
You HAVE NOT placed a delay between the stop commands. In fact, your delay does nothing except add a delay before the main loop stops.
Don't attach images. Attach your actual code. No one can debug images and you only posted a small section of your code.
06-03-2010 10:49 AM
Do not place your wait in that random case structure, that doesnt do what you think its doing.
Just place the wait in your while loop, completely outside of any other loop except the while loop.
And 10 seconds is a really long time between iterations, try bringing that number down.
06-03-2010 12:07 PM
06-03-2010 12:25 PM
06-03-2010 12:41 PM
You would put the wait inside the For loop that stops the pumps.
06-03-2010 01:05 PM
You can simplify your code by only calculating the address strings once. Then use autoindexing on the for loops. If you ever change the number of pumps, only one value in the program needs to be changed.
As a trouble shooting tool temporarily place indicators to display the strings sent to the equipment.
Lynn
06-04-2010 09:27 AM
Can you explain the autoindexing stuff a bit more? Also I am trying to enhance the program now, and just want to know the best way to go about it. I want to add in addition to the main killswitch that shuts everything down (which is actually taking about 2-3 seconds to complete when i press it) to making individual pump buttons at the start of the program. I've attached my first attempt at this, But i am certain there is a better way to do this. So right not I have it set up as two case structures. Unfortunately there is no pause command for the pumps just full stop. The buttons work fine, but the whole program is rather sluggish and the first pump at address 00 does not always chage the rate with the dial as it should. And any buttons that are pressed have a very noticeable lag between on and pump stopping or turning back on.The program itself works but is not as fast in response as it should be.
any thoughts?
And thanks for all the help with everything everyone!