Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SL to Ethernet or RS232?

Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
08-02-2009 15:29
Ok I have an Industrial PLC that has either Ethernet or RS232 capability.
What I want to do is be able to send recieve a small filestring to and from a SL prim or perhaps viewer.
The file string would just be Digital Inputs & Outputs Signals/Status, doubleword integers etc.
So then I could use SL like a HMI to show a virtual representation of a real machine and it's status and control it from SL.
Is there any stuff already built like this or is there a scripter who can do this, my scripting skills are pretty basic.
_____________________
Level 38 Builder [Roo Clan]

Free Waterside & Roadside Vehicle Rez Platform, Desire (88, 17, 107)

Avatars & Roadside Seaview shops and vendorspace for rent, $2.00/prim/week, Desire (175,48,107)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
08-02-2009 16:01
You are going to need to study up on http in LSL.

http://wiki.secondlife.com/wiki/Category:LSL_HTTP
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-02-2009 16:06
Unless you've got an Internet Protocol (IP) stack with with Transmission Control Protocol (TCP) built on top of it, and Simple Mail Transfer Protocol (SMTP, i.e. e-mail) or Hypertext Transfer Protocol (HTTP) built on top of the TCP--all on your PLC--you are really, really going to want a PC (or SOME kind of more sophisticated device) in between your chip and SL.

Once you handle that low-level end, the PC-to-SL part should be pretty easy and we can certainly help.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-02-2009 16:07
With the right software loaded on the PLC, you can do it.

If you're looking for someone to hire to do it, I would suggest posting a request in the Employment ops forum. Before you do, I would strongly suggest writing up some kind of formal specification for the project, which essentially details out what you are trying to do so that the person you hire can get a good idea of what you're trying to do and give you a good idea of what it will cost.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
08-02-2009 16:10
Here's a link on the general subject: http://www.ugotrade.com/2008/02/21/the-wizard-of-ibms-3d-data-centers/ .
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
08-02-2009 16:20
http://jon.oxer.com.au/sb/modules/talks/attachments/112/20081121-RealWorldSecondLife.pdf

http://channel3b.wordpress.com/2007/01/24/real-life-control-panel-for-second-life/
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-02-2009 16:49
Hmm. Well, it is certainly easier to create a specialized control in software than in hardware, though I'm not sure what's wrong with the WWW if you really want its use distributed. I know, I know: "Spoilsport!" :p
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
08-02-2009 16:49
qDot, the teledildonics guy, ought to know all about such matters, I would think.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
08-02-2009 17:26
From: Hewee Zetkin
Hmm. Well, it is certainly easier to create a specialized control in software than in hardware, though I'm not sure what's wrong with the WWW if you really want its use distributed. I know, I know: "Spoilsport!" :p

Well it was more I don't think a FX2N PLC can hook to the WWW directly and I'm only looking at this stage at our machines in our factory network, though there is something about modem options, but really it's little brain is designed for processing inputs and outputs, so I'm trying to work out a way to talk to it on as simple terms as possible without spending a fortune on OPC servers and Hardware. The ethernet or RS232 card is going to cost me AU$500 as it is, unless I find a bargain s/h unit.
I've seen the RealXtend has a X10 driver, but that's doesn't seem to have more than basic digital, I don't think it can handle a 32bit Signed Double Integer :)
Unfortunately I'm not a networking guru and still only halfway through the "Networking for Idiots " book so not sure how all this sttuff works in between the 2 ends I can handle, it sounds like I can make the prim with the LSL stuff in it send stuff using HTTP to the Internet/Ethernet and just have the PLC hear it from it's Ethernet port if I set up it's protocol correctly.
So at least I don't need a custom viewer by the sounds of it. The tricky bit is in the PLC driver and the HTTP bit. I'll ahve to dig up more info so I know what the questions really are :)
qDot doesn't seem to have done much more lately by the looks, and I'm sure there are allsorts of "spplications" for getting a SL to control stuff in RL :)
http://www.arduino.cc/ seems to be able to allow me to communicate on a small scale, for a home projct, but what I am envisioning later involves about 500 I/O/Word tags.
_____________________
Level 38 Builder [Roo Clan]

Free Waterside & Roadside Vehicle Rez Platform, Desire (88, 17, 107)

Avatars & Roadside Seaview shops and vendorspace for rent, $2.00/prim/week, Desire (175,48,107)
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
08-02-2009 17:40
Does it have an IP address? So you could use php sockets to send it udp packets or something?

Not that I know what this thread is about really
_____________________
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-02-2009 17:49
Yeah, it looks like the Ethernet module (FX2NC-ENET-ADP) does support TCP/IP, but uses a proprietary control protocol that requires the PC to treat it as a serial port. If the adapter itself is hackable, you might be able to squeeze in a tiny HTTPD implementation to just read/write to a predefined resource.

Otherwise, you'd have to set up another computer to talk to it and act as its interface so SL can talk to it.
Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
08-02-2009 17:54
From: Talarus Luan
Yeah, it looks like the Ethernet module (FX2NC-ENET-ADP) does support TCP/IP, but uses a proprietary control protocol that requires the PC to treat it as a serial port. If the adapter itself is hackable, you might be able to squeeze in a tiny HTTPD implementation to just read/write to a predefined resource.

Otherwise, you'd have to set up another computer to talk to it and act as its interface so SL can talk to it.

Thanks Taurus, that's the module I was considering using, and couldn't work that out for myself through the gobblygook, I may have to talk futher to some FX2N boffins on the PLC forums to findout what I can and can't use it's ethernet for. :)
_____________________
Level 38 Builder [Roo Clan]

Free Waterside & Roadside Vehicle Rez Platform, Desire (88, 17, 107)

Avatars & Roadside Seaview shops and vendorspace for rent, $2.00/prim/week, Desire (175,48,107)
qDot Bunnyhug
Robot Breaker
Join date: 19 Jul 2005
Posts: 63
08-02-2009 19:54
Yeah. qDot's been busy with other things for the past, oh, 4 years or so. :)

Anyways, I think your best bet here is to implement on a PC then start replacing the needed parts piece by piece. If you have something that already works, it's much easier to start replacing parts than it is to try and figure out all the modules while working from scratch, especially when working with something as finnicky as SL (Speaking of, you realize this control system will be about as far from guaranteed transfer and real time control as you can possibly get, right? :3 )
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-02-2009 20:43
From: Talarus Luan
Otherwise, you'd have to set up another computer to talk to it and act as its interface so SL can talk to it.

I would HIGHLY recommend just that. It abstracts the hardware end from the SL interface, which is DEFINITELY a good thing. Stick a dirt cheap little PC between the device and the Internet. Put a web server on the PC (for contacting using LSL's llHttpRequest() function) and/or expect to make HTTP requests from an intermediate program running on the PC to a SL script using the new HTTP-In functionality. On the device end, this means you can put as little as possible on the microcontroller and make up for it on your PC. Or you can have the PC act as a simple gateway. Whatever is simplest.