LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Start Guide. GPIB in LabView . HW drivers. Application deployment

Solved!
Go to solution

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?

0 Kudos
Message 11 of 21
(1,041 Views)
Aliases will show up in the pull down menu of the VISA Resource Name Control. You merely select the one you want. I already told you that the VISA Find Resources returns a string array. You need to take a LabVIEW basic tutorial if you do not understand. A string can be used as a resource name.

If you are stuck with the prologix, all you will be using is serial communication and you can not use already written drivers. Personally, I think it's for hobbyists.
0 Kudos
Message 12 of 21
(1,038 Views)

Could you recommend any good tutorial ?

0 Kudos
Message 13 of 21
(1,021 Views)
0 Kudos
Message 14 of 21
(1,018 Views)

thanks

0 Kudos
Message 15 of 21
(1,001 Views)

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 ?

 

0 Kudos
Message 16 of 21
(987 Views)

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.

0 Kudos
Message 17 of 21
(985 Views)

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 .

0 Kudos
Message 18 of 21
(972 Views)
Keep in mind that unlike using a real GPIB controller, you will only get the com port listed when doing the find resource function.
0 Kudos
Message 19 of 21
(967 Views)

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 ?

0 Kudos
Message 20 of 21
(948 Views)