LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Danfoss Solar Inverter ComLynx

Already did that, but that didnt make much sence to me, I know it describes the protocol, but have no idea what to do with it, like how to send requests to the inverter for instance, completely blank on the area.

0 Kudos
Message 12 of 24
(2,283 Views)

Hi DonTommy

I'm on vacation right now, so I don't read my emails very often.
I Think An Adam RS485 converter should handle it.
You are much further ahead than I, maybe you should try asking Danfoss about which converter they can recommend.

 

Tommy

0 Kudos
Message 13 of 24
(2,278 Views)

Hi

As far as I can tell:

The basic message format of both the request and reply is shown in the example on page 26.  The parameters to use in the request for individual values are shown in Appendix 7.3.

All the best

Mick

0 Kudos
Message 14 of 24
(2,269 Views)

Thanks Mick, can you guide me a bit more, i can see the "logic" on page 26, however having a hard time understanding how a request like that on page 26 is going to be sent to the inverter

0 Kudos
Message 15 of 24
(2,262 Views)

I have constructed some code, cant test it before the sun comes up, so if any of you got some pointers on my small python code I am more then happy to listen 🙂

 

(the hex code in the struct line is just the values from page 26 in the comlynx manual for requesting total production)

 

import serial
import struct

ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)

print(ser.isOpen())

data = struct.pack(hex, 0x7E, 0xFF, 0x03, 0x00, 0x02, 0x12, 0x03, 0x0A, 0x01, 0xC8, 0x04, 0xD0, 0x01, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x8E, 0xE7, 0x7E)

ser.write(data)
s = ser.read(1)
print(s)
ser.close()

0 Kudos
Message 16 of 24
(2,252 Views)

You can convert a byte array (U8) to a string, then write the string using a VISA Write.

 

Or you can enter your data into a string constant with it set to Hex display, and use VISA Write to write that.

0 Kudos
Message 17 of 24
(2,223 Views)

Hey again, getting closer.... i hope:)

 

Got this python code:

 

ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)

print(ser.isOpen())

data = "\x7E\xFF\x03\x00\x02\x11\x01\x0A\x01\xC8\x04\xD0\x01\x02\x80\x00\x00\x00\x00\x8E\xE7\x7E"

ser.write(data.encode(encoding='utf-8'))

while True:
s = ser.readline().decode('utf-8')
if s:
print(s)

ser.close()

 

No errors from python on execute, however it dosnt return anything from what I can see. So I guess my problem is that the master and slave adresses isnt set correctly, in the comlynx protocol manual, they always refferes to the master as being on adress 0,0,2 and a diagram shows that the first inverter on a network is 1,1,1, have tryed guessing other numbers with no luck.

My adam 4520 converter, is having the green led light on always, which means no data being transfered from what I have seen on their webpage, but should that change the moment I try to sent a request, no matter if the master/slave adress is wrong?

0 Kudos
Message 18 of 24
(2,211 Views)

Where are your LabVIEW questions?  You are talking about Python.

0 Kudos
Message 19 of 24
(2,197 Views)

Hi DonTommy

 

I have contacted Danfoss, and they say their converter is specially encoded and can not be bought anywhere other than at Danfoss, the price is 103 EUR

Download All
0 Kudos
Message 20 of 24
(2,161 Views)