11-29-2010 06:42 PM
Hi,
I am a complete noob to labview. We are looking at using labview look at a scad of cheap thermocouple interfaces. The setup is as follows:
linux PC with ethernet interface
Moxa nport ethernet to rs485 box
rs485 miltidrop chain with a number of interfaces, 8 thermocouples per unit
Also a computer controlled furnace
some other custom gadgets
So I looked at the VISA reference doc and read about the TCP Socket command. It seems pretty straight forward to set up the connection and the units on the rs495 are quite easy to program, but then it comes to creating the actual instances for each one of these 8 thermocouple. What I want to do is walk through a range of possible device addresses and see which ones respond with the right unt code. For each thermocouple unit, I want to create a vi of the right type. If I add other devices on the 485 multidrop, I want to use the same process and have the units show up with the right type...
What is not clear is that it looks like the VISA connection is done at the TCP socket level and not at the level of the 485 bus unit. Is this easy to do? It was also surprising that there was no standard probe command that is called to discover what units are active.
My decision to use labview will depend on bring able to get this to work in reasonable time. If we decide to do this, we will post the final working code.
thanks,
jerry
11-30-2010 03:16 AM
IF you are using Ethernet to RS-485 converter, then you must be able to see 8 RS-485 devices in Device manager.
So, instead of using VISA for TCP/IP, use VISA serial for accessing the RS-485 ports directly. Because the MOXA drivers will make ethernet link transparent to Labview.
11-30-2010 02:26 PM
Your comment is reasonable, but it doesn't address the problem I have.
My looking at the VISA serial shows the same situation, the assumption that there is a single unit attached to the open. With multidrop 485, there are multiple units, some of which will match the unit type that this instrument code is designed to support and some not. (in that way, it looks a bit more like a USB setup) I want all the work on the bus to be synchronous, each command either completes or times out before anything else can happen on the given bus.
I want to be able to
a) probe the 485 bus to see if there are any of the right units connected
b) display those as available choices for selection within labview
c) lock and communicate on the 485 bus when commands or data reads are needed for a given unit
thanks,
jerry
11-30-2010 03:30 PM
I may not completely understand your situation, but it sounds to me like the easiest thing to do is have a single VI that handles all communication, and call that VI from as many different locations as necessary. LabVIEW will only run one copy of that communication VI (and will cause other callers to wait if one is already executing), effectively locking the communication channel.