You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old February 17th, 2018, 07:43 PM   #1
xzy1023
Member
Canada

xzy1023 is offline
 
Join Date: Apr 2013
Location: Toronto
Posts: 7
WonderWare ArchestrA Script Function Library

I am trying to use lots same scripts in the ArchestrA IDE, so I decide to develop Custom Script Functions in Visual Studio for AppServer. I know the IDE is able to import the "dll" library fill. But I have no clue where to start.

Let me start with simple AddFunction() on .Net 4.5 Framework in Visual Studio using C# code.
Here is the code:

namespace Demo
{
public class DemoClass
{
public int GetAdd(int a, int b)
{
return a + b;
}
}
}

After I import the dll to IDE, I am able to see the function in the Function Browser. But when I am trying to use it in the script, it shows the "Unknow Method" fault. Anyone have thoughts about that?
Attached Images
File Type: png Snipaste_2018-02-17_19-38-34.png (31.8 KB, 9 views)
File Type: png Snipaste_2018-02-17_19-37-37.png (16.9 KB, 5 views)
File Type: jpg Snipaste_2018-02-17_19-48-40.jpg (33.7 KB, 6 views)

Last edited by xzy1023; February 17th, 2018 at 07:51 PM.
  Reply With Quote
Old February 17th, 2018, 08:22 PM   #2
lostcontrol
Member
New Zealand

lostcontrol is offline
 
lostcontrol's Avatar
 
Join Date: May 2009
Location: NeverSayNever
Posts: 761
Does intellisense worm?
Try demo.add..?
  Reply With Quote
Old February 17th, 2018, 08:54 PM   #3
xzy1023
Member
Canada

xzy1023 is offline
 
Join Date: Apr 2013
Location: Toronto
Posts: 7
Still not working.
When I use the system function the intellisense pop up, but not the MyFunction().
When I move the mouse to the fuction, system indicate the Unknown Method.
Attached Images
File Type: png Snipaste_2018-02-17_20-48-32.png (4.8 KB, 5 views)
File Type: png snipaste_20180217_204950.png (7.4 KB, 5 views)
  Reply With Quote
Old February 17th, 2018, 09:04 PM   #4
lostcontrol
Member
New Zealand

lostcontrol is offline
 
lostcontrol's Avatar
 
Join Date: May 2009
Location: NeverSayNever
Posts: 761
Hmm, I did this a couple of years ago but would have to hunt it down.
It might be that you have to declare a variable as your class, then run the function (getAdd..?)
That is the way a lot of dotNet functions work in SP
  Reply With Quote
Old February 17th, 2018, 09:19 PM   #5
xzy1023
Member
Canada

xzy1023 is offline
 
Join Date: Apr 2013
Location: Toronto
Posts: 7
Cool, it's working perfectly. You are super helpful.
I don't know how to express my gratitude.
Attached Images
File Type: png snipaste_20180217_211644.png (11.9 KB, 20 views)
  Reply With Quote
Old February 18th, 2018, 03:26 AM   #6
lostcontrol
Member
New Zealand

lostcontrol is offline
 
lostcontrol's Avatar
 
Join Date: May 2009
Location: NeverSayNever
Posts: 761
No worries, glad I could be of help & you got it working.!!
Something to be aware of is updating our functions, I can’t quite recall but did have some issues I think..
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Wonderware Archestra Object Export Problems iampatrick LIVE PLC Questions And Answers 1 October 28th, 2015 02:11 PM
wonderware intouch to archestra varunmahendran91 LIVE PLC Questions And Answers 0 April 20th, 2015 10:00 AM
Archestra SQL Datagrid and Wonderware TonytheEE LIVE PLC Questions And Answers 0 March 15th, 2013 11:04 AM
Wonderware Simple Script geniusintraining LIVE PLC Questions And Answers 5 March 2nd, 2007 01:36 PM
Wonderware Script Issue ControlLogix LIVE PLC Questions And Answers 2 October 24th, 2005 11:56 AM


All times are GMT -5. The time now is 03:48 AM.


.