Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: C code and GE editor

C code and GE editor 13 years 6 months ago #1022

  • anmi
  • anmi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hi,

I have created a class volume and the class editor with a C code. I have compiled and I obtain the .o file ( that I put in .opt file).

Now I want to do a Ge editor and connect the variables of C code ( In1, In2 , Factor and Out)to the GE editor and see the results ( The values of Out) on the Ge editor. How can I connect these variables? I can't find it in the guide.

Thanks.
The administrator has disabled public write access.

Re:C code and GE editor 13 years 6 months ago #1024

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3175
  • Thank you received: 501
  • Karma: 133
When you have created the function object class and the c-code you open the configurator for the root volume and activate Update Classes. Then you open the plc editor for an PlcPgm object, create an instance of your functions object and connect the inputs and outputs to suitable objects. When the node is built and Proview runtime is started, you can open Plc Trace for the PlcPgm from the runtime navigator to se the result.

To connect an attribute of a function object to a Ge graph, you select the attribute, e g Factor, in the configurator and Ctrl / Doubleclick in Ge to the grapical element you want to connect it to. You will find the function object below the PlcPgm and below the window (W) object. Note that you normally can't show an Input attribute that is connected to another object in the plc-code as this is a pointer to the output or signal it is connected to. You have to show the output or the signal instead.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.946 seconds