In TIDM-2010 software we are incorporating communication part into our main program, we are facing errors. I have explicated one case of motor 1 voltage variable below.
- In modbus_slave.c we have created our communication software. We have all the values of PFC,motor1 and motor2 to transmit for GUI. The code corresponding to motor 1 (compressor motor) is given as per the snippet below.
modbus_slave.c |
extern MTR1_VU_VFD; case 6: g_st_Act.u16_M1_VU = MTR1_VU_VFD; x = (g_st_Act.u16_M1_VU) * 100; break; |
- As the motor voltage values are addressed in hal.h we have taken the variables from modbus_slave and we are trying to call the voltage value from hal.h to GUI. The value that goes to GUI is read as MTR1_VU_VFD. The code snippet for the same is given below as highlighted.
hal.h |
float32_t MTR1_VU_VFD = 0.0; #if defined(MOTOR1_FAST)
// convert phase A voltage
value = (float32_t)ADC_readResult(MTR1_VU_ADCRES_BASE, MTR1_VU_ADC_SOC_NUM); pADCData->V_V.value[0] = value * pADCData->voltage_sf;
MTR1_VU_VFD = pADCData->V_V.value[0]; // to GUI |
After running the project, we are getting such errors.
Description Resource Path Location Type
#10010 errors encountered during linking; "tidm_02010_dmpfc_002x_simple.out" not built tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_board/hal.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_board/user_mtr1.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_board/user_mtr2.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_board/user_pfc.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_control/motor_common.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_control/motor1_drive.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_control/motor2_drive.obj" tidm_02010_dmpfc_002x C/C++ Problem
#10056 symbol "M1_VU_VFD" redefined: first defined in "./sys_main.obj"; redefined in "./src_control/pfc_ctrl.obj" tidm_02010_dmpfc_002x C/C++ Problem
Even though the variable names are changed we are facing these errors.
Can anyone pls help out?