『第 14 楼』:
使用 LLM 解释/回答一下
在工控邻域,实时性是最重要的,但WINDOWS是不实时的,对于即要“界面”又要“实时”的情况,可以在“WWW.FirstSail.b2b.Cn”网页下免费下载“WinSail”软件。可以说 DOS + WinSail = WINDOWS CE现在有一种“WinSail工业控制开发系统”正在业界普遍使用,其推出真正使嵌入式PC进行产品开发时,设计人员不需要在硬件、底层操作、界面、参数设置等花费太多的时间,只要把精力放在功能开发上。只要您懂C++ For DOS或Visual C++,您就能在DOS下编程,生成一个能与Windows竣美的应用系统!“WinSail工业控制开发系统”是基于DOS系统,用Borland C++3.1语言,在Large大模式下开发出来的软件开发包。虽然说完整的软件包大约只有450K左右,却能在DOS下生成的程序具有与WIN9x完全相同的界面,拥有Group、Label、Edit、ComboBox、Button、Radio、Check、ListBox、Grid、ScrollBar、Desktop、ToolsBar、StatusBar、Menu、PopuMenu、Window、Dialog、ICON、Bitmap、示波器等界面元素,支持鼠标,控件的操作99.9%与Windows兼容!可加载运行脚本对话框;支持Socket套接字编程;具有完整窗口图形界面的最小应用只有150K左右,可在只有1M的电子盘中运行;具有0.5uS微秒精确度的delay函数。可以说DOS + WinSail >= Windows CE“WinSail工业控制开发系统”目前支持:(1) “WinSail”的API与“C++ For DOS”函数库“共存”,特别是与C语言的图形函数BGI共存。(2) 支持具有优先级的多任务,同时可达到50个任务。(注:可配置脚本文件来不需要多任务支持,使程序运行于单任务中) 。(3) 支持数据库,生成的文件与Foxpro 2.6库兼容,可在微软Office的Excel中直接打开。(4) 使用16*16的简体、繁体中文字库、8*16的英文字库,支持TrueType字库。(5) “对话框”能在Visual C++预先做好界面,然后通过转换软件,能使Windows的对话框界面变成“WinSail”系统的对话框的界面代码源文件或脚本文件,充分利用Visual的优越性,使DOS平台的应用程序界面开发“不再难”!!!!!(6) 支持600*480*16、600*400*256、800*600*256、1024*768*256多种分辩率。(7) 支持Group、Label、Edit、ComboBox、Button、Radio、Check、ListBox、Grid、ScrollBar、Desktop、ToolsBar、StatusBar、Menu、PopuMenu、Window、Dialog、ICON、Bitmap、MessageBox、示波器、多元纵坐标示波器等界面元素。(8) 支持扩展内存--XMS、扩充内存EMS的内存访问。(9) 支持文本注册表--INI文件的读写,在写键值时,可保证在键值后面的“注释内容”仍然还存在。(10) 支持面向对象的I/O访问,屏蔽底层I/O口。(11) 具有COMM口通讯接口,支持多种校验位,包括“没有校验位”、“奇校验位”、“偶校验位”、“校验位永为1”、“校验位永为0”。后两种校验方式多用在多机通讯中区别“地址”和“数据”。(12) 支持条形码显示。包括EAN_8、UPC_A、UPC_E、EAN_13(商品码)、ISBN、ISSN、39、128、Codabar、交叉25码 (13) 窗口支持“用I/O口定义的虚拟键盘”、“窗口定时器”、“空闲时调用某函数”、“窗口刷新时调用某函数”等多种回调函数。(14) 多种常用数学运算,包括“低通”、“高通”、“带通”、“带阻”滤波器系数的产生(可加矩形窗、三角形窗、汉宁窗、海明窗、布莱克窗、Sin(x)/x窗、余弦窗、凯塞窗),滤波、插值、拟合、微积分、相关分析、FFT、DFT等。(15) 统计进程SPC和直方图、测量的可靠性和重复性GageR&R报表。(16) 支持“Bitmap”、“ICON”图像文件的显示、“Wav”声音文件的播放。(17) 支持“普通示波器”和“多纵坐标示波器”。(18) 支持Socket 套接字编程。 一、文件说明 1:文件:WinSail工控开发系统.doc------WinSail系统简要使用说明书 2:目录:WinToDos---------------------转换程序 3:目录:include2---------------------系统“头文件”和“库文件” 4:目录:Sail3000---------------------应用工程实例 5:目录:Application------------------VC++程序,里面有多个对话框 二、include2目录里面的文件说明 01:Barcode.h----------- 条形码显示/打印头文件, 类接口 02:DownComm.h---------- COMM口通讯, 类接口 03:Foxpro.h------------ Foxpro2.6数据库, 类接口 04:GageRR.h------------ 测量的可靠性和重重性报表, 类接口 05:Graph.h------------- 示波器和多纵坐标示波器, 类接口 06:HglgPrit.h---------- 文字、BITMAP图片、ICON图标的显示,WAV声音播放,API接口 07:Kernal.h------------ 多任务,API接口 08:Listing.h----------- 双向链表,类接口 09:Memroy.h------------ XMS和EMS内存,类接口 10:Mouse.h------------ 鼠标,API接口 11:MyFrame.h---------- 控件和内核初始化,类和API接口 12:NewMath.h---------- 数学库,API接口 13:Register.h--------- 文本INI文件读写访问,类接口 14:Relay.h------------ 面向对象的I/O访问,API接口 15:Spc.h-------------- 进程统计控制SPC,类接口 16:SVga_Dev.h--------- 800*600*256,1024*768*256分辨率图形驱动,API接口 17:Symbol.h----------- 符号定义 18:EgavgaF.Obj-------- BC31远调用驱动程序 19:Sail.Lib----------- 系统库文件 三、Sail3000目录里面的文件说明 01:Config.Sys----------- 系统驱动配置文件 02:Display.Fon---------- 8*16英文字库和16*16简体字库 02:DisplayF.Fon--------- 8*16英文字库和16*16繁体字库 03:Dwpword.Exe---------- 用户和密码观看文件(高级应用) 04:Pass.Bin------------- 用户和密码数据库,二进制 05:Mouse.Com------------ 鼠标驱动程序 06:Sail2000.Cpp--------- 用户工程的源文件示例 07:Sail2000.Prj--------- 用户工程的工程文件示例 08:Sail2000.Exe--------- 用户工程的主程序 09:a.bat---------------- 用户工程的批处理文件 10:Sys\Destop.Sys------- 用户工程的桌面配置文件 11:Sys\Manager.Sys------ 用户工程的桌面配置文件 12:Sys\Relay.Sys-------- 用户工程的I/O配置文件 13:Bmp\Computer.Bmp----- 内核使用的一幅图片 14:Bmp\Desktop.Bmp------ 内核使用的一幅图片 15:Bmp\Winnt.BMp-------- 密码框使用的一幅图片 16:Bmp\Sail200.Ico------ 窗口默认的标题栏图标 17:Bmp\BookS??.Ico------ 菜单默认的图标 18:Bmp\MsgBox??.Ico----- 信息框使用的图标 19:Bmp\Display.Ico------ 内核使用的一幅图标 20:Bmp\Net.Ico---------- 内核使和的一幅图标 四、WinToDos目录里面的文件说明 对于VC工程中的文件,只有“工程.rc”和“Resource.h”文件有价值 01:MakeDlg.Exe---------- 将VC中的资源对话框转成WinSail的对话框源程序 02:RegisterDll.Dll------ 支持MakeDlg.Exe访问文本INI注册表的DLL文件 五:DOS起动文件配置说明 假设Win的目录名称是“c:\Windows”,BC31的目录是“C:\Bc31” C:\Config.Sys请如下配置 Device = C:\Windows\Himem.Sys/TestMem:Off Device = C:\Windows\Emm386.Exe Ram HighScan DOS = High,Umb Stacks = 9,256 Files = 25 C:\Autoexec.Bat请如下配置 path C:\Windows;C:\Windows\Command;C:\Bc31\Bin Lh SmartDrv.Exe 六:对Main()主函数的要求 1:需包含头文件"Symbol.h"和"MyFrame.h" 2:先调用BOOL InitSystem(int argc, char** argv)内核初始化函数 3:中间写自己的代码 4:最后调用BOOL CloseSystem()内核退出函数. 5:例: #include "Symbol.h" #include "Myframe.h" extern unsigned _strlen = 60u * 1024u; void far TransrateKey(CObject* pCurObj) { return(0); } int main(int argc, char** argv) { //系统内核初始化 if (!InitSystem(argc, argv)) { ::CloseSystem() ; ::printf("\nInit System Error!"<img src="images/smilies/face-wink.png" align="absmiddle" border="0"> ; return(0); } //用户代码开始 //…… //用户代码结束 //退出系统内核 ::CloseSystem(); return(1); } 七:如何创建Sail2000工程并编码 01:在C盘中安装BC31,最好目录为C:\Bc31 02:用户在自已BC31的目录中,创建"Include2"目录 03:将include2\*.*的所有文件拷贝C:\bc31的"include2"目录中。 04:在BC31集成环境中,将"include包含"路径设成"c:\bc31\include2;c:\bc31\include" 05:在BC31集成环境中,"Large"大模式;"Default for memory model"默认内存模式。 06:在BC31集成环境中,Floating Point设置成"80287/387"和Instruion Set设置成"80386" 07:在BC31集成环境中,创建一工程,假设工程名称为Sail2000.Prj 08:在工程中加入C:\BC31\include2\Sail.Lib内核库文件 09:在工程中加入C;\BC31\include2\Egavgaf.Obj图形库文件 10:在工程中,须编写void far TransrateKey(CObject* pCurObj)的默认的窗口虚拟键盘函数,一般如下所示 void far TransrateKey(CObject* pCurObj) { return(0); }
In the industrial control field, real-time performance is the most important, but Windows is not real-time. For the situation that requires both "interface" and "real-time", you can download the "WinSail" software for free under the web page "WWW.FirstSail.b2b.Cn". It can be said that DOS + WinSail = Windows CE. Now, a "WinSail Industrial Control Development System" is widely used in the industry. Its launch truly enables designers not to spend too much time on hardware, underlying operations, interface, parameter settings, etc. when developing products for embedded PCs. They only need to focus on function development. As long as you understand C++ For DOS or Visual C++, you can program under DOS and generate an application system comparable to Windows! The "WinSail Industrial Control Development System" is a software development kit developed based on the DOS system using Borland C++ 3.1 language in Large mode. Although the complete software package is about 450K, the programs generated under DOS have the same interface as WIN9x, with interface elements such as Group, Label, Edit, ComboBox, Button, Radio, Check, ListBox, Grid, ScrollBar, Desktop, ToolsBar, StatusBar, Menu, PopuMenu, Window, Dialog, ICON, Bitmap, oscilloscope, etc. It supports the mouse, and 99.9% of the control operations are compatible with Windows! It can load and run script dialog boxes; supports Socket socket programming; the smallest application with a complete window graphical interface is about 150K and can run in an electronic disk with only 1M; has a delay function with an accuracy of 0.5 microseconds. It can be said that DOS + WinSail >= Windows CE. The "WinSail Industrial Control Development System" currently supports: (1) The API of "WinSail" coexists with the "C++ For DOS" function library, especially coexists with the graphics function BGI of the C language. (2) Supports prioritized multitasking, and can reach up to 50 tasks. (Note: The script file can be configured to not need multitasking support, so that the program runs in single-task.) (3) Supports databases, and the generated files are compatible with Foxpro 2.6 libraries and can be directly opened in Microsoft Office's Excel. (4) Uses 16*16 simplified and traditional Chinese character libraries, 8*16 English character library, and supports TrueType character libraries. (5) The "dialog box" can be pre-made in Visual C++, and then through the conversion software, the Windows dialog box interface can be turned into the interface code source file or script file of the "WinSail" system, making full use of the superiority of Visual, so that the application program interface development on the DOS platform "is no longer difficult"!!!!! (6) Supports multiple resolutions such as 600*480*16, 600*400*256, 800*600*256, 1024*768*256. (7) Supports interface elements such as Group, Label, Edit, ComboBox, Button, Radio, Check, ListBox, Grid, ScrollBar, Desktop, ToolsBar, StatusBar, Menu, PopuMenu, Window, Dialog, ICON, Bitmap, MessageBox, oscilloscope, multi-ordinate oscilloscope, etc. (8) Supports memory access of extended memory - XMS, expanded memory EMS. (9) Supports reading and writing of text registry - INI files, and when writing key values, the "comment content" after the key values can still remain. (10) Supports object-oriented I/O access, shielding the underlying I/O ports. (11) Has a COMM port communication interface, supports multiple parity bits, including "no parity bit", "odd parity bit", "even parity bit", "parity bit always 1", "parity bit always 0". The latter two parity methods are mostly used to distinguish "address" and "data" in multi-machine communication. (12) Supports barcode display. Including EAN_8, UPC_A, UPC_E, EAN_13 (product code), ISBN, ISSN, 39, 128, Codabar, cross 25 code. (13) The window supports multiple callback functions such as "virtual keyboard defined by I/O port", "window timer", "call a function when idle", "call a function when the window is refreshed". (14) Multiple common mathematical operations, including the generation of low-pass, high-pass, band-pass, band-stop filter coefficients (can add rectangular window, triangular window, Hamming window, Hanning window, Blackman window, Sin(x)/x window, cosine window, Kaiser window), filtering, interpolation, fitting, calculus, correlation analysis, FFT, DFT, etc. (15) Statistical process SPC and histogram, measurement reliability and repeatability GageR&R report. (16) Supports display of "Bitmap", "ICON" image files and playback of "Wav" sound files. (17) Supports "ordinary oscilloscope" and "multi-ordinate oscilloscope". (18) Supports Socket socket programming. I. File Description 1: File: WinSail Industrial Control Development System.doc ------ Brief user manual of the WinSail system 2: Directory: WinToDos --------------------- Conversion program 3: Directory: include2 --------------------- System "header files" and "library files" 4: Directory: Sail3000 --------------------- Application project examples 5: Directory: Application ------------------ VC++ program, with multiple dialog boxes II. File Description in the include2 Directory 01: Barcode.h --------- Header file for barcode display/printing, class interface 02: DownComm.h ---------- COMM port communication, class interface 03: Foxpro.h ------------ Foxpro 2.6 database, class interface 04: GageRR.h ------------ Report on measurement reliability and repeatability, class interface 05: Graph.h ------------- Oscilloscope and multi-ordinate oscilloscope, class interface 06: HglgPrit.h ---------- Display of text, BITMAP pictures, ICON icons, WAV sound playback, API interface 07: Kernal.h ------------ Multitasking, API interface 08: Listing.h ----------- Double linked list, class interface 09: Memroy.h ------------ XMS and EMS memory, class interface 10: Mouse.h ------------ Mouse, API interface 11: MyFrame.h ---------- Control and kernel initialization, class and API interface 12: NewMath.h ---------- Math library, API interface 13: Register.h --------- Reading and writing access of text INI file, class interface 14: Relay.h ------------ Object-oriented I/O access, API interface 15: Spc.h -------------- Process statistical control SPC, class interface 16: SVga_Dev.h --------- Graphics driver for resolutions 800*600*256, 1024*768*256, API interface 17: Symbol.h ----------- Symbol definition 18: EgavgaF.Obj -------- BC31 far call driver program 19: Sail.Lib ----------- System library file III. File Description in the Sail3000 Directory 01: Config.Sys ----------- System driver configuration file 02: Display.Fon ---------- 8*16 English character library and 16*16 simplified Chinese character library 02: DisplayF.Fon --------- 8*16 English character library and 16*16 traditional Chinese character library 03: Dwpword.Exe ---------- File for viewing user and password (advanced application) 04: Pass.Bin ------------- User and password database, binary 05: Mouse.Com ------------ Mouse driver program 06: Sail2000.Cpp --------- Example of source file of user project 07: Sail2000.Prj --------- Example of project file of user project 08: Sail2000.Exe --------- Main program of user project 09: a.bat ---------------- Batch file of user project 10: Sys\Destop.Sys ------- Desktop configuration file of user project 11: Sys\Manager.Sys ------ Desktop configuration file of user project 12: Sys\Relay.Sys -------- I/O configuration file of user project 13: Bmp\Computer.Bmp----- A picture used by the kernel 14: Bmp\Desktop.Bmp------ A picture used by the kernel 15: Bmp\Winnt.BMp-------- A picture used by the password box 16: Bmp\Sail200.Ico------ Default title bar icon of the window 17: Bmp\BookS??.Ico------ Default icon of the menu 18: Bmp\MsgBox??.Ico----- Icon used by the information box 19: Bmp\Display.Ico------ A icon used by the kernel 20: Bmp\Net.Ico---------- A icon used by the kernel IV. File Description in the WinToDos Directory For the files in the VC project, only the "Project.rc" and "Resource.h" files are valuable 01: MakeDlg.Exe ---------- Convert the resource dialog box in VC into the source program of the WinSail dialog box 02: RegisterDll.Dll ------ DLL file supporting MakeDlg.Exe to access the text INI registry V. Configuration Instructions for DOS Boot File Assume the directory name of Win is "c:\Windows" and the directory of BC31 is "C:\Bc31" Please configure C:\Config.Sys as follows Device = C:\Windows\Himem.Sys/TestMem:Off Device = C:\Windows\Emm386.Exe Ram HighScan DOS = High,Umb Stacks = 9,256 Files = 25 Please configure C:\Autoexec.Bat as follows path C:\Windows;C:\Windows\Command;C:\Bc31\Bin Lh SmartDrv.Exe VI. Requirements for the Main() Main Function 1: Need to include the header files "Symbol.h" and "MyFrame.h" 2: First call the BOOL InitSystem(int argc, char** argv) kernel initialization function 3: Write your own code in the middle 4: Finally call the BOOL CloseSystem() kernel exit function. 5: Example: #include "Symbol.h" #include "Myframe.h" extern unsigned _strlen = 60u * 1024u; void far TransrateKey(CObject* pCurObj) { return(0); } int main(int argc, char** argv) { // Kernel initialization of the system if (!InitSystem(argc, argv)) { ::CloseSystem() ; ::printf("\nInit System Error!") ; return(0); } // Start of user code //…… // End of user code // Exit the system kernel ::CloseSystem(); return(1); } VII. How to Create the Sail2000 Project and Code 01: Install BC31 on drive C, preferably the directory is C:\Bc31 02: The user creates an "Include2" directory in their own BC31 directory 03: Copy all files in include2\*.* to the "include2" directory of C:\bc31 04: In the BC31 integrated environment, set the "include include" path to "c:\bc31\include2;c:\bc31\include" 05: In the BC31 integrated environment, set "Large" large mode; "Default for memory model" default memory mode. 06: In the BC31 integrated environment, set Floating Point to "80287/387" and Instruction Set to "80386" 07: In the BC31 integrated environment, create a project, assume the project name is Sail2000.Prj 08: Add the kernel library file C:\BC31\include2\Sail.Lib to the project 09: Add the graphics library file C;\BC31\include2\Egavgaf.Obj to the project 10: In the project, the default window virtual keyboard function void far TransrateKey(CObject* pCurObj) must be written, generally as follows void far TransrateKey(CObject* pCurObj) { return(0); }
|