Using the SNAP PAC REST API with Excel
Documents
- 2229
- Published:
This document (included in OptoTutorial 2229) provides the instructions to create a Microsoft Excel® worksheet with Visual Basic® for Applications (VBA) macros that:
Read and write to...moreThis document (included in OptoTutorial 2229) provides the instructions to create a Microsoft Excel® worksheet with Visual Basic® for Applications (VBA) macros that:
Read and write to input and output points via the SNAP PAC REST API
Parse JSON text strings
Check for input and return errors
Collect data on an automated interval and display it in an Excel chart
For more tips, help, and code samples, visit the Opto 22 Developer’s portal at http://developer.opto22.com.
This tutorial is based on the hardware and software that come with a SNAP PAC Learning Center (part number SNAP-PACLC). NOTE: Due to the unavailability of essential parts, the SNAP-PACLC is obsolete as of April 2022. This document will remain available on our website for customers who already own a SNAP PAC Learning Center.
If you don’t have a Learning Center but you’re comfortable using PAC Manager™ and PAC Control™, you can modify the instructions to work with your own Opto 22 devices.
You’ll need:
Microsoft Excel 2007 (or higher) and a basic understanding of how to create, open, and close worksheets, select cells, and resize columns
A SNAP PAC Learning Center (or your own SNAP PAC R- or S-series controller and I/O modules)
PAC Project™ Basic (included with the Learning Center and also available to download for free from the Opto 22 website) and a good understanding of PAC Manager and PAC Control
The files in this tutorial’s download file
<less