Hi all.
I want create new component like thermistor EBM003, but I want increase range from -50C to 300C. I copy settings and inherit macros from EBM003 to new component but I can't edit macros called SetMinMax.
It's possible edit this macros or not?
I think tutorials how create new component or edit exist must be more detailed and understandable.
Thank You.
How can I edit inherited macros in new component?
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: How can I edit inherited macros in new component?
Hello,
We have recently done a lot with the component creation system to vastly simplify it. This v7 update is currently pending and should be available soon.
Once we have released this we can start updating the documentation and creating some much more user friendly examples.
For now here is the EBM003 component source which you can use to create your own slant on the component.
Let us know how you're getting on.
We have recently done a lot with the component creation system to vastly simplify it. This v7 update is currently pending and should be available soon.
Once we have released this we can start updating the documentation and creating some much more user friendly examples.
For now here is the EBM003 component source which you can use to create your own slant on the component.
Let us know how you're getting on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
Re: How can I edit inherited macros in new component?
Hi.
I make my component but have the same problem. I can't read temperature over 125C and under -25C. She's show but can't read. I think because new component EBM003v1 have inherited macros from thermistor base component. They don't allow /maybe/ increase range.
See attached files for details.
I make my component but have the same problem. I can't read temperature over 125C and under -25C. She's show but can't read. I think because new component EBM003v1 have inherited macros from thermistor base component. They don't allow /maybe/ increase range.
See attached files for details.
- Attachments
-
- Pt100.fcpx
- (5.5 KiB) Downloaded 431 times
-
- Pt100 read and display.fcfx
- (9.19 KiB) Downloaded 441 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: How can I edit inherited macros in new component?
Aha, Yes you're absolutely right. Here is the source for the v6 thermistor base component so you can edit the range.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
Re: How can I edit inherited macros in new component?
Hello.
I make RTD_base component from Thermistor_base. After that I make component Pt100 from EBM003v1r + RTD_base.
And finaly If I try read and display temperature, readings are over 25C and I can't make hex file. There's lot of mistakes
I know I was wrong but where? Calculations not my power. If anyone has some free time to look at the files and give me direction, I would be very grateful.
Thank you.
I make RTD_base component from Thermistor_base. After that I make component Pt100 from EBM003v1r + RTD_base.
And finaly If I try read and display temperature, readings are over 25C and I can't make hex file. There's lot of mistakes
I know I was wrong but where? Calculations not my power. If anyone has some free time to look at the files and give me direction, I would be very grateful.
Thank you.
- Attachments
-
- Pt100.rar
- (22.19 KiB) Downloaded 459 times
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
Re: How can I edit inherited macros in new component?
Hello. I edit component EBM003 and make component Pt100 with less range. From -25C to 200C. Add 3 sample points and expand range. ADC resolution is set to 10 bit. Now in simulation work normally but in compilation I see following message:
Pt100 read and display.c:
116: 450
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
118: 465
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
120: 479
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
(908) exit status = 1
(908) exit status = 1
I attach c file, project and component. Have somebody idea what is the mistake?
Pt100 read and display.c:
116: 450
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
118: 465
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
120: 479
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
(908) exit status = 1
(908) exit status = 1
I attach c file, project and component. Have somebody idea what is the mistake?
- Attachments
-
- Pt100 read and display.c
- (32.76 KiB) Downloaded 455 times
-
- Pt100.fcpx
- (5.45 KiB) Downloaded 407 times
-
- Pt100 read and display.fcfx
- (8.78 KiB) Downloaded 422 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: How can I edit inherited macros in new component?
Hi,
Looks like you are making good progress.
Have a close look at how you have edited the .Expansion in Ev_AddVar
In the original code each item added is followed by
the last item is followed by
Looks like you have that last line after each of your new additions.
Looks like you are making good progress.
Have a close look at how you have edited the .Expansion in Ev_AddVar
In the original code each item added is followed by
Code: Select all
.Expansion = .Expansion + ",\n"
Code: Select all
.Expansion = .Expansion + "\n};\n"
-
- Posts: 71
- Joined: Mon Dec 01, 2014 1:38 pm
- Location: Bulgaria
- Has thanked: 17 times
- Been thanked: 12 times
Re: How can I edit inherited macros in new component?
Thank you, LeighM.
You're absolutely right. Like I say calculation not my power. I simply paste and copy new Expansion but not right :=)
Thank you very, very much! Now everything is Ok.
I will made new component Pt1000, taste it in work and paste in forum.
Have a nice day!
You're absolutely right. Like I say calculation not my power. I simply paste and copy new Expansion but not right :=)
Thank you very, very much! Now everything is Ok.
I will made new component Pt1000, taste it in work and paste in forum.
Have a nice day!