Page 1 of 1

Stepper control on MIAC compile error

Posted: Wed Jul 01, 2009 3:57 pm
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?

Re: Stepper control on MIAC compile error

Posted: Thu Jul 02, 2009 12:59 pm
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.

Re: Stepper control on MIAC compile error

Posted: Fri Jul 03, 2009 6:08 am
by mimiyum
I got the same error. I just downloaded the Stepper Control program posted on your article.

Re: Stepper control on MIAC compile error

Posted: Fri Jul 03, 2009 9:07 am
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.

Re: Stepper control on MIAC compile error

Posted: Sat Jul 04, 2009 8:48 am
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:

Re: Stepper control on MIAC compile error

Posted: Mon Jul 06, 2009 4:13 pm
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?

Re: Stepper control on MIAC compile error

Posted: Thu Jul 09, 2009 4:25 pm
by mimiyum
PROBLEM SOLVED!

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

Thanks! :mrgreen: