04-03-2012 08:07 PM
Thanks. That problem has been solved.
I need to reproduce my test fixture to control it using USB-GPIB ( Prologix ) adapter and LabView . I have no experience with this.
So far, I've read many posts and have got some ideas. though . still have questions such as
1. How to do aliasing in VISA serial and VISA gpib in LV
2. How to parse resources found with FindRsrc ? and where is FindRsrcNext ? in LavView ?
Could you give any links to tutorials and examples?
04-03-2012 08:56 PM
04-04-2012 10:41 AM
Could you recommend any good tutorial ?
04-04-2012 11:46 AM
04-04-2012 06:31 PM
thanks
04-06-2012 05:48 PM
According to LabView help VisaOpen function can provide interaction with serial port by using ASRL::INSTR resource.
I can open visa session, get it' handler and OK . than viwrite sends commands and returns OK as well, but the read buffer of that port remains 0 ?
04-06-2012 05:53 PM
Well, since you are dealing with a serial port, there are numerous possibilities that there is nothing to read. If the Write is not correct, there will be no error generated but the instrument will not respond. You could have a mismatch in com settings, the wrong serial cable, the wrong command being sent, no termination character, incorrect termination character. Also, there is no need for calling the VISA Open function. All that you have to do is call the VISA Configure Serial Port - just like the examples do.
Please provide your code and the actual instrument you are trying to talk to. Before sending the code, make sure your string controls have data and then go to Edit>Make Current Values Default. Save the VI and attach it.
04-07-2012 09:49 AM
It is supposed to be fully automated system which doesn't depend on hardware realization.
So, the program has to use VisaOpen and ViFindRsrc to determine what branch of the program will work with that particular hardware. am I wrong?
1. Mismatch in com settings - (checked) I use default settings working fine in my original program.
2. Wrong serial cable - (no serial cable) it is Prologix USB-GPIB (I have no choice what hardware to use) though it works well with original program.
3. Wrong commands and termination characters - all of them are from my original program. I try different combinations for termination.
I see that all examples for Prologix use VisaSerial function but it is looks like people don't need to dig in Visa ASRL:: option, just.
I will provide the code on Mon. Thanks for your support .
04-07-2012 10:52 AM
04-09-2012 03:05 PM
It looks like LabView string is not an array of char ! so when VisaWrite function parameter is "ID?\r\n"
I can see it in NI Spy - VISA Write ("ASRL3::INSTR", "ID?\r\n" )
that would be OK for C language but it is wrong for LV . where the buffer doesn't have CR LF in this case.
It needs to use string concatenation to add termination characters.
How to use FindList (array of string) returned by VisaFindRsrc to open Visa ? visaSession type ?