Programmable Logic Controller Unit deprecated


Manipulate your signals just like a PLC

Content
6 years ago
0.16
19
Circuit network

i I'm missing Integer calculations, and some more suggestions

6 years ago
(updated 6 years ago)

first: a really nice mod, allowing easy calculations with a lot less combinators.

but ... when i wanted to convert a timer (that counts ticks) to a time in hours, minutes and seconds, i failed miserably :-(

there are only the four operators +-x/ and no mod operator. and when i tried to use the usual trick (s=t/60, ss=s*60, t=t-ss) it didn't work: looking at the intermediate value ss i found that all calculations seem to be done with floats and thus s is the number of seconds including a fractional part which is only truncated when the value is output to a signal. looping that value back from the output to the input, i could make it work only partially since looping it back causes a delay of one tick, and is not practical for most applications with more than 2 or 3 such values.
how do other people (and how can I ) handle this ?

ps: some suggestions for easier programming:
- there already are EQ, LT, LTE, GT, GTE. it would be nice to also have NEQ
- similar for logical operators (as someone else already has suggested): please add NOR, NAND and XNOR to the already existing OR, AND and XOR
- there is a lot of space on the tabs for input and output definitions. would you be willing to extend that from 8 to 16 variables on each of the two lists ? and/or maybe have 8 variables for red+green, and some more for "only red" and "only green" ? or have all the definitions include two checkmarks (both selected by default), one for red wire and one for green wire ? that would allow to input eg measured values for copper and iron ore on red wires and compare them to a second set of values from green wires without the need to have a bunch of external combinators that convert the signals from eg copper ore to A and then in the program compare copper ore with A. instead i would be able to have variables like "CopperOreGreen" and "CopperOreRed" and compare them ...
- and most of all: please add "insert" to the buttons in front of lines. there is already "delete", but to insert a line i would have to add it at the end and move it up all the way (line by line) to the desired location at the top :-(

5 years ago
  1. yes a MOD operation is something i overlooked
  2. NEQ - good idea
  3. also good idea
  4. yes i had originally invisioned "tiers" of PLC's with greater processing capabilities eg: tier 1 = 4 IO 2 = 8 IO etc
  5. having red/green/both would be a great addition
  6. agreed it's on the top of my list as i have encountered this a lot
  7. FYI this mod was written from ground up in 2 days and has had 0 polishing hopefully i will get a bit more time to work on this a bit more now that there is some interest in using it

New response