Eamonb
Hi I am getting  errors when I try to transfer a small ladder logic program using OpenPLC to a Raspberry Pi Pico . See  the script below . 
 
I would appreciate feedback on what is causing this issue 
 
Here is the relevant section flagging errors close to  the end of the script displayed when Transfer to PLC is selected in OpenPLC
 
In file included from editor\arduino\src\lib/iec_std_FB.h:1893,
                 from editor\arduino\src\lib/iec_std_lib.h:746,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\Config0.c:6:
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_DINT_body__':
editor\arduino\src\lib/arduino_lib_FB.h:439:53: warning: passing argument 2 of 'cloud_add_int' from incompatible pointer type [-Wincompatible-pointer-types]
  439 |     cloud_add_int(__GET_VAR(data__->VAR_NAME).body, &data__->DINT_VAR);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     __IEC_DINT_t *
editor\arduino\src\lib/arduino_lib_FB.h:373:28: note: expected 'int *' but argument is of type '__IEC_DINT_t *'
  373 | void cloud_add_int(char *, int *);
      |                            ^~~~~
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_REAL_body__':
editor\arduino\src\lib/arduino_lib_FB.h:470:55: warning: passing argument 2 of 'cloud_add_float' from incompatible pointer type [-Wincompatible-pointer-types]
  470 |     cloud_add_float(__GET_VAR(data__->VAR_NAME).body, &data__->REAL_VAR);
      |                                                       ^~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       __IEC_REAL_t *
editor\arduino\src\lib/arduino_lib_FB.h:374:30: note: expected 'float *' but argument is of type '__IEC_REAL_t *'
  374 | void cloud_add_float(char *, float *);
      |                              ^~~~~~~
In file included from editor\arduino\src\lib/iec_std_FB.h:1893,
                 from editor\arduino\src\lib/iec_std_lib.h:746,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\Res0.c:6:
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_DINT_body__':
editor\arduino\src\lib/arduino_lib_FB.h:439:53: warning: passing argument 2 of 'cloud_add_int' from incompatible pointer type [-Wincompatible-pointer-types]
  439 |     cloud_add_int(__GET_VAR(data__->VAR_NAME).body, &data__->DINT_VAR);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     __IEC_DINT_t *
editor\arduino\src\lib/arduino_lib_FB.h:373:28: note: expected 'int *' but argument is of type '__IEC_DINT_t *'
  373 | void cloud_add_int(char *, int *);
      |                            ^~~~~
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_REAL_body__':
editor\arduino\src\lib/arduino_lib_FB.h:470:55: warning: passing argument 2 of 'cloud_add_float' from incompatible pointer type [-Wincompatible-pointer-types]
  470 |     cloud_add_float(__GET_VAR(data__->VAR_NAME).body, &data__->REAL_VAR);
      |                                                       ^~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       __IEC_REAL_t *
editor\arduino\src\lib/arduino_lib_FB.h:374:30: note: expected 'float *' but argument is of type '__IEC_REAL_t *'
  374 | void cloud_add_float(char *, float *);
      |                              ^~~~~~~
In file included from editor\arduino\src\lib/iec_std_FB.h:1893,
                 from editor\arduino\src\lib/iec_std_lib.h:746,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\POUS.h:5,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\debug.c:25:
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_DINT_body__':
editor\arduino\src\lib/arduino_lib_FB.h:439:53: warning: passing argument 2 of 'cloud_add_int' from incompatible pointer type [-Wincompatible-pointer-types]
  439 |     cloud_add_int(__GET_VAR(data__->VAR_NAME).body, &data__->DINT_VAR);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     __IEC_DINT_t *
editor\arduino\src\lib/arduino_lib_FB.h:373:28: note: expected 'int *' but argument is of type '__IEC_DINT_t *'
  373 | void cloud_add_int(char *, int *);
      |                            ^~~~~
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_REAL_body__':
editor\arduino\src\lib/arduino_lib_FB.h:470:55: warning: passing argument 2 of 'cloud_add_float' from incompatible pointer type [-Wincompatible-pointer-types]
  470 |     cloud_add_float(__GET_VAR(data__->VAR_NAME).body, &data__->REAL_VAR);
      |                                                       ^~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       __IEC_REAL_t *
editor\arduino\src\lib/arduino_lib_FB.h:374:30: note: expected 'float *' but argument is of type '__IEC_REAL_t *'
  374 | void cloud_add_float(char *, float *);
      |                              ^~~~~~~
In file included from editor\arduino\src\lib/iec_std_FB.h:1893,
                 from editor\arduino\src\lib/iec_std_lib.h:746,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\POUS.h:5,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\POUS.c:1:
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_DINT_body__':
editor\arduino\src\lib/arduino_lib_FB.h:439:53: warning: passing argument 2 of 'cloud_add_int' from incompatible pointer type [-Wincompatible-pointer-types]
  439 |     cloud_add_int(__GET_VAR(data__->VAR_NAME).body, &data__->DINT_VAR);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     __IEC_DINT_t *
editor\arduino\src\lib/arduino_lib_FB.h:373:28: note: expected 'int *' but argument is of type '__IEC_DINT_t *'
  373 | void cloud_add_int(char *, int *);
      |                            ^~~~~
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_REAL_body__':
editor\arduino\src\lib/arduino_lib_FB.h:470:55: warning: passing argument 2 of 'cloud_add_float' from incompatible pointer type [-Wincompatible-pointer-types]
  470 |     cloud_add_float(__GET_VAR(data__->VAR_NAME).body, &data__->REAL_VAR);
      |                                                       ^~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       __IEC_REAL_t *
editor\arduino\src\lib/arduino_lib_FB.h:374:30: note: expected 'float *' but argument is of type '__IEC_REAL_t *'
  374 | void cloud_add_float(char *, float *);
      |                              ^~~~~~~
In file included from editor\arduino\src\lib/iec_std_FB.h:1893,
                 from editor\arduino\src\lib/iec_std_lib.h:746,
                 from C:\Users\The Boss\OpenPLC_Editor\editor\arduino\src\glueVars.c:2:
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_DINT_body__':
editor\arduino\src\lib/arduino_lib_FB.h:439:53: warning: passing argument 2 of 'cloud_add_int' from incompatible pointer type [-Wincompatible-pointer-types]
  439 |     cloud_add_int(__GET_VAR(data__->VAR_NAME).body, &data__->DINT_VAR);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     __IEC_DINT_t *
editor\arduino\src\lib/arduino_lib_FB.h:373:28: note: expected 'int *' but argument is of type '__IEC_DINT_t *'
  373 | void cloud_add_int(char *, int *);
      |                            ^~~~~
editor\arduino\src\lib/arduino_lib_FB.h: In function 'CLOUD_ADD_REAL_body__':
editor\arduino\src\lib/arduino_lib_FB.h:470:55: warning: passing argument 2 of 'cloud_add_float' from incompatible pointer type [-Wincompatible-pointer-types]
  470 |     cloud_add_float(__GET_VAR(data__->VAR_NAME).body, &data__->REAL_VAR);
      |                                                       ^~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       __IEC_REAL_t *
editor\arduino\src\lib/arduino_lib_FB.h:374:30: note: expected 'float *' but argument is of type '__IEC_REAL_t *'
  374 | void cloud_add_float(char *, float *);
      |                              ^~~~~~~
 
Reply 0 0
thiagoralves
These are just warnings, not errors. The code should compile just fine with those in
Reply 0 0
Reply