LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading through an RS-485 or a an Ethernet Hub,.??? and HOW ??

Solved!
Go to solution

I need to procure some Signal Conditoners to measure Frequecy output of Turbine flow meters. The signal conditioners i am looking into give an RS-485 output but i am not sure if these can be read by LabVIEW.. ??

All the devices connect through an RS-485 bus to the RS-485 serial adaptor.

I have 2 options (also illsutarted in the attached figure.) .

a. To connect through an Ethernet Hub to the computer and read the individual Signal conditioners by calling the TCP/IP in LabVIEW..

OR

b. Using the RS-485 bus to connect to the RS-485 interface of the computer  and read these devices through LabVIEW

 

my questions are.

 

1. How do i know if my computers RS-485 interface will recognise and read these devices.

2. is Option 2 possible. This will save me from buying a server to communicate to the computer through a Ethernet hub..

If its possible then how can i use labVIEW to read the independent devices.

 

Refer to the attached pic for clarity on connection to the computer using Option 1 and Option 2.

 

Shankar

0 Kudos
Message 1 of 20
(4,914 Views)

Yes.  LabVIEW can read data from an RS-485 serial port.  It doesn't care about the fact it is RS-485.  As long as your RS-485 serial card shows up as a Com port in windows, LabVIEW can access it using the VISA drivers.

 

You could use the ethernet port also, but how it communicates will all depend on what protocol the ethernet adapter called "iserver" uses.  You could definitely do it, it is just a matter of how much programming work you need to do in LabVIEW to adapt to its protocol.

0 Kudos
Message 2 of 20
(4,905 Views)

That is of great help..

But i need to one thing. How would i know if the serial input in my computer is an RS-232 or RS-485. I know this question may be dum but i am new to this.

Also if its an RS-232 then i need a convertor to convert my RS-232 to RS-485 right ?

Plus do u have any sample code which may show how i could configure LabVIEW to read inputs from various iDRX modules into one serial port.

 

this is the way we can get thru the Ethernet i believe... I am looking fr something similar for the RS-485...

http://forums.ni.com/ni/board/message?board.id=170&message.id=216191&requireLogin=False 

 

 

0 Kudos
Message 3 of 20
(4,895 Views)
Solution
Accepted by topic author shanky1023

You'd have to look at the hardware specifications on your computer.  Unless you have intentionally installed a new serial port that is RS-485, it is probably RS-232.   Any standard, off the shelf computer is going to only have RS-232 ports.  (Actually, most new computers nowadays don't even come with them.)  So you will either have to install an RS-485 serial card, or use an RS-232 to RS-485 convertor.

 

You'lll have to read the communications manual for those devices.  Each one of those modules will probably need to be set to a different slave address.  The command structure will probably look similar to that ethernet example you posted, except instead of using TCP/IP functions, you will need to use VISA serial port functions.  Look in the example finder for VISA serial examples.

Message 4 of 20
(4,888 Views)

Thanks..

I shall look into the serial communications of that device and get back later.

Thanks a lot.. Atleast i can go ahead and order the part . i shall in parallel look into the literature..

  

0 Kudos
Message 5 of 20
(4,885 Views)

 I got the signal conditionersbut these are read off the ethernet so the problem is little different from the topic of this post...

 

This problem i similar to an old problem posted in ni



 

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=216191&requireLogin=False

I have a signal conditioner iFPX-W.. its suppossed to give me Frequency output. i used the same .vi file from the prev post .. attaching it too.. modified a little for my case.
The problem  seems to be the same.The code runs but does not return a data value. Also i would like a continous graphical real time output of the measure frequecy as in when the Frequency changes it is displaye din the graph..

Can u please help me modify the code. the command *SRA\r seems to be right ... but i cant get any output.

0 Kudos
Message 6 of 20
(4,810 Views)

Are you getting any error message on the error wire?  Put an indicator there.

 

1.5 seconds does not seem like a long enough timeout.

0 Kudos
Message 7 of 20
(4,803 Views)

I am really sorry but i am fairly new to LabVIEW.. i don realise what u mean by putting an indicator in the error wire. do u mean in the error out wire from the TCP/IP read ??

Also i don seem to get any error off hand when i run the code.. it just keeps running.. When i turn on the Highlight Execution it just shows that  a data is produced but doesnt show me the value in the Front panel.

Could u helpme modify the code.. ?

0 Kudos
Message 8 of 20
(4,801 Views)

Hi shankar,

  Regarding your VI,probably it is giving some ascii values as output,which you want to reconvert into proper data type you want.Also putting indicator on error wire will give you some details of that error.That is some way of error handling in labview.Just highlight execution and carefully observe which values are output from  TCP/ip read function and use  unflatten from string function to get the proper result..

 

Please get back to me with your observations.

 

Thanks and regards,

srikrishna.J

Regards,
Srikrishna


0 Kudos
Message 9 of 20
(4,785 Views)

Does "u" = "you"?

 

 

Right click the error wire and select create indicator.  Since you are fairly new to LabVIEW, I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 10 of 20
(4,780 Views)