葡萄牙生产一台计算机,一种生产线上显示设备功率全自动测试系统 A process for producing a display device power line automatic test sy...

摘要:

本实用新型公开了一种生产线上显示设备功率全自动测试系统,其包括计算机,功率计,电磁感应读条码器,该系统通过电磁感应读条码器读取显示设备条码,并以此为判断显示设备到达检测位置的信息来触发开始进行功率检测,由功率计对显示设备的功率进行检测并判别是否在规定范围内,最后将检测结果发送给计算机保存. The utility model discloses a display device power automatic production line testing system which includes a computer, power meter, electromagnetic induction a bar code reader, reading the system by electromagnetic induction, the display device to read bar code, and as a judgment display device reaches the detection position information to trigger starts power detected by the power meter of the power of the display device to detect and determine whether the predetermined range, the final test result to the computer to save. 采用本实用新型的技术方案,该系统可自动操作,无需人工看管,自动化和生产效率高,减少人为操作因素产生的误判. Using the technical solution of the utility model, the system can operate automatically, without human care, automation and high production efficiency, reduce human factors produce false positives.

展开

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是一个简单的Java代码示例,演示了如何使用生产者消费者模式: ```java import java.util.LinkedList; public class ProducerConsumerExample { public static void main(String[] args) { LinkedList<Integer> buffer = new LinkedList<>(); int maxSize = 5; Thread producer = new Thread(new Producer(buffer, maxSize), "Producer"); Thread consumer = new Thread(new Consumer(buffer), "Consumer"); producer.start(); consumer.start(); } public static class Producer implements Runnable { private final LinkedList<Integer> buffer; private final int maxSize; public Producer(LinkedList<Integer> buffer, int maxSize) { this.buffer = buffer; this.maxSize = maxSize; } @Override public void run() { while (true) { synchronized (buffer) { while (buffer.size() == maxSize) { try { System.out.println("Buffer is full, waiting for consumer..."); buffer.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } int number = (int) (Math.random() * 100); System.out.println("Producing number: " + number); buffer.add(number); buffer.notifyAll(); } } } } public static class Consumer implements Runnable { private final LinkedList<Integer> buffer; public Consumer(LinkedList<Integer> buffer) { this.buffer = buffer; } @Override public void run() { while (true) { synchronized (buffer) { while (buffer.isEmpty()) { try { System.out.println("Buffer is empty, waiting for producer..."); buffer.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } int number = buffer.removeFirst(); System.out.println("Consuming number: " + number); buffer.notifyAll(); } } } } } ``` 在这个示例中,我们定义了一个 `Producer` 和一个 `Consumer` 类,它们都实现了 `Runnable` 接口,可在一个线程中运行。两个线程都使用了同一个共享的 `LinkedList` 对象,这是一个缓冲区,生产者往缓冲区中添加元素,消费者从缓冲区中移除元素。 在生产者消费者模式中,关键点是在生产者和消费者之间同步缓冲区。生产者会检查缓冲区是否已满,如果已满,则等待消费者消费一些元素。消费者会检查缓冲区是否为空,如果为空,则等待生产生产一些元素。在生产者或消费者完成它们的工作后,会通知等待的线程继续运行。这个通知过程使用 `wait()` 和 `notifyAll()` 方法实现。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值