USB/RS232

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
dharbitindy
Veteran Member
Posts: 101
Joined: 2019-05-26 18:38

USB/RS232

Post by dharbitindy » 2019-09-12 02:04

One thing that would be very cool would be to have the ability to detect a signal from a USB, or RS232 comm port, and then count the elapsed time between the on / off /on signal. In other words, capture a cycle time from a machine if that makes sense. There may be a way to do than now, but I haven't seen any post referring to this. Basically, looking for a comm port and interacting with it.

Thanks,
David

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: USB/RS232

Post by jsetzer » 2019-09-12 05:49

Maybe I did not get the point, yet. Can you please explain the use case a bit more.

As far as I know, the standard browsers cannot interact with the user's COM/USB ports or other hardware directly for security reasons. This means interaction with COM/USB can only work on the server's COM/USB ports.

From my experience such hardware-related interaction should be done by a separate service-application running on the server, for example a windows-service, which interacts with the hardward on the one hand side and then writes colllected data into your database on the other hand side. In the browser (on client side) you can use AJAX to get data from a serverside script which gets data from the database. But to be honest, this will never be real "realtime", I'm afraid, because every component takes its time.

There are libraries like SignalR (https://dotnet.microsoft.com/apps/aspnet/signalr) which offer "realtime interaction". It depends on the cycle, on the bandwidth, on the server's and the client's performance if it can work or not. If your COM-port signals change let's say in milliseconds this will be problematic. If it changes let's say every second, this will work many of the times. It it changes every couple of seconds, this will work most of the times.

Regards,
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

dharbitindy
Veteran Member
Posts: 101
Joined: 2019-05-26 18:38

Re: USB/RS232

Post by dharbitindy » 2019-09-14 03:22

Jan,

Thank you very much for the reply and explanations. To explain the use case a bit further, I have a machine running in production and a typical cycle time would be 30 seconds between signals. The idea is to capture each cycle i.e., some machines are 30 seconds, some 45 seconds, etc. An I/O box could capture the signals and perhaps capture these to a database using Visual Basic, or some type of software perhaps. I'm just not sure how to get the data from there to the Website, but I'll certainly look at your suggestions that you mentioned and research this a bit more to see if I can understand it better. Thanks again for the detailed response.

Best regards,
David

Post Reply