Live data input how to

For general Flowcode discussion that does not belong in the other sections.
Post Reply
PAAbbott
Posts: 18
http://meble-kuchenne.info.pl
Joined: Mon Dec 28, 2020 7:24 am
Location: South Africa
Has thanked: 17 times
Been thanked: 4 times

Live data input how to

Post by PAAbbott »

Good day

I am developing for a client and working with Can Bus and would appreciate some guidance

I have a sensor communicating via Can Bus I would like to know the following

1. Is it relay possible to pipe the live data into Flow Code and have my code work with that live data as it comes in Ie.. process it and present
processed data to me

2. If so what modal/modal`s do I need to have on my licences to do this.

3. What USB to CAN Bus converter is recommended (I have a USBCAN I & I am unsure if it will work with flow code specific)

4. How does one do this as I have not done this in any shape or form previously.

If this is not possible and i am expecting to much what is the close equivalent of it.

My reason behind this is I would like to develop the software and make sure it works and then design the hard were around it as far as possible

kind regards

Andre

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: Live data input how to

Post by BenR »

Hello Andre,

1) yes this is possible. I would maybe start by looking at our API slave components on the wiki. they include firmware and the component source for you to see how we are passing data back and forth from an embedded device.

https://www.flowcode.co.uk/wiki/index.p ... 9238744a75

2) I'm not sure you need any licenses to allow you to do this. However I beleive CAN may be under a license so you may need that. You could start with the simple MCP2515 external CAN transciever that's supported by our CAN component and controlled using SPI. This should then work as is with our existing API slave functionality.

3) I would do the USB to CAN interface yourself, either using an Arduino or another embedded device with USB connectivity as a bridge between the PC and the CAN. This is then guarenteed to work and you are in control in terms of the functionality available to you. As you say an off the shelf device is likely to be more locked down, may not work with Flowcode and won't provide the same learning experience to really get to grips with the comms.

4) The example avove should help to show you the way. We are currently working on a new automotive system which will include CAN and LIN and so it will likely be we add these to our API Slave devices soon. What sort of features do you need from the CAN interface?

PAAbbott
Posts: 18
Joined: Mon Dec 28, 2020 7:24 am
Location: South Africa
Has thanked: 17 times
Been thanked: 4 times

Re: Live data input how to

Post by PAAbbott »

Good day BenR

Thank you for your response it is highly appreciated

So I have read and analyzed what you have directed me to in terms of the wiki
and your response and think I have the required items and parts/components list down

In terms of hardware:

1. Arduino Uno (I have one on hand)
2. Can Bus shield (I have to two available one is the one I have been using in Jeri rig way connected my pic the other one is on stand by)
The shield communicates via Spi with my current pic so it is external Can Bus hardware that I am currently working with in any case
3. Required USB Cables (I have on hand)
4. Can Bus interface Cable (Existing one that I have been using all along)

In terms of Software:

1. Full comms A,B,C Pro (These I have)
2. Arduino Chip Pack ( I do not have this currently so if it is a must have I will have to make a plan to get it)*
3. App Developer Addon (This also I do not have currently so if it is a must have I will have to make a plan to get it)*
4. State Machine functionality (This also i do not have currently so if it is a must have I will have to make a plan to get it
I have no idea under what that falls, I suspect its the app developer, I think )*
5. Simulations pakige (This also i do not have currently so if it is a must have I will have to make a plan to get it)*

*unless loading the firm ware that is on the wiki in a zip is all I have to do and the rest is configuring the injector path in flow code in this specific
case (purely as a Can to USB/Flow Code input at this time)

on the config side of things I see they the do not mention Can Bus specific does that mean that I will be still setting up the External Can Bus Component as normal and use the can injector or the spi one that part of the puzzle is still a bit unclear to me where you tell it to get the data from the slave device during simulations.

Would you mined to elaborate a bit more on that Please.

This is part of a anti collision radar system, and the program has unexpectedly out grow the processor way sooner than I anticipated, being able to continue with the software development with out the constraints of hardware at this stage will help, as I can size the processor better ones the software is closer to the completion as well as the rest of the hard ware.

Inter acting with real time data and actual hardware has huge benefits if you ask me what I would like to see in the new automotive system which your working on that will be my contribution.

Ones again thank you for your time and effort it is highly appreciated.

Kind regards
Andre

lukassimek
Posts: 3
Joined: Wed Dec 15, 2021 9:48 am

Re: Live data input how to

Post by lukassimek »

Good day,
please inform me about an approximate date when the update for LIN bus control will be seen.
my next question is whether it will be possible to communicate with the LED driver MLX81106 / 7/8 and other components with similar features.
Thank you very much for your answer.

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: Live data input how to

Post by BenR »

Hello,

I've been working on the LIN components yesterday and they should be ready for release sometime in January.

Those devices look interesting and yes they look like they will be compatible.

lukassimek
Posts: 3
Joined: Wed Dec 15, 2021 9:48 am

Re: Live data input how to

Post by lukassimek »

Hello BenR,
please i have problem by create correct blocks for LIN bus master.
Have You some example bloks for flowcode (.fcfx) which i will use for me?
Thanks

lukassimek
Posts: 3
Joined: Wed Dec 15, 2021 9:48 am

Re: Live data input how to

Post by lukassimek »

Hello,
please i need help with sending first 14bit (break in header) on LIN bus. I have MCU 16F877A and UART blocks. I used TXSTA and TXREG but this is only 8 bits. Data was check with oscilloscope.
Thanks

Post Reply