Jump to content

ORSO2001

Privileged Member
  • Posts

    303
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by ORSO2001

  1. hi seems that you are receiving a REAL number as a string. the decimals will be always 2 or could be 1 or 3 or other? how "large" could be the end number?...what range?
  2. hi xXJEQTXx i don't know your program and your needs but I think that you have to "plan" your program to do just what is needed and no extra tasks...i mean that you have, maybe, think about a FSM (finite state machine) and let run just the function that you need. also..if your program use serial communication I suggest you to calculate what is the frequency of the updating that you really need and the real time needed at the connected "device" to have new data available.
  3. hi All, so...i need to manage an external "numeric keypad"; so I already bought a standard one (I think)...the keypad has the numbers from 0 to 9, the operator "+, - /, *" has the dot "." , also has a "DEL", "recall Calculator", "Enter", "bloc num" buttons. I tried the example program that add the pushed button of the keypad to a string that is displaied in the HMI; when I connect th eexternal keypad it is recognized as HID device and the display ask to reboot (I did). so...the numeric buttons are recognized and properly added to the string; the operators are recognized and added to the string but all the others are "dropped"...also the "." is dropped...there is a way to check what is the data sent by the keypad to the PLC (USB port) by a HID device? at the end i need to couple, at the "dropped" buttons, some special function. hope tha is clear...thanks
  4. thanks NoamM, it was from 2016..i don't remember exactly how but I already have had the answer...however...exist a variable, like a system struc, that show the step pf this procedure?
  5. what do you mean about "still not having any luck..."? what error code the modbus struct return?
  6. hi Rog, post what you did (may will be enough some picture about how you set the modbus)...and in my opinion the "problem" is understand how the floats variables works...you need to transfer the two INT16 registers (2*2 = 4 bytes) in a BUFFER of 4 bytes then transfer this BUFFER in a REAL variable; let me say that in my test the 4 bytes 41-DB-72-37 give a temperature of 27.430770.
  7. I also did a test...with USP-070-x10/x08 and Unilogic App 1.33.348 and when i use a timer inside a UDFB it works as described by timboekhorst. then i downgrade at version 1.26.90 and the problem still be present...also if the timer is managed as FunctionIn variable, so inside the UDFB i have a local timer, the counter still count...and every timer works in the same way...for example the TON doesn't restart when the RLO is off...with the timer in the main function block all seems works fine. hope that is helpful for the debug...
  8. ciao considering that you have to have a variable like UINT32 or INT32 called "revolutions" ...i think that the faster way is ... revolutions = PAR543 * 65536...then revolutions = revolutions + PAR544 ... so use the FB "multiplication" then the FB "addition".
  9. hi timboekhorst, seems strange...or better I never had problem with timers like you described...in my opinion you have to perform some debugs like: check if the "current" variable of your timer is call somewhere in the program insert one or more "activation counter" in the same row where your UDFB is called...to be sure that BITs command are not flikering for some reasons.
  10. Hi Gabriel i think that you have to use retain variables...so you haven't to write directly on the IO but you have to set the variables..then in some points of your project check the value of the variable and set the IO.
  11. a simple example with 2 timers... timer on off.ulpr
  12. Hi MELDAW, i think you have two ways to do this...or using 2 timers (1 for the ON status and other for the OFF status) or using the "activation time counter", that is an internal variable of the PLC (UINT32 if I well remember) that count the millisecond....and compae it with 2 variables for the ON and OFF status. hope that is clear enough...
  13. Fully agree....also with what was said later...
  14. Hi MELDAW, as i wrote in my previously post each "item" that you have to manage by the PID has to have its own PID blocs (PID config and PID AT params) ...this because these blocs have internaly an array of value that changes dduring th ePID calculation...than...that are corelated at the SP and PV ...so continuously modify the SP and the PV will not give you good result.
  15. hi MELDAW, each process has to have its own PID blocs (PID config and PID AT params) and each one has to run "individually"...or better you can create a generic FB that manage as FunctionIn the PID blocs. what I usually did is create a DTI that contain exactly the PID parameters struct, and other informations, to store and upload when the autotune is performed or the PLC is reboot.
  16. hi MELDAW sorry but I am not sure to have properly understood what you mean...please can you explain in other way or with an example?
  17. Hi MELDAW, you have to consider the string variable as a classic C/C++ char array that end with a null pointer. so when you create a string variable the PLC will instace a char array with one more position for the null pointer. every time that set a new "value" or modify actual "value" of this char array th ePLC will automatically set the null pointer at the right position (leght+1 is the last position) to define that the "value" is finished...for example...a string variable with 10 position but without any "start value" will have the null pointer at the first position; when you will assing the value "hello" the null pointer will be moved at the 5th position...so the system will know that the variable "value" start with "h" and stop with "o" and its length is 5... so...the "compare" FB checks if both string has the same length and all single position has the same value...if it is the power line will flow otherwise not. so a string variable of 10 elements that contain the value "hello" and the constant string "hello" are the same.
  18. hi MELDAW, ok...so if I well understood you is thinking about a DTI recipe because each row of the DTI will be a step of the recipe...something like that!? however...maybe you can save the name of the files that you will create in a file (from a DTI) so, in the same way of my example, you can navigate and select the "name" that you will append at the string that rappresent the name of the file. otherwise you have to take a look at the "file browser" or "file selector browser" in the MANAGEMENT TOOLS of the HMI toolbox
  19. Hi MELDAW, here a really short example about what I mean...built with release 1.33.236 DTI_CSV_MANAGEMENT.ulpr
  20. Hi MELDAW, ok...i don't know how complex is the recipe...but I can suggest to think about the implemetation of the recipe "name" in the struct that already contain the datas for the recipe...so you will just append the new receipe in just one file and you will navigate in this file to check/show the receipes that users had insert...so will be not needed some files browser to check what files was created...hope that is clear and that can be acceptable for you.
  21. hi Gabriel, 100 rows is a small table...so I think that you can use the "for loop function" or something like that to check all the row in a very short time.
  22. hi MELDAW, where the CSV file will be located/stored and who/when/how the CSV files will be created?...i mean you will created a CSV file referred at the current data then when the day is gone you will saved it or user will create its own, let me say, "recipe" then you want recall these? or you know from the begin what will be the CSV files name?...other!?
  23. Hi Gabriel if i well remember Unilogic doesn't has this kind of FB for the DTI...however I think that an own implementation of this will be not so hard...how many rows in the table?
  24. Hi rockber in the Toolbox under the PID FB group you will find "Reset PID autotune"; at this FB you have to pass your PID_Config struct....so the bit wil be reset until the new autotune will be complete (properly).
×
×
  • Create New...