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

TOPIC: PLC programming

PLC programming 16 years 2 months ago #149

  • Ohl
  • Ohl's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Hi,

Another newbie question:

How do I create a PLC code-snippet (function) that I can call multiple times?

What I would like to do is a function that checks the status signals of a frequency converter and then starts the converter if everything is ok. It would also be nice to get fault indication etc and of course to be able to stop the converter...

I will have 10 of these converters and I donĀ“t like to code the same thing several times.

Thanks in advance!
/Ohl
The administrator has disabled public write access.

Re:PLC programming 16 years 2 months ago #150

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
Hi,

You have build a function object, which isn't the easiest thing to start with as a beginner in Proview plc programming...

A function object is created in the class editor, and there is a new chapter 'Class Editor' in the designers guide that is present in the web version of designer guide. The section 'Function object classes' describes how to build function objects.

/Claes
The administrator has disabled public write access.

Re:PLC programming 16 years 2 months ago #151

  • Ohl
  • Ohl's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Okay, then I know what to do this weekend...

/Ohl
The administrator has disabled public write access.

Re:PLC programming 16 years 2 months ago #155

  • Ohl
  • Ohl's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Hi again

I have tried to follow the guidance in the Designers Guide but when I try to create a $ClassDef object under the $ClassHier object I get the following message:
\"Class is not a toplevel class in this window\"

This is strange because the window (Class Editor) is completely empty when it opens. I have tried to insert the $ClassDef as a child and also as a sibling but without success.

What am I doing wrong here?

/Ohl
The administrator has disabled public write access.

Re:PLC programming 16 years 2 months ago #156

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hello !

At the top level you should create a $ClassHier-object and name it \"Class\". Under this (as children) you can create the classes.

/Robert
The administrator has disabled public write access.

Re:PLC programming 16 years 2 months ago #157

  • Ohl
  • Ohl's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 102
  • Karma: 3
Hi!

Yes, I am trying to do that. I have created a $ClassHier-object at root-level and this object is by default named \"Class\".

Then when I try to add a child of type $ClassDef, as suggested in the Designers Guide, I get the mentioned message in the status line at bottom of the window.
To add the child I have tried the following:
* selecting the $ClassDef-object in the left pane and middle click on the $ClassHier-object and also below it. Only thing that happens is that the selected $ClassDef is deselected + mentioned message.
* selecting the $ClassDef-object in the left pane and right click on the $ClassHier-object to get the popup menu that usually pops up. Result is the popup menu is not shown for some reason and the selected $ClassDef is deselected.

In the same manner I cannot create any other type of object from the left pane either.

Have also tested this logged in as administrator.

/Ohl
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.373 seconds