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 » how to "writePin()"function?(how write pin output hight or low?)
how to "writePin()"function? [message #1778931] Mon, 25 December 2017 02:46 Go to next message
Barry wan is currently offline Barry wanFriend
Messages: 40
Registered: July 2017
Member
hi,
writePin() function,can be found in QX fb. I can't figure out that how does this function work. Which param. decide the result of writePin() output hight or low
on real GPIO_Pin?
Re: how to "writePin()"function? [message #1778934 is a reply to message #1778931] Mon, 25 December 2017 09:01 Go to previous messageGo to next message
Michael G. is currently offline Michael G.Friend
Messages: 10
Registered: December 2017
Junior Member
Hi,

you must have a processinterface like "sysfs"
Add this on your CMake...
sysfs write/read on GPIO Pins (QX, IX).

Or you make a own interface.
For a own is easiest to copy sysfs,
but note that sysfs only include IX and QX on CMakeList.

  • Attachment: sysfs.PNG
    (Size: 39.54KB, Downloaded 84 times)
Re: how to "writePin()"function? [message #1778966 is a reply to message #1778931] Tue, 26 December 2017 21:44 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

hi,

the class CProcessInterface which is requird to implement the writePin function is in the used pattern a parent of QX, IX, IW, QW. As such it has access to all inputs and outputs of the FBs. The typical implementation is to use the params input in the initialize function for setting up anything needed and in the write and read function use this information to perform the action. The return value should always indicate if reading or writing succeeded.
Previous Topic:forte log
Next Topic:Function Block Library Documentation
Goto Forum:
  


Current Time: Fri Apr 26 12:19:09 GMT 2024

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

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

Back to the top