Stepper control on MIAC compile error

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Stepper control on MIAC compile error

Post by mimiyum »

I tried to download the Stepper Control file and compile to the MIAC. I also downloaded the stepper installer I found here in one of the posts.
I get the following error when compiling to MIAC.
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(727:2): error: unknown identifier 'FCD_Stepper0_EnableMotor'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(727:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(732:2): error: unknown identifier 'FCD_Stepper0_IncrementStep'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(732:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(775:2): error: unknown identifier 'FCD_Stepper0_EnableMotor'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(775:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(780:2): error: unknown identifier 'FCD_Stepper0_DecrementStep'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(780:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(918:2): error: unknown identifier 'FCD_Stepper0_EnableMotor'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(918:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(923:2): error: unknown identifier 'FCD_Stepper0_IncrementStep'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(923:2): error: failed to generate expression
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(970:2): error: unknown identifier 'FCD_Stepper0_DisableMotor'
C:\Program Files\Matrix Multimedia\Flowcode V3\MIAC_Examples\MIAC Examples\stepper control.c(970:2): error: failed to generate expression
stepper control.c success

failure

..
Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED

What should I do?

User avatar
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: Stepper control on MIAC compile error

Post by Benj »

Hello

The stepper motor component is not really supported in v3 of Flowcode.

You should be able to download the component from here and this should allow you to get up and running with the component. If not then please can you send me your FCF and C code files from your project and I will look into it for you.

To install the component you will have to extract the contents of the stepperinstaller folder into yor "Flowcode V3/Components" directory and then run the "Install Stepper.bat" file.
Attachments
Stepperinstaller.zip
(36.52 KiB) Downloaded 558 times

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: Stepper control on MIAC compile error

Post by mimiyum »

I got the same error. I just downloaded the Stepper Control program posted on your article.
Attachments
stepper control.c
(17.29 KiB) Downloaded 469 times
stepper control.fcf
(13.99 KiB) Downloaded 534 times

User avatar
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: Stepper control on MIAC compile error

Post by Benj »

Ok I think I know whats going wrong.

Open the file in V3 and click the stepper component icon to add a single stepper component. Assign the component connections for the stepper, save the file and exit Flowcode.

Now when you re-open the file in Flowcode the component should be there as required and the component macro calls should work correctly.

Let me know how you get on.

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: Stepper control on MIAC compile error

Post by mimiyum »

Ok...I know that's supposed to have solved it. The program simulates well already and for the first time I saw the stepper motor component.

I now have ANOTHER problem. My MIAC has another program running and even if I press the reset button to download the program, I get the following error:

USB Write Failed
Failed with error 997: Overlapped I/O operation is in progress.

It seems that it doesn't want to overwrite the existing program.

Another thing I noticed when compiling the program, I read the following:

Warning: function never returns: 'FCM_Prog11'
Building CASM file

What does that mean?

Another question is what does each input I1 to I4 mean?

Thank you for your patience Benj. I hope you still have more of it! :wink:

User avatar
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: Stepper control on MIAC compile error

Post by Benj »

Hello

Ok hopefully this is an easy one to fix too.

First I would try following this FAQ but replacing "Matrix USB Programmer" with "MIAC PLC"

http://www.matrixmultimedia.com/support ... .php?t=508

If this does not work then do you have an EB006 or HP488 Dev board connected to your PC at the same time as the MIAC?

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: Stepper control on MIAC compile error

Post by mimiyum »

PROBLEM SOLVED!

Device Manager- MIAC PLC Power Management- just unclicked the "Allow the computer to turn off this device..."

Thanks! :mrgreen:

Post Reply