This is an old revision of the document!
TransSECS_Host –Configuring Event Data Collection Reports
This article describes how to use events for data collection in TransSECS.
For S1F3 polling–another approach of collecting and storing data, from periodic S1F3/S1F4 messages between events, please see this wiki article: TransSECS Host--Configuring S1F3 Polling in TransSECS for a Host Project
Before this, you should have done tool characterization that is connected to your host project, and you have requested defined RPTIDs from the tool, by right clicking on “RPTIDs” and “Online RPTIDs from Tool”.
For tool chracterization, see article TransSECS Host: Example of Characterization using GEMHost and the StandAloneGEMTool here.
The following steps describe how to setup RPTIDs to link with VIDs, CEIDs and collect data in TransSECS for a GEM host project, with StandAloneGEMTool.
Add and Configure RPTIDs
Right click on “RPTIDs” and select “Add RPTID”.
Now you see one RPTID0 (-1) listed under the RPTIDs.
RPTID Configuration
RPTID: must be greater than zero and unique
RPT Name: a unique name for this report, must start with a letter character and have no spaces
Then select the VIDs to be requested in the report. Select VIDs on the left side of the list and press the > arrow key to select these one at a time and move them to the right side. VIDs on the right side will be used in the report.
Note: CLOCK and VIDs with spaces in their names should not be used. CLOCK is often a reserved word in SQL (specifically MySQL) so will cause a database write error if used as a column name. You can rename the VIDs in the VID node so there is no conflict (do not change the VID id number, only the text name). Same with VIDs with spaces in the names. Either remove the space or use an underscore _ character for the space.
Now link reports (RPTIDs) to the events (CEIDs): One event can have many reports, depends on how you define the RPTID and what data you want to collect. Here we have an example of linking RPTID100 (LotData) to “START” event, and link RPTID(100) and RPTID(101) to “COMPLETED” event.
Add this script to the “Script” box, to check for quality and validate the other variables:
var TransSecsController = Java.type('com.ergotech.transsecs.secs.TransSecsController');
var StringValueObject = Java.type('com.ergotech.vib.valueobjects.StringValueObject');
if (incomingValue.getQuality() === 0) {
var map = incomingValue.getProperty("MAP");
if (map !== null) {
var controller = TransSecsController.getSingleController();
if (controller !== null) {
var name = controller.getControllerName();
if (name !== null) {
map.put("EQUIP_ID", new StringValueObject(name));
}
}
}
}
incomingValue;
Select and Link to the Database Table
The last step is to select the database table to store data.
For how to setup database connection and historical tables, please see “Database Connection” and “Historical Table Setup” section in this article: Configuring S1F3 Polling in TransSECS for a Host Project
If you've setup database Connection and historical table, under the RPTID configuration, there is a Devices and Tag selector shown in the image below.
Select the Device Name (the database connection name) and the Tag Name (your Historical table bean for this data collection).
This completes the setup of event report data collection. The next step is to build the project, go live with the tool, start collecting data, and check that the data is stored as expected in the database table.
Build and Test
Make sure your tool is running and ready for a host connection. For this test we are using the StandAloneGEMTool running on localhost and listening on HSMS port 5010/id 1.
In TransSECS press the hammer/start button to build the project. When the project is built, toggle the SIM button to LIVE.
On StandAloneGEMTool, select the STARTED event and trigger it, then you can trigger the COMPLETED event. The data should be saved as you trigger the events.
Check the Event Data Collection
You can check the table you created in the database.








