Undeclared Errors when using Stepper motor component

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
rstechnics
Posts: 16
Joined: Mon Oct 29, 2007 12:17 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Undeclared Errors when using Stepper motor component

Post by rstechnics »

Hi,
trying to get a Stepper motor working in FC8 with Arduino Uno R3 SMD.
Tried with both OUTPUTS/GENERIC and NEMA8 components in a new file.
At compiling only getting ERROR CODE 1 after a series of Undeclared.... lines, see below.
Updated version of FC8.2 and the Stepmotor components seem to have no actual newer updates..

Please your reaction how to correct this.
Many thanks and regards,
Luuk Aalders

Code: Select all

Target folder: U:\Projecten\FlowCode
Source name:   U:\Projecten\FlowCode\StepmotorTest_v01.fcfx
Title:         
Description:   
Device:        ARD.ATMEGA.ATMEGA328P
Generated by:  Flowcode v8.2.0.12
Date:          Monday, June 15, 2020 16:22:09
Users:         1
Registered to: rstechnics
License key: CXXNET
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat  atmega328p "U:\Projecten\\FlowCode\Test_v0101.elf" "U:\Projecten\FlowCode\StepmotorTest_v01.c" "U:\Projecten\FlowCode\Test_v0101.lst"
U:\Projecten\FlowCode>"C:\PROGRA~2\Flowcode\Common\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "U:\Projecten\FlowCode\Test_v0101.elf" "U:\Projecten\FlowCode\StepmotorTest_v01.c" -lm -Wl,-gc-sections 
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__EnableMotor':
U:\Projecten\FlowCode\Test_v0101.c:244: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:244: error: (Each undeclared identifier is reported only once
U:\Projecten\FlowCode\Test_v0101.c:244: error: for each function it appears in.)
U:\Projecten\FlowCode\Test_v0101.c:244: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__Output_Step':
U:\Projecten\FlowCode\Test_v0101.c:310: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:310: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c: In function 'FCD_02411_stepper_base__DisableMotor':
U:\Projecten\FlowCode\Test_v0101.c:375: error: 'FCP_TRIS_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:375: error: 'FCP_PORT_A' undeclared (first use in this function)
U:\Projecten\FlowCode\Test_v0101.c:384: error: 'FCP_PIN_A' undeclared (first use in this function)
Error returned from [avr-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles\avra.bat reported error code 1
Autoclose turned off
FINISHED
kind regards,
Luuk Aalders

RS Technics BV
for electronics engineering and industrial controls
The Netherlands
www.rstechnics.nl

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Undeclared Errors when using Stepper motor component

Post by medelec35 »

Can you post your flowchart?
That will be a big help in to seeing what the issue.
Martin

rstechnics
Posts: 16
Joined: Mon Oct 29, 2007 12:17 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Undeclared Errors when using Stepper motor component

Post by rstechnics »

Test_v0101.fcfx
For testing it now is just a basic Steppermotor setup rotating one direction in endless loop.
(8.64 KiB) Downloaded 173 times
kind regards,
Luuk Aalders

RS Technics BV
for electronics engineering and industrial controls
The Netherlands
www.rstechnics.nl

rstechnics
Posts: 16
Joined: Mon Oct 29, 2007 12:17 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Undeclared Errors when using Stepper motor component

Post by rstechnics »

--SOLVED--
Oops, just found out the cause for this errors..

At placement the Stepper motor components it is standard initialised at PortA0-A3.
The Arduino chip has only PortB-PortD.
Configuring the coil output properties to Port C0-C3 did the trick, now works fine without errors.

Anyway Medelec35, thanks!
kind regards,
Luuk Aalders

RS Technics BV
for electronics engineering and industrial controls
The Netherlands
www.rstechnics.nl

Post Reply