Where to get started...

Posted By cjohnson 3/18/2013 5:24:19 AM
Add to Favorites0
Author Message
cjohnson
 Posted 3/18/2013 5:24:19 AM
Esteemed User

Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)

Group: Forum Members
Last Active: 11/12/2013 2:18:14 PM
Posts: 3, Visits: 40
In our facility we have a machine control which a colleague of mine is collecting data from already. The machine is being accessed via a COM API through a home grown VB.Net application. Currently the application is only publishing the data to an Excel file with averages for overrides, run time totals, etc.

Here is where I need some guidance:
Since the connection to the control has already been accomplished in VB.Net, I believe that I need to use System.Net.Sockets.NetworkStream to publish an XML stream of the events to a socket that the cpp agent will access. Does this approach seem valid? What other than a raw XML stream needs to be provided to the agent? I have spent quite a bit of time reviewing the information already available before posting, but I am missing some of the information needed to get started. I believe I can use VB.Net to format an XML stream to comply with the standard, but getting that information to the Agent is where I have a hanging point. Am I on the right track?
will
 Posted 4/5/2013 11:54:48 AM
Supreme Being

Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)Supreme Being - (22,688 reputation)

Group: Forum Members
Last Active: 10/5/2015 12:03:20 AM
Posts: 37, Visits: 141


The Data Format you need to use is actually much simpler than XML, it is just a pipe delimitated stream of data looking something like this:


2009-06-15T00:00:00.000000|power|ON|execution|ACTIVE|line|412


I have put together a an instructional lab for the MTConnect MC2 conference. The lab is meant to be taught, but I think it could be self serve as well. If you are attending, we will walk you through it, otherwise there will be some video coming out to explain. The Lab goes through how to create an adapter in C# (VB.NET will be very similar). If you need help, I can walk you through it and tell you how the bits fit together. The link for the lab and the lab project on github is:


MC2 Adapter Lab


Please get back to me if you have any questions, I'd be happy to help guide you.

Best,
Will Sobel
cjohnson
 Posted 4/10/2013 2:37:10 AM
Esteemed User

Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)Esteemed User - (2,567 reputation)

Group: Forum Members
Last Active: 11/12/2013 2:18:14 PM
Posts: 3, Visits: 40
Will,

I apologize I'm just now seeing this. I was able to stumble my way through the adapter. I have the appropriate data string publishing and updating to port 7878, which I can confirm via a browser or telnet. I have everything on the adapter side working except allowing for multiple requests. I modified an example device.xml and agent.cfg file and setup the c++ agent on one of our servers, but I'm only seeing unavailable on the agent side.

Thank you for your response and the link to the lab materials. I regret that I was unable to attend the conference this year, but I will dig through the lab and see if I can find async code that I can apply towards my adapter.

Best Regards
richsunhyd
 Posted 2/22/2016 8:04:12 PM
I'm hooked

I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)I'm hooked - (495 reputation)

Group: Forum Members
Last Active: 2/22/2016 8:01:26 PM
Posts: 1, Visits: 1
495
Will,



Is there a .NET SDK available for Visual Basic instead of C#?

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top

Advertisements