Jump to content


Privileged Member
  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Isakovic

  1. I'll tell you configuration that works well with stepper, from my experience and similar application.

    V430-J-TR34 with configured outputs as "High Speed Output (Step Control)", with ramping done via linearization block. Input to LIN block is distance from encoder, ouput frequency. In your case input could be acceleration/deceleration time if there is no distance measurement.


    I see now that you are using V130, I personally never worked with that model, but maybe this can give you an idea.

  2. Sorry for derailing topic.

    I tried playing with it. When monitoring 1 unit is 1 minute and 2-3 seconds. When running autotune 1 unit is about 30ms. It doesn't seem consistent, it is the same if you change sample time. Maybe it depends on communication with controller.

    If you need time values to analyze your system I suggest calculating it manually by dividing your total online time with displayed units under the graph. Maybe someone who knows better can chime in, but I don't see any more settings for time axis.

  3. 5 hours ago, Ausman said:

    No doubt many people here will disagree with what I am saying

    You did not speak favorably about sacred cult of PID, I have to react    >.<

    Jokes aside, I used modified method from VisiLogic example program "PID motorized valve" to control 3-point and analogue actuators on systems running 24/7 and valve actuators last a long time. I did use relatively simple method before PID and it worked well, just little less stable.

  4. 8 hours ago, kratmel said:

    Code do sorting numbers placed in  MI13, MI14, MI15, M16, MI17 .......  (If we change first Block in row 5 from > to < code change sorting direction).

    That is right. N3 is solved.

    It is used in compressor control to sort working hours. On that project I learned you'll need to use loops when doing optimization problems, I avoided them before.  Whole program is a heap of loops.

    8 hours ago, kratmel said:

    Something like C++ for Visilogic....

    Code like this written in ladder gets hard  to follow even for simple stuff, bunch of indirect addressing. This program was written some time ago, if I needed to do it now I would try with UniLogic and C scripts, never used UL C functions to run actual machine, only for testing.

  5. If you need bit for one scan every second you should use transition contact in Gabriel's example, Felx's example will also work with normal contact. I don't know why this function was omitted from system bits in UniLogic, it is present in VisiLogic and I believe it is often used.

    Now I have a question here which method is best practice. In documentation for VisiLogic it is suggested to reduce the number of transition contacts, so I personally use one timer like Flex posted but with normal contact wherever it is needed in program. Is this still an issue in UniLogic or we can simply use frequency bit with transition contact?

  6. In similar project I had some time ago I used HSO in Step Control mode (not PWM), and frequencies for acceleration and deceleration are calculated in linearization block and copied to register for frequency, effectively the same thing you did. I remember having those issues that output would start with high frequency and motor couldn't speed up but can't say for sure what the solution was. When stopping are you ramping the frequency down or just set it to 0? Maybe put a delay after setting run bit if this is allowed.

    17 hours ago, kratmel said:

    And here I find a problem - the output of the PWM which perfectly controls the stepper motor when starting from 0 speed does not want to start smoothly from another source.

    I'm not sure what you mean by another source.

  7. If I understand manual correctly this Master Clock can work as an NTP server. There is a function in VisiLogic called RFC-1305 for time synchronization with NTP server, there is also an example. It works fine, but if something goes wrong and server returns 0 it will reset PLC clock to midnight 1.1.2001. Just make sure to have some logic preventing this.

    Or if wiring allows it use digital input as Ausman says, that will take less programming time and be pretty accurate for this case.

    • Like 1
  8. Oh I see it now!

    If the PLC and Hama are powered from the same supply both CH1 and GND on the PLC module will effectively be on the ground potential.

    Now I suspect AI08O also has GND and negative power terminal connected, so switching terminal places would not work. But will it work if separate power supply is used only to power Hama (not referenced to the ground), and other supply is used for current loop and PLC?

  9. You can search this on the internet for detailed explanation. It means that Integral component has maxed out over time and is contributing 100% to PID output. Maybe integral time is too slow or system cannot reach setpoint fast enough. If this makes oscillations or any other problems you can force Integral component to take some other value, there is a function block for that in PID menu.

    • Like 2
  10. The way that Sargani explained in post number 2 should work.

    6 hours ago, vken said:

    but as far I can understand is that the reading should be in two arrays or two registers.  how ever I was not able to read two arrays from unistream. 


    6 hours ago, vken said:

    When is saying 4 bytes (2 registers) they are 2 registers in row?

    Yes you can (and should in this case) read several registers in a row. If in "Modbus Master" setup you define tag as an array of 16 bit integers, let's say of length 10, PLC will read 10 consecutive registers from Modbus Slave.

    Can you post part of the program with code for making 32 bit float from 16 bit ints, with setup for Modbus so we can help you find the problem?

  11. Hello,

    I need to add two columns to an existing Data Table, in VisiLogic this can be done without losing values, I'm not sure how it works in UniLogic, I remember once editing it and all values went to 0. Can I add a member to Data Table struct and retaining values in old columns? I would back up old table, but problem is that I can't read the values in online mode and back them up, I get this error:


    Connection to plc was over Ethernet, ladder works normally in online mode so I wouldn't say it's a connection issue.

    If new columns cannot be added without losing values, my second question would be: Is it possible to read values via UniApps and save DT to USB stick?

  12. I'll explain the problem I had, maybe it helps somebody.

    I have several controllers that need to have synchronized RTC, and there was a problem that time update didn't work properly. After some troubleshooting I found that "Status" variables need to be defined in order for function blocks to work.

    This does not work (usually):


    This does work:


    Both cases compile the same without error or warning.

    UniLogic version 1.28.34
    PLC USP-070-B08

    • Upvote 1
  • Create New...