leon78 Member L Join Date Jul 2004 Posts 65 Dec 7, 2022 #1 I need to use the pragma statement with type of device (PLC). For example: Code: {IF defined ([I][B]PLC type = Control Win V3[/B][/I])} a := TRUE; {ELSE} a := FALSE; {END_IF} How I do it? What should I replace the text PLC type = Control Win V3 with?
I need to use the pragma statement with type of device (PLC). For example: Code: {IF defined ([I][B]PLC type = Control Win V3[/B][/I])} a := TRUE; {ELSE} a := FALSE; {END_IF} How I do it? What should I replace the text PLC type = Control Win V3 with?
ndzied1 Lifetime Supporting Member Join Date Aug 2002 Location Chicago, Illinois Posts 2,857 Dec 7, 2022 #2 Not sure what you are really trying to do but have you looked at the help on pragmas? https://help.codesys.com/webapp/_cds_struct_reference_pragmas;product=codesys;version=3.5.12.0
Not sure what you are really trying to do but have you looked at the help on pragmas? https://help.codesys.com/webapp/_cds_struct_reference_pragmas;product=codesys;version=3.5.12.0
cardosocea Member C Join Date Nov 2016 Location Fields of corn Posts 2,639 Dec 7, 2022 #3 I don't think you can do it with a PRAGMA call... but this is likely the variable you need to put it in runtime code. https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version https://faq.codesys.com/plugins/servlet/mobile?contentId=24510495#content/view/24510495
I don't think you can do it with a PRAGMA call... but this is likely the variable you need to put it in runtime code. https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version https://faq.codesys.com/plugins/servlet/mobile?contentId=24510495#content/view/24510495
leon78 Member OP L Join Date Jul 2004 Posts 65 Dec 7, 2022 #4 ndzied1 said: Not sure what you are really trying to do but have you looked at the help on pragmas? https://help.codesys.com/webapp/_cds_struct_reference_pragmas;product=codesys;version=3.5.12.0 Click to expand... I looked there and didn't find. But I know a few pragmas that are not in this section. They are mentioned in the Codesys FAQ https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version I think there is another list. Last edited: Dec 7, 2022
ndzied1 said: Not sure what you are really trying to do but have you looked at the help on pragmas? https://help.codesys.com/webapp/_cds_struct_reference_pragmas;product=codesys;version=3.5.12.0 Click to expand... I looked there and didn't find. But I know a few pragmas that are not in this section. They are mentioned in the Codesys FAQ https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version I think there is another list.
leon78 Member OP L Join Date Jul 2004 Posts 65 Dec 7, 2022 #5 cardosocea said: I don't think you can do it with a PRAGMA call... but this is likely the variable you need to put it in runtime code. https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version https://faq.codesys.com/plugins/servlet/mobile?contentId=24510495#content/view/24510495 Click to expand... I need pragmas because there is an inaccessible for Win V3 function in my program. And I have a problem, if I try to download my program to Win V3 on the PC instead needed hardware
cardosocea said: I don't think you can do it with a PRAGMA call... but this is likely the variable you need to put it in runtime code. https://faq.codesys.com/display/CDSFAQ/Reading+the+Compiler+and+Runtime+Version https://faq.codesys.com/plugins/servlet/mobile?contentId=24510495#content/view/24510495 Click to expand... I need pragmas because there is an inaccessible for Win V3 function in my program. And I have a problem, if I try to download my program to Win V3 on the PC instead needed hardware