automatic sawing machine

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

automatic sawing machine

Post by nuwan5213 »

hi all,
my recent project is automatic sawing machine and i will give some stich count and let machine to start by relay output.aftrer finish that alarm comes and stop the machine.
ok im getting problem with stich counting sensor ,
im using photo inturrupter and get the signal ,with 1000 rpm , machine motor counter is correct but more than that is count is very wrong.
im using 20 mhZ xtal and my program is attached with this.
please check that and give solution.im stucked heare..
(i used mr fotios's program to scroll the display]

thanks,
best regards,
nuwan. :(
Attachments
Project_3.fcf
(16.87 KiB) Downloaded 272 times
Project_2.fcf
(15.66 KiB) Downloaded 238 times
Electronics for better world.

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: automatic sawing machine

Post by Benj »

Hello Nuwan,

Sound like an interesting project. I have had a brief look at the file but hard to know what's doing what at the moment. Could the limitation be something to do with the delays you are using or the time it takes to write to the LCD?

If it were me doing the project I would probably use a INT interrupt pin for the incoming signal so that I could generate a hardware interrupt for every time the signal has a rising edge. This way it should be quite simple to ensure that no pulses are missed even if processing a delay or other "slow" code such as the LCD routines.

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: automatic sawing machine

Post by nuwan5213 »

hi ben.
Could you give me any example flowcode.

Thanks,
Best regards,
Nuwan.
Sent from my mobile device.
Electronics for better world.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: automatic sawing machine

Post by saschech@gmx.de »

Hello nuwan5213

A long time i build automatic-units for sewing machines.A importent questione: what type of motor you use for your project?

Regards Wolfgang

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: automatic sawing machine

Post by nuwan5213 »

hi,
Wolfgang.
im using ac servo mortor calld ho-hsing .im ok with start stopping and varing speed of motor and i cand understand inturrupt principle.
anyway i change my program with rb0 inturrupt.
please check that.
i saw rbo property window shows 15HZ for scaning frequancy.and cannot edit that.
what is that???????????????????.if rbo scan frequancy is that 15hz valeue i think it is impossible to catch the hand wheel photo inturrupter signal again in high revolutions
of the motor.
am i correct.
regards.
nuwan
Attachments
Project_4.fcf
(16.39 KiB) Downloaded 279 times
Electronics for better world.

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: automatic sawing machine

Post by Benj »

Hello Nuwan,

The 15Hz showed in the interrupt property window is greyed out and only applies to timer based interrupts. The I/O based interrupts such as INT or IOC will run as fast as you can process the interrupt and return back to main from your interrupt service routine. Because of this it is normally advised to do as little coding in the interrupt service macro as possible.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: automatic sawing machine

Post by saschech@gmx.de »

Hi nuwan5213

Normaly,if you work with a dc-mot the count-impuls is giving out "1imp. per turn".For only count stich and stop,I use a prog.counter it is the easyst way
for memory all parameters;eg. Signo721 http://www.hengstler.com/de/products/shop.php

regards wolfgang

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: automatic sawing machine

Post by nuwan5213 »

hi ben,
Did you see the my progrm "test4"
Is anythig wrong with it.
Regards nuwan.
Sent from my mobile device.
Electronics for better world.

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: automatic sawing machine

Post by Benj »

Hello,

Looks ok to me though i have not checked the actual code itself, basically just check clock and config sections looked ok.

Post Reply