1 / 10

WATS CLIENT API

WATS CLIENT API. Ragnar Engnes, Virinco Martin Lentz, Virinco. Client overview (Ragnar) .NET Converter in C# (Ragnar) LabVIEW Toolkit (Martin). Client overview. WATS User I nterface WATS TDM Interface WATS MES Interface. WATS Server. WATS Client Service (Transfer Agent)

dyan
Download Presentation

WATS CLIENT API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WATS CLIENT API Ragnar Engnes, Virinco Martin Lentz, Virinco

  2. Client overview(Ragnar) .NET Converter in C# (Ragnar) LabVIEW Toolkit (Martin)

  3. Clientoverview WATS User Interface WATS TDM Interface WATS MES Interface WATS Server WATS Client Service (Transfer Agent) Converters.xml Converters Teststand Standard Text Format Custom Drop Folders

  4. TDM Interface • Build UUTreports • Sequences • Measures (Numeric, String, PassFail...) • Charts • Attachments • Submit • Query

  5. TDM api Class model

  6. .NET Converter • In Visual Studio, create new Class Library (assembly/.dll) • Reference the TDM apidll (Program Files\Virinco\WATS\Designsupport) • Write the converter class that implements IReportConverter: • class MyConverter : IReportConverter • public Report ImportReport(TDM api, System.IO.Stream file) • < Read File and use api to create the report, eventually call Submit if file contains many reports> • Complete example on:https://virinco.zendesk.com/entries/23872588-Create-custom-WATS-Client-converter • Primary input is a file in any format • Delimited Text, XML, Binary • Can also fetch data from database, web-services etc. (.NET is the limit) • Planned improvements: GUI for configuration, examples database

  7. MES Interface • Production (active units, batches) • Product (product / revision information) • Workflow (validate, checking, start test) • Software (Download software)

  8. internalvoidSubmitToWATS() { try { if (_tdm.Status != Virinco.WATS.Interface.APIStatusType.Online) _tdm.InitializeAPI(true); if (unitinfo == null) { messageEvent("No person registered, scan barcode", MessageTypes.Error); return; } WorkflowResponseresp = _mesWorkflow.Validate(unitinfo.SerialNumber, unitinfo.PartNumber, ActivityMethod.StartTest, "Height Measure",null,wfUseStatus); if (!resp.ok || resp.InstanceStatus != WorkflowInstanceStatus.ActiveWorkflowExist) { messageEvent(String.Format("Workflow not ok: {0}\r\n{1}", resp.ErrorMessage, resp.Description),MessageTypes.Error); return ; } if (HeadPosition == 0) { messageEvent(String.Format("No measure obtained, try again"), MessageTypes.Error); return; } resp = _mesWorkflow.StartTest(unitinfo.SerialNumber, unitinfo.PartNumber, "Height Measure", null, false, false, wfUseStatus); messageEvent("Starting test: " + resp.Description, MessageTypes.Info); UUTReportuut = _tdm.CreateUUTReport("oper", unitinfo.PartNumber, unitinfo.Revision, unitinfo.SerialNumber, "80", "WATSUp2014", "1.1.1.1"); uut.AddMiscUUTInfo("Name", PersonName); uut.GetRootSequenceCall().AddNumericLimitStep("Height").AddTest(HeadPosition, Virinco.WATS.Interface.CompOperatorType.GELE, 150, 220, "cm"); _image.WritePngFile(@"c:\Tmp\Person.png"); using (FileStream fs = newFileStream(@"c:\Tmp\Person.png", FileMode.Open, FileAccess.Read)) { BinaryReader r = newBinaryReader(fs); byte[] buff = r.ReadBytes((int)fs.Length); uut.GetRootSequenceCall().AddGenericStep(GenericStepTypes.Action, "Picture").AttachByteArray("Image", buff, "image/png"); } _tdm.Submit(SubmitMethod.Automatic, uut); resp = _mesWorkflow.EndTest(unitinfo.SerialNumber, unitinfo.PartNumber, "Height Measure", ActivityTestResult.Passed, false, null,false,false,wfUseStatus); messageEvent("End test - height sent to WATS: " + resp.Description, MessageTypes.Info);

  9. LabVIEW Toolkit

  10. Download and install WATS Client WATS Plug into TestStand or LabVIEW in minutes

More Related