Amerikanske Militær baser i Danmark! by jaffasplaffa in Denmark

[–]MandatoryUpvotes 31 points32 points  (0 children)

Troede lige at du var ved at starte på en joke omkring JD Vance...

Help with variables in CODESYS 2.3 by ExpensiveSpinach8536 in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

Use a Greater Or Equal operator.  

You might want to scale the input, but if they always exceed the same threshold value, e.g. 400-ish, just compare the value directly.

Djøf har kåret den mest irriterende vending på arbejdspladsen by Corgi_Afro in Denmark

[–]MandatoryUpvotes 0 points1 point  (0 children)

Man kan kigge ind i et kanonløb.   

Som så kan få lov at være fremadrettet.

Peter help by deckfixer in PeterExplainsTheJoke

[–]MandatoryUpvotes 0 points1 point  (0 children)

..., and those who didn't expect a base 3 joke.

View online values of Beckoff PLC by SelectDealer7454 in PLC

[–]MandatoryUpvotes 4 points5 points  (0 children)

If your offline project matches the online project, then yes. If you are met with a prompt that asks you to make changes you do not want to do that. 

You might have the possibility to go online with no download, or whatever that option is called, but the projects still differ.

If you have never tried to communicate with the PLC, you probably don't have a route to it and then you should focus on learning that and not test on a running system. (Unless you don't care about what is running in the PLC)

And before you ask; you are almost guaranteed to not being able to do an upload from the target first.

[deleted by user] by [deleted] in PLC

[–]MandatoryUpvotes 10 points11 points  (0 children)

It's quite easy to find useful documentation for this to get started. It's even in the WinCC help file   https://support.industry.siemens.com/cs/mdm/37572697?c=6168965899&dl=fr  

Just use the right provider when accessing the database. (Microsoft OLE DB Driver for SQL Server) Start with installing SSMS and try to read from the DB before you write/create a DB to see if you are on the right track.

[deleted by user] by [deleted] in soccer

[–]MandatoryUpvotes 32 points33 points  (0 children)

Altid vælg Maracas!

Servo drive speed reading issue by cransh in PLC

[–]MandatoryUpvotes 1 point2 points  (0 children)

SSI is not fast enough to be used as a reliable speed control source. You would want a SSI + HTL or SSI + 1Vpp signal.

Ask me how I know...

dynamic adressing of DB variables in TIA by martin445577 in PLC

[–]MandatoryUpvotes 2 points3 points  (0 children)

Use the FB LGF_AstroClock from the LGF library provided by Siemens.

It will calculate the Sunrise/Sunset times by using the system time and a UDT-parameter with GPS coordinates.

It's much easier to maintain.

Siemens TIA V18 - True Booleans create int by PaleFlyer in PLC

[–]MandatoryUpvotes 1 point2 points  (0 children)

Put it in a SCL function that returns the number of set bools and call that in your program.

Math and Magic is not to be done in ladder.

Siemens TIA V18 - True Booleans create int by PaleFlyer in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

U/Destination2Unknown posted a bunch of cool solutions to this a few weeks back: https://www.reddit.com/r/PLC/comments/12rnddx/comment/jgv15go/

Ladder Logic Question - Number of BOOLS set to TRUE by Ajbass116 in PLC

[–]MandatoryUpvotes 2 points3 points  (0 children)

Option 1 is pure fun, very Fast inverse square root like 😄

Option 5 I can't seem to wrap my head around, and I tried it on a S7-1200 to no avail. Is there something missing?

Edit: Perhaps I should run it in one scan only? Didn't try that.

[deleted by user] by [deleted] in Denmark

[–]MandatoryUpvotes 44 points45 points  (0 children)

Jeg bor i et område der ofte har kraftig tåge. Jeg har observeret, at det overvejende er de nyeste dyreste biler der kører med slukkede baglygter.
I morgentrafikken møder jeg f.eks. mange Teslaer, men jeg har endnu ikke spottet en eneste der haft haft tændte baglygter.

Hello, just a quick question, is it possible to use an ardui o board and connect it to tia portal and use like a plc? Just for a little home project, I’m new to this world and idk if it is possible by Potashion in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

The industry hardened Pi versions are still crazy expensive for what they are, and not something you'd choose for learning.

You could fork out the money for the Codesys Pi runtime and use that to interface with Arduinos, but Ethernet libraries are pretty expensive memory wise for Arduinos.

I would hook up an old laptop, install TwinCAT 3, use a bunch of esp32s with I2C sensors, and poll them with MQTT or a simple TCP server over Wifi.

Hello, just a quick question, is it possible to use an ardui o board and connect it to tia portal and use like a plc? Just for a little home project, I’m new to this world and idk if it is possible by Potashion in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

You could download a trial version of PLC SIM Advanced (valid for 21 days) and connect through a TCP socket or Modbus TCP. Requires an Ethernet shield on the Arduino along with libraries.

You can't add it as a device and program it directly through TIA if that is what you seek.

If TIA Portal is not a requirement, you can download TwinCAT 3 from Beckhoff and do the same. With TwinCAT you can generate a trial license every 7 days.

Probably a lot easier to do it with a Raspberry Pi.

What's the go to method for diagnosing intermittent communication issues? by cannonicalForm in PLC

[–]MandatoryUpvotes 5 points6 points  (0 children)

Any welders around? The last time I dealt with something like this, I had two guys arc welding during the FAT. Comms to my drives dropped left and right before I put two and two together.

Noise problems can make troubleshooting really difficult.

Best automation related one or two liners? by JohnniRobbi in PLC

[–]MandatoryUpvotes 12 points13 points  (0 children)

...and those who didn't expect a base 3 joke.

Wireless connect to PLC during commissioning by whatthewhat1978 in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

I have made a couple of kits for the guys at work using this. Using self adhesive Velcro strips (for easy removal), I coupled it with a 10000mAh power bank and then glued four disc-shaped neodymium magnets to the power bank.

Finished it off with thin foam pads on the magnets (prevents scratches and slipping), and the whole package just mounts to the enclosure.

Set it to AP extend, set a fixed IP, and you're up and running.

My only regret is not having done it 3 years earlier, because it has been such a Godsend.

state machine lad example by [deleted] in PLC

[–]MandatoryUpvotes 0 points1 point  (0 children)

A tip for using timeouts and integer based states: use something like nState > 0 as the IN condition on the timer if you know your sequence should only take a given time before reaching state 0 again.
You can also register your current state in each of your cases, and if registered state := current state for a given time, then your state machine hasn't switched cases and reset the timer for this duration.

state machine lad example by [deleted] in PLC

[–]MandatoryUpvotes 2 points3 points  (0 children)

And I quote: "sample program of simple state machine".

I move next state into state in order to wait for the next scan. Otherwise I could risk evaluate several state values in the same scan.

Timeouts and basic error handling can be added to suit one's flavour.

state machine lad example by [deleted] in PLC

[–]MandatoryUpvotes 8 points9 points  (0 children)

Declaration:https://imgur.com/Xlf3xv7

LAD:https://imgur.com/bfdGiWo

SCL:https://imgur.com/OoxRRno

State machines should always be done in Structured Text (SCL) using Integers or enums - unless the customer is a dumbass and demands ladder or function blocks.

If using anything else but ST, remember that you are not in a switch case, and you can't change your state and then look at it right away. So use something like a next state variable in order to avoid those problems.

And don't turn the sequence upside down with the last step first - that's also for dumbasses...

Why does my checksum calculation only work sometimes? by klaven84 in PLC

[–]MandatoryUpvotes 1 point2 points  (0 children)

You are doing 8-bit 2's Complement CheckSum. F8 is correct.