超声波测试仪电路程序

超声波测试仪电路程序
笔者开发了一种动弹模测定仪,这款产品可以发出10000HZ的超声波用来测试混凝体的动弹模量。该产品由安装有WINCE的CORTEX A8的嵌入式电脑控制。COXTEX A8模组产生150HZ-1000HZ的占空比为50%的PWM信号,该信号经过电路放大以后驱动超声波探头对混凝土试件发射超声波。超声波信号经过混凝土试件反射后,被测试探头接收。由于接收的信号非常弱,所以该信号经过微小电压放大电路后放大,最终被COXTEX a8模组接收,并存储。CORTEX A8比较计算后最终得到这个混凝土试件的动弹模量。仪器的电路如下图所示:

COXTEX a8模组由WINCE 下的上位机软件控制,软件源码下载百度网盘地址链接:

https://pan.baidu.com/s/1pWaHwVruGceb9iuqVUidrw

密码: jfbq该软件的程序为:微云文件分享:超声波变频下载地址:

https://share.weiyun.com/5oujQdC

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

using System.Drawing;
using System.Drawing.Imaging;

namespace SmartDeviceProject5
{
class Class1
{
}

public class RealTimeImageMaker
{
private int width;//要生成的曲线图的宽度
private int height;//要生成的曲线图的高度
private Point[] pointList;//用来绘制曲线图的关键点,依次将这些点连接起来即得到曲线图
private Random random = new Random();//用于生成随机数
private Bitmap currentImage;//当前要绘制的图片
private Color backColor;//图片背景色
private Color foreColor;//图片前景色
///
/// 图片的高度
///
public int Height
{
get { return height; }
set { height = value; }
}

///
/// 图片的宽度
///
public int Width
{
get { return width; }
set { width = value; }
}
///
/// 构造函数,指定生成的曲线图的宽度和高度
///
/// 要生成的曲线图的宽度
/// 要生成的曲线图的高度
public RealTimeImageMaker(int width, int height)
: this(width, height, Color.Gray, Color.Blue)
{

}
///
/// 构造函数,指定生成的曲线图的宽度、高度及背景色和前景色
///
/// 要生成的曲线图的宽度
/// 要生成的曲线图的高度
/// 曲线图背景色
/// 曲线图前景色
public RealTimeImageMaker(int width, int height, Color backColor, Color foreColor)
{
this.width = width;
this.height = height;
this.backColor = backColor;
this.foreColor = foreColor;
pointList = new Point[width];
Point tempPoint;
//初始化曲线上的所有点坐标
for (int i = 0; i < width; i++)
{

tempPoint = new Point();

//曲线的横坐标沿x轴依次递增,在横向位置上每个像素都有一个点
tempPoint.X = i;
//曲线上每个点的纵坐标随机生成,但保证在显示区域之内
tempPoint.Y = random.Next() % height;
pointList[i] = tempPoint;
}
}

///
/// 获取当前依次连接曲线上每个点绘制成的曲线
///
///
public Image GetCurrentCurve()
{
//currentImage = historyImage.Clone(new Rectangle(1, 0, width - 1, height), PixelFormat.Format24bppRgb);
// currentImage = new Bitmap(width, height);
currentImage = new Bitmap(800, 600);
Point p;
//将当前定位曲线图的坐标点前移,并且将横坐标减1,
//这样做的效果相当于移除当前第一个点
for (int i = 0; i < width - 1; i++)
{
p = pointList[i + 1];
pointList[i] = new Point(p.X - 1, p.Y);
}
Point tempPoint = new Point();
//新生成曲线图定位点的最后一个点的坐标
tempPoint.X = width;
//曲线上每个点的纵坐标随机生成,但保证在显示区域之内
tempPoint.Y = random.Next(DateTime.Now.Millisecond) % height;
//在最后再添加一个新坐标点
pointList[width - 1] = tempPoint;
Graphics g = Graphics.FromImage(currentImage);
g.Clear(backColor);
//绘制曲线图
g.DrawLines(new Pen(foreColor), pointList);
g.Dispose();
return currentImage;
}
}
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

using System.Drawing;
using System.Drawing.Imaging;

namespace SmartDeviceProject5
{
class Class2
{
}

/// 说明:实时图片生成类,在本例中横向坐标上每个像素都会有一个控制点 /// 实际开发中可以减少控制点,比如每5个像素用一个控制点 /// 这样的效果或许更加逼真 // /// 首发地址: ///
public class RealTimeImageMaker
{
private int width;//要生成的曲线图的宽度
private int height;//要生成的曲线图的高度
private Point[] pointList;//用来绘制曲线图的关键点,依次将这些点连接起来即得到曲线图
private Random random = new Random();//用于生成随机数
private Bitmap currentImage;//当前要绘制的图片

private Color backColor;//图片背景色
private Color foreColor;//图片前景色 ///
/// 图片的高度 ///
///
///
public int Height
{
get { return height; }
set { height = value;
}
} ///
/// 图片的宽度 ///
public int Width

{
get { return width; }
set { width = value;
}
} ///
/// 构造函数,指定生成的曲线图的宽度和高度 ///
/// 要生成的曲线图的宽度 /// 要生成的曲线图的高度
public RealTimeImageMaker(int width, int height):this(width,height,Color.Gray,Color.Blue)
{
} ///
/// 构造函数,指定生成的曲线图的宽度、高度及背景色和前景色 ///

/// 要生成的曲线图的宽度 /// 要生成的曲线图的高度 /// 曲线图背景色 /// 曲线图前景色
public RealTimeImageMaker(int width, int height, Color backColor, Color foreColor)
{
this.width = width; this.height = height;
this.backColor = backColor; this.foreColor = foreColor; pointList = new Point[width];
Point tempPoint; //初始化曲线上的所有点坐标
for (int i = 0; i < width; i++)
{
tempPoint = new Point();
//曲线的横坐标沿x轴依次递增,在横向位置上每个像素都有一个点
tempPoint.X = i;
//曲线上每个点的纵坐标随机生成,但保证在显示区域之内
tempPoint.Y = random.Next() % height; pointList[i] = tempPoint;
}
} ///
/// 获取当前依次连接曲线上每个点绘制成的曲线 /// ///
public Image GetCurrentCurve()
{
//currentImage = historyImage.Clone(new Rectangle(1, 0, width - 1, height), PixelFormat.Format24bppRgb);
currentImage = new Bitmap(width, height);
Point p;
//将当前定位曲线图的坐标点前移,并且将横坐标减1, //这样做的效果相当于移除当前第一个点
for (int i = 0; i < width-1; i++)
{
p = pointList[i + 1];
pointList[i] = new Point(p.X-1,p.Y);
}
Point tempPoint = new Point();
//新生成曲线图定位点的最后一个点的坐标
tempPoint.X = width;
//曲线上每个点的纵坐标随机生成,但保证在显示区域之内
tempPoint.Y = random.Next(DateTime.Now.Millisecond) % height; //在最后再添加一个新坐标点
pointList[width-1]=tempPoint;
Graphics g = Graphics.FromImage(currentImage);
g.Clear(backColor); //绘制曲线图
g.DrawLines(new Pen(foreColor), pointList);
g.Dispose();
return currentImage;

}

}
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;

namespace SmartDeviceProject5
{
class Class3
{
}
///
/// 说明:实时图片生成类,在本例中横

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值