Morning everyone,
How do you go about receiving and then acting on multiple received bytes from a comms port.
So, say I setup a transmit AE 12 AC (whatever) how do I act on these bytes to do some on the receiving end, what is the decision method to extract the data from these bytes and act on it - how is it done.
Thanks
Matt
UART - Decision on Received Bytes
- 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: UART - Decision on Received Bytes
Hi Matt,
Examples 1 and 2 on this Wiki page should help to get you started.
https://www.matrixtsl.com/wikiv7/index. ... ateMachine
Let us know how you get on.
Examples 1 and 2 on this Wiki page should help to get you started.
https://www.matrixtsl.com/wikiv7/index. ... ateMachine
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
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: UART - Decision on Received Bytes
Hi Ben,
Thanks for the Link
Unfortunately I don't have the Comms Pack for USB so I can't simulate "1"
Number "2" doesn't seem to do anything in Simulation
MAtt
Thanks for the Link
Unfortunately I don't have the Comms Pack for USB so I can't simulate "1"
Number "2" doesn't seem to do anything in Simulation
MAtt
- 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: UART - Decision on Received Bytes
Hi Matt,
Are you providing data to drive the simulation, say via a COM port or via another Flowcode sim running and connected using the vNet injectors? The example is a communications example and needs communications data to drive it. It's more a how to handle the comms data using a state machine that I thought would be useful to you.Number "2" doesn't seem to do anything in Simulation
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
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: UART - Decision on Received Bytes
Hi Ben,
I think the code in principle is exactly what I'm after. I was thinking of the same idea just dont how to do it fully.
Im confident I could read in a byte of data when a RX Int was triggered and use it with a decision but it's the next stage I'm struggling with. How and where do you read the subsequent bytes store it in a buffer (somewhere) untilit tcan be read and act on it.
I have no idea what an injector is or what is used for,
Matt
I think the code in principle is exactly what I'm after. I was thinking of the same idea just dont how to do it fully.
Im confident I could read in a byte of data when a RX Int was triggered and use it with a decision but it's the next stage I'm struggling with. How and where do you read the subsequent bytes store it in a buffer (somewhere) untilit tcan be read and act on it.
I have no idea what an injector is or what is used for,
Matt