BL0032 windspeed

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

Moderator: Benj

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

BL0032 windspeed

Postby Monie Jacobsen » Wed Sep 25, 2019 11:19 am

Hi everyone
Want to be able to read pulses on one entrance.
Is there anyone here who will help
Have tried many times but without result
Med still can't read a frequency
Attachment:
READ FREQUENCY_BL0032.fcfx
(11.51 KiB) Downloaded 23 times


Do you have a code suggestion so that it becomes possible to read a sequence?
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 562
Joined: Wed May 31, 2017 11:57 am
Has thanked: 54 times
Been thanked: 316 times
Contact:

Re: BL0032 windspeed

Postby mnf » Wed Sep 25, 2019 1:57 pm

Hi Monie,

You don't seem to enable your timer interrupt in the code sample...

Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Wed Sep 25, 2019 2:38 pm

Hi mnf

OK, I look at this and return to you.
Thank you so much for your attention.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Wed Sep 25, 2019 3:51 pm

Hi mnf

Have tried the attachment below!
But can't make WindSpeed work :oops:
Attachment file:
BL0032_PulsIn.fcfx
(14.51 KiB) Downloaded 32 times
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 562
Joined: Wed May 31, 2017 11:57 am
Has thanked: 54 times
Been thanked: 316 times
Contact:

Re: BL0032 windspeed

Postby mnf » Wed Sep 25, 2019 5:30 pm

I did a simple frequency counter example here: https://www.matrixtsl.com/mmforums/viewtopic.php?f=26&t=20970&hilit=Frequency+counter that used two interrupts to count frequency... I used a rtc chip to generate the 1s interrupt rather than an inbuilt timer.
I have an anemometer here that came from a broken weather station I will can havea play with - but not too to tomorrow evening - and hopefully you'll be up and running by then :D

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Thu Sep 26, 2019 8:37 am

Hi mnf
Thank you so much for your suggestion.
The codes look exciting.
I usedsPIC Programmer BL0032
User I2C 4 line Display:
And user input B0
User FG085 Function Generator.

When pulse in at 92 Hz is displayed "PulsIn: 5050".
Where I wanted to be shown 9.2 m/s
Do you see where things go wrong in the codes?
Please see attachment:
BL0032_PulseInTest.fcfx
(18.14 KiB) Downloaded 17 times
Best Regard
Monie

mnf
Valued Contributor
Valued Contributor
Posts: 562
Joined: Wed May 31, 2017 11:57 am
Has thanked: 54 times
Been thanked: 316 times
Contact:

Re: BL0032 windspeed

Postby mnf » Thu Sep 26, 2019 7:14 pm

Hi Monie,

This is trying to do something different? Measure the length of a received pulse?

Martin1 (medelec) posted some PIC code here https://www.matrixtsl.com/mmforums/viewtopic.php?f=26&t=14749&p=59273&#p59273 that may do what you need?

Martin

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Fri Sep 27, 2019 10:51 am

Hi everyone

Regarding interrupt port for BLl0032
Does anyone have a record of interrupt for Port and Pin. number.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Sun Sep 29, 2019 5:08 pm

Hi everyone
I wish here to be able to press 2x keyboards simultaneously.
Keyboards type:BL0138
As an example: Press = 10 and Press = 11
Do you have a suggestion on how to write it as codes?
Press.JPG
Press.JPG (38.03 KiB) Viewed 1023 times
Last edited by Monie Jacobsen on Tue Oct 01, 2019 6:55 am, edited 1 time in total.
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Mon Sep 30, 2019 8:08 am

Hi Moni,
Monie Jacobsen wrote:HI medelec35
Pulse & frequency Meter User BL0032 - 16-Bit dsPIC ?
I have tried a lot to make your codes work with BL0032 - 16-Bit dsPIC but, with no luck!
Is it something you want to help with?

Please see attachment below;-)
Attachment:
Pulse & frequency Meter using CCP R1_v6_Test.fcfx

What about the basic frequency counter I created for you in 2012:
https://www.matrixtsl.com/mmforums/viewtopic.php?f=28&t=20253&p=89433&#p89433
That could be a starting point for you?
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Mon Sep 30, 2019 8:35 am

HI medelec35

"The basic frequency counter you created for me in 2012"
It will be very good to use in connecting a BL0032 - 16-bit dsPIC.
Just made the frequency counter work ;-)
But I do not have the opportunity to choose other ports from which I can read the Frequency.
Can only read from PB1!
Missing record for attach interrupt options, stating Time 1 to Time 9 And their respective Pin number.
Is it something you want to help inform?
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Mon Sep 30, 2019 10:01 am

Hi Monie,
you can only use different pins if the interrupt allows you to via port mapping.
These users thanked the author medelec35 for the post:
Monie Jacobsen (Tue Oct 01, 2019 6:50 am)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Mon Sep 30, 2019 10:46 am

Hi medelec35

Want to use different Interrupt for BL0032 - 16-bit dsPIC.
But the Pin numbers are missing!
Therefore, I need an overview of connectivity options
Properties Interrupt.JPG
Properties Interrupt.JPG (37.38 KiB) Viewed 994 times

Is that something you can help with?
Have no experience with IOC PORT!

See attachment:
READ FREQUENCY_BL0032.fcfx
(12.73 KiB) Downloaded 15 times
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Mon Sep 30, 2019 11:07 am

The timer interrupt is just for that purpose alone.
Does the INT/0 have a remap option?
Just select properties and change the selection to the required pin.
If not, then you can select INT/0 to INT/4.
If that is possible then hardware redesign?
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Mon Sep 30, 2019 11:12 am

I have just looked at your flowchart.
You are using INT2 and it does have a remap option, so you can select RB0 to RB15 etc.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Mon Sep 30, 2019 6:02 pm

Hi medelec35
Now read READ FREQUENCY_BL003 signal via Port as described below.
User:
INT4 = RB8 (Port BH)
INT4 = RB7 (Port D7G)
INT4 = RF0 (Port F0)

Thank you so much for your great help ;-)
Now I can work on the project...
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Tue Oct 01, 2019 7:01 am

Hi everyone
I wish here to be able to press 2x keyboards simultaneously.
Keyboards type:BL0138
As an example: Press = 10 and Press = 11
Do you have a suggestion on how to write it as codes?
See the picture below:
KeyPad_BL0138.JPG
KeyPad_BL0138.JPG (31.07 KiB) Viewed 950 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 1912
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: BL0032 windspeed

Postby LeighM » Tue Oct 01, 2019 10:00 am

Hi Monie,
The design of the keypad is such that you cannot press two keys at once and know what they are.
Only one key press at a time is detected.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Tue Oct 01, 2019 10:23 am

Hi LeighM
Do you have another suggestion that will have the same effect of activating 2 KeyPad?
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Tue Oct 01, 2019 11:19 am

Hi Monie,
I have no idea if attached will work.
Can you let me know please?
Attachments
Multiple Keys.fcfx
(8.57 KiB) Downloaded 14 times
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Tue Oct 01, 2019 12:14 pm

Hi medelec35
Has insert a comment in attached codes!
Cannot then use KeyPad again!
Or continue with the codes afterwards!
Please see the codes here:
Attachment file:
BL0032_KeyPress.fcfx
(58.59 KiB) Downloaded 29 times
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Tue Oct 01, 2019 12:22 pm

Not sure what you are saying, but I have modified your flowchart.
Attachments
BL0032_KeyPress.fcfx
(59.28 KiB) Downloaded 17 times
These users thanked the author medelec35 for the post:
Monie Jacobsen (Tue Oct 01, 2019 12:43 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: BL0032 windspeed

Postby Monie Jacobsen » Tue Oct 01, 2019 12:43 pm

Hi medelec35

It just works now ;-)
Thank you very much :D
Best Regard
Monie

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Tue Oct 01, 2019 12:43 pm

Looking at the first loop,it has now been made redundant.
All you need is:
Dual Keypress.png
Dual Keypress.png (49.09 KiB) Viewed 922 times
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8440
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2412 times
Been thanked: 3451 times
Contact:

Re: BL0032 windspeed

Postby medelec35 » Tue Oct 01, 2019 12:48 pm

Monie Jacobsen wrote:It just works now

Thanks for letting me know, I was not sure without hardware to test it on.
The flowchart is just relying on the fact that two keys are never pressed and released within a few microseconds of each other.
These users thanked the author medelec35 for the post:
Monie Jacobsen (Tue Oct 01, 2019 1:08 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.