fasavard

Hi, 

 

I am quite new with the software so bear with me for the newbie question. 

 

I am trying to create my first function to use in a ladder project. 

So to test the procedure, I am trying to create a NAND function. Here's the step so far I do:
  1. Add Function
  2. In that new function, I add a Contunation1 and a Continuation 2 node that Hook in a AND function, then goes through an inverter to a Connection node. 
  3. Then I add the NAND function into my FD program
So far, I only get one node, with only an output. How do we assign with input is thought wich node? 

I have attached my project file to this Post 
Quote 0 0
thiagoralves
You don't use connections to define inputs or outputs of a function. You need to create variables and under "Class" you select either Input or Output. Then, that variable will be the input or output of your function. Naturally, functions already have one output defined which is the return value. FunctionBlocks don't have any output defined, so you need to create variables and assign them properly. Attached is an example project with the NAND function working.
Quote 1 0