09-16-2008 01:39 PM
thank you Dennis, I think i got the program to change the old serial function to the new visa function.
the new one is so much better and easier to use.
THANK YOU AGAIN FOR YOUR HELP!!!
09-18-2008 05:55 PM
okay, i am back and facing a new problem.
i switched over from old serial driver to serial driver using VISA.
on one system my computer is faster in processor, the other is slower.
the old serial functions works fine on the slow processor, but when i replaced with the VISA version. it is causing error.
but when i put a delay time on the visa driver. i guess it allow time for the serial to be read and the error is gone.
but i am setting the pressure on my chamber. the delay is causing the setting pressure to be diffcult. becuase by the time the pressure hit a certain pressure, it would stop. because of the delay, it reads the pressure too late and my chamber ca't set properly.
question 1?
is the old serial driver faster than the new VISA?
question 2?
replacing new processors/computer is not a good solution to this right?
09-18-2008 08:24 PM
I think the old driver is actually slower and that is why placing a delay works for VISA. Using the old driver, the read took just a bit longer and the instrument had time to respond.
There could be other things going on that I can't solve or diagnose because I don't have your setup.What kind of delay have you been using? A way to get away from fixed delays is to put a VISA Bytes at Serial Port inside a loop. Exit the loop when the number of bytes is greater than 0. A following loop has another VISA Bytes at Serial Port and the number of bytes available is wired to the VISA Read. This loop will be set to exit when the number of bytes is equal to 0. Doing this, you will start the read as soon as bytes are available and don't have to guess at the delay values.
09-26-2008 01:45 PM
hi there.
i have been trying 2 weeks now trying to solve this issue is none is working.
i even used both called out for serial drivers OLD serial and VISA serial port for different system and i don't think thats a good solution.
do you think you can take a look at my code and show through me a diagram of what you mean by
" A way to get away from fixed delays is to put a VISA Bytes at Serial Port inside a loop. Exit the loop when the number of bytes is greater than 0. A following loop has another VISA Bytes at Serial Port and the number of bytes available is wired to the VISA Read. This loop will be set to exit when the number of bytes is equal to 0. Doing this, you will start the read as soon as bytes are available and don't have to guess at the delay values."
09-26-2008 03:46 PM - edited 09-26-2008 03:47 PM
I have no way to save the VI for 7.0 but I've attached an 8.0 version and an image of what I had in mind.
09-26-2008 04:17 PM
09-26-2008 04:29 PM
okay. it seems to be stuck here.
09-26-2008 05:19 PM
if i use the software that would run old serial driver for one system and visa serial for another. it seems to work okay and i don't mind using that if it must be the case. but i also run into another case where. if i am reading 730 mmgh and on my indicator. sometimes its reads 26 mmHg really quick and then back to 730. i think its a sampling issue. do you have a suggestion for that fix?
09-26-2008 10:02 PM
Take a close look at the False case in Dennis' code and compare it to the False case in your code. See any difference?
When bytes at port =0 is False, he reads the bytes from the port. You do nothing in the False case and the loop runs forever because you will always have those 98 bytes at the port.
09-26-2008 10:10 PM
oh, what a silly mistakes. i guess i have to come back on monday and try that again. but i thought i also tried making my case false/true and it would still not work. but yeah..i'll try it again when i come back.
you guys are great!