Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Send data between FB(Send data between FB to RPI)
Send data between FB [message #1754024] Mon, 13 February 2017 21:39 Go to next message
Gustavo Caiza is currently offline Gustavo CaizaFriend
Messages: 3
Registered: February 2017
Junior Member
Sorry for my english
I want to create new function blocks to control the digital inputs and outputs of the raspberry, when creating a function block if I can use the digital inputs and outputs, but when I create two FB one to declare the input pins and another to execute the process does not work, I do not know what is the problem, my code is bad or maybe I should also schedule the events.
I want to send data of type BOOL from one FB to the other, as I can do.?
Attached my code,
Thank you

void FORTE_PRUEB1::executeEvent(int pa_nEIID){
case scm_nEventINITID:
pinMode (PIN1(), INPUT);
if (digitalRead(PIN1())==0)
else {VALUE1()=false;}

void FORTE_PRUEBA2::executeEvent(int pa_nEIID){
case scm_nEventINITID:
pinMode (PIN2(), OUTPUT);
if (true==VALUE2())
else {digitalWrite(PIN2(),LOW);}
do not forget to send output event, calling e.g.
  • Attachment: rpi.png
    (Size: 37.97KB, Downloaded 40 times)
Re: Send data between FB [message #1754025 is a reply to message #1754024] Mon, 13 February 2017 22:12 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
As stated in my other comment please consider using the existing IO FBs. If you wan to develop your own FBs please have a look on the tutorials in the 4diac docs. Especially the flip-flop tutorial should be there for you.
Previous Topic:4DIAC 1.8.4: Color of mapped FBs and SubApps
Next Topic:[HELP] Raspberry Pi GPIO Usage- Beginner
Goto Forum:

Current Time: Tue Oct 16 17:35:05 GMT 2018

Powered by FUDForum. Page generated in 0.01948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top