Jump to content

ORSO2001

Privileged Member
  • Posts

    303
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by ORSO2001

  1. hi

    i think that the "problem" is that you select the input chanel of the URA-0800T analog reader module...this can has only UITN16 range and not negative value...linearization LFB is needed to conver the UINT16 range in the INT16 range...for example 4 mA (positive value) input means -100 (negative value) and 20 mA (always positive) means +23 (positive)...hope that is correct and clear.

  2. hi linnemann

    I think that this happens because also the "function in" variables are consider as "local" so are inizialized at every loop of the program...so the -|P|- will be as a normal -| |-  .

    if you want/need just a "one shot" command you have to reset the used variable at the end of what you need to do.

    consider that a single variable is passed by value...so you have also use a "function out" to reset it...otherwise array and struct are passed as reference...so what you do with the relative "function in" variable will have a direct effect to the global variables.

    hope that is clear but mostly that is right.

  3. Dears

    For the first time I am using the UIS-WCB2 module (twice in this project) and I was managing the relative I/O status for the alarms...I took a look at the online manual and I notice that is not exactly what I have in the I/O informations in the Unilogic software...see attached pictures...so my questions are:

    in the manual i saw a "generic" input and output status as two arrays of 4 UINT8 each one but in the real i have the status of analog input (2 units), temperatere input (2 units), analog output (2 units)...can I consider the same "exception value" for both types of inputs (analog and temperature)?

    the IO-Status is referred at the whole module...are others parameters that I have to consider to detect some malfunction...like internal params or internal info?

    other that is not included in the manual?

    thanks

    WBC2 from help file.png

    WBC2 from Unilogic IO.png

  4. Hi Flex,

    maybe (or for sure) I misunderstood what crash888 said...i though that crash888 was just trying to put the PC and the PLC online (without download the project)...however I did a check and the retain variable take the last value that these has after every reboot and also after a "download" of the project (same project)...just if you select "reset retain variables" these will be reset at the initial value...so...what I am wrong or what I am not understanding about the issue/question (seriously)?

  5. hi curtharrington1

    I don't know if the others PLC brands let you dinamically configure the hardware  installed on the system...but honestly I think not.

    i have had the same "problem" that you have in one of my project...at the time I just set up the "bigger/complete" installation of the I/O modules and added in the project some BIT to enable the checks of the high or low status of the I/O and also to enable or not the alarm report about the module (my own alarm manager)...this works but I don't know if this is a real good practice...at the moment are some years that works without problem... 

  6. i think that you can use a DTI to define the coupling "output : group" and also include the status o each outputs; so you can read/write  (row by row or passing to an array) the status of some contiguos outputs, or check if the position is in a specific group etc....at the end pass the status at the physical outputs

  7. hi steliosliv,

    i will try to anser at your questions...i hope that i will not write wrong informations:

    1) no...the UNILOGIC don't manage the UDFB as an object...so doesn't expose the Inputs and Outputs as attributes.

    2) no...the Input always needs a variable...could be local or global but doesn't accept the direct "power flow" of contacts.

    3) no...by what is wrote at point 1...but obviously you can use the same function many times.

    4) you are right...no local timer is managed by the UDFB...you have to use a different strategy...use the "millis counter"...in other thread, in this forum, I already post an example how to use millis.

    5) Structs and Arrays are always passed by reference...so also if assigned as Input variable (left side of the UDFB) you can modify the value of their members inside the UDFB...so an Output of this Struct or Array is not needed.

    • Like 1
  8. hi Vesp123

    what I meant is that the unistream share a system variable called  "General.Milliseconds Counter" that is an UINT32 variable that start to count the milliseconds from the PLC power ON.

    so you can save, when you want, its value to check how much time is gone...like a timer...obviously, or better I think that is obviously, this procedure need a "finite state machine" logic...so some other variable/s in your struct  will define which steps are you performing for each single struct...attached an example about what i meant.

    MILLIS.ulpr

    • Like 1
  9. hi Vesp123,

    if I well remember the "local tag" can't be |P| or |N|...because these are create and destroyed every cycle..then they can't remember the previously state...then...I have many projects that has to manage many devices in the same way but with different timming...then, usually, I create a struct that contain all the information about the specific device and I pass this struct at the UDFB...then I know if the specific device was "busy" or "free" or "running" or other else every new cycle.

     

×
×
  • Create New...