LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB to RS-232 Transition

Hii Friends,

 

I have started off with Labview a month back. I guess it is silly to ask this, but since am new i need your opinions

 

I have  made a code for data acquisition from a Tek scope connected to my PC using a GPIB interface. The acquisition was done using GPIB read n write functions. 

 

My senior now tell me to use the RS-232 interface to connect the Scope and PC. Can the same program be used at this juncture or the program needs to be modified. 

 

I am attaching my VI which i have made. 

 

Thanking you.

0 Kudos
Message 1 of 20
(3,280 Views)

Sure.  You'll replace the GPIB functions with VISA Read and Write functions.

 

While you are at it, there is plenty of room to clean up odd operations in that VI.  Why would you build an element onto the front of an array to proceed to just flip the array?  Why not add it to the end of the array using Build Array?  And then proceed to take the i th element out of that array, which should be the element that just got put in.  I would make sense to use use the scalar value.

0 Kudos
Message 2 of 20
(3,270 Views)

Thanks RavensFan for the reply and suggestions.

 

In my code, the GPIB continuously acquires a spike waveform whose amplitude varies continuously. 

 

Can the VISA REad and Write be used to acquire this type of waveform and variation?

 

Pa1

0 Kudos
Message 3 of 20
(3,249 Views)

Hi Pa,

 

GPIB functions are used to communicate with an external device connected by a GPIB bus. VISA functions are used to communicate with external devices one abstraction level higher, so you can connected by using different busses like RS232, LAN or GPIB…

Yes, VISA can be used to communicate with your device!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 20
(3,237 Views)

Why are you using those low level GPIB VIs anyway? 

 

What Tektronix scope are you using and why are you not using the LabVIEW drivers written for it? Tektronix usually has very nice LabVIEW drivers that are fully featured and since they use VISA are "interface independent". No need to resort to low level GPIB calls and SCPI strings.

 

A properly written program using VISA can change from RS-232, to GPIB, to Ethernet interface with the end user doing nothing more than selecting the appropriate interface.

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 20
(3,217 Views)

Thanks RTSLVU..

 

I use TDS 620B Scope. The program whichi made is actually the modified version of what my senior has made. I guess i need to re-write the code using VISA.

 

I'l make the code and get back to this forum... Thanks for the advice friend.

 

Pa1

0 Kudos
Message 6 of 20
(3,198 Views)

Thanks GerdW for the reply.

 

I'l make a fresh code with VISA and get back to this forum.  

 

Your suggestions are pushing me forward. Thanks  a trillion

0 Kudos
Message 7 of 20
(3,197 Views)

This should help get you started...

 

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9241659CE034080020E748...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 20
(3,182 Views)

Hii Friends,

 

I tried writing a basic VISA VI. However, am always encountering an error at the Read Function. 

 

I gave a time time but still the result is same. Can anyone help me through this. I get the error 'Error -1073807339 occurred at VISA Read in trial.vi'.

 

Pa1

0 Kudos
Message 9 of 20
(3,156 Views)

Hi Pa1,

 

the errors says: your device isn't sending an answer before the timeout…

 

- Is the connection ok? (Did you check the wires? Twice?)

- Do you send the correct commands?

- Do you use the correct TermChars? (They might be different for GPIB and RS232!)

- How does your "trial VI" look like?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 20
(3,152 Views)