Hello,
The Encoder rotary component exist but not for the simulation like switch, slider, ...
Is it possible to have this new component because I am creating an other component (expander + 4 encoders)
Thank you very much
Best regards
Encoder rotary for the simulation
Moderator: Benj
- 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: Encoder rotary for the simulation
Hello,
The Encoder Rotary component under inputs should have simulation and also simulate the pin states. What parts of the simulation are you currently missing?
The Encoder Rotary component under inputs should have simulation and also simulate the pin states. What parts of the simulation are you currently missing?
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
Re: Encoder rotary for the simulation
Hello
I need this component without pins connection because it is integrated in my new component that I want to simulate.
The new component is an MCP23017 connected to several rotary encoder.
Best regards
I need this component without pins connection because it is integrated in my new component that I want to simulate.
The new component is an MCP23017 connected to several rotary encoder.
Best regards
- 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: Encoder rotary for the simulation
Have a go with this and see if it does what you require.
Simply add to your v7 installation by copying the file below into your "Flowcode 7/components" folder.
The two pin states can be collated from the ReadCounter macro.
Pin1 = Counter & 0x01
Pin2 = (Counter & 0x02) >> 1
Also here is the source project if you want to have a play with it.
Let us know how you get on.
Simply add to your v7 installation by copying the file below into your "Flowcode 7/components" folder.
The two pin states can be collated from the ReadCounter macro.
Pin1 = Counter & 0x01
Pin2 = (Counter & 0x02) >> 1
Also here is the source project if you want to have a play with it.
Let us know how you get on.
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
Re: Encoder rotary for the simulation
Hi
I included one "SimQuadEnc" in "MCP23017_Encoder" component witch has INTA & INTB pins.
In the macro "CheckChangeSim" I read the counter of the "SimQuadEnc" and I check any change to set INTA.
But it's not a good solution, it's better if I can generate an interruption from the state of pin1 & pin2.
Click -> INT (SimQuadEnc) -> INTA (MPC23017_Encoder)
How to generate an interruption in the sub component "SimQuadEnc" that I can treat in the MCP23017_Encoder component ?
Is it possible to read a global variable set in "SimQuadEnc" linked with one property added in the "component properties" ?
Thank you for your help.
Best regards
I included one "SimQuadEnc" in "MCP23017_Encoder" component witch has INTA & INTB pins.
In the macro "CheckChangeSim" I read the counter of the "SimQuadEnc" and I check any change to set INTA.
But it's not a good solution, it's better if I can generate an interruption from the state of pin1 & pin2.
Click -> INT (SimQuadEnc) -> INTA (MPC23017_Encoder)
How to generate an interruption in the sub component "SimQuadEnc" that I can treat in the MCP23017_Encoder component ?
Is it possible to read a global variable set in "SimQuadEnc" linked with one property added in the "component properties" ?
Thank you for your help.
Best regards