MTCONNECT LIVE AGENT

Posted By Heleno 7/2/2012 9:20:27 AM
Add to Favorites0
Author Message
Heleno
 Posted 7/2/2012 9:20:27 AM
Esteemed User

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

Group: Administrators
Last Active: 7/12/2012 1:08:47 PM
Posts: 3, Visits: 43
Thank you William.
I'm doing every step you pointed me (I read all the MTConnect PDF files). My request //Linear[@name="Z"] returns an empty MTConnectStreams document and //Linear[@name="X"] returns all data for X axis. Should I conclude that the Live Agent never moves the Z axis? No one of my sample requests in the last weeks has returned any Z position information.


Thanks a lot!
will
 Posted 7/2/2012 12:43:39 PM
Supreme Being

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

Group: Forum Members
Last Active: 10/5/2015 12:03:20 AM
Posts: 37, Visits: 141
I think the Z axis is moved infrequently in this example (coming from a simulator that is running a very poorly written sample program). I was thinking of replacing the script with something better that also contains tooling, but haven't had the time. I will need to obscure all the program names, tool names, descriptions, and position data to do so. Takes some time to put these scripts together. The other option is to use my Heidenhain simulator, more on that in the next few days.

If you have any requirements, I think I may be able to put something together that would better fit the needs of at least one person (and therefor maybe more).

What do you need to do with the agent?

Best,
Will

To catch everyone up on the original email thread:


not sure what you're seeing. I just did a current: http://agent.mtconnect.org/current and there are values for all the data items. if you do a sample, there is the chance that you will only get a couple of components because you are grabbing a series of data from the agent and within that series there were no entries for the other components. If you would like to focus on a particular component you can give a path:

http://agent.mtconnect.org/sample?path=//Linear[@name="Z"]

If nothing comes back, that is because in the first 100 items there was no data for that component (same problem, now with a filter). You can scan the buffer by setting the from argument:

http://agent.mtconnect.org/sample?path=//Linear[@name="Z"]&from=203942917

or increasing the number of items you look at:

http://agent.mtconnect.org/sample?path=//Linear[@name="Z"]&count=10000

You can get a continuous stream using:

http://agent.mtconnect.org/sample?interval=1000&count=1000

will stream samples to you once a second. works on chrome, firefox, and safari.

When I write receive data from agent where I don't want to miss anything, I do the following:

1. Do a current:

http://agent.mtconnect.org/current

Parse the header and get the nextSequence attribute from the header. This will tell you where to start.



2. Stream samples:

Lets say the nextSequence="203942917" in the current:

http://agent.mtconnect.org/sample?interval=1000&count=1000&from= 203942917

Now you get everything. If you don't want to parse mime text docs, you can do the following:

http://agent.mtconnect.org/sample?count=1000&from= 203942917

Get the nextSequence from the sample and then sample every second:

http://agent.mtconnect.org/sample?count=1000&from= 203952917

This will give you everything as well. You can put this in a loop. If you get an empty streams document, this is because there is no new data... just wait a few seconds and the data will loop again.

btw... we should move this discussion to the forum: http://www.mtconnectforum.org/

Hope this helps,
Will Sobel
CEO
System Insights, Inc.
2550 9th Street, Suite 204B
Berkeley, CA 94710
Tel: +1-510-684-6400
Fax: +1-510-550-1976
http://www.systeminsights.com/
http://www.mtconnect.org/
http://projects.mtconnect.org/

Read our blog "Manufacturing Big Data" at: http://www.manufacturingbigdata.com/

The information contained in this electronic mail message and any attachments hereto is privileged and confidential information intended only for the use of the individual or entity named above or their designee. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copy of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by return message or by telephone, and delete the original message from your mail system.

On Jul 2, 2012, at 11:13 AM, Heleno Vale wrote:

Hello Dave and William,

Is there no "sample" for Z and C data in the MTConnect Live Agent?

The "current" request says "VMC-3Axis" device has a ComponentStream Linear Z and a Rotary C, but the sample request doesn't return its information.

Am I doing anything wrong?

Thanks a lot for your patience,
Heleno
7/6/2012 10:38:06 AM by will
Heleno
 Posted 7/3/2012 10:57:47 AM
Esteemed User

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

Group: Administrators
Last Active: 7/12/2012 1:08:47 PM
Posts: 3, Visits: 43
Hello Willian,

Thank you for your comments.

Is it possible for a component to receive both Rotary and Linear data through MTConnect? Is it possible for you to change the Live Agent so it can simulate Z and C data for the (same) tool?

I'm not a production or mechanical engineering student (I'm a computer science student), but I intend to create a generic virtual reality simulation for "any" CNC machine.

Thanks a lot,
Heleno
will
 Posted 7/6/2012 10:36:31 AM
Supreme Being

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

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

This sounds like a great project and I'll try to help in any way I can. I'll see if one of our customers or some data feed we have can provide a richer data set without having to obscure positions. The original idea of creating a data set with fake positions will make you sim look horrible since the spindle will be jumping around.

I would rather see if I can get real part and mix it with real tooling data. The best bet now would be the Heidenhain adapter since I get full tooling data from it. I'll sniff around and see if I can come up with something very soon.

Best,
Will Sobel
Heleno
 Posted 7/9/2012 12:11:05 PM
Esteemed User

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

Group: Administrators
Last Active: 7/12/2012 1:08:47 PM
Posts: 3, Visits: 43
Thanks a lot Will!

Just updating you:
Actually I can add any (number) devices the user wants to simulate inside the virtual world. Also, the user can add any components he wants to each device. Each device is a single thread and it reads its own XML file from the internet, so each one of its components behaves according to X and Y positions from the MTConnect Live Agent. It is working fine. Like I said, I didn't implement the Z position for the components because MTConnect Live Agent don't have it yet (or don't have it so well designed as the X and Y pos). My next steps are (I don't even know exactly because I never worked with a CNC machine or a manufacturing cell before.....I hope you can help me here):
1) implement the Z pos (the easier part);
2) read the door state (another easy part I think);
3) read C data to rotate a virtual component;
4) develop virtual conveyors and human and robotic operators (with only virtual data) to link the machines;
5) read and simulate the "part" data (and geometry) so I can synchronize each machine and have every virtual machine working together with real machines (a hard part);
6) dinamically modify a part based on X, Y, Z and C data
7) communicate from the virtual to the real world (the hard part, because I don't know if I can at least send simple text messages to most of CNC's, just to notify a operator regarding the virtual tasks to synchronize virtual and real worlds ...I think I will have to send messages to a separate computer)

Our lab is just beggining to work with MTConnect, so we need your help Smile
Thanks again!
Heleno

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top

Advertisements