SGLMaster / mikroPLC

A PLC-like firmware for the PIC18F4550 microcontroller.
0 stars 0 forks source link

CCS C Compiler error messages #2

Open behram-dago opened 2 years ago

behram-dago commented 2 years ago

Hi, i like your PLC project and i tried to compile the included files but i get always the error messages corresponding "(USB_HID_ENDPOINT)" generally about mikroPLC.c beginning with the linenumber 308. Do you have an idea how could it be solved? Thank you in advance!

Greeting from germany Behram Garadagh

willians06 commented 2 years ago

Hi there. Are you using the correct version of the CCS compiler? And are you targeting the PIC18F4550 microcontroller specifically?

behram-dago commented 2 years ago

Hi sure i'm using ccs c-compiler version 5 and had also selected the pic18f4550.  Thanks for your respond. GreetingB. Garadagh Am Dienstag, 17. Mai 2022, 18:23:04 MESZ hat Willians Briceño @.***> Folgendes geschrieben:

Hi there. Are you using the correct version of the CCS compiler? And are you targeting the PIC18F4550 microcontroller specifically?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

willians06 commented 2 years ago

Ok. I haven't worked in this project for a while. But I think I can try a compilation soon and let you know if it works for me.

behram-dago commented 2 years ago

Thank you very much i have to put this image from the sreen-shot again. In your original email you could see it.  Am Dienstag, 17. Mai 2022, 19:16:16 MESZ hat Willians Briceño @.***> Folgendes geschrieben:

Ok. I haven't worked in this project for a while. But I think I can try a compilation soon and let you know if it works for me.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

willians06 commented 2 years ago

image

The compilation worked for me.

willians06 commented 2 years ago

This is my exact version of CCS: image

willians06 commented 2 years ago

I can email you the compiled HEX file if you want.

willians06 commented 2 years ago

But I'm not sure if it works because I don't currently own a 18F4550.

behram-dago commented 2 years ago

Hi, please send me the hex  file. I'm using the version 5.009 of the ccs c-compiler and it was elder than yours.An other asking : how is python-file to use? GreetingB. Garadagh Am Dienstag, 17. Mai 2022, 19:42:19 MESZ hat Willians Briceño @.***> Folgendes geschrieben:

But I'm not sure if it works because I don't currently own a 18F4550.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SGLMaster commented 2 years ago

You need to install the HEX file in the micro and then correctly connect the LCD display and input so you can access the menu through the controller. In the menu, you have to select the 'Connect to PC' option. Then, you can connect the micro through USB to the PC interface which is the mikroPLC-Loader.py python program. In that interface, you have to load a TXT which must contain the Step7 instructions. It must be one instruction per line.

Once you load the TXT, you can download it to the microcontroller and it will save it in the internal EEPROM. After that, you can use 'Execute Program' to run the loaded program or 'Review Instructions' to see each downloaded instruction individually to verify the download process was ok.

You can also choose the 'Load Example' options to load example instructions into the memory so you can check if the PLC process is working correctly without loading from the PC.

El mar, 17 may 2022 a las 21:24, behram-dago @.***>) escribió:

Hi, please send me the hex file. I'm using the version 5.009 of the ccs c-compiler and it was elder than yours.An other asking : how is python-file to use? GreetingB. Garadagh Am Dienstag, 17. Mai 2022, 19:42:19 MESZ hat Willians Briceño @.***> Folgendes geschrieben:

But I'm not sure if it works because I don't currently own a 18F4550.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/SGLMaster/mikroPLC/issues/2#issuecomment-1129472071, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFJ2EHBBFLD6AAFGJY3HA3VKRBF7ANCNFSM5V7NLGHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SGLMaster commented 2 years ago

You can also check the mikroPLC.h file for the pinout to use with LCD matrix and buttons to control the menu. Also, the Input/Output pins for the PLC operation are listed there.

SGLMaster commented 2 years ago

Or you could also check the schematic in schematic-with-regular-lcd.PNG to see the pin out for the regular configuration.

behram-dago commented 2 years ago

Hi, it's very helpfull from you thanks. But i did not see any .HEX file in the email from you. Thanks a lot again. If have the HEX file i could run it well. best regardB. Garadagh

Am Mittwoch, 18. Mai 2022, 21:54:51 MESZ hat Willians Alejandro Briceño Linarez ***@***.***> Folgendes geschrieben:  

Or you could also check the schematic in schematic-with-regular-lcd.PNG to see the pin out for the regular configuration.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SGLMaster commented 2 years ago

I just added a release with the HEX file. You can find it here: https://github.com/SGLMaster/mikroPLC/releases/download/v1.0.0/mikroPLC-Firmware.hex

behram-dago commented 2 years ago

Hi, i received the new HEX file. Thanks a lot. I could run the mikroPLC-loader.py but for now i just run the simulation on proteus. I hope i get it running on real hardware. Well i wonder if  another instruction-set from simatic s7 could be added to the python file without any complictaion? For example the "label instruction M" and others that are included by simatic. best regardB. Garadagh Am Donnerstag, 19. Mai 2022, 14:41:55 MESZ hat Willians Alejandro Briceño Linarez @.***> Folgendes geschrieben:

I just added a release with the HEX file. You can find it here: https://github.com/SGLMaster/mikroPLC/releases/download/v1.0.0/mikroPLC-Firmware.hex

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SGLMaster commented 2 years ago

I'm not sure. I haven't worked in this code for a while but maybe if you study the code for the existing instructions you could add new ones to the micro without too much complication. Must of it seems to be copy and paste and numeric codes. The mikroPLC-Loader.py just translates a TXT file into the respective HEX codes for every instruction but the controller needs to understand them first.