|
Re: SPI on Raspberry Pi | 4DIAC [message #1818010 is a reply to message #1817906] |
Wed, 04 December 2019 08:11   |
|
Hi,
you can have a look at the FB creation tutorial and their specifically on the Service Interface Function Block section. What kind of CAN communication do you like to do? Is it like publish/subscribe then pelase read the documentation section on the communication architecture. If it is I/Os then I can only offer you code examples. Especially the Embrick module should be similar to what you need.
I hope this helps to get you started.
|
|
|
|
Re: SPI on Raspberry Pi | 4DIAC [message #1818048 is a reply to message #1818021] |
Wed, 04 December 2019 18:18   |
|
The reason I'm asking is mainly target towards how you would like to represent your requried CAN communication in IEC 61499. The most flexiblity you have when you are using a Publish subscirbe interface where you send plain CAN messages. However then you have to write FBs that will generate the messages and do all the padding and stuff (i.e., CAN messages have at max 8 bytes).
If you have other use cases you may want to do more in C++ code and have a simpler interface on IEC 61499 side.
|
|
|
|
Re: SPI on Raspberry Pi | 4DIAC [message #1818055 is a reply to message #1818054] |
Wed, 04 December 2019 21:10   |
|
With the information given so far I would say both is possible. However if on the other end of the CAN only IO modules or IO module like devices are connected I think the IO concept is the better solution.
However for starting the pub/sub approach may be easier (especially better documented)
|
|
|
|
|
|
|
Re: SPI on Raspberry Pi I/O expand | 4DIAC [message #1848083 is a reply to message #1848005] |
Fri, 19 November 2021 11:15  |
Jonathan Lainer Messages: 5 Registered: November 2021 |
Junior Member |
|
|
If you want to create your own function block (FB) to extend 4diac, I suggest you take a look at the corresponding documentation.
To embed custom code, you want to look at section Create a Service Function Block.
The documentation walks you through creating a FB interface in the IDE, exporting it and then adding your custom code to it.
If you encounter any problems or if something is unclear, please don't hesitate to ask!
[Updated on: Fri, 19 November 2021 11:17] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01747 seconds