|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB and CCTVHello,
I am attempting to create a web server that will be attached to a pelco video matrix switcher (9770) via a serial port. I want to setup hyperlinks on the webserver that will feed ascii commands to the matrix switch via the serial port. These commands will tell the switcher what video ports to feed what monitor ports. My questions are: 1. has anyone done this before? 2. Does anyone have scripts that i could use to do this? 3. I have read online that config of a mscomm32 file is necessary. Is this true? If it is how does it play into the config? Thanks, -David Hi David,
When dealing with the Pelco Matrix Switcher, or any Matrix switcher for that matter (Kalatel, Bosch, etc...) you have to start with a document that actually lists the protocols / commands that the interface you are wanting to use can handle. I have worked with Matrix Switchers before, having worked in the security industry, and I am confident that we can solve your problem here. The devices are not the complicated from a programming point of view. Lets start at the beginning: 1/ Do you have the Protocols / commands and port / data specifics that the switcer wants you to use? 2/ Since we know they are serial based, how you connect from a PC to the switcher is a matter of knowing if it is RS-232 or RS-485. If it is RS-232 then it should be fairly easy to do via the standard .Net 2.0 framework. If it is RS-485, we may have to consider hardware issues when dealing with the comms. Off the top of my head I cannot remember which one it is for the Pelco. You can find some information on using the serial comms via .Net at this website: http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/default.aspx The examples are in c# and VB .net What it really comes down to then, and the way I would approach it, is to make a simple trial application in .Net (pick your language - I should say VB since we are in a VB group), and start with simply getting a serial communication to occur. Maybe from a PC to another PC running Hyperterminal. VB .net 2005 Express is available here: http://msdn.microsoft.com/vstudio/express/vb/default.aspx Once you have the ability to send information via the serial port, then you can use the protocol document to create a big list of commands that you can send to the switcher. When you have the commands in the application, then it is simply a matter of deciding a way that the users can interact with the application to send the commands. You have suggested that you want to use a web page, so I would suggest using something simple to start with, then move to a web platform. I would try simply doing a stock standard VB program with a form and a few buttons. If all that works fine then try using Visual Web Developer Express 2005, to take your solution to a web page based one. The software is available here: http://msdn.microsoft.com/vstudio/express/vwd/default.aspx I hope this gets you on the right track. Unfortunately I dont have any scripts already done, or a out-of-the-box solution ready to go, but you should find solving this problem fairly straight forward if you use what I have said as a guide. Generally CCTV equipment isnt that complex to deal with from a PC point of view (with the exception of some really poorly documented asian DVR's), you just have to have the right information to talk to it. The rest is pretty straight forward. Cheers and good luck The Frog David Cogo wrote: Show quoteHide quote > Hello, > > I am attempting to create a web server that will be attached to a pelco > video matrix switcher (9770) via a serial port. I want to setup > hyperlinks on the webserver that will feed ascii commands to the matrix > switch via the serial port. These commands will tell the switcher what > video ports to feed what monitor ports. > > My questions are: > 1. has anyone done this before? > 2. Does anyone have scripts that i could use to do this? > 3. I have read online that config of a mscomm32 file is necessary. Is > this true? If it is how does it play into the config? > > Thanks, > > -David Hi,
>> 1. has anyone done this before?2. Does anyone have scripts that i could use to do this? 3. I have read online that config of a mscomm32 file is necessary. Is this true? If it is how does it play into the config? << 1. Yes, but there isn't anything "standard" about this. The proceedure is to create a web service. The web service implements the serial commands on the server, using the SerialPort object in VS 2005 (or something like DesktopSerialIO.dll for VS 2003, which you can download from my homepage). Your client application doesn't need to know anything about the content of the actual commands -- you build that into the underpinnings of the service. 2. There aren't any scripts needed (or useful, IMO). Just call methods in your service. 3. Don't use MSComm. Use the .NET 2.0 SerialPort object, or an equivalent add-on. Naturally, the serial port must be set up to match the serial speed, comport, and other requirements for your hardware. However, this isn't configuration that your user needs to know anything about. What you do have to understand are the commands that are issued to your switchers, and how to implement those commands in your code. This is straight forward, but if you haven't done it before, it isn't as simple a 1-2-3. It does take some work. That is one reason that I wrote my book (see below). I do not have any examples EXACTLY like what you want to do, though some are similar, non have a web service interface. Implementing a web service is well documented online and in other books, though. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information.
Windows History Deletion
MDI Forms Herfried K. Wagner - HELP! Return ByRef How to create ForeignKeyConstraint? How-To Parse this data.. Writing to a MS access db from visual studio .net Using Web.config's <system.web><pages><controls><add /></controls></pages></system.web> To Register The breakpoint will not currently be hit Exporting data to excel not working..... |
|||||||||||||||||||||||