IS there a chance you can look at the list of errors and help me figure out what I did wrong?
Lost with compile error
-
- Posts: 133
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 2:29 pm
- Has thanked: 26 times
- Been thanked: 7 times
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: Lost with compile error
Hi ,
It seems all the errors has to do with the UART and string handling functions,
I would first comment the UART and all string macro's out to see what happens
It seems all the errors has to do with the UART and string handling functions,
I would first comment the UART and all string macro's out to see what happens
Regards Peter - QME Electronics
-
- Matrix Staff
- Posts: 1920
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 622 times
- Been thanked: 645 times
Re: Lost with compile error
Hi Alan.
The issue is with user macro.
On the yes branch of the is an undefined Goto Connection point.
I'm guessing it was set for some other connection point e.g B, but that has been deleted?
That would cause this issue.
The no branch also makes the code continue to the end, so the decision branch is redundant.
It can be removed or disabled unless you have just posted a cut down version?
The issue is with
Code: Select all
Closed_loop_PWM2
On the yes branch of
Code: Select all
AN1_current_HP > PWM2_Current_Target OR AN1_current_HP = PWM1_Current_Target
I'm guessing it was set for some other connection point e.g B, but that has been deleted?
That would cause this issue.
The no branch also makes the code continue to the end, so the decision branch is redundant.
It can be removed or disabled unless you have just posted a cut down version?
Martin
-
- Matrix Staff
- Posts: 1920
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 622 times
- Been thanked: 645 times
Re: Lost with compile error
For future reference how the error could be found.
1. Make sure you don't have the word error within the project title, so rename.
2. Compile to hex.
3. Either open project Name.msg.txt
or
select Build ribbon, Compiler messages.
Select a blank area within compiler messages text, hold ctrl and press a to select all, then ctrl c to copy (or use the right mouse button)
Run notepad or any text viewer, use ctrl v (or right-click mouse button) and paste within text viewer.
4. Left-click anywhere at the top of the text editor and search (normally ctrl f) for the word error.
In this case, you should see: That tells you to look for a label (a goto) within FCM (FlowCode user Macro) Closed_loop_PWM2_B
1. Make sure you don't have the word error within the project title, so rename.
2. Compile to hex.
3. Either open project Name.msg.txt
or
select Build ribbon, Compiler messages.
Select a blank area within compiler messages text, hold ctrl and press a to select all, then ctrl c to copy (or use the right mouse button)
Run notepad or any text viewer, use ctrl v (or right-click mouse button) and paste within text viewer.
4. Left-click anywhere at the top of the text editor and search (normally ctrl f) for the word error.
In this case, you should see: That tells you to look for a label (a goto) within FCM (FlowCode user Macro) Closed_loop_PWM2_B
Martin
Re: Lost with compile error
Thank you Martin - I did catch the PCC_Closed_loop_pwm2_B, but could not figure out where the "B" came from. I though that was the full name but apparently, it was a goto indicator.
Glad you put this down for me. I was going to ask how I can find this stuff, but felt a little pushy!
I compiled another program with a goto (with nowhere to go to), and went through the steps above - Worked great
Thanks again
Glad you put this down for me. I was going to ask how I can find this stuff, but felt a little pushy!
I compiled another program with a goto (with nowhere to go to), and went through the steps above - Worked great
Thanks again
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: Lost with compile error
Regarding this line of code.
This will be doing a binary OR and not a boolean comparison OR which is I beleive is what you are after.
Try this instead.
Code: Select all
AN1_current_HP > PWM2_Current_Target OR AN1_current_HP = PWM1_Current_Target
Try this instead.
Code: Select all
(AN1_current_HP > PWM2_Current_Target) || (AN1_current_HP = PWM1_Current_Target)
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1920
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 622 times
- Been thanked: 645 times
Re: Lost with compile error
Hi Alan.
The parentheses makes sure that calculations or conditions are completed in the correct order.
Using instead of is vital for the condition to work, so that is the main point.
The parentheses makes sure that calculations or conditions are completed in the correct order.
Using
Code: Select all
||
Code: Select all
OR
Martin