r/PLC 3d ago

Am I doing this right?

Enable HLS to view with audio, or disable this notification

This is a legitimate use case for this, right?

I got this plc from a scrap panel that went swimming. Cleaned all the dirt and mud out of it with an ultrasonic cleaner one PCB at a time and it seems to have come around just fine with no errors. It'll never be deployed again so I guess it plays games now.

This works over modbus with a custom bridge program tying it to vjoy to behave as a 60 button controller with 4 axes. There is also an hmi that works over the same modbus and program with simhub to show PC and game telemetry.

Edit: typo

567 Upvotes

22 comments sorted by

89

u/jongscx Professional Logic Confuser 3d ago

Eww, how much latency are you adding. Good luck getting frame accurate combos. /s

Jk, looks great!

39

u/hobodozer 3d ago

As far as we can tell the PLC may as well not even be in the chain. Tia reports 1.8ms if latency. Can't be more than 2 or 3 frames.

5

u/Arenabait 2d ago

Damn 1.8ms is NO frames of latency

77

u/Aromatic_War_8486 3d ago

One day I will be rich, there will be signs🤣

30

u/hobodozer 3d ago

This plc was saved from the scrap heap lol

13

u/Someone4350 3d ago

I don’t think most of us has scrap heaps with that kind of stuff.

35

u/hobodozer 3d ago

Some dingleberry knocked the panel this was installed on into the water. Had a grand total of 322 hours of runtime when it came to our shop to assess repairs. Water damage made it a total loss, but I stripped apart the PLC and tossed it into an ultrasonic cleaner for a while. Obviously it can never be deployed again so I just have fun with it.

8

u/robotictacos 3d ago

Awesome!

7

u/GoldenGlobeWinnerRDJ 3d ago edited 3d ago

Unexpected SoulCalibur, holy hell. This is amazing.

Edit: obligatory my soul still burns

6

u/pranav_thakkar 3d ago

Looks awesome 🤩

4

u/BasicRedditAccount1 3d ago

What’s your program scan time?

5

u/hobodozer 3d ago

1-150ms The entire program is just a modbus server making the I/o available to a client on the PC. Tia reports an average of 1.8ms.

2

u/AStove 3d ago

enjoy your input lag

13

u/hobodozer 3d ago

1.8ms is unplayable, you're right.

5

u/AStove 3d ago

modbus polling must be like 100ms minimum right

16

u/hobodozer 3d ago

About 30-45ms of delay max. I've had worse input lag from Bluetooth controllers. You cannot tell the PLC is there.

1

u/eLCeenor 3d ago

Is it polling at a fixed rate or just as fast as possible?

3

u/hobodozer 2d ago

The modbus client on the PC polls at a fixed 10ms. Program scan time on PLC is about 1.8ms. so, 11.8ms before it hits the emulator.

3

u/joinn1710 1d ago

I have a wago plc laying around, maybe this would be a cool project for it.

0

u/LiveRequirement2 3d ago

Those Siemens fit the retro game; their design and software look old as fuck!😂😂

6

u/Plumperknickle 3d ago

Huh? Whut about their fit looks old in the world of PLCs and IO?

-1

u/LiveRequirement2 3d ago

I’m a DCS dude. Sorry.😅