Mastiff
February 3rd, 2008, 09:11 AM
I will try to run the Phidgets on a virtual machine on my server to increase stability and reliability of Girder (one to many close calls). I have tried, and I can access and do all the Phidgets stuff on the VM. Then I'll use Comserver to send messages between the Server and the VM. But the problem is that I have a ton of code on my main server GML to access different outputs, and they all look like this:
PI:setOutputState (9,true)
That activates Phidgets output 9.
PI:setOutputState (9,false)
And that will deactivate output 9.
I have functions for the comserver as well, to get easy access to commands. The function of the IP for the VM is like this:
function Kom.C11(msg,pld1,pld2,pld3,pld4)
g2g.ClientSendEvent("192.168.0.11",msg,200,1,pld1,pld2,pld3,pld4)
end
So how do I get that Phidgets command converted to a comserver command that gets sent like this, so I won't have to change any of the old code:
Kom.C11("Phidget",9,true)
Then I need one single command at the Phidgets VM end to receive this and turn it back into this:
PI:setOutputState (9,true)
But that should be possible with something like this, I think:
PI:setOutputState (pld1,pld2) Or am I barking up the wrong forrest as usual?
PI:setOutputState (9,true)
That activates Phidgets output 9.
PI:setOutputState (9,false)
And that will deactivate output 9.
I have functions for the comserver as well, to get easy access to commands. The function of the IP for the VM is like this:
function Kom.C11(msg,pld1,pld2,pld3,pld4)
g2g.ClientSendEvent("192.168.0.11",msg,200,1,pld1,pld2,pld3,pld4)
end
So how do I get that Phidgets command converted to a comserver command that gets sent like this, so I won't have to change any of the old code:
Kom.C11("Phidget",9,true)
Then I need one single command at the Phidgets VM end to receive this and turn it back into this:
PI:setOutputState (9,true)
But that should be possible with something like this, I think:
PI:setOutputState (pld1,pld2) Or am I barking up the wrong forrest as usual?