Jump to content

pascal

Members
  • Posts

    97
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by pascal

  1. Hi, 

    maybe I'm doing something wrong or I'm missing something in my mind 😁

    I have a URB-TCP remote IO with expansion module DI02E (fast counter)

    i'm using the first input as a counter up ->  counter mode 0Xb02

    so unilogic is making in IO ->

     URB adapter input a page with 2 inputs Uint32 and a output page with some bits ( state of the countermode)

    when I put a 24V signal pulse to my input , then I hoped the value of the input value 0 (Uint32) would go from 0 to 1, and when giving another pulse to the input he goes from 1 to 2 and so on....

    but no, nothing is changing ...... the value of the counter is staying at 0....

    Am I missing something here ? 

  2. Stef,

    had the same problem, but I managed to "convert" the float to real : the problem is that when you read a float trough modbus, the bytes are swapped.

    you read a float and receive 4 bytes ->  this is the way I convert the floating value into a real value

    image.thumb.png.d681829f1bc90c2a649f07a9ac595390.png

    I read the float as a buffer of 4 bytes , then I swap the bytes 

    first byte you receive is in fact the 3th byte of the real

    second is the 4th byte - third byte is the 1st byte and last byte you receive is the 2nd byte

    a good idea is to check it with this link : https://www.h-schmidt.net/FloatConverter/IEEE754.html

     

     

  3. just found out :

    in properties of your 4..20mA input, you can determine the values of 4 and 20 mA -> if in your setup 4mA = 0% and 20mA=100%, then you just put these numbers in the properties, so unilogic itself is calculating everything for you 😁

    in my example -> 4mA = 4900 and 20mA=1400..... (measuring the filling height seen from the top of a tank - my sensor returns  not 4..20mA but 20..4mA)

    image.png.331e53fb671888b861c5be5ca411e9ff.png

  4. BACNET.....

    strange thing....

    The only thing I struggled with is -> when talking bacnet, if the BAS (building automation system) wants to talk to the PLC, you should consider that the PLC is to be configure as a server ! not slave....

    I have here a unistream PLC with the same problem's. I use my unistream as the BAS master and want to read (and write) several bacnet objects from different "participants"

    let's explain : My unistream is the master controller in the BAS, there are several devices (bacnet devices) connected (via IP) to my LAN. I want to read eg. the actual temperature from a bacnet thermostat, do some calculations and wants to write an analog value to a valve (also a bacnet object). This can not be done by the Unistream PLC ! because it only act as a server ( a stupid bacnet device). For this reason, I use KEPWARE with advanced tags option -> this software act as a smart device -> reads all bacnet participants "objects" and redirects the values from the bacnet object to the corresponding participant -> read present value object xx from bacnet device 1 and write it to present value of object yy of bacnet device 2...   tested and works fine !

    (it's not a cheap solution, but it's the only software I found who can do this)

    to check if you are talking bacnet, you can install "yabe" -> a free software to read all bacnet objects and see all the values...

     

    • Upvote 1
  5. I putted a widget on my HMI (and webpage) to see my data table ( and of course to edit it). Every PLC scan I read some data of my table, update it and stores it in the table. (like running hours...)

    But when I want to edit a variable of my table, sometimes I manage to do, sometimes I don't. I put my table in EDIT ON mode, select the appropriate field I want to edit, but suddenly the cursor disappears...

    unilogic version 1.31.125

  6. jmech,

    So you connect a "TPC/IP to RS485 translator" to your ethernet port to communicate with a rs485 device. So you don't need to set the baud of your ethernet connection...

    I had also some troubles with modbus com.....

    sometimes you ask the content of 1 register, but the slave answers with a bunch of registers.... So unilogic expects a modbus receive of 4 bytes, but the slave answers with 42 bytes...

    how to test -> make a modbus master of your PLC and read 1 register into a buffer......

    sometimes register 300001 is at adress 0.... or at adres 1.... 

    MODBUS is always exiting to program 😂😂

    I think modbus developers invented the enigma coding machine....

  7. I have following question :

    I'm using modbus communication to read some values of a powermeter. Instead of reading 40 variables - one by one - I read them in one modbus cyle, into a buffer...

    with the command buffer to struct, I can copy the values from the buffer to the struct. But when defining the structure, can I be 100% sure that the position of my variables in the structure is like I programmed the structure ?

    I give an example :

    I read 12 bytes via modbus ( 3 floating values) into buffer read[0..11]

    I have a struct with variables float1 - float 2 - float 3

    then I use buffer to struct....

    are the first 4 bytes going to float1, second 4 bytes to float 2 and last 4 bytes to float3 ? I tested this, yes they do......but is this always like this?

    I need to know if when recompiling the program, or copying this UDFB to another PLC program, will be always working with the "correct postioned" structure... 

     

  8. I had the same problem, stopping the sampler, and in the next cycle of the program I start the sampler. This doesn't work. I have to let the PLC doing another run 1 cycle and then I can restart the sampler...

    maybe a status bit would be nice to say that file is being saved, so we can use this bit for restarting the sampler...

  9. I want to store a specific string (read fixed) to a "string tag" according a value.  If value = 1, then string should be "OK" - value = 2, string is "NOT OK", value = 3, string is "FAULT...",....

    OK, I know I can do this with the compare instructions, but I want to do this with the switch case instruction....😎

    suggestions anybody ?

  10. I have a project with a USP-104-B10 and several URB remote I/O modules connected.

    When I add an IN or OUT module on the USP-104-B10 and then I export the IOtags to Excel, then the modules are not ordened anymore...

    the last added IO module is putted at the end of the excel file...even this is the first module of the project

    isn't it possible to export the IO/tags in order they are on the PLC ? 

  11. Hi,

    I rewrote my program, so I divided the large rungs into more rungs.

     

    But still I have a question and problem.

     

    Is it possible that the PLC reads a bad value from the datatables while the data tables are updated with " remote access " ?

     

    Every cycle I read the data table, but the customer changed the values of the data table and suddenly he had wrong values ?

    I checked the program, but couldn't find any wrong programming.

  12. Ok,

     

    I think this will be the problem ( bad programming of me ! )

     

    But 1 question about this issue :

     

    is the order of commands execution always the same, or can it change in time. The most of the time, I get "good" values, but suddenly I get a wrong one !

    Or is the time needed for an read data table column and put the values into the MI's taking some time, so this is sometimes slower and I get "bad" result.

    this is because I want to explain my customer why the PLC sometimes gives the "wrong" values. 

  13. I have the following problem :

     

    In net 1, I read a column of a data table in MI100 ... MI 109 

    in the same net (net 1) I search a certain value in the MI100...MI109, with a CALL subroutine that returns a returnvalue.

     

    Is this allowed, or should I search this value in another net ?

     

    Because sometimes (not always) I don't have the correct  returnvalue ?

     

    program look likes this :

     

     read column and write to MI 100...MI 109  // search value into MI 1 // call subroutine for searching where MI 1 is in MI 100...MI 109 // put return value into MI 2 ( all this is place in one net ! )

     

    or should it be like this ?

     

    net 1 : read column and write to MI 100...MI 109

    net 2 :search value into MI 1

    net 3 : call subroutine for searching where MI 1 is in MI 100...MI 109

    net 4: put return value into MI 2 

     

    before I change my program, I want to know if this is the problem of bad readings !

     

     

     

     

     

  14. I've made a project where the user has the abbility of changing his "receipts" in the data tables.

    I have 10 different receipts (so 10 different data tables the user can modify), but when i am executing the receipt, I copy the values of the asked receipt into a new data table (called the working data table).

    The problem is that the user also can modify the "working data table" and this is not wanted.

    Is there a possibility to set or unset the viewing of certain data tables (customer uses the remote access software to change the receipts)

     

    is there a way to reorder the data tables ( now they appear in the order we programmed the data tables)

  15. When downloading a project to a V570, with the option to syncronize the time between PC and PLC the UniDownloader (ver 5.0.07) will fail to do !

    first it will syncornise the time, but the PLC stops running and the only way to "run" the PLC is via the sofware visilogic.

    I'm not able to restart the PLC with the Debug screen.

    The only way the downloader works is to upgrade only the application

    (did not tried to download the bin,boot and OS)

    all software (on PC and PLC) are the latest version

  16. I have a customer who wants to use excel to download and read the MI's from the PLC.

    This you can do with UNIDDE, but we can only read/write the memory of the PLC.

     

    Is there an easy way to read/write the data from the data table's via UNIDDE ?

    • Like 1
×
×
  • Create New...