Read data from com port

Hello, I am needing help and advice to be able to capture the weight of a scale connected to the comm port. I have been suggested to use Capesoft’s WinEvent template, there are others like Francisco Carabez’s Wedge that is free. I have no experience with this, if someone could guide me about it I would be infinitely grateful.
Thanks a lot!

Hi,

I use WinEvent all the time to read and write to the COM ports (for large display screens) and it’s extremely easy to use and extremely stable.

Its really a case of opening the port and sending the required data to it - very simple, plus the example app should help you during testing too.

Regards,

Andy

1 Like

Fortunitely, or unfortunitely :slightly_smiling_face: , I have quite a bit of experience with this. I read COM ports to obtain GPS data. But the principle is the same.

If you had an example of what the expected COM port data would look like I could provide more assistance.

I ended up created a ,NET DLL as an OCX and read COM data from there. However, WinEvent is more than capable to read the data as well.

1 Like

Hello, thank you very much for the comments. What I need is to read the weight of a scale in order to calculate the price of a product based on weight.

Sure. I understand.

Do you have an example of the data you expect to receive from the COM port?

Sometimes the device manufacturer will provide iit.

What is the name of the device manufacturer and model of the device?

1 Like

Hello,
We monitor about 5 scales in a production factory.
We used clalit32.dll (for the live of me I cannot remember where we got it from)

But you cannot go wrong with WinEvent!

1 Like

Hi,
WinEvent does magic in that area. Clacom too is a good tool set for Com Port reading. I have some experience too in reading com ports in some of our truck weigh bridge products. All you read is to open the com port, set the baud rate and read the data out, you might need to parse out the data that comes in your receiving string. WinEvent has some good example of COM operations.

1 Like

Hi Martin,

As others have pointed out, WinEvent contains functions for reading (and writing) to a Windows Com port. It’s one of our earliest accessories and we’ve been using the code since about 1995.
you can read some information about it here;
https://www.capesoft.com/docs/winevent5/WinEvent.htm#UserCommsFunctions

ClaCom was also very popular back in the day, but was discontinued a long long time ago, and is no longer available. Your reference to a “wedge” may be related to a number of devices acting as keyboards - which has both advantages and disadvantages, which is discussed in the docs in the link above.

Cheers
Bruce

1 Like

Hi Martin,
we use Clacom for windows por reading and writing truck scale data;
Also you can use WinEvent but I don’t have experience with it, and as others have pointed out, there are others solutions.
Now we are shifting to get the data using the ethernet port.
Which indicators are you using ?? Mettler Toledo ??
We have a lot of experience with scales and if you need help, just call.
reregards, marcelo

1 Like

yes that would be ClaCom (from GapDev). I also have used it for lots of things including scales on conveyor belt lines but Bruce notes it is no longer available - so perhaps WinEvent is the best solution these days.

cheers

Geoff R

Hello,
True, I also could not find it on the net.
Our apps still compile and work just fine with Clarion 11. + windows 10.

If it is no longer supported/or available does that mean we are allowed to share it with others?
Does it become part of public domain?
Curious!

Yours truly,
F Rabie tel 0824438230

no I don’t think you can share it as it would still be copyright etc. Only the owner of the copyright could put it into the public domain.

(I am not a lawyer but that is my understanding)

the reason it still works in later versions of Clarion is that I believe it was written in C and therefore not reliant on any given Clarion runtime.

be aware there was another message a while back saying not to let it do its error windows ie. handle any errors yourself.

cheers

Geoff R

I still have the Clacom disks and manual etc which I bought back in the nineties. My intention then was to build a client server solution for telex sending and receiving. I could not find out how to do it in Clarion so in the end I used VB6 with Access as back end database. I developed it as two applications, one front end with the editor which put messages into the outbox table . It also had browses for inbox,outbox and sent box tables. The server used the mscomm.ocx to communicate with the modem and parse and put incoming messages into the database inbox table. This worked fine. Can still be done.

But I have no use for the Clacom library so if anybody is interested I could be interested in selling it. No idea for a price. My private email: [email protected].

Werner

Hi, check this:

http://attryde.com/clarion/cw_serial32.htm

1 Like

That’s very good information! I actually didn’t know about the 16 bit / 32 bit differences. Very good to know. Thank you for posting the link!

1 Like

Many thanks! I am working remotely for a client but he has not passed me the model and brand of the scales yet. He is going to go to the store tomorrow to see just that. The idea is to capture the weight from the scale and then calculate the total price based on the weight caught. I thank you very much for your interest and help, as soon as I have news I will let you know.