First open the "CSON-Examples\a very basic Object Net" folder.

Here you can see some Classes, two CSON Example Classes (1 and 2) and a "CSON Example Net" class.

inheritance
The "CSON Example Net" has inherited from the "CSON-NetControl" class. It contains the ObjectNet itself, and ensures, that many instances of one net can be created.
Here the net is saved in: "CSON Example Net.MainObjectNet.vit" The name of the net is equivalent with tho Objectname.

The other two classes are the ones, which are getting launched inside the net. They have inherited from the "CSON-BaseClass", like every net-object has to do.

starting & control
For further advice create a Object of the type "CSON Example Net". Therefore you can use the ini.file, placed beside the class.

Done? You should see the ObjectNet Frontpanel now, already launched, with 4 controls, and 4 big buttons.

  • Inside the controls you can see the data of different services, which are getting observed from the net. e.g. the CSAge of your System.
  • The left button "Shutdown Net + Net-Objects + Controlers" does a full cleanup...nothing from the net should be left, if pushed
  • The second button keeps all Net-Objects alive. It only shutŽs down the control stuctures (The net itself and the LocalControlers)
  • The third button only shutŽs down the objects inside the net, with the net itself and the localControlers still alive
  • The right one doesnŽt shut down anything, it stops only the data visualisation, and gives the user (if not inside a execution System) the possibility to modify the net "on the fly"

where to edit a net?
Now push the "Stop serving for editing" button, and chage to the block diagram.

  • In the second frame of the sequenze, you can see your ObjectNet. the other frames does not interest you.
  • You see tree Lauch.viŽs, and as expected you can find tree new objects in your object Inspector. Inside the Lauch.viŽs you can choose, on which ports the Objects of the Net are talking together.
  • In this Net "ONTest 1" publishes a integer, "ONTest 2" Suscribes to that Service, and on update it publishes the integer as string. On that string "ONTest1" suscibes.
  • Further you can see "ONTest 3" Publishes a integer too, and also we can use a "Port Observer" to listen to existing Services, like the CSAge of our system.
  • The while loop is not a "must" inside the net. It gives only the possibility to close Circles, with the use of a shift register (the dummy.vi on the left side initializes the default of the shift).

I think thatŽs enaugh to give a first experience what you can do with a Object Net. If you want to code things, like hierarchical NetŽs, or if you want to use a existing class inside the net, take a look at the other two examples.

-- AlexanderSchwinn - 02 May 2007
Topic revision: r3 - 2007-05-02, AlexanderSchwinn - This page was cached on 2024-04-20 - 13:04.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)