implementation of parts of the unilynx protocol, for communicating with danfos photovoltaic inverters. Still BETA ! needs byte stuff/unstuff fixed, and some CRC are left out for niw...

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers unilynx.h Source File

unilynx.h

00001 #ifndef UNILYNX_H_
00002 #define UNILYNX_H_
00003 
00004 
00005 /* RAW measured values */
00006 #define RAW_MEAS_VALUES                0X01 
00007 #define ID_RAW_MEAS_VALUES             0X04 
00008 #define INSTANT_ENERGY                 0X01 //RETURNS U32
00009 #define ENERGY_PRODUCTION              0X02 //RETURNS U32
00010 #define ENERGY_PRODUCTION_TODAY        0X04 //RETURNS U32
00011 
00012 /* Smoothed measured values */
00013 #define RAW_SMOOTH_VALUES               0X02 
00014 #define ID_RAW_SMOOTH_VALUES            13//0X0D 
00015 #define GRID_VOLTAGE                    0X14 //RETURNS U32
00016 #define GRID_CURRENT_MA                 0X15 //RETURNS U32
00017 #define GRID_FREQ_cHZ                   0X16 //RETURNS U32
00018 
00019 
00020 /* Status values */
00021 #define STATUS_VALUES                0X0A 
00022 #define OPERATION_MODE                0X02 //RETURNS U32
00023 
00024 
00025 void rs485init(void);
00026 void getNodeInfo(void);
00027 //int readParameter(int param_idx, int param_sub_idx);
00028 int readParameter(int param_idx, int param_sub_idx, int dest);
00029 void test(void);
00030 void ping(void);
00031 
00032 #endif