usec delay error using INT variable
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:03 am, edited 1 time in total.
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
This should help you, since you can select a delay of uS or mS
http://www.matrixmultimedia.com/mmforum ... =29&t=6792
or
http://www.matrixmultimedia.com/mmforum ... =26&t=6967
again change from seconds to uS.
http://www.matrixmultimedia.com/mmforum ... =29&t=6792
or
http://www.matrixmultimedia.com/mmforum ... =26&t=6967
again change from seconds to uS.
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:03 am, edited 1 time in total.
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:03 am, edited 1 time in total.
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
Sorry, I did not realise you used the example posted. I thought I was offering a solution.
Can you see if this is exactly the same please. If it is I will look a bit deeper into what the problem is.
PortB 0 = input. Port B1=output.
It will start off with a delay of 257 uS, and increase by pressing and releasing switch on port B1, or decrease by pressing and releasing switch on port B0
Since this is only a delay test, you will find that off time is slightly longer than on time i.e 344uS V 322uS, this is only due to switch detection test effectively placed after the call for off delay time.
If you want to post your flowcode, I can have a look to see where the problem is.
Can you see if this is exactly the same please. If it is I will look a bit deeper into what the problem is.
PortB 0 = input. Port B1=output.
It will start off with a delay of 257 uS, and increase by pressing and releasing switch on port B1, or decrease by pressing and releasing switch on port B0
Since this is only a delay test, you will find that off time is slightly longer than on time i.e 344uS V 322uS, this is only due to switch detection test effectively placed after the call for off delay time.
If you want to post your flowcode, I can have a look to see where the problem is.
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
I have removed the delay flowcode, and made this one more accurate with a compensation formula. I hope Ben or Steve can come up with a better formula because one is definitely required for better accuracy (or even a different method). I have also change the flowcode slightly so on and off times are equal, but you can still used two port B inputs (B0 and B1) to decrease or increase time respectively.
- Attachments
-
- large int uS delay1.fcf
- (9 KiB) Downloaded 325 times
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:04 am, edited 1 time in total.
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
Jan, I did not have the same problem as you, for on time of 257uS. I have left default time of 1000uS since was testing a range of times. You could try downloading this latest file I have posted, and set the time for 257uS.
If it works for you, then there could be a problem with your flowchart, perhaps there is a slight programming error? At least with flowchart posted, it is truly variable and the rest can be adated for your requirements.
If it works for you, then there could be a problem with your flowchart, perhaps there is a slight programming error? At least with flowchart posted, it is truly variable and the rest can be adated for your requirements.
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:04 am, edited 1 time in total.
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
by medelec35 on Sun Feb 21, 2010 10:18 pmJan Lichtenbelt wrote:Dear medelec,
You wrote: "You could try downloading this latest file I have posted". Which file and where can I find it?
Called: large int uS delay1.fcf
about four posts up from this post.
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:05 am, edited 1 time in total.
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
3. At last I made my own programm which works well, see attachment "large int uS delay version JL.fxf" .
- Attachments
-
- large int uS delay version JL.fcf
- (13.59 KiB) Downloaded 318 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: usec delay error using INT variable
Sorry Jan I misread the most important part 
Glad you have got it working. I shall have to read more carefully in the future.
So the one I created had even on/off times.Jan Lichtenbelt wrote:The total on and off time is 1000 usec.
Glad you have got it working. I shall have to read more carefully in the future.
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Deleted
Last edited by Jan Lichtenbelt on Sat Feb 27, 2010 9:05 am, edited 1 time in total.
- 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: usec delay error using INT variable
Thats a bit harsh Jan, Medelec doesn't work for Matrix and certainly doesn't have to give out his free time to help people. As you seem to be asking a lot of questions I would apologise or he may choose not to help you again in future.
Also why "must" we do something? We provide this level of support because we like the product and want to see it evolve and get better. Also being an educational company we do not like to see customers struggling. Please make no mistake there is no "must" about it.
Post up the program that you think should be working and I will look into it for you.
Also why "must" we do something? We provide this level of support because we like the product and want to see it evolve and get better. Also being an educational company we do not like to see customers struggling. Please make no mistake there is no "must" about it.
Post up the program that you think should be working and I will look into it for you.
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
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: usec delay error using INT variable
Dear Medelec,
Thanks a lot for your help.
But I think personal discussions should be out of this Forum and should not be archived by Google and therefor I removed my contribution.
Kind regards,
Jan
Thanks a lot for your help.
But I think personal discussions should be out of this Forum and should not be archived by Google and therefor I removed my contribution.
Kind regards,
Jan