描述了一种基于主从式架构,从机基于STM32F107的32位微处理器实现光强度数据采集,主机应用C#编程语言实现数据处理的光强度检测系统。该系统在主机端采用串口通信类库,实现程序对光强板、程控电源、PLC的控制和数据接收。主机程序的核心功能还包括光强标定和二次校准,修正硬件因素和外界条件存在的误差。系统对接收到的数据做优化处理并转换为需要的格式,样品测试的曲线分别在极坐标、直角坐标和数据列表中显示,便于数据分析。该系统可广泛应用于光源与照明领域。
A light-intensity detection system with host-slave architecture is described in this paper. The slave computer is based on 32-bit microprocessor STM32F107 to acquire the light-intensity data,and then the data is processed with C# programming language by means of the host computer. The serial communication class library is adopted by the host-side in the system,so the program can control the light-intensity board,programmable power supply and PLC,and realize data reception. The core functions of the host computer program include light-intensity calibration,secondary calibration,and errors correction caused by hardware and external environments. After that,the received data is optimized and converted to the needed format. The tested curves of the sample are displayed in polar coordinates,rectangular coordinates and data list for further analysis. The system can be widely used in light source and illumination field.