I write to you an example how to develop a simply FBD program, that copies a logic input on a logic output. To do it you you cannot simply connect the logic input to the output, you have to use the MOV instruction.
In the example program, I have also written the MyFunction function, this to explain to you how is possible to write the own functions or function blocks, and then use them (Any times it’s needed) in the programs.
It’s obvious that you can manage the I/Os in any of the 5 languages provided by the IEC61131 norm, but normally it’s better to write the logic sequencies in the IL or LD languages (Example program Printout, Download).