06-03-2012 12:59 AM
Hello,
with single VISA config,how many times v can use VISA write in a VI..?? Is there any limitation..?? will the baud rate reduce if i go on adding VISA write serially..??
Thank you
06-03-2012 02:34 AM
Hi,
> how many times v can use VISA write in a VI..??
There is no practical limit (other than eventually you'll run out of memory)
> will the baud rate reduce if i go on adding VISA write serially..??
No
However, your question raises some flags.
Programs are usually easier to design, debug, and maintain if instrument communication is done in one central location rather than scattered around in the code.
Suggestion: Put your instrument communication in a consumer loop or Action Engine.
steve
06-03-2012 09:55 AM
To reiterate what Steve has already stated. You setup the port once and the settings will not change until you change them or close the port. I have had the most success with serial ports using an Action Engine for writing and a second loop for just reading from the serial port. The second loop for reading is only because I mostly dealt with equipment that will "randomly" send me data and I needed to parse it into very specific replies and status.
06-03-2012 08:27 PM
@crossrulz wrote:
To reiterate what Steve has already stated. You setup the port once and the settings will not change until you change them or close the port. I have had the most success with serial ports using an Action Engine for writing and a second loop for just reading from the serial port. The second loop for reading is only because I mostly dealt with equipment that will "randomly" send me data and I needed to parse it into very specific replies and status.
I will have to try this method, I haven't really done this before because most of my apps are command response so it's not necessary. But I do have one that streams (although I can't remember in that one if we ever write). On a side note, my general philosophy is "where there is a reference, there is an action engine". Has worked well so far. Every now and then I won't hold to it, but in general I feel it makes it easier to debug.
06-03-2012 09:44 PM
for(imstuck) wrote:On a side note, my general philosophy is "where there is a reference, there is an action engine".
I tend to follow that philosophy myself. File I/O, VISA references, Queues, Notifiers, heck even Events. I'll have to remember that saying though. If you want to see an example of how I implemented some of my serial interfaces, PM me. We should take it offline as it might not be proper for me to post it here and there might be some explaining for my specific requirements.