|
|
|
Re: Using 4diac in Revolution Pi (RevPi) && IO accessing [message #1843652 is a reply to message #1843630] |
Thu, 12 August 2021 09:23 |
|
Hi,
the revpi allready follows our new IO infrastructure implementation (similar to modular wago and embrick). For this the PARAMS input is not used anymore but the instance name of the IX and QX function blocks. These names are mapped to the I/O pins of your IO modules.
The mapping itself is done in a seperate IO configuration. This IO configuration is again a 1499 FBNetwork. Typically we do it in a dedicated IO config resource in the target devices. There you need a master fb and in the order of the physical connection the IO module FBs daisychained with an adapter connection. With that 4diac FORTE can check if the right IO modules are connected in the right order on your backplane.
The IO module FBs have for every physical pin an string input where you can specify names of or you IX/QX blocks. On startup/init the mapping is performed.
For the revpi the master fb is the IORevPiCore, the IO blocks are IORevPiAIO and IORevPiDIO. Unforutnately I don't have the fbt files at hand. But you could manually reconstruct them from the Cpp files in patch.
I hope this helps,
Alois
|
|
|
|
|
Re: Using 4diac in Revolution Pi (RevPi) && IO accessing [message #1843771 is a reply to message #1843706] |
Tue, 17 August 2021 10:22 |
Tuojian Lyu Messages: 18 Registered: October 2020 |
Junior Member |
|
|
Hi Alois,
After some work on the IO configuration FBN, the problem is now that FBs, including IORevPiCore, IORevPiDIO and IORevPiBusAdapter, could not be initialized successfully, even though I included and compiled the RevPi IO module patch.
Steps to reproduce:
1. Pull the RevPi patch
2. Select FORTE_IO and FORTE_IO_RevPiModularIO in CMake (other options are the same as default from the tutorial)
3. Compile Forte successfully
4. Create SIFB, IORevPiCore, IORevPiDIO, and create an adapter, IORevPiBusAdapter.
5. Create a separate resource and map those FBs to this IO config resource and deploy. Those FBs could not be initialized correctly. (NO deployment error)
End of steps
I have two questions:
1. How to use an adapter in SIFB. From the tutorial, I only see how to use the adapter in basic FB and composite FB but not SIFB. How should I configure events links inside SIFB for the adapter? Or, I just need to drag and drop the adapter to its correct places (socket/plug) and that is all.
2. How do fbt files link to source files? Using the same names? I tried to test embrick IO config FBN and those FBs are working well. I noticed the core FB is called EBMaster but its corresponding source files are Master.cpp/.h under embrick module folder. How does the EBMaster FN link to Master.cpp/.h source files or binary files?
I suppose the fbt and its source files should use the same name so that RT knows where to find its binary. But when I check the EBMaster, it is not the case as I thought.
Br,
Tuojian
|
|
|
Re: Using 4diac in Revolution Pi (RevPi) && IO accessing [message #1843778 is a reply to message #1843771] |
Tue, 17 August 2021 17:18 |
|
Hi Tuojian,
not sure if fully understand you first question. The application fragment you are showing looks good. However when you get NA on monitoring it normally means that the FBs and ports could not be found in your FORTE. Did you get any errors during deployment? What is the output in your deployment console.
Yes 4diac FORTE and 4diac IDE communication with each other on name basis. So if you have fbt files with the same names and the same interface as in the cpp files everything should be fine.
Alois
|
|
|
|
Powered by
FUDForum. Page generated in 0.04341 seconds