Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel

Invitation Sent

Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
  • Home
  • Collaborate
  • Exchange Community
  • :
  • Private Communities
  • :
  • SmartX for Niagara
  • :
  • Graphical Script Blocks Overview (Comments / Issues / Script Syntax)
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Wireless Information Network Solutions
          • Instrument Area Network
          • Remote Monitoring
          • Tank Level Monitoring
          • Remote Data Collection
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Wireless Information Network Solutions
        • Instrument Area Network
        • Remote Monitoring
        • Tank Level Monitoring
        • Remote Data Collection
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
        • Community experts & publishers
          • Publishers Community
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Community experts & publishers
        • Publishers Community
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation Knowledge Base
    • Industrial Automation How-to videos
    • SCADA & Telemetry Solutions Knowledge Base
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Technology Partners
  • Support
    • Ask Exchange
    • Leaderboard
    • Our Community Guidelines
    • Community User Guide
    • How-To & Best Practices
    • More
Join Now
How can we help?
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
50915members
Join Now
244900posts
Join Now

Graphical Script Blocks Overview (Comments / Issues / Script Syntax)

Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Solved Go to Solution
Back to SmartX for Niagara
Solved
Jim_Okapal
Lt. Commander | EcoXpert Master Jim_Okapal Lt. Commander | EcoXpert Master
Lt. Commander | EcoXpert Master
‎2020-11-05 01:21 PM
0 Likes
1
218
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-05 01:21 PM

Graphical Script Blocks Overview (Comments / Issues / Script Syntax)

I've gone through the Graphical Blocks as they currently exist for Beta Version #4 (Build 23)

 

 

COMMON ISSUES FOR ALL BLOCKS:
1) Some input type choices may not apply to the block type
2) Input and Output names (in/out) can be changed, but the settings value reverts back

     to (in/out), while the block slot name will maintain the change.
3) Inputs and outputs start with an index of 00. Would prefer that it starts with 01.
4) The amount of block outputs can become greater than 1 if you change the input type so

     that the "save" button lights up and then you change the number of outputs followed by

     a save. The quantity of public numerics created will equal the number of outputs. Internally,

     all outputs of the block will be pointing to the first public numeric created.


***************************************************************
LOGIC BLOCKS:

 

Scripting Syntax:

AND: Utility1_out00 = BinaryInput1 And BinaryInput2
OR: Utility1_out00 = BinaryInput1 or BinaryInput2
XOR: Utility1_out00 = BinaryInput1 bitxor BinaryInput2
NOT: Utility1_out00 = BinaryInput1
Greater Than: Utility1_out00 = FloatInput1 > FloatInput2
Greater Than/Equal: Utility1_out00 = FloatInput1 >= FloatInput2
Equals: Utility1_out00 = FloatInput1 equals FloatInput2
Less Than/Equal: Utility1_out00 = FloatInput1 <= FloatInput2
Less Than: Utility1_out00 = FloatInput1 < FloatInput2
Not Equal: Utility1_out00 = FloatInput1 <> FloatInput2


Specific Block Issues:
1) NOT block: Value in equals the value out. Output is set as an
     Integer and isn't changeable. Problem can be seen in above script.

2) Output is set as an Integer and not changeable for
    GreaterThan
    GreaterThan/Equal
    LessThan
    LessThan/Equal
    Not Equal


***************************************************************
MATH BLOCKS:

 

Scripting Syntax:

Addition: Utility1_out00 = FloatInput1 + FloatInput2
Subtraction: Utility1_out00 = FloatInput1 - FloatInput2
Multiplication: Utility1_out00 = FloatInput1 * FloatInput2
Division: Utility1_out00 = FloatInput1 / FloatInput2
Average: Utility1_out00 = AVERAGE(FloatInput1 , FloatInput2
Maximum: Utility1_out00 = MAXIMUM(FloatInput1 , FloatInput2)
Minimum: Utility1_out00 = MINIMUM(FloatInput1 , FloatInput2)
Absolute: Utility1_out00 = ABS(FloatInput1)
Negative: Utility1_out00 = -FloatInput1
Power: Utility1_out00 = FloatInput1 ^ FloatInput2
Square Root: Utility1_out00 = SQRT(FloatInput1)
Modulus: Utility1_out00 = FloatInput1 MOD FloatInput2
Sine: Utility1_out00 = SIN(FloatInput1)
Cosine: Utility1_out00 = COS(FloatInput1)
Tangent: Utility1_out00 = TAN(FloatInput1)
Arc Cosine: Utility1_out00 = ACOS(FloatInput1)
Arc Sine: Utility1_out00 = ASIN(FloatInput1)
Arc Tangent: Utility1_out00 = ATAN(FloatInput1)
Exponential: Utility1_out00 = EXPONENTIAL(FloatInput1)
Factoral: Utility1_out00 = FACTORIAL(FloatInput1)
LogBase10: Utility1_out00 = LOG(FloatInput1)
LogNatural: Utility1_out00 = LN(FloatInput1)


Specific Block Issues:
1) Average: Max number of inputs is 15 due to function limit
2) Maximum: Max number of inputs is 15 due to function limit
3) Minimum: Max number of inputs is 15 due to function limit
4) Sine/Cosine/Tangent/ArcSin/ArcCos/ArcTan: Need a conversion factor when considering

     a typical user, since the most common method is to use degrees. The script function by

     default uses radians instead of degrees. There should be a conversion formula applied

     ahead of time.
     Radians = Deg * (3.1415/180)
     Degrees = Rad * (180/3.14159)
     Example:
     Typical Calculation: Sin(90deg) = 1
     Script Calculation: Sin((90deg) * (3.14159 / 180)) = 1

***************************************************************
PROCESS CONTROL BLOCKS (SELECT BLOCK):

 

Scripting Syntax:

1) Normal Link:
    If BinaryInput1 Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2

 

2) False setting,no link:
    If false Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2

 

3) True setting,no link:
     If true Then Utility1_out00 = FloatInput1 Else Utility1_out00 = FloatInput2

 

Specific Block Issues:
1) Inputs and outputs remain analog no matter what the input/output settings are changed to.
2) If switch slot is linked to an object, then an OFF value will send Input2 and ON Value will

     send Input1 (see above)
3) If switch slot is not linked and set for FALSE or set for TRUE, then Input1 will be passed no

     matter what. (see above)
4) If/Then/Else argument may need to focus on the value instead of the link name being injected

     into the syntax since that changes the overall meaning of the line. (see above)

 

***************************************************************
STRING BLOCKS:

 

Scripting Syntax:
Concatenate (Wrong): Utility1_out00 = ;(StringInput1 , StringInput2)
Concatenate (Right): Utility1_out00 = (StringInput1 ; StringInput2)
IndexOf: Utility1_out00 = FIND(StringInput1 , StringInput2)
Length: Utility1_out00 = LENGTH(StringInput1)
Numeric to String: Utility1_out00 = NUMTOSTR(FloatInput1)
String Select: If BinaryInput1 Then Utility1_out00 = StringInput1 Else Utility1_out00 = StringInput2
String to Numeric: Utility1_out00 = STRTONUM(StringInput1)
Sub String: Utility1_out00 = MID(StringInput1 , FloatInput1 , FloatInput2)

 

Specific Block Issues:
1) Concatenate: Block won't compile due to the ";" being in the wrong spot in the script. Proper

    syntax is shown below the incorrect one. Once changed, the block works.
2) IndexOf: Output needs to be numeric instead of string
    Example usage: Find(abcde,bc)
    Result: 2
3) IndexOf: "Find" syntax will find case insensitive items while "Search syntax will find case sensitive

    items. May need an more options to handle both scenarios.
4) String Select: Has same issues as Process Control Select Block
5) Sub String: Output needs to be string instead of numeric.
    Example usage: Mid(abcde,2,3)
    Result: bcd


***************************************************************
TIMER BLOCKS:

 

Scripting Syntax:
Current Time: Utility1_out00 = DATE
DateTime Select: If BinaryInput1 Then Utility1_out00 = DateTimeInput1 Else Utility1_out00 = DateTimeInput2
DifTime: (Wrong): Utility1_out00 = DIFTIME(DateTimeInput1 , DateTimeInput2 , MINUTE)
DiffTime (Right): Utility1_out00 = DIFFTIME(MINUTE,DateTimeInput1,DateTimeInput2)


Specific Block Issues:
1) Datetime Select: Has same issues as Process Control Select Block
2) DifTime: Function is misspelled and syntax is incorrect (see above)

 

***************************************************************

Solved! Go to Solution.

Labels
  • Feedback
  • Issue
Tags (1)
  • Tags:
  • english
Share
Reply

Accepted Solutions
Will_Workman
Janeway Will_Workman Janeway
Janeway
‎2020-11-11 08:40 AM
0 Likes
0
197
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-11 08:40 AM

Re: Graphical Script Blocks Overview (Comments / Issues / Script Syntax)

@Jim_Okapal.

 

Thank you for sharing the results of your testing.  Most of the issues that you have found have already been reported to Tridium and should be fixed in future build 24.

 

The one issue that had not been reported before was with Concatenate.  I will added that one to the tracker list.

 

The feedback on Radians vs Degrees is good.  I will submit to Tridium for it to default to Degrees.

 

 

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
1 Reply 1
Will_Workman
Janeway Will_Workman Janeway
Janeway
‎2020-11-11 08:40 AM
0 Likes
0
198
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-11 08:40 AM

Re: Graphical Script Blocks Overview (Comments / Issues / Script Syntax)

@Jim_Okapal.

 

Thank you for sharing the results of your testing.  Most of the issues that you have found have already been reported to Tridium and should be fixed in future build 24.

 

The one issue that had not been reported before was with Concatenate.  I will added that one to the tracker list.

 

The feedback on Radians vs Degrees is good.  I will submit to Tridium for it to default to Degrees.

 

 

See Answer In Context

Tags (1)
  • Tags:
  • english
Share
Reply
Top Experts
User Count
Will_Workman
Janeway Will_Workman Janeway
12
ChrisHoward
Lieutenant JG ChrisHoward Lieutenant JG
7
RandyDavis
Sisko RandyDavis Sisko
1
David_Purser
Sisko David_Purser Sisko
1
barry_sweet_abs
Lieutenant JG barry_sweet_abs
1
See More Top Experts
Find a Service Provider
Find a certified partner to help you address your integration, installation, maintenance and project needs.
View all Providers
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric