LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

guidance on how to approach a communications task with Delta inverter

Good Morning readers and NI Knights

I have a question regarding a communications task involving a Delta inverter (M20A) remotely connected through a serial gateway (ATOP SE5001)

 

The inverter is wired by RS485 from the gateway, for access by a remote logger (pc).

 

As I see the problem (and I may be answering my own question here) I need to firstly:

1. Open a TCP session

2. Using the addressing protocol required by the inverter, send a hex-based command to the slave address for a data read (slave address 1 and command 96+ sub-command 1 (which returns 155 bytes)....protocol document attached)

So the procedure seems simple, and I'm sure somebody will advise me that indeed it is....but.....my confusion is how I should establish the TCP connection and then set the slave address using either the TCP functions or the Visa functions.......or a combination of both.

I'm not chasing after any code, just a suggestion as to which is the best approach to use.

Thanks and best regards

Ray

 

0 Kudos
Message 1 of 5
(2,878 Views)

RS-485 has nothing to do with TCP.

 

RS-485 is a serial protocol similar to RS-232 but uses a current loop instead of voltage levels. 

 

I would use VISA serial and a serial to RS-485 adaptor or a USB to RS-485 adaptor that "looks like" a com port.

 

As for the protocol it sounds like you are on your way, I attached a VI to calculate the CRC. I used this on a solar charge controller that also used RS-485. 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(2,868 Views)

RS485 is not a communications protocol...its a wiring standard.

If you read my OP, you will see that the inverter is connected via a gateway........which has an IP address.

I probably should have mentioned that we are not...NOT...using Virtual COM ports

0 Kudos
Message 3 of 5
(2,863 Views)

So, I have a few questions that hopefully will either clear up my confusion or at least allow someone more knowledgeable to answer!

 

You want to set the slave address on the M20A inverter in order to communicate via its serial port. The slave address seems to be referred to as the 'Inverter ID' in this document: M20A Manual v3. This needs to be set using buttons on the device, if I'm understanding the manual correctly. You only need to do this once per inverter. This then becomes part of your message (which you already knew it seems)

 

My questions are:

  • You make it very clear you're not using the SE5001 in any of its seemingly many 'Virtual COM' modes. Why is this? (I'm more curious than thinking it makes a difference, but I suspect this would greatly simplify your experience, so I guess you have a good reason.)
  • Have you been able to connect to the gateway (ignoring the serial connection to the inverter) already? The gateway's documentation here suggests that you can test connectivity simply by pinging the device. It also describes some test applications (Visual BASIC - urgh...) that you could use to test communications independently of your inverter.
  • If you have managed that already, have you tried using the LabVIEW TCP interface to do the same?

Beyond those steps, I'll keep reading, but it would be great to confirm you're already past that point!

 

Best,

Chris

 

 


GCentral
0 Kudos
Message 4 of 5
(2,827 Views)

Ray,

 

Firstly, I agree with the statement of RTSLVU that a virtual comm RS485 interface will be the easiest way to interface your device. Protocol gateways add a degree of complexity that may not be necessary for your project.

That said, I have used a few different ethernet -> protocol gateways (but not RS485 ones) and setting them up normally involves the following.

 

Connect to the IP address of the gateway from a web browser. All I have seen host a configuration webpage. You can set up everything you use from here. This may include things like RS485 device address, baud rates, etc. You can normally change the IP address and other config settings from here too.

 

If you have the choice, select the gateway to be the TCP server and make your software as the client. The reason for this is twofold.

1) The gateway will come online when powered, as server it will wait for your software to connect, if it was the client it would sit trying to connect to software that may not be running.

2) The firewall on your computer will be a lot more fussy about recieving incoming connections than it is about establishing connections.

 

In your software you then just need to open up the TCP connection to the gateway and send your data (I havent checked the datasheet for your gateway, but it should probably explain the packet structure). It will probably be the RS485 data wrapped by some other bytes thst tell the gateway what to do with it. The gateway will then forward the 485 message to device and wait for its response which it will then back to you.

 

Hope this helps a little.

 

 

 

0 Kudos
Message 5 of 5
(2,805 Views)