Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

can i use visa.vi for rs232 to db25 port?

Solved!
Go to solution

can i use visa.vi for rs232 to db25 port? because where using rs232 to parallel port (db25).

and also any vi to read data from serial.

im new in labview i just learn it on tutorial from youtube,,

if not can anyone give me an idea how to make it or can give me a example vi.

 

tnx..

0 Kudos
Message 1 of 14
(4,537 Views)

Is this related to this or this?

 

You're mixing protocols and hardware. RS-232 is a protocol - a means of communication. The DB-25 port is a connector. It's neither serial nor parallel. It's what's connected to it that's important. You can have a DB-25 connector that's used for serial communication or you can have a DB-25 port that's used for parallel communication (like a printer).

 

I would suggest you start here: Instrument Control in LabVIEW Tutorial in order to get an overview of instrument control.

 

To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

 

LabVIEW also ships with examples for serial communication, which you can find via the Example Finder (Help -> Find Examples).

 

Once you've gotten a better overview, you can post back with a follow-up question.

Message 2 of 14
(4,529 Views)

i have dis vi attached but im not sure if this is right nad it can read rs232 to db25 port..

is there is a software or application that may simulate this vi? 🙂

0 Kudos
Message 3 of 14
(4,497 Views)

Are you just trying to loopback the serial port on your pc? Connecting the return count to the byte count does not make much sense. If you are doing a loopback, then it's not a very good simulation of communicating to an actual instrument.

 

If by 'simulation'. you mean other serial communication programs, there a large number of terminal emulation programs out there. Hyperterminal used to come with windows. Others are MAX that gets installed with NI-VISA, Procomm, TeraTerm, etc.

Message 4 of 14
(4,494 Views)

Actually were trying to read frequency data from the instrument so i used loops to read and write data continuously..

am i ryt?..

 

i attach new vi. can u help me wid this if it can rs232 to db25..

 

is hex value coming out from the visa resource?

 

 

0 Kudos
Message 5 of 14
(4,474 Views)
Solution
Accepted by topic author koko13

Your front panel might be ... catchy (and frankly annoying), but your VI doesn't make much sense. If you want your code to "start" when the user presses a front panel "Start" button then you need to sit and wait until the user presses start, not rely on the user to press Start before running your VI.

 

Also, you have:

  • Wired the value "Port" to the "Enable Termination Char" input of the VISA configure. Why? You should know whether it needs to be enabled based on what you're trying to talk to. Does the device end its messages with a specific character? If so, wire a True to this input, and wire a value to the termination char input to correspond to the ASCII value of the character the instrument uses to end its messages.
  • Wired a zero to the byte count of VISA Read. Why? This means you're not going to read anything, by definition.
  • Do you need to wait a certain amount of time after sending the command before data is available?
  • Do you need to terminate the command you're sending with something? 
  • You currently have the loop set up as an infinite loop. This means the only way to stop your VI is by using the Abort button in the toolbar. THIS IS BAD. Provide a Stop button on your front panel to allow your VI to terminate cleanly.

See attached mod as a better starting point.

0 Kudos
Message 6 of 14
(4,467 Views)

in interfacing it may work in cd4052??

0 Kudos
Message 7 of 14
(4,384 Views)

koko13,

 

How are you talking to the cd4025?  The protocol you use, which should be in the documentation for the device, will determine whether you can use VISA or will need something else. 

 

Hope this helps,

 

Jen W

Applications Engineer

National Instruments

ni.com/support

0 Kudos
Message 8 of 14
(4,344 Views)

im talking about the new mod vi... if this is right to read data from cd4052..i try it but did not work...

0 Kudos
Message 9 of 14
(4,328 Views)

You've provided exactly zero information on this cd4052 and just saying your code does not work is insufficient information. Doing a google of cd4052 returns an IC and obviously that is not what you are using. Provide a link to the instrument manual or attach it. Provide the error number that you get when you run your program. Test instrument communication with a terminal emulation program such as Hyperterminal.

0 Kudos
Message 10 of 14
(4,325 Views)