Jump to content


  • Posts

  • Joined

  • Last visited

Ness's Achievements


Member (2/4)



  1. How can I get multiple values back from multiple SQL statements in a stored procedure in MySQL? Stored Procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `get_test`(OUT var1 INT, OUT var2 INT ) BEGIN SELECT Temperature into var1 FROM `interface`.`setpoints` WHERE Area = 1; SELECT Temperature into var2 FROM `interface`.`setpoints` WHERE Area = 2; SELECT var1, var2; END In MySQL Workbench: CALL `interface`.`get_test`(@a1,@a2); Result Grid shows: var1 | var2 750 | 850 In UniLogic my Query is: CALL get_test(:a,:b); The query executes successfully but doesn't return any values. The two tags tied to the Query Outputs keep their current values and aren't changed. Do I just need the proper SQL incantation to get this working? Or are out parameters not supported with UniLogic?
  2. Here's one way to get a running average. running average.ulpr
  3. I get this too randomly. Closing UniLogic, opening Task Manager, ending the 'Unitronics.Notifier' task, and reopening UniLogic fixes the issue for me. Just closing and reopening UniLogic leaves the program still laggy.
  4. One easy work around is to use a stored procedure, from what I've seem that seems to allow an unlimited number of input parameters.
  5. Actually, running some more tests I'm able to write a ton of the rows to the DTI without issue.. trying to narrow down what is actually causing the issue.
  6. Does this DTI digital signing also apply to "Write Row to DTI" ? We are getting the "CPU Watchdog Activated" for multiple DTI writes in 1.30 where we weren't in 1.28.
  7. Yeah, I really like the UniLogic ladder editor for the most part but not being able to view more tag characters is my #1 gripe. I find myself using shortened tag names for a lot of things just so I can read rungs at glance without mousing over everything.
  8. Support pointed me to a software build 1.29.138 which fixed the issue!
  9. We're having the exact same issue as Daniel_EWW. 1.28 works fine. Upgrade to 1.29 and the Modbus serial NumOfClients starts to grow, hits 165 and dies. This is with a single Modbus device as a master and the PLC is the slave.
  10. Maybe use two PID configurations - one is active when the PV is above a set point, the other active when the PV is below. Or maybe just toggle the 'Reverse Action' bit when the (SP > PV) and back when (SP < PV) if the heating/cooling behavior is similar.
  11. Do you get a status for the drain valve? If not you could just start calculating flow when the tank volume changes by a certain amount. If you get feedback from both valves I would just do something like record the time it takes for each 1% level change when a valve is open. You can then just do: flowrate = (1% tank_volume)/(delta_time) I guess it mostly depends on what you want to use the measurement for. It also sounds like it's either only filling or draining. If both the fill and drain valve can be open at the same time you could have a situation where you're filling at 4 GPM and draining at 4 GPM and calculate a flow rate of 0 GPM.
  12. It looks like you already know the volume (or it's simple to calculate) and you want to calculate the flow rate? Wouldn't it be easier to calculate the flow rate in the PLC and send the result via MQTT?
  13. Thanks for the tip about printing to PDF! It looks like it displays twice the number of tag characters as the editor itself - I wish this was possible in the editor. I've tried installing UniLogic in a Linux VM with Wine and in Windows Sandbox. Sadly SQL Server doesn't work under either.
  • Create New...