Jump to content

Simon

MVP 2014
  • Posts

    595
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by Simon

  1. I'd turn attention to the message format.  You have a message length of 20 characters in the protocol scan, but the message is only 3 characters, including the CR (0D hex).  Reduce your message template to 3 characters and you should see something better.

    In terms of decoding, you have at least 3 options:

    1. Read the raw message then use logic to pull out the 2nd character as the data.  As Aus suggests, you can use the "P" and "R" messages as a redundancy measure. 

    image.png
     

    Set the steam variable to put one character per integer.  that way the second integer in the vector will hold the ascii value of the key that was pressed.

    image.png

    2. Create a variation of the template where the first and last characters are fixed text, and the centre character is linked to an MI.  You would need two templates, one for the "P" messages and one for the "R" messages.

    image.png

    3. Do the "brute force" method and create 24 individual messages and use the "Index of received message" to tell you which key was pressed or released.  Example below for the digits 0...3

    image.png

     

     

    • Thanks 1
  2. 5 hours ago, tim.snelling said:

    If you are interested, this is the reply that I received from my Support Ticket.

    With the UniStream, you can have dozens of devices connect to the PLC on the same port. All you will need to do is set up 1 Modbus TCP slave instance, and point all of your devices to the same port (502).

    So it appears I can delete my Slave on port 503, and all should be good, with dual connections (or more if needed) on port 502 :)

    Tim

     

    Hi Tim,

    Good to have Unitronics confirm that.  I suspected it was the case but have never tried it.

    Simon

  3. 5 hours ago, tim.snelling said:

    If you are interested, this is the reply that I received from my Support Ticket.

    With the UniStream, you can have dozens of devices connect to the PLC on the same port. All you will need to do is set up 1 Modbus TCP slave instance, and point all of your devices to the same port (502).

    So it appears I can delete my Slave on port 503, and all should be good, with dual connections (or more if needed) on port 502 :)

    Tim

     

    Hi Tim,

    Good to have Unitronics confirm that.  I suspected it was the case but have never tried it.

    Simon

  4. I would definitely try a test setup with two ModbusTCP masters polling the single UniStream slave.  As I said it may just work exactly the way the V230 has been working.  If you don't have the actual masters, then test with a PC based emulator.

    I took a quick look and see what you mean about setting up two Modbus configs and two Scan EX blocks in Visilogic. Easy to do.

    If you used UniCAN you would need CAN modules on all PLCs.  But you say you are using a windows PC as the master, so I don't think CAN is the right option.

    It's frustrating that a newer version doesn't do what the old one did.  If you want to push it further with Unitronics, then yes I would open a support ticket.

     

    Hope this helps, Simon

  5. Hi Tim,

    Unilogic doesn't support 2 slaves on the same protocol.

    Since it's ethernet you may find that the two masters can connect and each poll the same slave without issue, this would depend on how rapidly the masters were each polling the slave.  This would definitely be a problem on RS485, but Ethernet can handle some level of simultaneous requests.  I suspect if both masters made a poll request at the same time, one of them would be buffered until the other one was answered, then the buffered request would be answered.

    I understand if you want a more tightly engineered solution, and for that you would need to add something external like the Moxa Mgate product that can allow multiple masters to access a single slave.

  6. It is possible in any way to download log files via the Unistream built-in webpages?

    Firstly I see that the file browser widget is not yet supported in the web page editor.

    However is there another way to embed a log file into a hyperlink on the screen, so the user can just click on the link to download the file into their browser?

    The specific application is energy monitoring and logging, and many self-contained off-the-shelf systems have this type of interface.  They often run on Javascript engines or similar.

    Thanks,

    Simon

  7. Hi Mel,

    I can't see a system function for this, but each HMI screen has the optional "Is Active" tag (bit type).

    image.png

     

    Are you looking for a way to monitor an existing project, or creating from scratch?  Obviously this requires a program change if you are working with an existing project.

    Simon

  8. Hi, these are just my quick comments, but one key thing with autotune and heaters is to choose the right setpoint.  The autotune can get "stuck" or just take a really long time if the wrong setpoint is used.  Autotune drives the process to the setpoint, then applied alternative step changes to the setpoint, about 5-10% above and below the setpoint.  It measures the step response of the process to these changes in setpoint.

    For example, if your ambient temp is 23° C and you choose a setpoint of 30°C the process will ramp up nicely to 30° (or 33°).  However for the negative ramp (back to 27°) it will take a very long time, especially if the process vessel is large and/or insulated, as the difference between the process temp and ambient temp is very small.  On the other hand, if the process temp is 90°C and the vessel is relatively small and uninsulated, the autotune will cycle much faster, as the vessel is able to lose heat quickly once the heater is tuned off.

    Hope this makes sense, it seemed like a complete mystery to me until I worked through it.  My desktop test system is a 5W ceramic resistor inside a plastic cup 🙂

  9. Hi, 

    It's all about the reference point.  First let me say, with the outputs, the diagram you post is consistent with how i've summarised it.

    Regarding the inputs, the diagram you post is showing everything relative to the PLC, which is opposite to how I have summarised it.

    So

    for the PNP input, the external device (sensor, switch) is sourcing, and the PLC input is sinking (current flows from the external device into the PLC input)

    for the NPN input, the external device is sinking, and the PLC input is sourcing. (current flows from the PLC input into the external device)

    so the trick is to understand whether the source/sink terminology refers to the external input device or the PLC input.

    In my explanation, I have used the external device as the reference point.

    There are many ways to represent this, but the physics is consistent 🙂

  10. Hi,

    I think you have the sensor side back to front.  Below are two diagrams from 2 brands of sensors.  The PNP sensor is connected between +24V and the PLC input (load) and the NPN sensor is connected between 0V and the PLC input.

    It's the opposite for outputs.

    The terms Sinking and Sourcing often get used, and that can also be confusing without the right reference point.  It's better to think in terms of current flow rather than voltage.  The sinking and sourcing of current is relative to the signal driver.  And for the purists, we are talking conventional current not electron flow 🙂

    Sourcing - the signal driver is pushing current

    * sourcing input - the driver (sensor) pushes current into the load (PLC input)

    * sourcing output - the driver (PLC output) pushes current into the load (solenoid, relay, etc)

    Sinking - the signal driver is receiving current

    * sinking input - the driver (sensor) receives current from the load (PLC input)

    * sinking output - the driver (PLC output) receives current from the load (solenoid, relay, etc)

     

    I hope that's helpful, I don't claim to have the only way, or the best way, of explaining this.

    image.png

    image.png

×
×
  • Create New...