Hi,
In Labcetner VSM they have a component called COMPIM which allows you to connect the simulation with a real serial port so the simulation can use real time data.
In the real project I am using a Raspberry Pi and I have a USB device that sends a serial string for the data. I was wondering if such a thing exists in FC so when I simulate the project on the PC I can connect to the USB serial device to use real time data.
If not would it be worth putting the post in the feature request to see if other people thing it would be useful.
Bob
Is it possible to use USB device within a simulation
-
- Posts: 279
- http://meble-kuchenne.info.pl
- Joined: Sat Mar 19, 2022 4:53 pm
- Has thanked: 25 times
- Been thanked: 30 times
-
- Valued Contributor
- Posts: 988
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 517 times
Re: Is it possible to use USB device within a simulation
Hi Bob,
Yes - it's possible using the SCADA options - at least for some boards. See new project - AppDeveloper - Templates - API - Scada for some examples.
The board needs to have the SCADA firmware loaded on it. See https://www.flowcode.co.uk/wiki/index.p ... _Developer for an intro.
Martin
Yes - it's possible using the SCADA options - at least for some boards. See new project - AppDeveloper - Templates - API - Scada for some examples.
The board needs to have the SCADA firmware loaded on it. See https://www.flowcode.co.uk/wiki/index.p ... _Developer for an intro.
Martin
-
- Valued Contributor
- Posts: 1181
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 287 times
- Been thanked: 417 times
Re: Is it possible to use USB device within a simulation
Hi
If only during simulation then depending on the component you are using, under properties there will be a simulation setting in which you can specify options such as a Comms port or Human Interface etc
Hope this helps,
Regards
If only during simulation then depending on the component you are using, under properties there will be a simulation setting in which you can specify options such as a Comms port or Human Interface etc
Hope this helps,
Regards
-
- Matrix Staff
- Posts: 1269
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 168 times
- Been thanked: 285 times
Re: Is it possible to use USB device within a simulation
App Developer's main function is to produce PC-based apps and not really a simulation of an embedded target. You would typically use it to create apps that interact with hardware you have designed (e.g. using those API components) or with 3rd-party hardware.
When simulating an embedded app (i.e. using Flowcode with an Embedded project rather than an App Developer project), there should be ways for the simulation to interact with "real" serial data. For example, if you are using the UART component in your project then there is a "Data Source" property under the "Simulation" group of the component properties that should allow you to link directly with the USB device that is usually connected to the Raspberry Pi. The reference for this component's properties are here:
https://www.flowcode.co.uk/wiki/index.p ... _reference
When simulating an embedded app (i.e. using Flowcode with an Embedded project rather than an App Developer project), there should be ways for the simulation to interact with "real" serial data. For example, if you are using the UART component in your project then there is a "Data Source" property under the "Simulation" group of the component properties that should allow you to link directly with the USB device that is usually connected to the Raspberry Pi. The reference for this component's properties are here:
https://www.flowcode.co.uk/wiki/index.p ... _reference