This is a brief tutorial that will show you how to connect your Arduino Uno to ThingWorx and upload values to a ThingWorx “Thing.” First you will learn how to set up a ThingShape, a Thing, a Service within your ThingShape, and an Application Key. Next you will learn how to program your Arduino Uno to start sending data to your ThingWorx Things! Two simple ThingWorx libraries along with example codes are included with this tutorial. They will allow you to start pushing data in minutes!
Requirements:
- ThingWorx hosted instance
- Arduino Uno
- Ethernet or WiFi Shield with corresponding libraries
- Arduino Environment
In this post:
Tutorial 1: Setting up your ThingWorx Thing
In order to start pushing data to ThingWorx, we must first define our ThingShape, service, Thing, and Application Key.
1: Create an Application Key
An application key is the authentication that you use to send or receive data from your Thing. It is associated with a ‘tag’ that is common to all of the components of your thing. To create the key first get to the home page of your ThingWorx Composer.
1.1: Under the “Security” heading on the left click on “Application Keys.”
1.2: Next, click on the “New” button towards the top of the screen. Fill in the required fields
1.3: Now, create a tag by clicking on the wand next to tags. Either choose an existing tag or create a new one. The tag ties your application key to all the components of your Thing.
1.4: After selecting a tag click Save at the top and you will see that an Application Key has populated the “keyId” field.
2: Create a ThingShape and Service
2.1: From the ThingWorx Composer home page select Thing Shapes on the left side of the page under the “Modeling” heading.
2.2: Next select “New” at the top of the screen and fill out the required fields.
2.3: Make sure your tag matches the tag you used when creating your Application Key. On the left side of the screen select “Properties.”
2.4: Select “Add My Property” to start adding Properties to your ThingShape. These are the values that you will be pushing to the ThingWorx site via your Arduino’s ethernet or wifi shield. Select “Number” as the type. You should have a Properties page that looks something like this:
2.5: Now we’ll create a service that reads values from your Arduino and populates your Properties with them. First, while still in the ThingShape edit mode, click on Services on the left hand side and select the “Add My Service” button at the top.
2.6: Fill in the Name and Description, then click on Inputs/Outputs.
Add inputs that correspond to the data values that you are sending from the Arduino. These input names MUST match the names that you select in your Arduino code (discussed later). Also make sure that the type is set to STRING. Next, we need to write a short JavaScript that will convert the string values to type float and then populate the properties. Note below that properties will have a “me.” in front of them.
2.7: Click the Done button at the bottom and then the Save button at the top to complete your ThingShape and Service.
3: Create a Thing
3.1: From the Composer home page click “Thing” and then click “New”. Populate the required fields. Make sure your tag is the same one you used for your ThingShape and Application Key. Choose the “GenericThing” as your Thing Template. Choose the ThingShape that you just created as your implemented ThingShape.
3.2: Now click Save and you’re done with your Thing!
4: Test your Service
4.1: While you are still in your Thing you can now test the service you made by clicking on Services on the left side of the screen. If the Service doesn’t show up then click save again on your Thing and ThingShape and close and reopen your Thing tab. The screen should look something like the one below when you click on Services.
4.2: Click the “Test” button on the Service that you just created and populate the fields. Click Execute Service.
4.3: Now exit out of that window and go to your Properties tab on the left and refresh the properties. The values should have populated into your properties!
If the properties didn’t update or you got a JavaScript error, be sure to check back through your Property names, types, and JavaScript code and ensure that it matches the formats from above.
Tutorial 2: Programming your Arduino
Included in this tutorial are two Arduino libraries, called ThingWorxWiFi (5.2 KB .zip) and ThingWorxEthernet (4.9 KB .zip). They also come with example programs. Download these libraries and place them in the /Arduino/libraries folder. Open up your Arduino Environment and under File/Examples, find the Example code for the particular hardware you are using (either WiFi or Ethernet shield). This tutorial will walk you through the Ethernet code. The WiFi code is almost identical save for the required WiFi network information. When you open the code it should look like this:
Make sure you denote how many values you will be pushing to ThingWorx (next to the #define sensorCount). Now fill in the required info: a unique MAC address, server, app key, thing name, service name, the names of your values or sensor values (these must match your Service variables exactly!), the time between connections, and the corresponding pins that your sensors are on. This is all you need to start pushing values! The code as written will send your raw (0 to 1028) analog to digital converted values to ThingWorx. You may choose to process your data into usable values before you send it off. If so, either modify the values in this loop:
Or however you see fit.
Creating Ideal Translation Workflows for Optimum Results
In Part Two of this post on coupling products for translation, we’ll discuss the specific steps that are required to implement complete translation projects – from managing technical content objects to managing costs and file collaboration. Refer to Part One for the overall solution design which shows the strengths of PTC’s Translation Manager, Windchill ProjectLink, workflow, reporting, and multi-lingual publishing and how they can be leveraged for translation.
The Process
There are six process components to the overall translation solution. The process starts and ends with PTC’s Translation Manager. Windchill ProjectLink is nested in the middle of the process to facilitate the business project, cost collaboration, and file transfers with Translation Service Providers.
Step 1. Designate Objects for Translation
The first step of the process begins with source content that is ready for translation to the target language(s). The content is stored in Product or Library folders in Windchill/Arbortext Content Manager. Here the project owner identifies complete document structures or document objects to be translated. A translation work package is created for the objects. The Translation Service Provider and target language(s) are designated with the creation of the translation package. Languages and Translation Service Providers are configurable.
At the completion of this step, the content is prepared for translation. It results with a collection of XML objects to be translated in a zip file. The source objects are set to the In Translation lifecycle state and the source content continues to be managed in relation to other content and states.
Step 2. Create Translation Project
In the second step, ProjectLink is used to create a translation project that contains any business-related activity required for traceability. This activity includes deadlines and due dates, assign internal resources to the project, and expose the project to Translation Service Provider(s) or other external users outside your firewall. Any cost information, such as Requests for Quote and quotations received can also be stored under the project.
To start, the translation zip package is posted to the project. From here, the package is available for workflow and lifecycle activities as well as for collaboration with Translation Service Providers. If a process for approving translation costs is required, the cost approval workflow would be executed on the translation package stored in the project. Providers will be able to see the source content in order to estimate the level of effort and designated project participants can see cost approved or not approved activity.
Step 3. Route Objects for Translation
This step in the workflow is for actual translation activities. Here Translation Service Providers can:
- Checkout and Download the package when it is ready to translate and
- Checkin and Upload the package when the work is complete.
This activity makes use of the translation package on ProjectLink so that collaboration with users outside your firewall can work on the project. The user interface is self-serving and provides traceability out-of-the-box. The zipped file is automatically iterated and historical versions are maintained on checkin so that everyone on the project is aware of the project status. Users can schedule alerts to immediately know when a critical threshold is reached. Therefore having the lifecycle states in ProjectLink enables real-time reporting on activities to show key performance indicators. Is the project on time? On budget?
Step 4. Route Translated Collateral for Approval
The approval workflow activity in step four supports reviewing translated content delivered by the Translation Service Provider. Reviews may be performed by local native language review teams or it may include users that have other roles on the project. This activity uses the translation package on ProjectLink so that collaboration for users inside or outside of your firewall can continue to work on the translation. As a result of this workflow, updates can be made either by the Translation Service Provider or by home team members.
Once the translation is approved, the translation project can be concluded and all ProjectLink activities closed. Even so, an organization may still elect to store invoices and final cost information in the project for matrix reporting and future planning purposes.
Step 5. Store Objects in Translation Library
After objects are translated, the final translation zip package is returned to the Translation Library where XML objects and images are stored. Here the translated target objects are bound to specific revisions and iterations of source objects for each language. For clarity on object status, objects are marked “Translated” or “Translated, Ready for Publish”.
When the objects are returned to Windchill/Arbortext Content Manager they can be published, updated, and iterated just like any other object. This is important since changes may be necessary to:
- validate the markup;
- facilitate aesthetics for publishing;
- change product names, service marks or other marketing decisions;
- change dates or other metadata.
Step 6. Route Assembled PDF Document for Approval
In an environment with shared document components, status checks are necessary to verify that all objects included in the document are ready for publishing. This is a key element of the process since some objects may be In Translation, others may be at earlier iterations with no recent updates, or they could be universal images that require no translation. When all objects in the translated document are Ready for Publish, the published document is created, and routed for review and approval. This may be the first time that a translated document is being reviewed as a whole, thus it may be the first time that all content is reviewed relative to the content around it. At this point, it is expected that any changes made during this stage would be made by the home team for content stored securely behind the firewall.
The document review and approval process should be the same as your usual published document review process with different resources for languages. Documents can contain a single language or there may be multiple languages per document depending on the style guidelines for your organization.
Summary
For anyone that has been involved in the translation process, you can likely sympathize on how complex and challenging the tasks can be. By putting ProjectLink to work in your translation process, it does not have to be the case. With PTC’s Translation Manager and Windchill ProjectLink, workflow activities can be more transparent, helping to streamline the translation process across all documents and languages that need to be managed. If you have questions about how ProjectLink, Translation Manager, or multi-lingual publishing solutions can be integrated into your organization, be sure to contact the EAC Product Development team from the links below.
Learn More
Be sure to read Part One of this post to learn more about the solutions being deployed in the workflow being described.
Why Translation Workflows Matter
For companies who require product documentation to be localized for regional use, the sheer number of translated objects makes translation management very important to the business and organization as a whole. Suppose, for the purpose of simple math, that you are translating to 9 languages. One source language plus 9 target languages is 10 languages total. That means up to 90% of the content you are managing is translated. 10% of those objects could be global images that do not require translation, which would drop managed translated content to 80%. In global companies, it is fair to say that a large majority of the content you are responsible for is translated.
One might think that the translation process would simply involve handing off copies of documents to translation teams and then waiting a few days/weeks for the local language versions to arrive, but in reality this process is much more complex. Even when the material is developed in a sophisticated technical documentation tool like PTC Arbortext, it remains necessary to closely administer this activity to avoid risks associated with mandates that vary in different geographies, inefficient file tracking, incomplete reviews, and delays throughout the translation lifecycle.
This is the first of a two part series that discusses how to optimize translation processes by coupling two complementary tools, PTC Translation Manager and PTC ProjectLink. By combining these tools, organizations can overcome several obstacles that either slow workflow processes or increase costs during the translation of technical documentation. Part one outlines these tools and the processes they are designed to address. Part two details how more efficient translation workflows can be arranged in order to expand past administering translated XML objects, to include management of peripheral translation activities such as cost quotations, file sharing, collaboration with translation service providers, and quality assurance processes.
PTC’s Translation Manager
Translation Manager is a component of the PTC Windchill Service Information Manager. The Translation Manager prepares content for translation by identifying document components to be translated, creating work packages for translation or translation service providers, and setting the InTranslation lifecycle state. Key features include:
- Automate the creation of translation packages using workflows
- Restrict creation of translation packages to authorized translation users
- Generate a translation package from a Publication Structure or an Information Structure or
- include select document objects by assigning the proper translation attribute and life cycle state
- Automatically associate translated dynamic documents with their source objects
- Identify whether a translation exists for a source document or not
- Bind specific revisions and iterations of source objects to translated target objects
- Publish translated dynamic document structures.
Post-translation, the Translation Manager stores content by linking translated objects to source document objects in the translation library and sets the Translated lifecycle state.
Windchill ProjectLink
ProjectLink enables defining and executing project plans as well as associating project tasks with product deliverables. Through a self-administered virtual workspace, ProjectLink provides project management capabilities and access to accurate product information for resources inside or outside of your firewall.
In this solution, Windchill ProjectLink is featured to facilitate translation tasks outside your organization.
Windchill Workflow and Reporting Features
Workflow and Reporting are core features of the PTC product suite and are available in all Windchill-based products including Arbortext Content Manager, Service Information Manager, and ProjectLink.
Workflow
Windchill Review and Approval Processes are used to automatically set the state of objects to the target lifecycle state and invite a list of Reviewers to provide comments.
Reporting
Windchill offers multiple tools to help decision-makers easily visualize trends, patterns and relationships using graphical and drill-down reports of key performance indicators. Simple and easy-to-use reporting and charting tools enable users to configure and save reports.
Publishing
PTC Arbortext Publishing Engine is a server-based system that assembles XML content and automatically publishes the content in both print and electronic forms, all with high-quality layout and formatting.
Stylesheets
Predefined stylesheets are used for layout and page composition. There can be different formatting options based on the language attribute assigned in the XML file.
XLIFF for Generated Text
Text that is generated by the stylesheet is translated once and stored for future use in an independent file. For example, text like the word “Table” is not translated with content. This is supported using XLIFF technologies. XLIFF is the XML Localization Interchange File Format which is used to store extracted text and carry the data from one step to another in the localization process.
Summary
As you can see, there are some pretty sophisticated tools available to support the translation process. The challenge is knowing how to leverage these tools to create a process that maximizes efficiency. Stay tuned, because we will be discussing just that in part two.
EAC Product Development Solutions (EAC), a leading provider of product development technology and services, is pleased to announce the acquisition of the Arbortext Business Unit of TerraXML. This acquisition makes EAC unique in providing a complete end-to-end systematized solution set for managing product information, executing processes within that system, and publishing relevant information both inside and outside the enterprise.
Burnsville, MN, March 19, 2014 — EAC Product Development Solutions (EAC) expands capabilities and services through the acquisition of TerraXML’s Arbortext Business Unit. This acquisition aligns EAC with industry trends toward Service Information Management (SIM), Service Lifecycle Management (SLM), and automated publishing of technical information. The Arbortext Business Unit will operate as the EAC Product Development Information Services group or PDIS, and provide implementation, customization, development, and support for the Arbortext product line.
Thane Hathaway, President and CEO of EAC said: “Small and medium businesses (SMB’s) need to manage and publish accurate product information in real time, across multiple platforms just like the Fortune 500’s, but they’ve never had a world class and affordable solution. With this acquisition, we’ve gained the unique ability to implement and support an end-to-end PLM and publishing system specifically tailored for SMB. We look forward to satisfying this market need while continuing to grow and develop these tools.”
Cory Huey, Vice President of Services at EAC said: “This acquisition opens the doors to many new possibilities. In the future, we will develop integrated dynamic publishing products that small companies can more easily afford and deploy. I’m excited to see where the market takes us from here.”
Acquiring the Arbortext Business Unit of TerraXML enables EAC to enter new markets and provide end-to-end solutions to the product development and manufacturing industries. Arbortext allows product companies to easily create products and technical publications and make that information available to customers, dealers, and service staff.
I’ve been a Mechanical Engineer for years. This means I’ve had many conversations with people regarding their opinions about the various CAD tools on the market. For the record, I’m a Creo and Pro/ENGINEER man. During these, sometimes heated, conversations I regularly hear people say that it takes too many mouse clicks to do something in Creo; whether that is creating a feature in sketcher mode or getting to the dialogue box to select a sketching plane for an extrude. Every time I hear this I have the same response. I tell them about a simple solution that’s built right into Creo. I use it every day. It’s the right mouse button.
The right mouse button (RMB) gives you several menu options depending on what mode you are in and what you are currently doing. For example if you are editing an extrude and you have the dashboard up and you hold down the right mouse button you will see options such as “Edit Internal Sketch, Clear, Surface, Thicken sketch, Flip Depth Direction, Add Taper, Show Section Dimensions.” I don’t know about you but I find that a lot faster and easier than digging through the dashboard.
This was just one quick example of using the right mouse button in Creo. Feel free to explore the right mouse button in other areas of Creo for different menu options. Let me know your favorite “short cuts” in the comments below.