How to Read weighbridge weighing

Source: Internet
Author: User
How to Read lbs. weighbridge displays and connect them to your computer through RS232 serial port? now you need to use PHP to get the weights and real-time data of LBS. $ Fddio_open (COM1:, O_RDWR); if (! $ Fd) {die (& quot; ErrorwhenopenCOM1 & quot;) ;}$ ffdio_stat ($ fd); print_r ($ ff); it is successful here. D. how to read weighbridge weights

The Weighbridge display is connected to the computer through the RS232 serial port. now you need to use PHP to obtain the weight and real-time data of items on the weighbridge.
$ Fd = dio_open ('com1: ', O_RDWR );
If (! $ Fd)
{
Die ("Error when open COM1 ");
}

$ Ff = dio_stat ($ fd); print_r ($ ff); it is successful here.

Dio_read ($ fd, $ len); it won't work here

How can I read real-time weight data? Thank you.

------ Solution --------------------
I thought you should write a startup command to the port first?
Or is he sending messages without any purpose?

Read in a loop.

Let's look at the weighbridge instruction.
------ Solution --------------------
Isn't it a loop?
While ($ t ++) <1000)

The loop is not cyclical, not the reason for reading failure ????
Yes?
When you read it, he did not send it, but you did not read it when he sent it.
------ Solution --------------------
That's because that port never has data.
------ Solution --------------------
"(PHP 4> = 4.2.0, PHP 5 <= 5.0.5)" is a little old. Check whether third-party class libraries are available.
------ Solution --------------------
There should still be no data.
Does it (manufacturer) provide a CD? Is there an example?
Are there examples of success? For example, c's?
------ Solution --------------------
Call the manufacturer. I don't have a manual. how do I know how to do this?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.