Mayesha

How to declare a variable in the editor, whcih is as follows:

Ticker : BLINK := (ENABLE := TRUE, TIMELOW := T#100MS, TIMEHIGH := T#1S)
Reply 0 0
thiagoralves
I don't know where you got that line of ST code, but first you need to create this 'BLINK' FunctionBlock, as that does not exist on the standard FunctionBlocks.
Reply 0 0
Mayesha
Can you give me a simple example of how to create a function block with those parameters? I am new to structured text.
Reply 0 0
thiagoralves
Click on the grey plus symbol on the left panel and select FunctionBlock. Then on the variable panel on top, click on the green plus symbol to add the variables: ENABLE, TIMELOW and TIMEHIGH as input. That's easy. The problem is not creating the block. The problem is the logic that resides inside the block. As I said, I suggest you go back to whatever book or article you took that line of code from and try to get the code for that BLINK block. I can infer it just blinks the output according to the times that were provided, but even then you still need to write the code for that.
Reply 0 0
Reply