Created variables do not appear in process data workspace

Hello, I’m using pcworx to command an AXC 1050, but I have a problem, I want to assign process data to variable I created in the IEC programming workspace (in order to use them in “main”), but they never appear in the process data workspace so I can’t assign them the process data I want. If anyone can help me please.

Hello, Am I correct in assuming that you’re using PC Worx version 6.x, with an AXC 1050 controller, and not PC Worx Engineer version 7 with an AXC F 2152 controller? If that is the case - then I’m afraid you will need to contact your local Phoenix Contact office for technical support, since that is not a PLCnext controller. (but here is a small hint:

- In your “Main” IEC program, declare the I/O variable with the “External” option.
- In the Global Variable table, create a variable with the same name and type as the External variable in Main.
- The variable will now be visible in the Process Data Workspace and can be connected to I/O data.) Hope that helps! Martin.

Hello again, It seems to work ! thank you !!!

- In your “Main” IEC program, declare the I/O variable with the “External” option.

- In the Global Variable table, create a variable with the same name and type as the External variable in Main.
- The variable will now be visible in the Process Data Workspace and can be connected to I/O data.)

Hi Martin, I have 2 questions about this: I want to create a function block with a variable from my program connected to it. I want to be able to pass in an address-string using the code interface in PCNe/PCWE First question : I am looking on how to expose my variables globally to the PLC and i keep reading about declaring a variable using an ‘external’ option. I don’t know exactly how this is done. Is it in the port definition, like below ? or did you mean the ‘extern’ C keyword //#port
//#external
//#attributes(Input|Retain)
//#name(address)
uint8 address[9]; Second question : im using a uint8 instead of a string since that isnt yet supported but i wonder if it’s possible to send a string to this variable from PLCn for example from the port list (where i can perfectly toggle booleans etc) because the value only shows […] I know i can update the individual chars from the watch window but that’s not the preferred way.. Thanks in advance!!

Hi Thomas, The thread you are replying to related to PC Worx 6, not PLCnext Engineer … so the answer I gave will not necessarily apply to PLCnext Engineer. If the questions you have are about PLCnext Engineer, please branch your question into a new post and I will answer there. Thanks!