SETL
Hello, I want to ask you how to use Global variables in OpenPLC Editor. I want to create pulse variables as 100ms, 500ms, 1s pulse from the cyclic program via Global variables, but it's not possible because the compiler generates an error. How it's possible to create Global variables, that ist possible use in all programs with different cyclic settings. Thank you very much. 
global_openplc_1.jpg  global_openplc.jpg 
Quote 0 0
thiagoralves
Hi SETL. Creating the global variable is just the first part of the problem. To use a global variable, for each program that you want to use it, you must add a variable with the same name and select External for the Class. Make sure that the type also matches your global variable otherwise you will get a type mismatch error during compilation.

Also, from the screenshots it looks like you have two programs (program0 and program1), but on your resource screen it shows only one instance running program1. With just one instance, the runtime will run only one program. If you want to run both programs at the same time (program0 and program1) you will have to create another cyclic task and another instance and associate it with program0. Then both programs will run concurrently.
Quote 1 0