Dana,
The beta will allow you to communicate with SB3 through the registry. The .Net example shows how it is done. You can pass any ShopBot command through the registry.
Dana,
The beta will allow you to communicate with SB3 through the registry. The .Net example shows how it is done. You can pass any ShopBot command through the registry.
Ryan- I understand the paradigm, it seems like a very awkward method of communication, although it could do the job. I read the documentation, and clearly understand it.
This communications method does not seem equal to the quality of the rest of the shopbot.
Kind of like a dog walking on its hind legs, its interesting that it can be done, but no dog chooses it for normal operations..
I still advocate adding UDP to do the same functions, it is real-time has built-in event handling under any .NET platform (and other programming languages through callback functions) therefore much more appropriate to the task, in addition the programs do not need to be on the same computer. UDP would be a very effective method of communicating with the shopbot or anything else, better than "pseudo RS232" over USB.
What I see that I really like is the SetUsrValue and GetUsrValue functions from within the SBP file. That uses the registry as a database, which is its function in the system, and is a great idea for allowing programs to set values that change rarely so the SBP file can get them. Much cleaner than communication through standard files due to the API calls for registry access.
In any case I am glad there is any method at all for inter-process communication, thats an improvement. I will add support for it in my C# shopbot control library, probably tomorrow, then I will use it a while. The jury is out till then.
However it works, I will have it at Gary Campbells camp in Florida for anybody to check out.
D
Greg- Here is the C# interface to the status flags:
using System;
using System.Text;
using Microsoft.Win32;
public class ShopbotRuntimeStatus
Wow, great! Thanks for sharing Dana. I will have to get to work to try this out. I too find it a bit funny to be messing with registry keys... but at least it is a solution!
Greg- It is not a great solution to say the least.. I hope SB uses it as a learning experience to come up with a better approach.
However, you are welcome to see how to use the communication method from C#.
D
Jeeeeeeeseeeeeee
The Shopbot has eight output signals. Surely one could be dedicated as a status signal. Most PCs have a parallel port that is sitting idle. The Shopbot controller could send a signal to one of the input lines on the parallel port to signal the status of the cut.
The master program that initiated the call to the Shopbot sbp file could call the sbp file and then wait until the sbp file sent a "busy" signal. Then the master program could periodically check the signal until it saw a "finished" state.
It's not very exotic, but it would work. It's the same principle that you'll find on most alarm panels. When a red light turns on or a bell starts to ring, the operator knows that he has to put his book down and do something.
Ryan- You're right! The beta will allow you to communicate with SB3 through the registry. All you have to do is take a look at the .Net example, and you can then see how it is done. Any Shopbot command will pass through the registry.
Thanks for helping everyone here!
Josh
Wisconsin Auctions
http://wisconsin-auctions.com
You can do a lot of interesting stuff with an mbed microcontroller, including implementing the watchdog timer (or timers).
www.mbed.org
Just a quick reply to this OLD thread... but in case anyone is interested in how I finally solved this issue, I did it very kludgily (is that a word?). Anyways, I took my initial idea of writing to a file at the end of a shopbot file, but on the c# side, I am just looking at the file size. This way, I don't have to open the file on the c# side, and can just test the size until something is written to the file!