Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connecting/Interfacing with machines/equipment
Message
De
19/08/2015 12:57:20
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01623582
Message ID:
01623595
Vues:
38
>>>Hi,
>>>
>>>What are the "standard" or good practice methods of interfacing VFP application with machines or equipment. For example, say a customer has a process equipment. And the VFP application needs to get the temperature, or pressure, or number of hours the equipment has been running. Any specific features the software operating the equipment should have?
>>>
>>>TIA.
>>
>>It's a while since I've had to do that type of thing but, in general, most devices you might want to 'talk' to send data via a comm interface (hopefully in some easily parsed ascii format). They usually fall into two categories:
>>(a) Those that send a steady stream of data (similar, for example, to NMEA data on a GPS device)
>>(b) Those that can be queried for specific data.
>>
>>In either case you can use the MSCOMM OLE control to listen to the COM port.
>>For (a) you'll need to continuously monitor the stream and pluck out the data that you are interested in.
>>For (b) you'll need a two-way connection so that you can ask for the info. that is required.
>>
>>It's much easier to do this type of thing using the .NET 'System.IO.Ports.SerialPort' class rather than MSCOMM - if it's an available option you might consider creating a C# wrapper to deal with it.
>>
>>IAC, if you know the hardware you're dealing with the first step is to read the relevant documentation.
>>
>>HTH....
>
>First, thank you for the message. Since I am just exploring this approach, doing it in C# sounds more reasonable for me than in VFP (will help me to learn C# better). I have no idea what hardware I will have to deal with (this is a potential customer). But if I were to create this interface in C#/VS, would you suggest doing it with Win Forms or another type of application?

Probably best as a class in its own project - that way you could plug it in to whatever (WinForms, WPF, Console, etc - or even VFP)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform