Author Topic: Machine simulator 3.13.0  (Read 185 times)

ominence5

  • Newbie
  • *
  • Posts: 1
Machine simulator 3.13.0
« on: November 04, 2022, 06:19:26 PM »
Hi all,

Hope you can help.

I have a Siemens LOGO 8 and I'm trying to get network analogue input to work. The logo8 from my understanding cannot deal with floats.

Has anyone managed to configure the water tank via the graph code to output an integer rather than a float for the variable of the tank level?

Thanks in advance.

O5

EasyPLC_Master

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
Re: Machine simulator 3.13.0
« Reply #1 on: November 04, 2022, 06:57:08 PM »
Hello,

For instance let's suppose we are using the machine 15 Tank Level included in M.S.
Fist, open this machine in the Editor and change the Tank properties for PLC I/O asssigments (digital & analog) and set all signals to -1 to disable it.
Now open the Machine Graph Code Editor and make something like this (image attached), here we are using four float variables to convert the values, the PLC analog outputs from LOGO are divided by 10, (logo will write from 0 to 100) that will be converted in MS from 0.0 to 10.0 (then we can avoid decimals in LOGO) the same for the output, the tank values are multiplied by 10 in order to save one decimal.
Use this code as example, but this is the idea, you can customize the values to adapt it to your needs.

A sample machine is attached where this programming is made.
« Last Edit: November 06, 2022, 07:25:33 PM by EasyPLC_Master »