Opto 22

43044 Business Park Drive, Temecula, CA 92590 USA
Local & outside the USA:(951) 695-3000
Toll-Free within the USA:(800) 321-6786
Fax: (951) 695-3095
Email: sales@opto22.com

Free IO4AB Technical Seminar in Your Area

Hot Tips from PSG: Using Nested If Statements in OptoScript

Join Us in Germany at the SPS/IPC/DRIVES Electric Automation Exhibition

SNAP PAC System Classes in Spanish Offered in Florida

Free IO4AB Technical Seminar in Your Area

SNAP I/O and CompactLogix

Don't miss learning how you—or an automation engineer you know—can use intelligent remote SNAP I/O to expand or supplement an Allen-Bradley® ControlLogix® or CompactLogix™ system.

  • Add I/O points without impacting performance on the controller.
  • Get PID loop control, temperature conversion, pulsing, and many other I/O functions at the local level—without programming.
  • Take advantage of FREE pre-sales engineering, FREE product support, and a lifetime warranty on most SNAP I/O modules.

Seminars are jointly sponsored by Opto 22 and our local distributors.

See list of seminar cities.
Find out more about seminar content.

Hot Tips from PSG: Using Nested Ifs in OptoScript


Opto 22's Product Support Group (PSG) develops some helpful tips as they work with customers who contact them for free product support.

"Recently while compiling some OptoScript code, I got the dreaded 'syntax error' on lines 92, 96, 102, 106,..." one PSG engineer told OptoNews recently.

"Since I've made this mistake before, I suspected the root cause of all these errors was a missing endif in my nested ifs."

If you use if statements nested within other ifs in your PAC Control OptoScript blocks, here are a few tricks to help you keep track of which if goes with which else and/or endif.

  • Type the else (if applicable) and endif immediately after typing your if/then line, and then fill in the code between them after that. That way you know they're all in place.
  • Use comments. Especially when you anticipate a lot of code between the if/else/endif, it may be helpful to add comments after each, such as:
    else // the opening of the comm handle failed
    endif // checking the comm handle open return value
  • Indent lines of code as shown in the PAC Control User's Guide section on OptoScript Control Structures. Then you can use the column number to match an if with an else or endif. Put the cursor just in front of one, note the column number, then look for the other half of the pair in the same column.

What if you still get that series of syntax errors? Watch for more tips in the next OptoNews.

Questions? Contact Opto 22 Product Support.

Join Us in Germany at the SPS/IPC/DRIVES Electric Automation Exhibition

SPS/IPC/DRIVES automation conference logo

Opto 22's Gerhard Kreiling will be glad to see you later this month at the SPS/IPC/DRIVES Automation Exhibition and Conference in Nuremberg, Germany.

Ethernet in Automation is one of the key topics of the conference this year. Gerhard will be in the ODVA booth (6-250) and the Hy-Line booth (6-140), showcasing intelligent remote SNAP I/O for Allen-Bradley ControlLogix and CompactLogix systems.

  • When: 25-27 November, 2008
  • Where: Exhibition Centre in Nuremberg, Germany
  • More information

SNAP PAC System Classes in Spanish Offered in Florida


Information: Optomize, Inc.
Phone: (954) 349-1616
Fax: (954) 756-7203
Email: training@optomizeonline.com
Website: www.optomizeonline.com
Location: 2800 Glades Circle, Suite 115
Weston, FL 33327 USA

Four-day, Hands-on SNAP PAC System Training in Spanish

When: November 17-20, 2008, 8:30 a.m. to 5:00 p.m. Lunch is included.

Cost: $1000 per person (receive a $500 certificate toward purchase of Opto 22 products through Optomize, Inc.)

Limited to eight (8) people

Description: Introduction to Opto 22's SNAP PAC System: PAC Project automation software, SNAP PAC programmable automation controllers, and SNAP I/O.

  • System configuration and programming
  • Networking capabilities
  • Diagnostics and troubleshooting
  • Communication options and protocols (TCP & UDP, IP, SMTP, SNMP, FTP, OPC, Modbus TCP, Modbus ASCII/RTU, Profibus DP, EtherNet/IP, Allen Bradley DF1, DNP3, etc.)

Please note: The November 17-20 SNAP PAC System class will be given in Spanish. Other classes are available in English. Contact Optomize for more information.

Lunch Seminars

When: Call for an appointment. FREE demonstration, lunch included.

Description: We visit you with sandwiches and a Learning Center to show you how powerful, robust, reliable, and easy-to-use the Opto 22 SNAP PAC System is.

Seminars can be given in Spanish or English.


All Opto22

Request Information
  • FREE Product Brochure
  • Product Demonstration
  • PreSales Engineering Assistance

Opto 22 Product Support

Opto 22 Product Support is FREE Monday through Friday 7 a.m. to 5 p.m. Pacific Time

Product Support Numbers:

Local: (951) 695-3080
Toll-Free: (800) 835-6786
Fax: (951) 695-3017