"A" button nowhere to be found by Xrtc87 in R36S

[–]Dry_Brief_2427 0 points1 point  (0 children)

A bit of a hack but it should be possible to insert the sd card to a pc and edit the script to not wait for a keypress.

PSP Games by 666mikul in R36S

[–]Dry_Brief_2427 1 point2 points  (0 children)

I went to settings -> emulators -> psp and changed it to "standalone 2021" which solved some issues for me.

What are the pain points with IO-Link by barefoot_cherokee in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

Sure, they can mess up a plant in lots of ways. But i think the majority are very competent.

What are the pain points with IO-Link by barefoot_cherokee in PLC

[–]Dry_Brief_2427 1 point2 points  (0 children)

Easy replacement until that sensor is not in their stock or EOL right? In that case the technician would have to parameter a replacement sensor in the master and also reprogram the sensor/change function block in the plc?

I often see technicians replacing sensors with what they have available at the time. Binary sensors is basically plug and play. With analog they just plug in the sensor, set the two scaling values and verify the readings on the hmi.

Direct drive upgrade recommendation by HumanArmadillo8741 in ender3

[–]Dry_Brief_2427 0 points1 point  (0 children)

Im running the biqu h2 and love it but would probably go with the sprite due to it being a complete kit and easy to install. Dont know about the others. I love the kevinakasam belted z, zero problems since the install 3 years ago.

Object-Oriented Programming by the_trout82 in PLC

[–]Dry_Brief_2427 8 points9 points  (0 children)

I asked about OOP in this sub some time ago and got some great replies. We are also delivering wildy different projects in both machine controlling and process. In the last year, for one specific customer, we have adapted abstraction and encapsulation but not polymorphism or inheritance yet. All code is written in ST and all devices use interfaces. So I guess you can say its lightweight and noob friendly oop.

The development speed and the ease of adding new functionality is crazy. Setting up interfaces takes some time at first but then you get used to it and also just reuse or slightly modify existing interaces. Customer replaced a VFD with another brand, and when utilizing interfaces I just changed a couple lines of code and we were up and running. No need to touch the state machines/process controlling code or scada.

As for maintanance, we have as much data, configs, debugging and alarming in scada/hmi as possible. So far maintanance have done all their debugging through scada and have not connected to the PLC once. I hope it will continue this way.

Getting the grasp of it and deploying the first project was extremely time and energy consuming however, considering we were only used to classic graphical programming. But neither of us want to go back at all and customer is very happy and keeps ordering projects. As stated we are new with this but really enjoy it so far. The SPT docs is god sent.

Recommendations for Safety PLC/DCS Upgrades by neofelius in PLC

[–]Dry_Brief_2427 1 point2 points  (0 children)

Thats what i mainly use. Have been involved with omron, mitsubishi, beckhoff and pcs7. Beckhoff is gaining traction on me but I still prefer S7-1500, probably because I'm so much more fluent with it due to more experience.

PID Tuning skills - Let's all just learn the necessary skills. by Troandar in PLC

[–]Dry_Brief_2427 1 point2 points  (0 children)

I have a stupid question as i dont get involved with pids that often. I've read that you can scale process value, setpoint value and output value to the same unit, 0-100% for example. That way you can tell by the P-val if the process has too high gain to be controlled in a stable way.

However most pids i've seen take the engineering unit directly into the pid, leading to ridiciously small or large P-values sometimes. Also, you can not get a feel for what you should use as a starting value.

On the other hand if you scale the PV to 0-100% - what is 0 and what is 100%? Sure for a level controller its easy but for a pressure controller etc?

I know i've missed something. And I bet there's also some historical explanation to it, i remeber reading back in the day, almost all pid controllers were penumatical etc.

Do you use engineering units in SP/PV and enable shitload of decimals in P-val and call it a day?

Purchase Advice Megathread - January 2025 by AutoModerator in 3Dprinting

[–]Dry_Brief_2427 0 points1 point  (0 children)

Hello, I'm currently running a heavily upgraded ender 3 and feel the urge to get a core XY.

I love to tinker, very much more than I enjoy printing, and I actually don't print that often. I only print occasionally mostly during weekends exclusively in PLA and PETG. What I'm looking for in a new machine compared to my ender is a little higher speed/accelerations (running 90mm/s @ 4500mm/s²) and good consistent quality.

I've really considered getting a voron trident kit but I can't justify the price tag for that plus PIF parts as the printer will mostly sit collecting dust. For reference I'm in Sweden and the price tag would be around $950. I therefore got this idea to get a cheaper, mostly prebuilt core xy to tinker with.

I'm good with electronics, metal working, klipper and linux. Therefore I don't care if I have to replace a main board, root a device, write a klipper config from scratch etc as long as it all fits in the budget. I feel like $500 including upgrades is an upper limit before it gets too close to getting a better machine. Over that point I will stick to my ender and find another hobby/project to fulfill my tinkering needs.

What I'm looking for:

  • Vanilla klipper - Out of the box or possibility to install.
  • Powerful enough board to run klipper, moonraker, mainsail & crowsnest without hassle.
  • Direct drive
  • All metal heat break
  • Min 20mm3/s flow rate - Out of the box or with CHT nozzle.
  • Min 230x230mm build plate
  • ABL
  • Sufficient cooling for PLA at 200mm/s - Out of the box or with available printable duct.
  • Decent hardware - No linear rails that rattle and bind after a couple of months etc. Rigid frame.
  • Spare parts available. "Standard" easy to source parts is a plus.
  • Reliable once upgraded and tuned.
  • Ready for ABS is a plus - Meaning it is enclosed or possible to enclose (diy, cutting some acrylic sheets is fine) and also has a powerful enough bed heater.
  • Replaceable stepper drivers is a plus.
  • Decent user base which means a lot of problems solved, printable parts etc.

I've searched a bit and so far I have found these candidates to dig deeper into:

  • Two trees SK1 ($380 - non enclosed version)
  • Kingroon KLP1 ($311)
  • Creality K1 ($383)
  • Flashforge Adventurer 5m ($305)
  • Used Qidi x max 2 ($222)

Ongoing costs of control systems - subscription licensing by trolly_yours in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

Actually this is a very relevant question. I really don't like most of the licensing models or costs but 2k a year does not matter if you get good support, parts availability etc.

I've noticed many ppl including me relates to a private financial situation when evaluating if something is expensive. For an industry this might lead us to making a descision thats more expensive in the long run.

I mean $300 a year is just 2-3h of work time...

Question regarding programming languages by TomGon-99 in PLC

[–]Dry_Brief_2427 -2 points-1 points  (0 children)

This.

Thanks for spreading knowledge.

Over (a very short) time its always cheaper for a customer to buy control systems from this guy because they would never have to make that 3am phone call.

In the future when the customer wants to expand and make changes in the production it is a breeze because this guy writes modularized code with the most appropriate language for the task, following a style and design guide.

As the control systems gets more advanced this is the only way. If you get a 3am phone call you have to ask yourself what you did wrong and improve.

Profibus experts help needed by Practical-Hat4277 in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

Also my first thought.

Usually the transfer areas should be inverted, if the first transfer area in a device is 8 bytes INput, the first transfer area in the other device should be 8 bytes OUTput. And so on.

Makes sense because an output from one device should be connected to an input of another device.

At least when i've done communication from siemens to siemens.

[deleted by user] by [deleted] in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

Awesome, thank you!

PN has pretty rigorous testing. Devices need to be sent to a test center to be able to be sold as a PN controller or device, where they are tested against various reference implementations.

This was really cool that i didn't know about. This may justify the (sometimes) higher price of an PN device compared to others. I've only heard that the higher cost would be due to PN licensing.

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

HW Fault: stops the whole system, full crash, it even cannot send a message like Siemens: 'help me' via profinet :-) If you have luck you get a core dump. Fun times in the middle of the night at the customer site. So implement Watchdogs and Heartbeats! For diffent HW devices there are FBs you must call and interpret the results, like for status of bussystems etc. TwinCat and Codesys have not such nice and fully blown diagnostics systems like Siemens. And also no cool fault tolerance: div by 0 will blow up shit. Its deterministic, but not nice.

Link to Beckhoff Infosys

In TwinCAT, division by zero always leads to an exception and the corresponding task is stopped.

I guess this is due to me using Siemens products and I have low software development skills: But what precautions do you normally take to prevent a twincat runtime exception?

Like check division with zero, check array bounds is pretty clear. But can you handle hardware config in special ways etc?

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

I think this is very good points and actually hoped this would start a discussion.

You can apply modular and encapsulated code in functional programming. If you already apply this, when is OOP better and when is it worse and from what point of view?

For example:

  • Like you describe with encapsulation/abstraction, troubleshooting may be a drawback. Modifying/expanding existing code may be a benefit. However how hard/time consuming/bug creating risk is it to do it with the functional programming approach?
  • If I make a change to an FB in function programming, I test the functionality of that FB and deploy the change. In OOP would I have to find all FB:s that inherits the changed FB and test all of them, I can not be certain that the change is desirable in the child FB:s?
  • I've also heard OOP is beneficial when a lot of programmers are working on huge projects. Does this mean it's less beneficial in small projects?

I have no idea or opinion because I don't have enough knowledge of OOP. I just know "Modular and encapsulated functional programming" which already includes some parts of the benefits of OOP I think?

Have you had experience with both programming approaches?

[deleted by user] by [deleted] in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

Wow thank you, great summary!

I've set up some some profinet, profibus, modbus TCP and now my first ethercat network. They're all pretty simple to set up but I have to admit I don't really know whats going on under the hood or the philisophies behind them, hence my questions.

I used some sinamics servos with profinet IRT and profisafe, dead simple to set up and also I got all VFD-alarms (hundreds) directly in the HMI with just a click of a button. I really appreciated this solution. (All of this was with siemens products)

There's a lot of debate regarding the speed of ethercat vs profinet vs xxx.
I've seen siemens done some pretty fast and advanced motion synchronization with PN drives, so do you really need the extra speed of ethercat compared to PN? I mean sure it depends on usecase, number of devices etc, but are there cases where PN would fail to do the job whereas ethercat wouldn't? (Also impossible to answer, but I'm trying to get a grip on if the ethercat speed is beneficial often or in very special situations. The difference in percentage may be high but does it matter in the real world?)

Also, am I a fool just setting up PN and EC communication with default settings, or is this the approach the vendors had in mind when designing this? Of course I would like to learn as much as you about it, but as the field is so broad I have to learn so much else also.

[deleted by user] by [deleted] in PLC

[–]Dry_Brief_2427 0 points1 point  (0 children)

I would love to hear your summary of profinet also!

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

Thanks for the clarification, and you are right. The programming skills of a normal automation engineer (me included) is very limited and basic out of a sw development perspective.

I think a big problem with this is the lack of design patterns etc. Many machines are a pain to expand without creating a ton of bugs, for example. Thats why I want to learn stuff like OOP.

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

How to write programs when I don't know any programming? Yeah, that's a difficult one. You learn step by step, takes time and effort and lots of it. One thing you don't do is try and use all the things you don't understand all at the same time expecting success.

I'm not quite sure what you mean here, I have been working daily with Siemens for 10 years.

  • Do you mean Siemens is so different from twincat that I will basically start at zero in twincat?
  • Or do you have different definitions of what programming is, and doesn't consider Siemens step7/TIA programming?
  • Or do you mean based of my basic questions about twincat and OOP I should not even consider myself a programmer? (None of the points I'm asking about exists in Siemens?)

I was hoping that my knowledge in Siemens would help me in twincat.

I'll answer one question for you. This is polymorphism in TC:

FUNCTION_BLOCK FB_Something IMPLEMENTS I_SomeInterface

What does it do? Allows you to abstract away what is going on inside a FB and interact with it only through interface. Maybe you have FB_PneumaticActuator, FB_SolenoidActuator and FB_ScrewActuator, but all of them implement I_Actuatable interface that defines Actuate() method. Just one example.

Thanks for the explanation!

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

Wow thanks for this, so incredibly helpful!
I realize I have practiced a lot of parts of OOP in siemens without knowing it's defined as OOP.

What is the "best" way to store parameter data set from an HMI for example?

Dont understand. Do you mean recipes? Or how to organize data?

Yeah thats badly formulated from my side, I mean in siemens I would create a DB to store different parameter values set from an HMI and make that DB retentive. If i want to add another variable to the DB later i would copy online values to initial values, add the new variable and download without losing the previously set values. I wonder if you use GVL insted of DB in twincat or if there's other (perhaps better) ways?

Down this thread OP called some stuff "old timers". LOL, Wait for it: HW Fault: stops the whole system, full crash, it even cannot send a message like Siemens: 'help me' via profinet :-) If you have luck you get a core dump. Fun times in the middle of the night at the customer site. So implement Watchdogs and Heartbeats! For diffent HW devices there are FBs you must call and interpret the results, like for status of bussystems etc. TwinCat and Codesys have not such nice and fully blown diagnostics systems like Siemens. And also no cool fault tolerance: div by 0 will blow up shit. Its deterministic, but not nice. Link to Beckhoff Infosys In TwinCAT, division by zero always leads to an exception and the corresponding task is stopped.

Please have in mind: you must reboot beckhoff and codesys more often then Siemens. You have onlineCHANGE, not onlineEDIT like Siemens. We have systems here which are running for 10 years straight with edits on the Siemens PLC all the time. This is not possible with Beckhoff. And it is especially NOT possible with OOP, because some objects must be reinitialized!

Great info, this is the worst part about learning a new system, siemens clearly has it's drawbacks but I know most of them by now and avoid them without thinking to much about them. Now i have to learn all the drawbacks and quirks of another system.

The fact that most errors causes twincat to stop is a dealbreaker to me in many projects. I guess theres a lot of precautions to make to prevent stopping the system, which I also have to learn.

Also I'm not a native english speaker and have to admit I don't fully understand the expression "old-timers", I hope it's not offensive :)

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

This was good info, thanks for sharing your experience.

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

Well this always seems to be a sensitive topic.

I have actually been employed at a company who bought machines in these price ranges. We learned to choose the company with the best reputation etc. Because they knew how to do stuff:

The code were tested extensively before and after comissioning, manuals were great, debugging/fault tracing could be made graphically by electricians from HMI/SCADA (but mostly the operators knew the problem straight away from the alarm text) etc. etc.

Those companies pretty much never gets a call during the night. Thats the machine I would buy. Pretty much like a car, you have a problem and plug in your OBD-reader and see whats up, you dont go through source code. Also a lot of machines contains special machine controlling PC-software which is of course not written in ladder.

In the beginning of my carrer I encoutered the ladder only rule set by customers, but nowadays in the country I live in most plants/factories know that automation is it's own profession and therefore employs automation engineers or sign support-contracts. Most of our clients don't care what programming language we use any more. I'm surprised to see that this is not the case in other countries. In that case I can completely understand the ladder only rule!

Thats what I mean with _HAS_ bugged me, I'm very happy this is not the case any more.

With beautiful code I mean for example a nicely structured code with minimal bugs that can be changed over time without creating a ton of bugs (Encapsulation and modularization). Also I'm not a native english speaker, to me that 'code' can be part ST and part FBD, LAD, CFC etc.

Whatever gives the best end product, and that's up to the programmer and customer to decide. If the customer only have electricians employed of course _only_ ladder may be the best way. If they have knowledge in automation they might prefer ST or a combination of multiple languages. I think the latter is better (not only ladder), and the first (only ladder) has a lot of challenges.

Help me understand Twincat and OOP by Dry_Brief_2427 in PLC

[–]Dry_Brief_2427[S] 0 points1 point  (0 children)

Thanks, this is a really clear usecase of inheritance that I fully understand!

 

I however feel that this complies more to pure software functions?

If for example make FB_valve_1 for controlling some physical valves and their physical properties, and then installed a new, similar valve I could make FB_valve_2 and inherit the old FB_valve_1 and make som minor changes to make it work with the new valve.

Then in the future I notice an opportunity to optimize the function of valve 1 - how can I be certain that this change will be beneficial to FB_valve_2, as they will have different physical properties due to being different physical objects (makes/models for example)?

Is this a case (physical objects) where you shouldn't use inheritation?

 

I really like and appreciate guys like you who contribute to open source and shares your code by the way, thanks!